# Proofs

proof_type: f_proof
decl_type: formula
library: reals
theory: quadratic
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (split)
   (("1"
     (flatten)
     (split)
     (("1" (lemma "roots_ge_0") (inst?) (assert))
      ("2" (flatten) (lemma "roots_le_ge_0") (inst?) (assert))))
    ("2"
     (flatten)
     (case "root(a,b,c,eps) = 0")
     (("1"
       (hide -2)
       (lemma "root_eq_0")
       (inst?)
       (assert)
       (flatten)
       (assert)
       (assert)
       (case "b=0")
       (("1" (assert))
        ("2" (replaces -2) (hide -) (mult-cases 2) (grind))))
      ("2" (lemma "root_gt_0") (inst?) (assert) (ground))
      ("3" (propax))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: quadratic
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (split)
   (("1"
     (flatten)
     (split)
     (("1" (flatten) (lemma "roots_lt_0") (inst?) (assert))
      ("2"
       (flatten)
       (case "c=0")
       (("1"
         (assert)
         (lemma "roots_le_ge_0")
         (inst -1 "a" "b" "c" "-eps")
         (assert)
         (flatten)
         (lemma "root_eq_0")
         (inst -1 "a" "b" "c" "eps")
         (assert)
         (replaces -1)
         (hide-all-but (-5 -6))
         (mult-cases -2)
         (("1" (grind)) ("2" (grind))))
        ("2"
         (hide -3)
         (lemma "roots_lt_gt_0")
         (inst -1 "a" "b" "c" "-eps")
         (assert))))))
    ("2"
     (flatten)
     (lemma "roots_lt_0")
     (inst?)
     (assert)
     (replaces -1)
     (lemma "roots_le_ge_0")
     (inst -1 "a" "b" "c" "-eps")
     (assert)
     (flatten)
     (assert)
     (lemma "root_eq_0")
     (inst?)
     (assert)
     (ground)
     (neg-formula -2)
     (replaces -1)
     (hide-all-but (1 2 3))
     (mult-cases 1)
     (grind))))


proof_type: f_proof
decl_type: formula
library: reals
theory: quadratic
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (split)
   (("1"
     (flatten)
     (split)
     (("1" (lemma "roots_le_0") (inst?) (assert))
      ("2"
       (flatten)
       (lemma "roots_le_ge_0")
       (inst -1 "a" "b" "c" "-eps")
       (assert))))
    ("2"
     (flatten)
     (case "root(a,b,c,eps) = 0")
     (("1"
       (hide -2)
       (lemma "root_eq_0")
       (inst?)
       (assert)
       (flatten)
       (assert)
       (case "b=0")
       (("1" (assert))
        ("2" (assert) (replaces -2) (hide -) (mult-cases 2) (grind))))
      ("2" (lemma "root_lt_0") (inst?) (assert) (ground))
      ("3" (propax))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: quadratic
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem 1 ("a" "b" "c" "x"))
   (flatten)
   (expand "root")
   (ground)
   (expand "discr")
   (expand "sq")
   (ground))


proof_type: f_proof
decl_type: formula
library: reals
theory: quadratic
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem 1 ("a" "b" "c" "x"))
   (case "discr(a, b, c) >= 0")
   (("1"
     (assert)
     (use "quadratic_aux")
     (name-replace "X1" " (x - root(a, b, c,1))" :hide? nil)
     (name-replace "X2" " (x - root(a, b, c,-1))" :hide? nil)
     (assert)
     (replace -3 :hide? t)
     (rewrite "zero_times3")
     (rewrite "zero_times3")
     (replace -1 :dir rl :hide? t)
     (replace -1 :dir rl :hide? t)
     (prop)
     (("1" (assert)) ("2" (assert)) ("3" (assert)) ("4" (assert))))
    ("2" (assert) (use "discr_ge_0") (prop))))


proof_type: f_proof
decl_type: formula
library: reals
theory: quadratic
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem 1 ("a" "b" "c"))
   (prop)
   (("1"
     (lemma "quadratic_eq_0")
     (inst -1 "a" "b" "c" "root(a,b,c,1)")
     (inst 1 "root(a,b,c,1)")
     (prop))
    ("2" (skosimp*) (use "discr_ge_0") (prop))))


proof_type: f_proof
decl_type: formula
library: reals
theory: quadratic
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (case "a!1 > 0")
   (("1" (use "a_gt_0_discr_ge_0") (assert))
    ("2" (hide 3) (typepred "a!1") (use "a_lt_0_discr_ge_0") (assert))))


proof_type: f_proof
decl_type: formula
library: reals
theory: quadratic
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem 1 ("a" "b" "c" "x"))
   (case "discr(a, b, c) >= 0")
   (("1"
     (assert)
     (lemma "quadratic_aux")
     (inst?)
     (name-replace "X1" " (x - root(a, b, c,1))" :hide? nil)
     (name-replace "X2" " (x - root(a, b, c,-1))" :hide? nil)
     (assert)
     (replaces -3)
     (lemma "root_le")
     (inst?)
     (case "a > 0")
     (("1" (expand "sign") (assert) (real-props 1) (ground))
      ("2" (expand "sign") (assert) (real-props 2) (ground))))
    ("2"
     (assert)
     (lemma "not_solvable_quadratic")
     (inst?)
     (assert)
     (split -1)
     (("1" (inst-cp - "x") (inst - "0") (rewrite "sq_0") (assert))
      ("2" (inst-cp - "x") (inst - "0") (rewrite "sq_0") (assert))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: quadratic
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem 1 ("a" "b" "c" "x"))
   (case "discr(a,b,c) >= 0")
   (("1"
     (assert)
     (lemma "quadratic_aux")
     (inst?)
     (name-replace "X1" " (x - root(a, b, c,1))" :hide? nil)
     (name-replace "X2" " (x - root(a, b, c,-1))" :hide? nil)
     (assert)
     (replaces -3)
     (lemma "root_le")
     (inst?)
     (assert)
     (case "a > 0")
     (("1" (expand "sign") (assert) (real-props 1) (ground))
      ("2" (expand "sign") (assert) (real-props 2) (ground))))
    ("2"
     (assert)
     (lemma "not_solvable_quadratic")
     (inst?)
     (assert)
     (split -1)
     (("1" (inst-cp - "x") (inst - "0") (rewrite "sq_0") (assert))
      ("2" (inst-cp - "x") (inst - "0") (rewrite "sq_0") (assert))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: quadratic
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (split)
   (("1"
     (flatten)
     (case "aa = 0")
     (("1"
       (assert)
       (replaces -1)
       (expand "solvable?")
       (assert)
       (expand "solution")
       (assert)
       (grind-reals))
      ("2"
       (assert)
       (hide 2)
       (lemma "quadratic_eq_0")
       (inst?)
       (assert)
       (flatten)
       (expand "solvable?")
       (assert)
       (flatten)
       (assert)
       (expand "solution")
       (assert))))
    ("2"
     (flatten)
     (split)
     (("1" (grind))
      ("2"
       (flatten)
       (expand "solvable?")
       (split -1)
       (("1" (flatten) (expand "solution") (assert))
        ("2"
         (flatten)
         (lemma "quadratic_eq_0")
         (inst?)
         (expand "solution")
         (assert)
         (flatten)
         (assert))))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: quadratic
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "quadratic")
   (lemma "quadratic_eq_0")
   (inst?)
   (ground)
   (("1" (inst 1 "1")) ("2" (inst 1 "-1"))
    ("3" (skeep -2) (typepred "eps") (assert))))


proof_type: f_proof
decl_type: formula
library: reals
theory: quadratic
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "quadratic")
   (lemma "quadratic_eq_0_full")
   (inst?)
   (replaces -1)
   (split)
   (("1"
     (flatten)
     (split -1)
     (("1" (propax))
      ("2"
       (flatten)
       (assert)
       (split -2)
       (("1" (inst 2 "-1")) ("2" (inst 2 "1"))))))
    ("2"
     (flatten)
     (split -1)
     (("1" (propax))
      ("2" (flatten) (assert) (skeep -2) (typepred "eps") (assert))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: convex_functions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "convex?")
   (skeep)
   (expand "o")
   (inst -2 "x" "y" "t")
   (assert)
   (inst - "f(t * x - t * y + y)" "f(y) - t * f(y) + t * f(x)")
   (assert)
   (inst - "f(x)" "f(y)" "t")
   (assert))


proof_type: f_proof
decl_type: formula
library: reals
theory: convex_functions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "convex?")
   (skeep)
   (inst?)
   (inst?)
   (assert)
   (hide -3)
   (hide -3)
   (case "f(t * x - t * y + y) >= g(t * x - t * y + y) or f(t * x - t * y + y) < g(t * x - t * y + y)")
   (("1"
     (case "f(y) >= g(y) or f(y) < g(y)")
     (("1"
       (case "f(x) >= g(x) or f(x) < g(x)")
       (("1"
         (prop)
         (("1" (expand "max") (assert))
          ("2"
           (expand "max")
           (assert)
           (mult-by -2 "(1-t)")
           (mult-by -3 "t")
           (assert))
          ("3"
           (expand "max")
           (assert)
           (mult-by -2 "(1-t)")
           (mult-by -3 "t")
           (assert))
          ("4"
           (expand "max")
           (assert)
           (mult-by -2 "(1-t)")
           (mult-by -3 "t")
           (assert))
          ("5"
           (expand "max")
           (assert)
           (mult-by -2 "(1-t)")
           (mult-by -3 "t")
           (assert))
          ("6"
           (expand "max")
           (assert)
           (mult-by -2 "(1-t)")
           (mult-by -3 "t")
           (assert))
          ("7"
           (expand "max")
           (assert)
           (mult-by -2 "(1-t)")
           (mult-by -3 "t")
           (assert))
          ("8" (expand "max") (assert))))
        ("2" (mult-by -3 "t") (hide-all-but 1) (grind))))
      ("2" (hide-all-but 1) (grind))))
    ("2" (hide-all-but 1) (grind))))


proof_type: f_proof
decl_type: formula
library: reals
theory: convex_functions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "convex?")
   (skeep)
   (inst - "x" "y" "t")
   (inst - "x" "y" "t")
   (assert)
   (expand "+")
   (assert))


proof_type: f_proof
decl_type: formula
library: reals
theory: convex_functions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "convex?")
   (skeep)
   (inst - "x" "y" "t")
   (expand "*")
   (assert)
   (factor 1)
   (mult-by -1 "aaa")
   (assert))


proof_type: f_proof
decl_type: formula
library: reals
theory: convex_functions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (name "tt" "(C-A)/(B-A)")
   (("1"
     (label "ttname" -1)
     (case "1-tt = (B-C)/(B-A)")
     (("1"
       (label "ottname" -1)
       (expand "convex?")
       (inst - "B" "A" "tt")
       (case "A + tt * B - tt * A = C")
       (("1"
         (replace -1)
         (assert)
         (split)
         (("1"
           (case-replace "(B - C) / (C - A) = (1-tt)/tt")
           (("1"
             (case-replace "(B - A) / (C - A) = 1/tt")
             (("1"
               (field 1)
               (replace "ttname" + rl)
               (cross-mult 1)
               (assert))
              ("2" (cross-mult 1) (assert))))
            ("2" (cross-mult 1) (field 1))))
          ("2" (replace "ttname" + rl) (cross-mult 1) (assert))
          ("3" (replace "ttname" + rl) (cross-mult 1) (assert))))
        ("2" (replace "ttname" + rl) (field 1))))
      ("2" (replace "ttname" + rl) (field 1))))
    ("2" (assert))))


proof_type: f_proof
decl_type: formula
library: reals
theory: convex_functions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (lemma "convex_function_right_lt")
   (skeep)
   (inst - "A" "B" "C" "f")
   (assert)
   (field -1)
   (field 1))


proof_type: f_proof
decl_type: formula
library: reals
theory: convex_functions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (case "x = y")
   (("1" (inst + 0) (assert))
    ("2"
     (inst + "(y-z)/(y-x)")
     (("1"
       (prop)
       (("1" (cross-mult 1) (assert)) ("2" (cross-mult 1) (assert))
        ("3" (mult-by 1 "(y-x)") (field))))
      ("2" (assert))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: convex_functions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "between_point_is_wtd_av")
   (inst - "x" "y" "z")
   (assert)
   (skosimp*)
   (inst + "(1-t!1)")
   (assert))


proof_type: f_proof
decl_type: formula
library: reals
theory: convex_functions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (case "w!1 >= y!1")
   (("1"
     (expand "convex?")
     (name "ttt" "(y!1-x!1)/(w!1-x!1)")
     (("1"
       (label "tname" -1)
       (inst - "w!1" "x!1" "ttt")
       (prop)
       (("1"
         (case "x!1 + ttt * w!1 - ttt * x!1 = y!1")
         (("1"
           (replace -1)
           (label "yname" -1)
           (inst - "y!1")
           (assert)
           (replace -6 - rl)
           (both-sides "-" "f!1(x!1)+ttt*f!1(x!1)" -2)
           (assert)
           (cancel-by -2 "ttt")
           (replace "tname" + rl)
           (cross-mult 1)
           (assert))
          ("2"
           (replace "tname" + rl)
           (hide-all-but 1)
           (mult-by 1 "(w!1 - x!1)")
           (assert)
           (grind)
           (field 1))))
        ("2" (replace "tname" + rl) (cross-mult 1) (assert))
        ("3" (replace "tname" + rl) (cross-mult 1) (assert))))
      ("2" (assert))))
    ("2"
     (case "w!1 < x!1")
     (("1"
       (expand "convex?")
       (name "ttt" "(x!1-w!1)/(y!1-w!1)")
       (("1"
         (label "tname" -1)
         (inst - "y!1" "w!1" "ttt")
         (prop)
         (("1"
           (case "w!1 + ttt * y!1 - ttt * w!1 = x!1")
           (("1"
             (replace -1)
             (label "xname" -1)
             (inst - "y!1")
             (assert)
             (replace -6 - rl)
             (both-sides "-" "ttt*f!1(x!1)" -2)
             (assert)
             (factor -2)
             (name "GEE" "(1-ttt)")
             (replace -1)
             (div-by -3 "GEE")
             (case "ttt < 1")
             (("1" (assert))
              ("2" (replace "tname" + rl) (cross-mult 1) (assert))))
            ("2"
             (replace "tname" 1 rl)
             (mult-by 1 "(y!1 - w!1)")
             (field 1))))
          ("2" (replace "tname" + rl) (cross-mult 1) (assert))
          ("3" (replace "tname" + rl) (cross-mult 1) (assert))))
        ("2" (assert))))
      ("2" (inst - "w!1") (assert))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: convex_functions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (skeep)
   (lemma "between_point_is_wtd_av")
   (inst - "x" "y" "w")
   (assert)
   (skosimp*)
   (expand "convex?")
   (inst - "x" "y" "t!1")
   (assert)
   (replace -3 - rl)
   (inst - "w")
   (case-replace "f(y) - t!1*f(y) = (1-t!1)*f(y)")
   (("1" (grind)) ("2" (grind))))


proof_type: f_proof
decl_type: formula
library: reals
theory: convex_functions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (skeep)
   (lemma "between_point_is_wtd_av")
   (inst - "x" "y" "w")
   (assert)
   (skosimp*)
   (expand "convex?")
   (inst - "x" "y" "t!1")
   (assert)
   (replace -3 - rl)
   (inst - "w")
   (assert))


proof_type: f_proof
decl_type: formula
library: reals
theory: convex_functions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (label "convexf" -1)
   (label "Ax" -2)
   (label "Bx" -3)
   (label "fac" -4)
   (label "fbc" -5)
   (label "fxc" 1)
   (lemma "between_point_is_wtd_av2")
   (label "bpwa" -1)
   (inst - "A" "B" "x")
   (assert)
   (skosimp*)
   (expand "convex?")
   (inst - "B" "A" "t!1")
   (assert)
   (copy "fac")
   (mult-by -1 "1-t!1")
   (copy "fbc")
   (mult-by -1 "t!1")
   (add-formulas -1 -2))


proof_type: f_proof
decl_type: formula
library: reals
theory: convex_functions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (skeep)
   (expand "convex?")
   (inst - "x" "y" "t")
   (assert)
   (mult-by -2 "t")
   (mult-by -3 "1-t")
   (add-formulas -2 -3))


proof_type: f_proof
decl_type: formula
library: reals
theory: convex_functions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "convex_btw_pt_left_lt")
   (inst - "x" "w" "f(w) + (f(v)-f(w))/2" "f" "v")
   (assert)
   (split)
   (("1" (case "x = v") (("1" (replace -1) (inst - "w")) ("2" (assert))))
    ("2" (inst - "w") (assert))))


proof_type: f_proof
decl_type: formula
library: reals
theory: convex_functions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "convex_btw_pt_left_lt")
   (inst - "w" "x" "(f(v)-f(w))/2 + f(w)" "f" "v")
   (assert)
   (inst - "w")
   (assert))


proof_type: f_proof
decl_type: formula
library: reals
theory: convex_functions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "strictly_convex?")
   (expand "convex?")
   (skeep)
   (case "t = 0")
   (("1" (replace -1) (assert))
    ("2"
     (case "t = 1")
     (("1" (replace -1) (assert)) ("2" (inst - "x" "y" "t") (assert))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: convex_functions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "strictly_convex?")
   (inst - "x!1" "y!1" "1/2")
   (assert)
   (inst - "1 / 2 * x!1 - 1 / 2 * y!1 + y!1")
   (grind))


proof_type: f_proof
decl_type: formula
library: reals
theory: convex_functions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "strictly_convex?")
   (prop)
   (inst - "x!1" "y!1" "1/2")
   (assert)
   (inst - "1 / 2 * x!1 - 1 / 2 * y!1 + y!1")
   (assert)
   (hide -1)
   (grind))


proof_type: f_proof
decl_type: formula
library: reals
theory: convex_functions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "strictly_convex?")
   (expand "convex?")
   (skeep)
   (expand "o")
   (inst -2 "x" "y" "t")
   (assert)
   (inst - "f(t * x - t * y + y)" "f(y) - t * f(y) + t * f(x)")
   (assert)
   (inst - "f(x)" "f(y)" "t")
   (assert))


proof_type: f_proof
decl_type: formula
library: reals
theory: convex_functions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "strictly_convex?")
   (skeep)
   (inst?)
   (inst?)
   (assert)
   (hide -3)
   (hide -3)
   (case "f(t * x - t * y + y) >= g(t * x - t * y + y) or f(t * x - t * y + y) < g(t * x - t * y + y)")
   (("1"
     (case "f(y) >= g(y) or f(y) < g(y)")
     (("1"
       (case "f(x) >= g(x) or f(x) < g(x)")
       (("1"
         (prop)
         (("1" (expand "max") (assert))
          ("2"
           (expand "max")
           (assert)
           (mult-by -2 "(1-t)")
           (mult-by -3 "t")
           (assert))
          ("3"
           (expand "max")
           (assert)
           (mult-by -2 "(1-t)")
           (mult-by -3 "t")
           (assert))
          ("4"
           (expand "max")
           (assert)
           (mult-by -2 "(1-t)")
           (mult-by -3 "t")
           (assert))
          ("5"
           (expand "max")
           (assert)
           (mult-by -2 "(1-t)")
           (mult-by -3 "t")
           (assert))
          ("6"
           (expand "max")
           (assert)
           (mult-by -2 "(1-t)")
           (mult-by -3 "t")
           (assert))
          ("7"
           (expand "max")
           (assert)
           (mult-by -2 "(1-t)")
           (mult-by -3 "t")
           (assert))
          ("8" (expand "max") (assert))))
        ("2" (mult-by -3 "t") (hide-all-but 1) (grind))))
      ("2" (hide-all-but 1) (grind))))
    ("2" (hide-all-but 1) (grind))))


proof_type: f_proof
decl_type: formula
library: reals
theory: convex_functions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "strictly_convex?")
   (skeep)
   (inst - "x" "y" "t")
   (inst - "x" "y" "t")
   (expand "+")
   (assert))


proof_type: f_proof
decl_type: formula
library: reals
theory: convex_functions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "strictly_convex?")
   (skeep)
   (inst - "x" "y" "t")
   (expand "*")
   (assert)
   (mult-by -1 "a")
   (assert))


proof_type: f_proof
decl_type: formula
library: reals
theory: convex_functions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (label "convexf" -1)
   (label "Ax" -2)
   (label "Bx" -3)
   (label "fac" -4)
   (label "fbc" -5)
   (label "fxc" 1)
   (lemma "between_point_is_wtd_av2")
   (label "bpwa" -1)
   (inst - "A" "B" "x")
   (assert)
   (skosimp*)
   (expand "strictly_convex?")
   (inst - "B" "A" "t!1")
   (assert)
   (copy "fac")
   (mult-by -1 "1-t!1")
   (copy "fbc")
   (mult-by -1 "t!1")
   (add-formulas -1 -2))


proof_type: f_proof
decl_type: formula
library: reals
theory: convex_functions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "convex?")
   (skeep)
   (lemma "complete_square")
   (copy -1)
   (copy -1)
   (inst - "aaa" "b" "c" "y + t * x - t * y")
   (("1"
     (inst - "aaa" "b" "c" "y")
     (("1"
       (inst - "aaa" "b" "c" "x")
       (("1"
         (replace -1)
         (hide -1)
         (replace -1)
         (hide -1)
         (replace -1)
         (hide -1)
         (assert)
         (both-sides "-" "(4 * (aaa * c) - sq(b)) / (4 * aaa)" 1)
         (assert)
         (case "aaa = 0")
         (("1" (assert))
          ("2"
           (cancel-by 2 "aaa")
           (name "W" "b/(2 * aaa)")
           (label "wname" -1)
           (replace "wname")
           (hide "wname")
           (name "Qx" "W + x")
           (label "qxname" -1)
           (name "Qy" "W + y")
           (label "qyname" -1)
           (case "x = Qx - W and y = Qy - W")
           (("1"
             (prop)
             (label "xQx" -1)
             (label "yQy" -2)
             (replace "xQx")
             (replace "yQy")
             (assert)
             (hide ("xQx" "yQy" "qyname" "qxname"))
             (case "sq(Qx - Qy) > 0")
             (("1"
               (expand "sq" -)
               (both-sides "+" "2*Qx*Qy" -1)
               (assert)
               (assert)
               (mult-by -1 "t*(1-t)")
               (("1" (grind))
                ("2"
                 (hide-all-but (-3 -4 1))
                 (lemma "lt_times_lt_pos1")
                 (inst - "t" "t" "1" "t")
                 (assert))))
              ("2"
               (hide-all-but (1 4))
               (lemma "pos_times_gt")
               (inst - "Qx-Qy" "Qx-Qy")
               (grind))))
            ("2" (assert))))))
        ("2" (hide-all-but (1 2)) (expand "quadratic") (grind))))
      ("2" (hide-all-but (1 2)) (grind))))
    ("2" (hide-all-but (1 2)) (grind))))


proof_type: f_proof
decl_type: formula
library: reals
theory: convex_functions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "strictly_convex?")
   (skeep)
   (lemma "complete_square")
   (copy -1)
   (copy -1)
   (inst - "a" "b" "c" "y + t * x - t * y")
   (inst - "a" "b" "c" "y")
   (inst - "a" "b" "c" "x")
   (replace -1)
   (hide -1)
   (replace -1)
   (hide -1)
   (replace -1)
   (hide -1)
   (assert)
   (both-sides "-" "(4 * (a * c) - sq(b)) / (4 * a)" 2)
   (assert)
   (cancel-by 2 "a")
   (name "W" "b/(2 * a)")
   (label "wname" -1)
   (replace "wname")
   (hide "wname")
   (name "Qx" "W + x")
   (label "qxname" -1)
   (name "Qy" "W + y")
   (label "qyname" -1)
   (case "x = Qx - W and y = Qy - W")
   (("1"
     (prop)
     (label "xQx" -1)
     (label "yQy" -2)
     (replace "xQx")
     (replace "yQy")
     (assert)
     (hide ("xQx" "yQy" "qyname" "qxname"))
     (case "sq(Qx - Qy) > 0")
     (("1"
       (expand "sq" -)
       (both-sides "+" "2*Qx*Qy" -1)
       (assert)
       (assert)
       (mult-by -1 "t*(1-t)")
       (("1" (grind))
        ("2"
         (hide-all-but (-3 -4 1))
         (lemma "lt_times_lt_pos1")
         (inst - "t" "t" "1" "t")
         (assert))))
      ("2"
       (hide-all-but (1 4))
       (lemma "pos_times_gt")
       (inst - "Qx-Qy" "Qx-Qy")
       (grind))))
    ("2" (assert))))


proof_type: f_proof
decl_type: formula
library: reals
theory: convex_functions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "max_of_convex")
   (assert)
   (hide -1)
   (lemma "quad_convex")
   (assert)
   (hide -1)
   (expand "convex?")
   (skosimp*)
   (both-sides "+" "H" 1)
   (assert)
   (lemma "triangle")
   (inst - "(1-t!1)*(y!1*y + x)" "t!1*(x!1*y + x)")
   (lemma "abs_mult")
   (inst - "(1-t!1)" "y!1*y + x")
   (replace -1)
   (hide -1)
   (lemma "abs_mult")
   (inst - "t!1" "x!1*y + x")
   (replace -1)
   (hide -1)
   (expand "abs" -1 2)
   (expand "abs" -1 3)
   (assert))


proof_type: f_proof
decl_type: formula
library: reals
theory: convex_functions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (skoletin 1)
   (lemma "max_of_convex")
   (inst - "quadratic(a,b,c)" "(lambda (t): abs(x + t*y) - H)")
   (assert)
   (hide 2)
   (hide -1)
   (lemma "quad_convex")
   (inst - "a" "b" "c")
   (assert)
   (hide -1)
   (expand "convex?")
   (skosimp*)
   (both-sides "+" "H" 1)
   (assert)
   (lemma "triangle")
   (inst - "(1-t!1)*(y!1*y + x)" "t!1*(x!1*y + x)")
   (lemma "abs_mult")
   (inst - "(1-t!1)" "y!1*y + x")
   (replace -1)
   (hide -1)
   (lemma "abs_mult")
   (inst - "t!1" "x!1*y + x")
   (replace -1)
   (hide -1)
   (expand "abs" -1 2)
   (expand "abs" -1 3)
   (assert))


proof_type: f_proof
decl_type: formula
library: reals
theory: convex_functions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (name "newquad" "quadratic(sq(y), 2 * (x * y), sq(x) - sq(H))")
   (label "newquadname" -1)
   (skoletin 1)
   (prop)
   (replace -4)
   (assert)
   (hide -4)
   (case "max(quadratic(a,b,c)(w),newquad(w)) = 0 AND max(quadratic(a,b,c)(v),newquad(v)) = 0")
   (("1"
     (prop)
     (lemma "quad_strictly_convex")
     (copy -1)
     (inst - "a" "b" "c")
     (inst - "sq(y)" "2*x*y" "sq(x) - sq(H)")
     (("1"
       (replace "newquadname")
       (lemma "max_of_strictly_convex")
       (inst - "quadratic(a, b, c)" "newquad")
       (assert)
       (lemma "strictly_convex_unique_min")
       (inst - "(LAMBDA (z): max(quadratic(a, b, c)(z), newquad(z)))" "v"
        "w")
       (assert)
       (replace -4)
       (replace -5)
       (skosimp*)
       (inst - "z!1")
       (hide -1)
       (hide -1)
       (hide -1)
       (case "quadratic(a, b, c)(z!1) >= abs(z!1 * y + x) - H")
       (("1" (assert) (expand "max" -6) (assert))
        ("2"
         (expand "max" -5)
         (assert)
         (both-sides "+" "H" -5)
         (assert)
         (mult-ineq -5 -5)
         (("1"
           (lemma "sq_rew")
           (copy -1)
           (inst -1 "H")
           (replace -1)
           (hide -1)
           (inst -1 "abs(z!1*y+x)")
           (replace -1)
           (hide -1)
           (lemma "sq_abs")
           (inst -1 "z!1*y+x")
           (replace -1)
           (hide -1)
           (expand "sq" -1 2)
           (both-sides "-" "sq(H)" -1)
           (assert)
           (assert)
           (case-replace
            "y * y * z!1 * z!1 - sq(H) + 2 * (x * y * z!1) + x * x = newquad(z!1)")
           (("1" (assert))
            ("2"
             (hide-all-but ("newquadname" 1))
             (replace "newquadname" + rl)
             (hide "newquadname")
             (grind))))
          ("2"
           (hide (2 3 4 5 6 7 8 9))
           (prop)
           (("1" (expand "abs" 1 2) (expand "abs" 1 1) (propax))
            ("2" (expand "abs" 1 1) (expand "abs" 1 1) (propax))))))))
      ("2"
       (hide-all-but (1 2 3 4 5 6))
       (expand "sq")
       (lemma "pos_times_lt")
       (inst - "y" "y")
       (grind))))
    ("2"
     (prop)
     (("1"
       (case "quadratic(a,b,c)(w) >= abs(w*y + x) - H")
       (("1"
         (expand "max" -2)
         (assert)
         (replace -2)
         (both-sides "+" "H" -1)
         (assert)
         (mult-ineq -1 -1)
         (("1"
           (lemma "sq_rew")
           (inst - "abs(w*y + x)")
           (replace -1)
           (hide -1)
           (lemma "sq_abs")
           (inst - "w*y+x")
           (replace -1)
           (hide -1)
           (both-sides "-" "H*H" -1)
           (assert)
           (case-replace "sq(w * y + x) - H * H = newquad(w)")
           (("1" (expand "max" 1) (assert))
            ("2" (replace "newquadname" + rl) (hide-all-but 1) (grind))))
          ("2" (hide-all-but (-1 1)) (grind))))
        ("2"
         (expand "max" -1)
         (assert)
         (replace -1)
         (both-sides "+" "H" -1)
         (assert)
         (mult-eq -1 -1)
         (lemma "sq_rew")
         (inst - "abs(w*y+x)")
         (replace -1)
         (hide -1)
         (lemma "sq_abs")
         (inst - "w*y+x")
         (replace -1)
         (hide -1)
         (both-sides - "H*H" -1)
         (assert)
         (case-replace "sq(w * y + x) - H * H = newquad(w)")
         (("1" (assert))
          ("2" (replace "newquadname" + rl) (hide-all-but 1) (grind))))))
      ("2"
       (copy -2)
       (hide -3)
       (case "quadratic(a,b,c)(v) >= abs(v*y + x) - H")
       (("1"
         (expand "max" -2)
         (assert)
         (replace -2)
         (both-sides "+" "H" -1)
         (assert)
         (mult-ineq -1 -1)
         (("1"
           (lemma "sq_rew")
           (inst - "abs(v*y + x)")
           (replace -1)
           (hide -1)
           (lemma "sq_abs")
           (inst - "v*y+x")
           (replace -1)
           (hide -1)
           (both-sides "-" "H*H" -1)
           (assert)
           (case-replace "sq(v * y + x) - H * H = newquad(v)")
           (("1" (expand "max" 1) (assert))
            ("2" (replace "newquadname" + rl) (hide-all-but 1) (grind))))
          ("2" (hide-all-but (-1 1)) (grind))))
        ("2"
         (expand "max" -1)
         (assert)
         (replace -1)
         (both-sides "+" "H" -1)
         (assert)
         (mult-eq -1 -1)
         (lemma "sq_rew")
         (inst - "abs(v*y+x)")
         (replace -1)
         (hide -1)
         (lemma "sq_abs")
         (inst - "v*y+x")
         (replace -1)
         (hide -1)
         (both-sides - "H*H" -1)
         (assert)
         (case-replace "sq(v * y + x) - H * H = newquad(v)")
         (("1" (assert))
          ("2"
           (replace "newquadname" + rl)
           (hide-all-but 1)
           (grind))))))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: convex_functions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (name "newquad" "quadratic(sq(y), 2 * (x * y), sq(x) - sq(H))")
   (label "newquadname" -1)
   (skoletin 1)
   (prop)
   (label "Aw" -1)
   (label "Bw" -2)
   (label "Av" -3)
   (label "Bv" -4)
   (hide ("Aw" "Bw" "Av" "Bv"))
   (replace -4)
   (assert)
   (hide -4)
   (case "max(quadratic(a,b,c)(w),newquad(w)) = 0 AND max(quadratic(a,b,c)(v),newquad(v)) = 0")
   (("1"
     (prop)
     (lemma "quad_strictly_convex")
     (copy -1)
     (inst - "a" "b" "c")
     (inst - "sq(y)" "2*x*y" "sq(x) - sq(H)")
     (("1"
       (replace "newquadname")
       (lemma "max_of_strictly_convex")
       (inst - "quadratic(a, b, c)" "newquad")
       (assert)
       (lemma "strictly_conv_uniq_intv_min")
       (inst - "A" "B"
        "(LAMBDA (z): max(quadratic(a, b, c)(z), newquad(z)))" "v" "w")
       (assert)
       (reveal ("Aw" "Bw" "Av" "Bv"))
       (assert)
       (hide ("Aw" "Bw" "Av" "Bv"))
       (replace -4)
       (replace -5)
       (skosimp*)
       (inst - "z!1")
       (assert)
       (hide -1)
       (hide -1)
       (hide -1)
       (hide -1)
       (hide -1)
       (case "quadratic(a, b, c)(z!1) >= abs(z!1 * y + x) - H")
       (("1" (assert) (expand "max" -6) (assert))
        ("2"
         (expand "max" -5)
         (assert)
         (both-sides "+" "H" -5)
         (assert)
         (mult-ineq -5 -5)
         (("1"
           (lemma "sq_rew")
           (copy -1)
           (inst -1 "H")
           (replace -1)
           (hide -1)
           (inst -1 "abs(z!1*y+x)")
           (replace -1)
           (hide -1)
           (lemma "sq_abs")
           (inst -1 "z!1*y+x")
           (replace -1)
           (hide -1)
           (expand "sq" -1 2)
           (both-sides "-" "sq(H)" -1)
           (assert)
           (assert)
           (case-replace
            "y * y * z!1 * z!1 - sq(H) + 2 * (x * y * z!1) + x * x = newquad(z!1)")
           (("1" (assert))
            ("2"
             (hide-all-but ("newquadname" 1))
             (replace "newquadname" + rl)
             (hide "newquadname")
             (grind))))
          ("2"
           (hide (2 3 4 5 6 7 8 9))
           (prop)
           (("1" (expand "abs" 1 2) (expand "abs" 1 1) (propax))
            ("2" (expand "abs" 1 1) (expand "abs" 1 1) (propax))))))))
      ("2"
       (hide-all-but (1 2 3 4 5 6))
       (expand "sq")
       (lemma "pos_times_lt")
       (inst - "y" "y")
       (grind))))
    ("2"
     (prop)
     (("1"
       (case "quadratic(a,b,c)(w) >= abs(w*y + x) - H")
       (("1"
         (expand "max" -2)
         (assert)
         (replace -2)
         (both-sides "+" "H" -1)
         (assert)
         (mult-ineq -1 -1)
         (("1"
           (lemma "sq_rew")
           (inst - "abs(w*y + x)")
           (replace -1)
           (hide -1)
           (lemma "sq_abs")
           (inst - "w*y+x")
           (replace -1)
           (hide -1)
           (both-sides "-" "H*H" -1)
           (assert)
           (case-replace "sq(w * y + x) - H * H = newquad(w)")
           (("1" (expand "max" 1) (assert))
            ("2" (replace "newquadname" + rl) (hide-all-but 1) (grind))))
          ("2" (hide-all-but (-1 1)) (grind))))
        ("2"
         (expand "max" -1)
         (assert)
         (replace -1)
         (both-sides "+" "H" -1)
         (assert)
         (mult-eq -1 -1)
         (lemma "sq_rew")
         (inst - "abs(w*y+x)")
         (replace -1)
         (hide -1)
         (lemma "sq_abs")
         (inst - "w*y+x")
         (replace -1)
         (hide -1)
         (both-sides - "H*H" -1)
         (assert)
         (case-replace "sq(w * y + x) - H * H = newquad(w)")
         (("1" (assert))
          ("2" (replace "newquadname" + rl) (hide-all-but 1) (grind))))))
      ("2"
       (copy -2)
       (hide -3)
       (case "quadratic(a,b,c)(v) >= abs(v*y + x) - H")
       (("1"
         (expand "max" -2)
         (assert)
         (replace -2)
         (both-sides "+" "H" -1)
         (assert)
         (mult-ineq -1 -1)
         (("1"
           (lemma "sq_rew")
           (inst - "abs(v*y + x)")
           (replace -1)
           (hide -1)
           (lemma "sq_abs")
           (inst - "v*y+x")
           (replace -1)
           (hide -1)
           (both-sides "-" "H*H" -1)
           (assert)
           (case-replace "sq(v * y + x) - H * H = newquad(v)")
           (("1" (expand "max" 1) (assert))
            ("2" (replace "newquadname" + rl) (hide-all-but 1) (grind))))
          ("2" (hide-all-but (-1 1)) (grind))))
        ("2"
         (expand "max" -1)
         (assert)
         (replace -1)
         (both-sides "+" "H" -1)
         (assert)
         (mult-eq -1 -1)
         (lemma "sq_rew")
         (inst - "abs(v*y+x)")
         (replace -1)
         (hide -1)
         (lemma "sq_abs")
         (inst - "v*y+x")
         (replace -1)
         (hide -1)
         (both-sides - "H*H" -1)
         (assert)
         (case-replace "sq(v * y + x) - H * H = newquad(v)")
         (("1" (assert))
          ("2"
           (replace "newquadname" + rl)
           (hide-all-but 1)
           (grind))))))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: convex_functions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "k")
   (("1"
     (skeep)
     (expand "^")
     (expand "expt")
     (expand "convex?" 1)
     (propax))
    ("2"
     (skeep)
     (skeep)
     (inst - "f")
     (expand "^")
     (expand "expt" +)
     (name "h" "LAMBDA (x): expt(f(x),j)")
     (case-replace "(LAMBDA (x): f(x) * expt(f(x), j)) = f*h")
     (("1"
       (hide -1)
       (assert)
       (replace -4)
       (replace -1)
       (label "hname" -1)
       (label "hconv" -2)
       (label "fconv" -3)
       (label "ge0" -4)
       (label "final" 1)
       (case "forall (x): h(x) >= 0")
       (("1"
         (label "hge0" -1)
         (case "j > 0")
         (("1"
           (label "jgt0" -1)
           (expand "convex?")
           (skeep)
           (inst - "x" "y" "t")
           (inst - "x" "y" "t")
           (assert)
           (expand "*" +)
           (copy "ge0")
           (copy "hge0")
           (inst - "t*x-t*y+y")
           (inst - "t*x-t*y+y")
           (mult-ineq -6 -7)
           (hide -2)
           (hide -2)
           (case "(t - t * t) * (h(x) - h(y)) * (f(y) - f(x)) <= 0")
           (("1" (assert))
            ("2"
             (name "X" "(t-t*t)")
             (label "Xname" -1)
             (name "Y" "(h(x) - h(y))")
             (label "Yname" -1)
             (name "Z" "(f(y) - f(x))")
             (label "Zname" -1)
             (replace "Xname")
             (replace "Yname")
             (replace "Zname")
             (lemma "neg_times_le")
             (inst - "X" "Y*Z")
             (assert)
             (flatten)
             (hide 2)
             (split)
             (("1"
               (replace "Xname" + rl)
               (both-sides "+" "t*t" 1)
               (assert)
               (div-by 1 "t"))
              ("2"
               (case "forall (xr,yr: real): f(xr) >= f(yr) IFF h(xr) >= h(yr)")
               (("1"
                 (inst-cp -1 "x" "y")
                 (inst - "y" "x")
                 (case "Y>= 0")
                 (("1"
                   (label "Ycase" -1)
                   (case "Z<=0")
                   (("1"
                     (lemma "neg_times_le")
                     (inst - "Y" "Z")
                     (assert))
                    ("2" (assert))))
                  ("2"
                   (case "Y<= 0")
                   (("1"
                     (label "Ycase" -1)
                     (case "Z>=0")
                     (("1"
                       (lemma "neg_times_le")
                       (inst - "Y" "Z")
                       (assert))
                      ("2" (assert))))
                    ("2" (assert))))))
                ("2"
                 (hide (2 3 4 5 6))
                 (skeep)
                 (case "f(yr) > 0 AND f(xr) > 0")
                 (("1"
                   (flatten)
                   (lemma "both_sides_expt_pos_ge")
                   (inst - "j" "f(xr)" "f(yr)")
                   (("1"
                     (assert)
                     (expand "^" -1)
                     (replace "hname" + rl)
                     (assert)
                     (replace -1)
                     (assert))
                    ("2" (assert)) ("3" (assert))))
                  ("2"
                   (case "f(yr) = 0 or f(xr) = 0")
                   (("1"
                     (inst-cp "ge0" "xr")
                     (inst "ge0" "yr")
                     (split -1)
                     (("1"
                       (replace -1)
                       (replace "hname" + rl)
                       (assert)
                       (expand "expt" 2 2)
                       (replace -1)
                       (lemma "nnreal_expt")
                       (inst - "j" "f(xr)")
                       (assert))
                      ("2"
                       (replace -1)
                       (assert)
                       (replace "hname" + rl)
                       (assert)
                       (replace -1)
                       (expand "expt" 1 1)
                       (assert)
                       (case "f(yr) = 0")
                       (("1" (replace -1) (expand "expt" 1 2) (propax))
                        ("2"
                         (assert)
                         (lemma "nnreal_expt")
                         (inst - "j" "f(yr)")
                         (assert)
                         (lemma "expt_pos_aux")
                         (inst - "j" "f(yr)")
                         (assert))))))
                    ("2"
                     (flatten)
                     (inst-cp "ge0" "xr")
                     (inst "ge0" "yr")
                     (assert))))))))))))
          ("2"
           (case "j = 0")
           (("1"
             (replace -1)
             (expand "expt")
             (replace "hname" + rl)
             (expand "*" +)
             (expand "convex?")
             (propax))
            ("2" (assert))))))
        ("2"
         (skeep)
         (inst - "x")
         (replace "hname" + rl)
         (assert)
         (lemma "nnreal_expt")
         (inst - "j" "f(x)"))))
      ("2" (replace -1 + rl) (expand "*" +) (propax))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: convex_functions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "k")
   (("1"
     (skeep)
     (expand "^")
     (expand "expt")
     (expand "expt")
     (expand "strictly_convex?")
     (propax))
    ("2"
     (skeep)
     (skeep)
     (inst - "f")
     (expand "^")
     (expand "expt" +)
     (name "h" "LAMBDA (x): expt(f(x),1+j)")
     (case-replace "(LAMBDA (x): f(x) * expt(f(x), 1+j)) = f*h")
     (("1"
       (hide -1)
       (assert)
       (replace -4)
       (replace -1)
       (label "hname" -1)
       (label "hconv" -2)
       (label "fconv" -3)
       (label "ge0" -4)
       (label "final" 1)
       (case "forall (x): h(x) >= 0")
       (("1"
         (label "hge0" -1)
         (expand "strictly_convex?")
         (skeep)
         (inst - "x" "y" "t")
         (inst - "x" "y" "t")
         (assert)
         (expand "*" +)
         (copy "ge0")
         (copy "hge0")
         (inst - "t*x-t*y+y")
         (inst - "t*x-t*y+y")
         (mult-ineq -5 -6)
         (hide -2)
         (hide -2)
         (case "(t - t * t) * (h(x) - h(y)) * (f(y) - f(x)) <= 0")
         (("1" (assert))
          ("2"
           (name "X" "(t-t*t)")
           (label "Xname" -1)
           (name "Y" "(h(x) - h(y))")
           (label "Yname" -1)
           (name "Z" "(f(y) - f(x))")
           (label "Zname" -1)
           (replace "Xname")
           (replace "Yname")
           (replace "Zname")
           (lemma "neg_times_le")
           (inst - "X" "Y*Z")
           (assert)
           (flatten)
           (hide 2)
           (split)
           (("1"
             (replace "Xname" + rl)
             (both-sides "+" "t*t" 1)
             (assert)
             (div-by 1 "t")
             (assert))
            ("2"
             (case "forall (xr,yr: real): f(xr) >= f(yr) IFF h(xr) >= h(yr)")
             (("1"
               (inst-cp -1 "x" "y")
               (inst - "y" "x")
               (case "Y>= 0")
               (("1"
                 (label "Ycase" -1)
                 (case "Z<=0")
                 (("1" (lemma "neg_times_le") (inst - "Y" "Z") (assert))
                  ("2" (assert))))
                ("2"
                 (case "Y<= 0")
                 (("1"
                   (label "Ycase" -1)
                   (case "Z>=0")
                   (("1"
                     (lemma "neg_times_le")
                     (inst - "Y" "Z")
                     (assert))
                    ("2" (assert))))
                  ("2" (assert))))))
              ("2"
               (hide (2 3 4 5 6))
               (skeep)
               (case "f(yr) > 0 AND f(xr) > 0")
               (("1"
                 (flatten)
                 (lemma "both_sides_expt_pos_ge")
                 (inst - "1+j" "f(xr)" "f(yr)")
                 (("1"
                   (assert)
                   (expand "^" -1)
                   (replace "hname" + rl)
                   (assert)
                   (replace -1)
                   (assert))
                  ("2" (assert)) ("3" (assert))))
                ("2"
                 (case "f(yr) = 0 or f(xr) = 0")
                 (("1"
                   (inst-cp "ge0" "xr")
                   (inst "ge0" "yr")
                   (split -1)
                   (("1"
                     (replace -1)
                     (replace "hname" + rl)
                     (assert)
                     (expand "expt" 2 2)
                     (replace -1)
                     (lemma "nnreal_expt")
                     (inst - "1+j" "f(xr)")
                     (assert))
                    ("2"
                     (replace -1)
                     (assert)
                     (replace "hname" + rl)
                     (assert)
                     (replace -1)
                     (expand "expt" 1 1)
                     (assert)
                     (case "f(yr) = 0")
                     (("1" (replace -1) (expand "expt" 1 2) (propax))
                      ("2"
                       (assert)
                       (lemma "nnreal_expt")
                       (inst - "1+j" "f(yr)")
                       (assert)
                       (lemma "expt_pos_aux")
                       (inst - "1+j" "f(yr)")
                       (assert))))))
                  ("2"
                   (flatten)
                   (inst-cp "ge0" "xr")
                   (inst "ge0" "yr")
                   (assert))))))))))))
        ("2"
         (skeep)
         (inst - "x")
         (replace "hname" + rl)
         (assert)
         (lemma "nnreal_expt")
         (inst - "1+j" "f(x)"))))
      ("2" (replace -1 + rl) (expand "*" +) (propax))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: quad_minmax
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (assert)
   (expand "quadratic")
   (ground)
   (expand "sq")
   (move-terms -1 r 2)
   (move-terms -1 l 1)
   (factor -1 l)
   (isolate-mult -1 l 1)
   (replace -2)
   (cross-mult 2))


proof_type: f_proof
decl_type: formula
library: reals
theory: quad_minmax
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
script:
  (""
   (skosimp*)
   (assert)
   (expand "is_minimum?")
   (skosimp*)
   (expand "quadratic")
   (claim "%1 = %2 + a!1 * sq(y!1+b!1/(2*a!1))" t (! 1 r) (! 1 l))
   (replace -1 :hide? t)
   (move-terms 1 l *)
   (assert)
   (mult-cases 1))


proof_type: f_proof
decl_type: formula
library: reals
theory: quad_minmax
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
script:
  (""
   (skosimp*)
   (assert)
   (flatten)
   (expand "quadratic")
   (rewrite "canonical_sq")
   (rewrite "canonical_sq")
   (field :cancel? t)
   (rewrite "sq_gt")
   (grind-reals))


proof_type: f_proof
decl_type: formula
library: reals
theory: quad_minmax
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
script:
  (""
   (skosimp*)
   (assert)
   (flatten)
   (expand "quadratic")
   (rewrite "canonical_sq")
   (rewrite "canonical_sq")
   (field :cancel? t)
   (lemma "sq_gt")
   (invoke (inst - "-(%! 1 l 1%)" "-(%! 1 r 1%)"))
   (("1" (assert) (rewrite "sq_neg") (rewrite "sq_neg"))
    ("2" (grind-reals)) ("3" (grind-reals))))


proof_type: f_proof
decl_type: formula
library: reals
theory: quad_minmax
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (case "t!1 > - b!1/(2*a!1)")
   (("1"
     (lemma "quad_min_mono_inc")
     (inst - "a!1" "b!1" "c!1" "xu!1" "t!1")
     (assert)
     (assert))
    ("2"
     (lemma "quad_min_mono_dec")
     (inst - "a!1" "b!1" "c!1" "xl!1" "t!1")
     (assert)
     (assert))))


proof_type: f_proof
decl_type: formula
library: reals
theory: quad_minmax
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
script:
  (""
   (skosimp*)
   (lemma "quad_min_mono_inc")
   (inst - "a!1" "b!1" "c!1" "t!1" "xu!1")
   (lemma "quad_min_mono_dec")
   (inst - "a!1" "b!1" "c!1" "t!1" "xl!1")
   (assert)
   (assert)
   (lemma "quad_minmaxpt_midpt")
   (inst - "a!1" "b!1" "c!1" "xl!1" "xu!1")
   (assert)
   (replace -1)
   (assert))


proof_type: f_proof
decl_type: formula
library: reals
theory: quad_minmax
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (case "x!1 < -b!1/(2*a!1)")
   (("1"
     (name "h" "min(epsil!1/2,-b!1/(2*a!1) - x!1)")
     (label "hname" -1)
     (label "xcase" -2)
     (label "age" -3)
     (label "bp" -4)
     (label "finalone" 1)
     (inst - "x!1+h")
     (prop)
     (("1"
       (lemma "quad_min_mono_dec")
       (inst - "a!1" "b!1" "c!1" "x!1" "x!1 + h")
       (assert)
       (prop)
       (("1" (grind))
        ("2" (both-sides "-" "x!1" "xcase") (assert) (grind))
        ("3" (grind))))
      ("2"
       (expand "min")
       (lift-if)
       (assert)
       (prop)
       (both-sides "-" "x!1" "bp")
       (assert)
       (both-sides "-" "x!1" "xcase")
       (assert)
       (grind))
      ("3" (both-sides "-" "x!1" "bp") (assert))))
    ("2"
     (name "h" "min(epsil!1/2,b!1/(2*a!1) + x!1)")
     (inst - "x!1-h")
     (assert)
     (prop)
     (("1"
       (label "quadr" -1)
       (label "hname" -2)
       (label "age" -3)
       (lemma "quad_min_mono_inc")
       (inst - "a!1" "b!1" "c!1" "x!1" "x!1-h")
       (case "x!1 > -b!1/(2*a!1)")
       (("1"
         (label "xcase" -1)
         (label "lem1" -2)
         (assert)
         (prop)
         (("1" (grind))
          ("2"
           (both-sides "+" "b!1/(2*a!1)" "xcase")
           (("1"
             (case-replace "-b!1 / (2 * a!1) + b!1 / (2 * a!1) = 0")
             (("1"
               (expand "min")
               (lift-if)
               (prop)
               (("1" (grind)) ("2" (grind))))
              ("2" (grind))))
            ("2" (grind))))))
        ("2" (assert))))
      ("2"
       (case "x!1 > -b!1/(2*a!1)")
       (("1"
         (label "xcase" -1)
         (both-sides "+" "b!1/(2*a!1)" "xcase")
         (("1"
           (case-replace "-b!1 / (2 * a!1) + b!1 / (2 * a!1) = 0")
           (("1" (grind)) ("2" (assert))))
          ("2" (assert))))
        ("2" (assert))))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: quad_minmax
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
script:
  (""
   (skosimp*)
   (assert)
   (expand "is_maximum?")
   (skosimp*)
   (expand "quadratic")
   (claim "%1 = %2 + a!1 * sq(y!1+b!1/(2*a!1))" t (! 1 r) (! 1 l))
   (replace -1 :hide? t)
   (move-terms 1 l *)
   (assert)
   (mult-cases 1))


proof_type: f_proof
decl_type: formula
library: reals
theory: quad_minmax
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
script:
  (""
   (skosimp*)
   (assert)
   (flatten)
   (expand "quadratic")
   (rewrite "canonical_sq")
   (rewrite "canonical_sq")
   (field :cancel? t)
   (lemma "sq_ge")
   (invoke (inst - "-(%! 1 l 1%)" "-(%! 1 r 1%)"))
   (("1" (assert) (rewrite "sq_neg") (rewrite "sq_neg") (assert))
    ("2" (grind-reals)) ("3" (grind-reals))))


proof_type: f_proof
decl_type: formula
library: reals
theory: quad_minmax
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
script:
  (""
   (skosimp*)
   (assert)
   (flatten)
   (expand "quadratic")
   (rewrite "canonical_sq")
   (rewrite "canonical_sq")
   (field :cancel? t)
   (rewrite "sq_lt")
   (field 1))


proof_type: f_proof
decl_type: formula
library: reals
theory: quad_minmax
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (case "t!1 > - b!1/(2*a!1)")
   (("1"
     (lemma "quad_max_mono_dec")
     (inst - "a!1" "b!1" "c!1" "xu!1" "t!1")
     (assert)
     (assert))
    ("2"
     (lemma "quad_max_mono_inc")
     (inst - "a!1" "b!1" "c!1" "xl!1" "t!1")
     (assert)
     (assert))))


proof_type: f_proof
decl_type: formula
library: reals
theory: quad_minmax
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
script:
  (""
   (skosimp*)
   (lemma "quad_max_mono_dec")
   (inst - "a!1" "b!1" "c!1" "t!1" "xu!1")
   (lemma "quad_max_mono_inc")
   (inst - "a!1" "b!1" "c!1" "t!1" "xl!1")
   (assert)
   (assert)
   (lemma "quad_minmaxpt_midpt")
   (inst - "a!1" "b!1" "c!1" "xl!1" "xu!1")
   (assert)
   (replace -1)
   (assert))


proof_type: f_proof
decl_type: formula
library: reals
theory: quad_minmax
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (lemma "quad_loc_min_is_glob_min")
   (skosimp*)
   (inst - "-a!1" "-b!1" "-c!1" "epsil!1" "x!1")
   (assert)
   (skosimp*)
   (inst - "y!1")
   (assert)
   (grind))


proof_type: f_proof
decl_type: formula
library: reals
theory: quad_minmax
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (case "-b/(2*a)<xl")
   (("1"
     (hide 1)
     (skeep)
     (lemma "quad_min_mono_inc")
     (inst - "a" "b" "c" "xu" "t")
     (assert)
     (assert))
    ("2"
     (case "-b/(2*a) > xu")
     (("1"
       (hide 3)
       (skeep 2)
       (lemma "quad_min_mono_dec")
       (inst - "a" "b" "c" "xl" "t")
       (assert)
       (assert))
      ("2"
       (case "quadratic(a,b,c)(xl) <= quadratic(a,b,c)(xu)")
       (("1"
         (hide 3)
         (skeep 3)
         (case "t < -b/(2*a)")
         (("1"
           (lemma "quad_min_mono_dec")
           (inst - "a" "b" "c" "xl" "t")
           (assert)
           (assert))
          ("2"
           (lemma "quad_min_mono_inc")
           (inst - "a" "b" "c" "xu" "t")
           (assert)
           (assert))))
        ("2"
         (hide 5)
         (skeep 4)
         (case "t < -b/(2*a)")
         (("1"
           (lemma "quad_min_mono_dec")
           (inst - "a" "b" "c" "xl" "t")
           (assert)
           (assert))
          ("2"
           (lemma "quad_min_mono_inc")
           (inst - "a" "b" "c" "xu" "t")
           (assert)
           (assert))))))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: quad_minmax
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "abs")
   (lift-if)
   (lift-if)
   (lift-if)
   (assert)
   (ground)
   (("1"
     (lemma "quad_min_mono_dec")
     (inst - "a" "b" "c" "y" "x")
     (assert))
    ("2"
     (lemma "quad_minmaxpt_delta")
     (inst - "a" "b" "c" "x - (-b / (2 * a))")
     (assert)
     (lemma "quad_min_mono_inc")
     (inst - "a" "b" "c" "y" "2 * (-b / (2 * a)) - x")
     (assert)
     (case "y = 2 * (-b / (2 * a)) - x")
     (("1" (replace -1 :dir rl) (assert)) ("2" (assert))))
    ("3"
     (lemma "quad_minmaxpt_delta")
     (inst - "a" "b" "c" "y - (-b / (2 * a))")
     (assert)
     (lemma "quad_min_mono_inc")
     (inst - "a" "b" "c" "2 * (-b / (2 * a)) - y" "x")
     (assert)
     (case "2 * (-b / (2 * a)) - y = x")
     (("1" (replace -1) (assert)) ("2" (assert))))
    ("4"
     (lemma "quad_min_mono_inc")
     (inst - "a" "b" "c" "y" "x")
     (assert))))


proof_type: f_proof
decl_type: formula
library: reals
theory: quadratic_2b
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand* "root2b" "root")
   (rewrite "discr2b_discr")
   (real-props)
   (rewrite "sqrt_div")
   (assert))


proof_type: f_proof
decl_type: formula
library: reals
theory: quadratic_2b
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "quad_eq_0")
   (inst -1 "a" "2*b" "c" "x")
   (replaces -1)
   (rewrite "discr2b_discr_ge_0" :dir rl)
   (ground)
   (("1" (skeep -2) (inst 1 "eps") (rewrite "root2b_root" :dir rl))
    ("2" (skeep -2) (inst 1 "eps") (rewrite "root2b_root" :dir rl))))


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


proof_type: f_proof
decl_type: formula
library: reals
theory: sigma
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (case "FORALL (rng: nat): T_pred(low!1+rng) IMPLIES
                                       sigma(low!1, low!1+rng, F!1) = sigma2(low!1, low!1+rng, F!1)")
   (("1"
     (inst - "high!1-low!1")
     (("1"
       (assert)
       (typepred "high!1")
       (assert)
       (skosimp*)
       (typepred "j!1")
       (typepred "low!1")
       (lemma "connected_domain")
       (inst - "low!1" "j!1" "high!1")
       (("1" (assert) (expand "sigma") (expand "sigma2") (propax))
        ("2"
         (assert)
         (skosimp*)
         (lemma "connected_domain")
         (inst - "j!2" "j!1" "low!1")
         (assert)
         (expand "sigma")
         (expand "sigma2")
         (propax))))
      ("2" (expand "sigma") (expand "sigma2") (assert))))
    ("2"
     (hide 2)
     (induct "rng")
     (("1"
       (assert)
       (flatten)
       (expand "sigma")
       (expand "sigma")
       (expand "sigma2")
       (propax))
      ("2"
       (skosimp*)
       (assert)
       (expand "sigma" 1)
       (expand "sigma2" 1)
       (assert)
       (hide 2)
       (typepred "low!1")
       (typepred "j!1")
       (assert)
       (prop)
       (("1"
         (lemma "connected_domain")
         (inst - "low!1" "j!1+1+low!1" "j!1+low!1")
         (assert))
        ("2"
         (skosimp*)
         (lemma "connected_domain")
         (inst - "j!2" "j!1+1+low!1" "j!1+low!1")
         (assert))))
      ("3" (hide 2) (skosimp*))))
    ("3" (skosimp*))))


proof_type: f_proof
decl_type: formula
library: reals
theory: 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))
    ("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: sigma
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (case "high!1<low!1")
   (("1" (expand "sigma") (assert))
    ("2"
     (case-replace "z!1=low!1-1")
     (("1" (assert) (expand "sigma") (propax))
      ("2"
       (lemma "sigma_spl")
       (inst - "F!1" "low!1" "z!1-low!1" "high!1-z!1")
       (("1" (assert) (hide-all-but (1 3)) (use "T_pred_lem") (assert))
        ("2" (assert)) ("3" (assert))))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: sigma
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "sigma_split")
   (inst?)
   (inst -1 "low!1")
   (rewrite "sigma_eq_arg")
   (assert))


proof_type: f_proof
decl_type: formula
library: reals
theory: sigma
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "sigma_split")
   (inst?)
   (inst -1 "i!1")
   (assert)
   (rewrite "sigma_rew" -)
   (assert)
   (replace -1)
   (hide -1)
   (assert)
   (expand "sigma" 1 1)
   (lift-if)
   (ground)
   (expand "sigma")
   (assert))


proof_type: f_proof
decl_type: formula
library: reals
theory: sigma
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem 1 (_ _ x))
   (rewrite "high_low_rewrite")
   (hide 2)
   (skosimp*)
   (prop)
   (("1" (expand "sigma") (assert))
    ("2"
     (induct "n" 2)
     (("1"
       (rewrite "sigma_eq_arg")
       (("1" (assert)) ("2" (use "T_pred_lem") (assert))))
      ("2" (hide 2) (skosimp*) (expand "sigma" +) (assert))
      ("3"
       (hide 3)
       (skosimp*)
       (inst + "high!1")
       (("1" (assert)) ("2" (use "T_pred_lem") (assert))))
      ("4" (assert))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: sigma
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem 1 ("F" "a" _ _))
   (rewrite "high_low_rewrite")
   (hide 2)
   (skosimp*)
   (prop)
   (("1" (expand "sigma") (assert))
    ("2"
     (induct "n" 2)
     (("1"
       (rewrite "sigma_eq_arg")
       (("1" (rewrite "sigma_eq_arg"))
        ("2" (use "T_pred_lem") (assert))))
      ("2" (hide 2) (skosimp*) (expand "sigma" +) (assert))
      ("3"
       (skosimp*)
       (inst + "high!1")
       (("1" (assert)) ("2" (use "T_pred_lem") (assert))))
      ("4" (assert))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: sigma
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem 1 ("B" "F" _ _))
   (rewrite "high_low_rewrite")
   (hide 2)
   (skosimp*)
   (prop)
   (("1" (expand "sigma") (assert))
    ("2"
     (induct "n" 2)
     (("1"
       (skosimp*)
       (rewrite "sigma_eq_arg")
       (("1" (inst?) (assert))
        ("2" (hide -1 2) (use "T_pred_lem") (assert))))
      ("2"
       (hide 2)
       (skosimp*)
       (expand "sigma" +)
       (prop)
       (("1" (inst?) (assert)) ("2" (skosimp*) (inst?) (assert))))
      ("3"
       (skosimp*)
       (hide-all-but (1 2))
       (typepred "n!2")
       (assert)
       (typepred "high!1")
       (prop)
       (("1" (inst + "high!1"))
        ("2" (skosimp*) (inst + "j!1") (assert))))
      ("4" (assert))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: sigma
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem 1 ("F" _ _))
   (rewrite "high_low_rewrite")
   (hide 2)
   (skosimp*)
   (prop)
   (("1" (expand "sigma") (expand "abs") (assert))
    ("2"
     (induct "n" 2)
     (("1"
       (rewrite "sigma_eq_arg")
       (("1" (rewrite "sigma_eq_arg") (assert))
        ("2" (hide 2) (use "T_pred_lem") (assert))))
      ("2"
       (hide 2)
       (skosimp*)
       (expand "sigma" +)
       (lemma "triangle")
       (inst?)
       (assert))
      ("3"
       (hide 3)
       (skosimp*)
       (inst + "high!1")
       (("1" (assert)) ("2" (use "T_pred_lem") (assert))))
      ("4" (assert))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: sigma
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem 1 ("F" _ _))
   (rewrite "high_low_rewrite")
   (("1"
     (hide 2)
     (skosimp*)
     (prop)
     (("1" (expand "sigma") (assert))
      ("2"
       (induct "n" 2)
       (("1"
         (skosimp*)
         (rewrite "sigma_eq_arg")
         (("1" (inst?)) ("2" (hide -1 2) (use "T_pred_lem") (assert))))
        ("2"
         (hide 2)
         (skosimp*)
         (expand "sigma" +)
         (prop)
         (("1" (inst?) (assert)) ("2" (skosimp*) (inst?))))
        ("3"
         (hide 3)
         (skosimp*)
         (inst + "high!1")
         (("1" (assert)) ("2" (hide -1) (use "T_pred_lem") (assert))))
        ("4"
         (hide-all-but 1)
         (skosimp* t)
         (hide -1)
         (use "T_pred_lem")
         (assert))
        ("5" (assert))))))
    ("2" (hide 2) (skosimp* t) (use "T_pred_lem") (assert))))


proof_type: f_proof
decl_type: formula
library: reals
theory: sigma
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem 1 ("F" _ _))
   (rewrite "high_low_rewrite")
   (("1"
     (hide 2)
     (skosimp*)
     (prop)
     (induct "n" 2)
     (("1"
       (rewrite "sigma_eq_arg")
       (("1" (flatten) (inst?))
        ("2" (hide 2) (use "T_pred_lem") (assert))))
      ("2"
       (skosimp*)
       (hide 2)
       (expand "sigma" +)
       (prop)
       (("1" (inst?) (assert)) ("2" (skosimp*) (inst?))))
      ("3"
       (hide 3)
       (skosimp* t)
       (inst + "high!1")
       (assert)
       (hide -1 -2 -3)
       (use "T_pred_lem")
       (assert))
      ("4" (hide 2 3) (skosimp* t) (hide -1) (use "T_pred_lem") (assert))
      ("5" (assert))))
    ("2" (hide 2) (skosimp) (skosimp* t) (use "T_pred_lem") (assert))))


proof_type: f_proof
decl_type: formula
library: reals
theory: sigma
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem 1 ("F" _ _ "z"))
   (rewrite "high_low_rewrite")
   (("1"
     (hide 2)
     (skosimp*)
     (prop)
     (("1" (expand "sigma") (assert))
      ("2"
       (induct "n" 2)
       (("1"
         (skosimp*)
         (rewrite "sigma_eq_arg")
         (("1"
           (rewrite "sigma_eq_arg")
           (hide -1 2)
           (use "T_pred_lem")
           (assert))
          ("2" (hide 2) (inst?) (use "T_pred_lem") (assert))))
        ("2" (hide 2) (skosimp*) (expand "sigma" +) (assert))
        ("3" (skosimp*))
        ("4"
         (hide-all-but 1)
         (skosimp* t)
         (typepred "high!1")
         (prop)
         (("1" (inst + "high!1"))
          ("2" (skosimp*) (inst + "j!1") (assert))))
        ("5"
         (hide -1 2 3)
         (skosimp* t)
         (typepred "high!1")
         (prop)
         (("1" (inst + "high!1+z") (("1" (assert)) ("2" (inst?))))
          ("2"
           (skosimp*)
           (inst + "j!1+z")
           (("1" (assert)) ("2" (inst?))))))
        ("6"
         (hide -1 2 3)
         (skosimp* t)
         (assert)
         (typepred "low!1")
         (prop)
         (("1" (inst?))
          ("2"
           (skosimp*)
           (inst + "j!1+z")
           (("1" (assert)) ("2" (inst?))))))
        ("7" (assert))))))
    ("2" (skosimp*))
    ("3"
     (hide 2)
     (skosimp* t)
     (hide -1 -4)
     (assert)
     (prop)
     (("1"
       (typepred "high!1")
       (prop)
       (("1" (assert) (inst?))
        ("2"
         (skosimp*)
         (inst + "j!1+z")
         (("1" (assert)) ("2" (inst?))))))
      ("2"
       (skosimp*)
       (typepred "high!1")
       (prop)
       (("1" (inst?))
        ("2"
         (skosimp*)
         (inst + "j!2+z")
         (("1" (assert)) ("2" (inst?))))))))
    ("4"
     (hide 2)
     (skosimp* t)
     (hide -1)
     (inst?)
     (assert)
     (skosimp*)
     (reveal -1)
     (inst + "j!1+z")
     (("1" (assert)) ("2" (inst?))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: sigma
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem 1 ("F" _ _ "z"))
   (rewrite "high_low_rewrite")
   (("1"
     (hide 2)
     (skosimp*)
     (prop)
     (("1" (expand "sigma") (assert))
      ("2"
       (induct "n" 2)
       (("1"
         (flatten)
         (rewrite "sigma_eq_arg")
         (rewrite "sigma_eq_arg")
         (("1" (assert))
          ("2" (hide -1 -2 2) (use "T_pred_lem") (assert))))
        ("2"
         (hide 2)
         (skosimp*)
         (expand "sigma" +)
         (assert)
         (prop)
         (hide -1 2)
         (lemma "connected_domain")
         (inst?)
         (inst - "low!1+z" "1+k!1+z")
         (assert))
        ("3"
         (hide-all-but 1)
         (skosimp* t)
         (typepred "high!1")
         (inst + "high!1")
         (assert)
         (skosimp*)
         (assert)
         (use "T_pred_lem")
         (assert))
        ("4" (hide-all-but 1) (skosimp*))
        ("5" (hide-all-but 1) (skosimp*)) ("6" (assert))))))
    ("2" (hide 2) (skosimp*)) ("3" (hide 2) (skosimp*))))


proof_type: f_proof
decl_type: formula
library: reals
theory: sigma
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem 1 ("F" "G" _ _))
   (rewrite "high_low_rewrite")
   (hide 2)
   (skosimp*)
   (prop)
   (("1" (expand "sigma") (assert))
    ("2"
     (induct "n" 2)
     (("1"
       (rewrite "sigma_eq_arg")
       (("1" (rewrite "sigma_eq_arg") (rewrite "sigma_eq_arg"))
        ("2" (use "T_pred_lem") (assert))))
      ("2" (hide 2) (skosimp*) (expand "sigma" +) (propax))
      ("3"
       (hide-all-but 1)
       (skosimp* t)
       (typepred "high!1")
       (inst + "high!1")
       (assert)
       (skosimp*)
       (use "T_pred_lem")
       (assert))
      ("4" (assert))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: sigma
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem 1 ("F" "G" _ _))
   (rewrite "high_low_rewrite")
   (("1"
     (hide 2)
     (skosimp*)
     (prop)
     (("1" (expand "sigma") (assert))
      ("2"
       (induct "n" 2)
       (("1"
         (flatten)
         (rewrite "sigma_eq_arg")
         (("1" (rewrite "sigma_eq_arg") (inst?))
          ("2" (hide -1 2) (use "T_pred_lem") (assert))))
        ("2"
         (hide 2)
         (skosimp*)
         (expand "sigma" +)
         (prop)
         (("1" (inst?) (assert)) ("2" (skosimp*) (inst?))))
        ("3"
         (hide-all-but 1)
         (skosimp* t)
         (typepred "high!1")
         (inst + "high!1")
         (assert)
         (skosimp*)
         (use "T_pred_lem")
         (assert))
        ("4"
         (hide-all-but 1)
         (skosimp* t)
         (hide -1 -2)
         (use "T_pred_lem")
         (("1" (assert))
          ("2" (lemma "T_pred_lem") (inst?) (inst - "high!1") (assert))))
        ("5" (assert))))))
    ("2" (hide 2) (skosimp* t) (use "T_pred_lem") (assert))))


proof_type: f_proof
decl_type: formula
library: reals
theory: sigma
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem 1 ("F" "h" _ "l" _))
   (rewrite "high_low_rewrite")
   (("1"
     (hide 2)
     (skosimp*)
     (prop)
     (("1" (expand "sigma") (assert))
      ("2"
       (induct "n" 2)
       (("1"
         (rewrite "sigma_eq_arg")
         (("1"
           (rewrite "sigma_eq_arg")
           (expand "restrict")
           (flatten)
           (assert))
          ("2" (hide 2) (use "T_pred_lem") (assert))))
        ("2"
         (hide 2)
         (skosimp*)
         (expand "sigma" +)
         (rewrite "restrict")
         (assert))
        ("3" (skosimp*) (inst + "h") (assert))
        ("4" (skosimp*) (inst + "l") (assert))
        ("5"
         (hide-all-but 1)
         (skosimp* t)
         (hide -3 -4)
         (inst + "n!2")
         (("1" (assert)) ("2" (use "T_pred_lem") (assert))))
        ("6" (assert))))))
    ("2" (hide 2) (skosimp*) (inst + "h") (assert))
    ("3" (hide 2) (skosimp*) (inst + "l") (assert))))


proof_type: f_proof
decl_type: formula
library: reals
theory: sigma
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (case "high!1 < low!1")
   (("1" (expand "sigma") (assert))
    ("2"
     (rewrite "sigma_restrict")
     (("1" (use "T_pred_lem") (assert))
      ("2" (use "T_pred_lem") (assert))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: sigma
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (case "high!1 < low!1")
   (("1" (expand "sigma") (assert))
    ("2"
     (lemma "sigma_restrict")
     (inst?)
     (inst -1 "high!1" "low!1")
     (("1"
       (assert)
       (replace*)
       (hide -1 -2)
       (lemma "sigma_restrict")
       (inst -1 "G!1" "high!1" "high!1" "low!1" "low!1")
       (("1" (assert)) ("2" (use "T_pred_lem") (assert))
        ("3" (use "T_pred_lem") (assert))))
      ("2" (use "T_pred_lem") (assert))
      ("3" (use "T_pred_lem") (assert))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: sigma
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (case "FORALL (jj:nat): low1+jj<=high1 IMPLIES sigma(low1,low1+jj,F) = sigma(low2,low2+jj,G)")
   (("1"
     (inst - "high1-low1")
     (("1" (assert)) ("2" (expand "sigma" +) (lift-if) (ground))))
    ("2"
     (hide 2)
     (induct "jj")
     (("1"
       (assert)
       (flatten)
       (expand "sigma" +)
       (expand "sigma" +)
       (inst - "0")
       (("1" (assert)) ("2" (assert))))
      ("2"
       (skeep)
       (assert)
       (expand "sigma" +)
       (replace -1)
       (assert)
       (inst?))
      ("3"
       (hide 2)
       (skeep)
       (lemma "connected_domain")
       (inst - "low2" "high2" "jj+low2")
       (("1" (assert))
        ("2"
         (assert)
         (typepred "high2")
         (ground)
         (skosimp*)
         (inst + "j!1")
         (assert))
        ("3"
         (typepred "high2")
         (ground)
         (("1" (inst + "high2") (ground))
          ("2" (skosimp*) (inst + "j!1") (assert))))))
      ("4" (assert))
      ("5"
       (hide 2)
       (skeep)
       (typepred "high1")
       (ground)
       (("1" (inst + "high1")) ("2" (skosimp*) (inst + "j!1") (assert))))
      ("6" (assert))))
    ("3"
     (skeep)
     (typepred "high2")
     (ground)
     (("1" (inst + "high2") (assert))
      ("2" (skosimp*) (inst + "j!1") (assert))))
    ("4"
     (hide 2)
     (skeep)
     (typepred "high1")
     (ground)
     (("1" (inst + "high1")) ("2" (skosimp*) (inst + "j!1") (assert))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: sigma
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "sigma_restrict_eq")
   (inst - "F" "(LAMBDA (tt:T): 0)" "high" "low")
   (lemma "sigma_zero")
   (inst?)
   (assert)
   (expand "restrict")
   (decompose-equality)
   (lift-if)
   (inst - "x!1")
   (("1" (ground)) ("2" (assert) (ground))))


proof_type: f_proof
decl_type: formula
library: reals
theory: sigma
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (case "FORALL (F: [T -> real], high: T_high, low: T_low,k:nat):k<=high-low IMPLIES
                        abs(sigma(low, low+k, F)) <=
                         sigma(low, low+k, LAMBDA (n: T): abs(F(n)))")
   (("1"
     (skeep)
     (inst - "F" "high" "low" "high-low")
     (("1" (assert)) ("2" (assert) (expand "sigma" +) (grind))))
    ("2"
     (hide 2)
     (induct "k")
     (("1"
       (skeep)
       (assert)
       (expand "sigma" +)
       (expand "sigma" +)
       (assert))
      ("2"
       (skeep)
       (skeep)
       (inst - "F" "high" "low")
       (assert)
       (expand "sigma" +)
       (expand "abs")
       (lift-if)
       (lift-if)
       (lift-if)
       (assert)
       (ground))
      ("3"
       (hide 2)
       (skeep)
       (assert)
       (typepred "high")
       (typepred "low")
       (lemma "connected_domain")
       (ground)
       (("1" (inst - "low" "high" "low+k") (assert))
        ("2" (skeep -1) (inst - "low" "j" "k+low") (assert))
        ("3" (skeep -) (inst - "j" "high" "k+low") (assert))
        ("4" (skosimp*) (inst - "j!2" "j!1" "k+low") (assert))))))
    ("3"
     (hide 2)
     (skeep)
     (assert)
     (typepred "high")
     (typepred "low")
     (lemma "connected_domain")
     (ground)
     (("1" (inst - "low" "high" "low+k") (assert))
      ("2" (skeep -1) (inst - "low" "j" "k+low") (assert))
      ("3" (skeep -) (inst - "j" "high" "k+low") (assert))
      ("4" (skosimp*) (inst - "j!2" "j!1" "k+low") (assert))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: sigma
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "sigma_split")
   (inst - "F" "high" "low" "z")
   (assert)
   (replace -1 +)
   (hide -1)
   (lemma "sigma_split")
   (inst - "F" "z" "low" "z-1")
   (assert)
   (replace -1)
   (hide -1)
   (case "sigma(1+z,high,F) = 0")
   (("1"
     (replace -1)
     (case "sigma(low,z-1,F) = 0")
     (("1" (replace -1) (expand "sigma" +) (expand "sigma" +) (propax))
      ("2" (rewrite "sigma_restrict_eq_0"))))
    ("2" (rewrite "sigma_restrict_eq_0"))))


proof_type: f_proof
decl_type: formula
library: reals
theory: sigma
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "sigma_eq_one_arg")
   (inst?)
   (assert)
   (split)
   (("1" (skosimp*) (inst - "i!1") (assert))
    ("2" (skosimp*) (inst - "i!1") (assert))))


proof_type: f_proof
decl_type: formula
library: reals
theory: sigma
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (case "FORALL (F: [T -> real], high: T_high, low: T_low, z1, z2: int):
                 (     low <= z1 AND z1 <= high AND low <= z2 AND z2 <= high
                   AND z1 < z2
                   AND FORALL (i: subrange(low, high)):
                         i /= z1 AND i /= z2 IMPLIES F(i) = 0)
                  IMPLIES sigma(low, high, F) = F(z1) + F(z2)")
   (("1"
     (skeep)
     (case "z1 < z2")
     (("1" (inst?) (assert))
      ("2"
       (inst - "F" "high" "low" "z2" "z1")
       (assert)
       (skosimp*)
       (inst - "i!1")
       (assert))))
    ("2"
     (hide 2)
     (skeep)
     (lemma "sigma_split")
     (inst - "F" "high" "low" "z1")
     (assert)
     (replaces -1)
     (expand "sigma" + 2)
     (lemma "sigma_split")
     (inst - "F" "high" "1+z1" "z2")
     (assert)
     (replaces -1)
     (expand "sigma" + 1)
     (assert)
     (rewrite "sigma_restrict_eq_0")
     (("1"
       (rewrite "sigma_restrict_eq_0")
       (("1"
         (rewrite "sigma_restrict_eq_0")
         (skosimp*)
         (inst - "i!1")
         (assert))
        ("2" (skosimp*) (inst - "i!1") (assert))))
      ("2" (skosimp*) (inst - "i!1") (assert))))
    ("3"
     (hide 2)
     (skeep)
     (lemma "connected_domain")
     (typepred "high")
     (typepred "low")
     (ground)
     (("1" (inst - "low" "high" "z2") (assert))
      ("2" (skosimp*) (inst - "low" "j!1" "z2") (ground))
      ("3" (skosimp*) (inst - "j!1" "high" "z2") (assert))
      ("4" (skosimp*) (inst - "j!2" "j!1" "z2") (assert))))
    ("4"
     (hide 2)
     (skeep)
     (lemma "connected_domain")
     (typepred "low")
     (typepred "high")
     (ground)
     (("1" (inst - "low" "high" "z1") (assert))
      ("2" (skosimp*) (inst - "j!1" "high" "z1") (assert))
      ("3" (skosimp*) (inst - "low" "j!1" "z1") (assert))
      ("4" (skosimp*) (inst - "j!1" "j!2" "z1") (assert))))
    ("5"
     (hide 2)
     (skeep)
     (lemma "connected_domain")
     (typepred "low")
     (typepred "high")
     (skosimp*)
     (ground)
     (("1" (inst - "low" "high" "i!1") (assert))
      ("2" (skosimp*) (inst - "j!1" "high" "i!1") (assert))
      ("3" (skosimp*) (inst - "low" "j!1" "i!1") (assert))
      ("4" (skosimp*) (inst - "j!1" "j!2" "i!1") (assert))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: sigma
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "sigma_restrict_eq")
   (inst?)
   (assert)
   (hide 2)
   (expand "restrict")
   (apply-extensionality 1 :hide? t)
   (lift-if)
   (ground)
   (inst?))


proof_type: f_proof
decl_type: formula
library: reals
theory: sigma
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "sigma_ge_0")
   (inst -1 "(LAMBDA (t:T): G!1(t) - F!1(t))" "high!1" "low!1")
   (split -1)
   (("1"
     (assert)
     (lemma "sigma_minus")
     (inst?)
     (replace -1 * rl)
     (hide -1)
     (assert))
    ("2" (hide 2) (skosimp*) (assert) (inst?) (assert))))


proof_type: f_proof
decl_type: formula
library: reals
theory: sigma
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "sigma_gt_0")
   (inst -1 "(LAMBDA (t:T): G!1(t) - F!1(t))" "high!1" "low!1")
   (split -1)
   (("1"
     (assert)
     (lemma "sigma_minus")
     (inst?)
     (replace -1 * rl)
     (hide -1)
     (assert))
    ("2" (propax)) ("3" (skosimp*) (assert) (inst?) (assert))))


proof_type: f_proof
decl_type: formula
library: reals
theory: sigma
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (case "i!1 = low!1")
   (("1"
     (rewrite "sigma_first")
     (("1"
       (lemma "sigma_first")
       (inst -1 "G!1" "high!1" "low!1")
       (assert)
       (split -1)
       (("1"
         (assert)
         (replace -1)
         (replace -5)
         (hide -1 -5)
         (assert)
         (replace -1)
         (assert)
         (rewrite "sigma_eq"))
        ("2"
         (assert)
         (expand "sigma")
         (assert)
         (expand "sigma")
         (assert))))
      ("2" (expand "sigma") (assert) (expand "sigma") (assert))))
    ("2"
     (case-replace "i!1 = high!1")
     (("1"
       (rewrite "sigma_last")
       (lemma "sigma_last")
       (inst -1 "G!1" "high!1" "low!1")
       (assert)
       (replace -1)
       (hide -1)
       (assert)
       (replace -4)
       (assert)
       (rewrite "sigma_eq"))
      ("2"
       (lemma "sigma_split")
       (inst?)
       (inst -1 "i!1")
       (assert)
       (replace -1)
       (hide -1)
       (lemma "sigma_split")
       (inst -1 "G!1" "high!1" "low!1" "i!1")
       (assert)
       (replace -1)
       (hide -1)
       (lemma "sigma_last")
       (inst-cp -1 "F!1" "i!1" "low!1")
       (inst -1 "G!1" "i!1" "low!1")
       (assert)
       (replace -1)
       (hide -1)
       (replace -1)
       (hide -1)
       (replace -3)
       (hide -3)
       (ground)
       (case-replace
        "sigma(low!1, i!1 - 1, G!1 WITH [i!1 := a!1]) = sigma(low!1, i!1 - 1, G!1)")
       (("1" (hide -1) (assert) (rewrite "sigma_eq"))
        ("2" (hide 4) (rewrite "sigma_eq"))))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: sigma
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "sigma_le")
   (inst - "F" "LAMBDA (i:T): B/(high-low+1)" "high" "low")
   (("1"
     (split -)
     (("1"
       (case "FORALL (i:nat): i<= high-low IMPLIES sigma(low,low+i,LAMBDA (i:T):B/(high-low+1)) = (i+1)*B/(high-low+1)")
       (("1"
         (inst - "high-low")
         (("1"
           (case "(high-low+1)*B/(high-low+1) = B")
           (("1" (assert)) ("2" (field)) ("3" (assert))))
          ("2" (assert))))
        ("2"
         (induct "i")
         (("1" (assert) (expand "sigma" +) (expand "sigma" +) (assert))
          ("2" (skeep) (expand "sigma" +) (assert))
          ("3" (skosimp*) (assert)) ("4" (assert)) ("5" (assert))
          ("6" (assert)) ("7" (assert)) ("8" (assert)) ("9" (assert))
          ("10" (assert))
          ("11"
           (skosimp*)
           (lemma "T_pred_lem")
           (inst - "high" "low" "i!2 + low")
           (assert))
          ("12"
           (skosimp*)
           (lemma "T_pred_lem")
           (inst - "high" "low" "i!2 + low")
           (assert))
          ("13"
           (skosimp*)
           (lemma "T_pred_lem")
           (inst - "high" "low" "i!2 + low")
           (assert))
          ("14"
           (skosimp*)
           (lemma "T_pred_lem")
           (inst - "high" "low" "i!2 + low")
           (assert))))
        ("3" (skosimp*) (assert)) ("4" (skosimp*) (assert))
        ("5"
         (skosimp*)
         (lemma "T_pred_lem")
         (inst - "high" "low" "i!1 + low")
         (assert))))
      ("2" (skosimp*) (inst - "n!1") (assert))))
    ("2" (skosimp*) (assert))))


proof_type: f_proof
decl_type: formula
library: reals
theory: sigma
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem 1 ("F" _ _))
   (rewrite "high_low_rewrite")
   (hide 2)
   (skosimp*)
   (prop)
   (("1" (expand "sigma") (assert))
    ("2"
     (induct "n" 2)
     (("1"
       (rewrite "sigma_eq_arg")
       (("1" (skosimp*) (inst?)) ("2" (use "T_pred_lem") (assert))))
      ("2"
       (hide 2)
       (skosimp*)
       (expand "sigma" +)
       (prop)
       (inst?)
       (assert))
      ("3" (hide-all-but 1) (skosimp* t) (use "T_pred_lem") (assert))
      ("4" (assert))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: sigma
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem 1 ("F" _ _))
   (rewrite "high_low_rewrite")
   (hide 2)
   (skosimp*)
   (prop)
   (("1" (expand "sigma") (assert))
    ("2"
     (induct "n" 2)
     (("1"
       (rewrite "sigma_eq_arg")
       (("1" (skosimp*) (inst?))
        ("2" (hide 2) (use "T_pred_lem") (assert))))
      ("2"
       (hide 2)
       (skosimp*)
       (expand "sigma" +)
       (prop)
       (inst?)
       (assert))
      ("3" (hide-all-but 1) (skosimp* t) (use "T_pred_lem") (assert))
      ("4" (assert))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: sigma
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem 1 ("FF" _ _))
   (rewrite "high_low_rewrite")
   (hide 2)
   (skosimp*)
   (prop)
   (induct "n" 2)
   (("1"
     (rewrite "sigma_eq_arg")
     (("1" (use "T_pred_lem") (assert))
      ("2" (hide 2) (use "T_pred_lem") (assert))))
    ("2" (hide 2) (skosimp*) (expand "sigma" +) (assert))
    ("3" (hide-all-but 1) (skosimp* t) (use "T_pred_lem") (assert))
    ("4" (assert))))


proof_type: f_proof
decl_type: formula
library: reals
theory: 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))))
          ("2"
           (ground)
           (hide -2 -3 -4 3)
           (expand "sum_it_def")
           (expand "sum_it_def")
           (expand "sigma" + 2)
           (propax))
          ("3"
           (ground)
           (expand "sigma")
           (assert)
           (hide -1 -2 3)
           (use "T_pred_lem")
           (assert))
          ("4"
           (hide -1 -2 3)
           (skosimp*)
           (ground)
           (("1"
             (expand "sum_it_def" 1)
             (expand "sigma" -)
             (assert)
             (expand "sigma" 1 2)
             (propax))
            ("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: f_proof
decl_type: formula
library: reals
theory: sigma
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem 1 ("F" "high" "low"))
   (case "low > high")
   (("1"
     (expand "sum_it")
     (expand "sum_it_def")
     (expand "sigma")
     (assert))
    ("2"
     (expand "sum_it")
     (expand "sum_it_def")
     (assert)
     (lemma "sum_it_prop")
     (inst -1 "F" "high" "low" "low")
     (assert)
     (rewrite "sigma_eq_arg"))))


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


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


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


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


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


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


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


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


proof_type: t_proof
decl_type: tcc
library: reals
theory: sigma
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp* t)
   (prop)
   (("1" (use "T_pred_lem") (assert)) ("2" (use "T_pred_lem") (assert))
    ("3" (use "T_pred_lem") (assert)) ("4" (use "T_pred_lem") (assert))))


proof_type: t_proof
decl_type: tcc
library: reals
theory: sigma
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (skosimp*)
   (typepred "low1")
   (typepred "high1")
   (case "(EXISTS (j: T): high1 <= j) AND (EXISTS (j: T): j <= low1)")
   (("1"
     (hide -2)
     (hide -2)
     (flatten)
     (skosimp*)
     (lemma "connected_domain")
     (inst - "j!2" "j!1" "low1+i!1")
     (assert))
    ("2"
     (split +)
     (("1" (split -1) (("1" (inst + "high1") (assert)) ("2" (propax))))
      ("2" (split -2) (("1" (inst + "low1") (assert)) ("2" (propax))))))))


proof_type: t_proof
decl_type: tcc
library: reals
theory: sigma
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (skosimp*)
   (typepred "low2")
   (typepred "high2")
   (case "(EXISTS (j: T): high2 <= j)
          AND (EXISTS (j: T): j <= low2)")
   (("1"
     (hide -2)
     (hide -2)
     (flatten)
     (skosimp*)
     (lemma "connected_domain")
     (inst - "j!2" "j!1" "low2+i!1")
     (assert))
    ("2"
     (split +)
     (("1" (split -1) (("1" (inst + "high2") (assert)) ("2" (propax))))
      ("2" (split -2) (("1" (inst + "low2") (assert)) ("2" (propax))))))))


proof_type: t_proof
decl_type: tcc
library: reals
theory: sigma
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (typepred "high")
   (typepred "low")
   (case "(EXISTS (j: T): j <= low)
          AND (EXISTS (j: T): high <= j)")
   (("1"
     (hide -2)
     (hide -2)
     (flatten)
     (skosimp*)
     (lemma "connected_domain")
     (inst - "j!1" "j!2" "i!1")
     (assert))
    ("2"
     (split)
     (("1"
       (assert)
       (split -)
       (("1" (inst + "low") (assert)) ("2" (propax))))
      ("2"
       (hide -1)
       (split -)
       (("1" (inst + "high") (assert)) ("2" (propax))))))))


proof_type: t_proof
decl_type: tcc
library: reals
theory: sigma
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (typepred "high")
   (typepred "low")
   (case "(EXISTS (j: T): j <= low)
                        AND (EXISTS (j: T): high <= j)")
   (("1"
     (hide -2)
     (hide -2)
     (flatten)
     (skosimp*)
     (lemma "connected_domain")
     (inst - "j!1" "j!2" "i1!1")
     (assert))
    ("2"
     (split)
     (("1"
       (assert)
       (split -)
       (("1" (inst + "low") (assert)) ("2" (propax))))
      ("2"
       (hide -1)
       (split -)
       (("1" (inst + "high") (assert)) ("2" (propax))))))))


proof_type: t_proof
decl_type: tcc
library: reals
theory: sigma
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (typepred "high")
   (typepred "low")
   (case "(EXISTS (j: T): j <= low)
                                      AND (EXISTS (j: T): high <= j)")
   (("1"
     (hide -2)
     (hide -2)
     (flatten)
     (skosimp*)
     (lemma "connected_domain")
     (inst - "j!1" "j!2" "z")
     (assert))
    ("2"
     (split)
     (("1"
       (assert)
       (split -)
       (("1" (inst + "low") (assert)) ("2" (propax))))
      ("2"
       (hide -1)
       (split -)
       (("1" (inst + "high") (assert)) ("2" (propax))))))))


proof_type: t_proof
decl_type: tcc
library: reals
theory: sigma
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "connected_domain")
   (typepred "low")
   (typepred "high")
   (ground)
   (("1" (inst - "low" "high" "z") (assert))
    ("2" (skosimp*) (inst - "j!1" "high" "z") (assert))
    ("3" (skosimp*) (inst - "low" "j!1" "z") (assert))
    ("4" (skosimp*) (inst - "j!1" "j!2" "z") (assert))))


proof_type: t_proof
decl_type: tcc
library: reals
theory: sigma
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "connected_domain")
   (typepred "low")
   (typepred "high")
   (ground)
   (("1" (inst - "low" "high" "z1") (assert))
    ("2" (skosimp*) (inst - "j!1" "high" "z1") (assert))
    ("3" (skosimp*) (inst - "low" "j!1" "z1") (assert))
    ("4" (skosimp*) (inst - "j!1" "j!2" "z1") (assert))))


proof_type: t_proof
decl_type: tcc
library: reals
theory: sigma
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "connected_domain")
   (typepred "low")
   (typepred "high")
   (ground)
   (("1" (inst - "low" "high" "z2") (assert))
    ("2" (skosimp*) (inst - "j!1" "high" "z2") (assert))
    ("3" (skosimp*) (inst - "low" "j!1" "z2") (assert))
    ("4" (skosimp*) (inst - "j!1" "j!2" "z2") (assert))))


proof_type: j_proof
decl_type: tcc
library: reals
theory: 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 "(FORALL (rng: nat): T_pred(low!1+rng) IMPLIES (rational_pred(sigma(low!1, low!1+rng, Fnat!1))             AND integer_pred(sigma(low!1, low!1+rng, Fnat!1)))       AND sigma(low!1, low!1+rng, Fnat!1) >= 0)")
   (("1"
     (inst -1 "high!1-low!1")
     (("1"
       (assert)
       (split -1)
       (("1" (propax))
        ("2" (use "T_pred_lem") (assert) (expand "sigma") (propax))))
      ("2" (expand "sigma") (assert))))
    ("2"
     (hide 2)
     (induct "rng")
     (("1" (skosimp*) (rewrite "sigma_eq_arg") (assert))
      ("2"
       (skosimp*)
       (expand "sigma" 1)
       (split -1)
       (("1" (flatten) (assert))
        ("2"
         (hide 2)
         (lemma "T_pred_lem")
         (inst - "low!1+j!1" "low!1" "low!1+j!1")
         (("1" (assert))
          ("2" (assert) (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" (skosimp*)) ("4" (skosimp*)) ("5" (skosimp*))))


proof_type: j_proof
decl_type: tcc
library: reals
theory: 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) (grind))
        ("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: t_proof
decl_type: tcc
library: reals
theory: sigma
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp* t)
   (prop)
   (("1" (inst + "low!1") (assert))
    ("2" (skosimp*) (inst + "j!1") (assert))
    ("3" (skosimp*) (inst + "low!1") (assert))
    ("4" (skosimp*) (inst + "j!1") (assert))))


proof_type: f_proof
decl_type: formula
library: reals
theory: factorial
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (rewrite "product_it_product" :dir rl)
   (expand "product_it")
   (lemma "for_induction")
   (inst? -1)
   (inst -1 "LAMBDA(i:upto(n),a:real) : a = factorial(i)")
   (assert)
   (hide 2)
   (skeep)
   (expand "factorial" +)
   (assert))


proof_type: f_proof
decl_type: formula
library: reals
theory: factorial
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (rewrite "product_it_product" :dir rl)
   (expand "product_it")
   (lemma "for_induction")
   (inst? -1)
   (inst -1 "LAMBDA(i:upto(p),a:real) : a = factorial(i)")
   (assert)
   (hide 2)
   (skeep)
   (expand "factorial" +)
   (assert))


proof_type: f_proof
decl_type: formula
library: reals
theory: binomial
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "C")
   (expand "factorial" 1 2)
   (expand "factorial" 1 2)
   (expand "factorial" 1 1)
   (lemma "div_simp" ("n0x" "factorial(pn!1-1)"))
   (assert))


proof_type: f_proof
decl_type: formula
library: reals
theory: binomial
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "C")
   (expand "factorial" 1 3)
   (expand "factorial" 1 2)
   (expand "factorial" 1 1)
   (lemma "div_simp" ("n0x" "factorial(pn!1-1)"))
   (assert))


proof_type: f_proof
decl_type: formula
library: reals
theory: binomial
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "C")
   (name "FACN" "factorial(n!1)")
   (expand "factorial" 1 1)
   (replace -1)
   (name "FACNK" "factorial(n!1-k!1)")
   (expand "factorial" 1 4)
   (expand "factorial" 1 2)
   (replace -1)
   (expand "factorial" 1 7)
   (expand "factorial" 1 3)
   (expand "factorial" 1 2)
   (expand "factorial" 1 1)
   (name-replace "FACK1" "factorial(k!1-1)")
   (hide -1 -2)
   (lemma "both_sides_times1"
    ("n0z"
     "FACN/(FACK1*FACNK)"
     "x"
     "(1+n!1)/((n!1+1-k!1)*k!1)"
     "y"
     "1/(n!1+1-k!1)+1/k!1"))
   (("1"
     (lemma "add_div"
      ("x" "1" "n0x" "n!1 + 1 - k!1" "y" "1" "n0y" "k!1"))
     (rewrite "div_times" -2)
     (("1" (assert) (replace -1 -2 rl) (rewrite "div_times" -2) (assert))
      ("2"
       (hide-all-but -1)
       (lemma "posint_times_posint_is_posint"
        ("pi" "k!1" "pj" "n!1+1-k!1"))
       (assert))))
    ("2"
     (hide 1)
     (lemma "posint_times_posint_is_posint"
      ("pi" "k!1" "pj" "n!1+1-k!1"))
     (assert))))


proof_type: f_proof
decl_type: formula
library: reals
theory: binomial
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (typepred "k!1")
   (expand "C")
   (expand "factorial" 1 11)
   (expand "factorial" 1 8)
   (name "K1" "factorial(k!1)")
   (replace -1)
   (name "K2" "factorial(n!1)")
   (replace -1)
   (expand "factorial" 1 2)
   (expand "factorial" 1 1)
   (name "K3" "factorial(-1 - k!1 + n!1)")
   (replace -1)
   (name-replace "K4" "K3*K1")
   (lemma "minus_div2" ("x" "K2*n!1" "y" "K2*k!1" "n0x" "K4*(n!1-k!1)"))
   (("1"
     (lemma "div_cancel1" ("x" "K2/K4" "n0z" "n!1-k!1"))
     (rewrite "div_div2" -1)
     (replace -2 1)
     (replace -1 1)
     (lemma "div_cancel1" ("x" "K2/K4" "n0z" "1+k!1"))
     (rewrite "div_div2" -1)
     (replace -1 1)
     (propax))
    ("2"
     (hide 1)
     (expand "K4")
     (lemma "posreal_times_posreal_is_posreal"
      ("px" "n!1-k!1" "py" "K1*K3"))
     (assert))))


proof_type: f_proof
decl_type: formula
library: reals
theory: binomial
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem 1 ("m"))
   (expand "C")
   (expand "factorial" 1 2)
   (expand "factorial" 1 2)
   (expand "factorial" 1 2)
   (expand "factorial" 1 1)
   (expand "factorial" 1 1)
   (lemma "div_cancel1" ("x" "(m*m-m)/2" "n0z" "factorial(m-2)"))
   (replace -1 1 rl)
   (propax))


proof_type: f_proof
decl_type: formula
library: reals
theory: binomial
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "n")
   (("1" (grind))
    ("2"
     (skolem 1 ("j"))
     (flatten)
     (expand "sigma" 1)
     (rewrite "C_n" 1)
     (lemma "expt_plus" ("n0x" "2" "i" "1" "j" "j"))
     (replace -1)
     (rewrite "expt_x1" 1)
     (hide -1)
     (case "j=0")
     (("1"
       (replace -1)
       (expand "sigma")
       (rewrite "C_0")
       (rewrite "C_0")
       (grind))
      ("2"
       (case "FORALL (j,n:nat): j <= n => sigma(0, j, LAMBDA (i: {i: nat | i <= n}): C(n, i)) = sigma(0, j, LAMBDA (i:nat): IF i>n THEN 0 ELSE C(n, i) ENDIF)")
       (("1"
         (inst-cp - "j" "j+1")
         (inst - "j" "j")
         (assert)
         (("1"
           (replace -1)
           (replace -2)
           (hide -1 -2)
           (lemma "sigma_first[nat]" ("low" "0" "high" "j"))
           (("1"
             (inst-cp -
              "LAMBDA (i: nat): IF i > j THEN 0 ELSE C(j, i) ENDIF")
             (("1"
               (inst -
                "LAMBDA (i: nat): IF i > 1+j THEN 0 ELSE C(j+1, i) ENDIF")
               (("1"
                 (assert)
                 (rewrite "C_0")
                 (rewrite "C_0")
                 (replace -3 -2)
                 (replace -1 2)
                 (hide -1)
                 (expand "sigma" -2)
                 (rewrite "C_n")
                 (lemma "extensionality"
                  ("f"
                   "LAMBDA (i_1: nat):
                                  (LAMBDA (i: nat):
                                     IF i > j + 1 OR i = 0 THEN 0 ELSE C(j, i - 1) ENDIF)
                                      (i_1 + 1)"
                   "g"
                   "LAMBDA (i: nat): IF i > j THEN 0 ELSE C(j, i) ENDIF"))
                 (("1"
                   (lemma "sigma_shift_T[nat]"
                    ("low"
                     "0"
                     "high"
                     "j-1"
                     "z"
                     "1"
                     "F"
                     "LAMBDA (i: nat): IF i > j+1 OR i = 0 THEN 0 ELSE C(j, i-1) ENDIF"))
                   (("1"
                     (split -1)
                     (("1"
                       (split -2)
                       (("1"
                         (replace -1 -2)
                         (replace -2 -4 rl)
                         (hide -1 -2)
                         (lemma "sigma_sum[nat]"
                          ("low"
                           "1"
                           "high"
                           "j"
                           "F"
                           "LAMBDA (i: nat): IF i > j THEN 0 ELSE C(j, i) ENDIF"
                           "G"
                           "LAMBDA (i: nat): IF i > j + 1 OR i = 0 THEN 0 ELSE C(j, i - 1) ENDIF"))
                         (("1"
                           (lemma "extensionality"
                            ("f"
                             "LAMBDA (i: nat):
                                              IF i > 1 + j THEN 0 ELSE C(1 + j, i) ENDIF"
                             "g"
                             "LAMBDA (i_1: nat):
                                            (LAMBDA (i: nat): IF i > j THEN 0 ELSE C(j, i) ENDIF)(i_1) +
                                             (LAMBDA (i: nat):
                                                IF i > j + 1 OR i = 0 THEN 0 ELSE C(j, i - 1) ENDIF)
                                                 (i_1)"))
                           (("1"
                             (split -1)
                             (("1" (replace -1 -2 rl) (assert))
                              ("2"
                               (hide-all-but (1 2))
                               (skosimp*)
                               (case "x!1=0")
                               (("1"
                                 (assert)
                                 (replace -1)
                                 (rewrite "C_0")
                                 (rewrite "C_0"))
                                ("2"
                                 (case "x!1<=j")
                                 (("1"
                                   (assert)
                                   (lemma
                                    "C_n_plus_1"
                                    ("n" "j" "k" "x!1"))
                                   (assert))
                                  ("2"
                                   (case "x!1 = j+1")
                                   (("1"
                                     (assert)
                                     (replace -1)
                                     (rewrite "C_n")
                                     (rewrite "C_n"))
                                    ("2" (assert))))))))))
                            ("2" (hide-all-but (1 2)) (grind))
                            ("3" (hide-all-but (1 2)) (grind))
                            ("4" (hide-all-but (1 2)) (grind))))
                          ("2" (hide-all-but (1 2)) (grind))))
                        ("2"
                         (hide-all-but (1 2))
                         (skosimp*)
                         (case "x!1 > j")
                         (("1" (assert)) ("2" (assert))))))
                      ("2" (hide-all-but (1 2)) (grind))))
                    ("2" (hide-all-but (1 2)) (grind))))
                  ("2" (hide-all-but (1 2)) (grind))
                  ("3" (hide-all-but (1 2)) (grind))))
                ("2" (hide-all-but (1 2)) (grind))))
              ("2" (hide-all-but (1 2)) (grind))))
            ("2" (hide-all-but (1 2)) (grind))))
          ("2" (skosimp*) (assert))))
        ("2"
         (hide-all-but 1)
         (skolem 1 ("_" "n!1"))
         (induct "j")
         (("1" (expand "sigma") (expand "sigma") (propax))
          ("2"
           (skolem 1 ("j!1"))
           (flatten)
           (assert)
           (("1" (expand "sigma" 1) (propax)) ("2" (skosimp*) (assert))))
          ("3" (skosimp*) (assert)) ("4" (hide 2) (grind))
          ("5" (hide 2) (grind))))
        ("3" (hide-all-but 1) (grind)) ("4" (hide-all-but 1) (grind))
        ("5" (hide-all-but 1) (grind))))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: binomial
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (decompose-equality)
   (case-replace "x!2 = 0")
   (("1" (grind))
    ("2"
     (expand* "C_it" "C")
     (rewrite "product_it_product")
     (lemma "product_cross")
     (inst?)
     (assert)
     (rewrite "product_factorial")
     (mult-by 2 "factorial(x!2)")
     (replaces -1 :dir rl)
     (case-replace
      "factorial(x!1) / (factorial(x!2) * factorial(x!1 - x!2)) *
                                           factorial(x!2) = factorial(x!1)/factorial(x!1 - x!2)")
     (("1"
       (hide -1)
       (typepred "x!2")
       (rewrite "product_it_product" :dir rl)
       (expand "product_it")
       (lemma "for_induction")
       (inst?)
       (inst -1
        "lambda(i:upto(x!2),a:real) : a = factorial(x!1-x!2+i)/factorial(x!1-x!2)")
       (assert)
       (hide 3)
       (skeep 1)
       (expand "factorial" 1 1)
       (grind-reals))
      ("2" (hide 2 3) (grind-reals))))))


proof_type: t_proof
decl_type: tcc
library: reals
theory: binomial
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem 1 ("n" "k"))
   (lemma "posreal_div_posreal_is_posreal"
    ("px" "factorial(n)" "py" "(factorial(k) * factorial(n - k))"))
   (assert)
   (case "FORALL (n:nat): factorial(n)/factorial(n) = 1")
   (("1"
     (case "FORALL (n: nat, j: {i: nat | i <= n+1}):
                            factorial(n + 1) / (factorial(j) * factorial(n + 1 - j)) =
                             IF j = 0 OR j = n + 1 THEN 1
                             ELSE factorial(n) / (factorial(j) * factorial(n - j)) +
                                   factorial(n) / (factorial(j - 1) * factorial(n + 1 - j))
                             ENDIF")
     (("1"
       (case "FORALL (n:nat, k: {i: nat | i <= n}): integer_pred(factorial(n) / (factorial(k) * factorial(n - k)))")
       (("1" (inst -1 "n" "k"))
        ("2"
         (hide 2 -3)
         (induct "n")
         (("1"
           (skosimp*)
           (typepred "k!1")
           (expand "factorial" 1)
           (rewrite "div_simp" 1)
           (assert))
          ("2"
           (skolem 1 ("n!1"))
           (flatten)
           (skolem 1 ("i"))
           (inst -2 "n!1" "i")
           (case "i=0")
           (("1" (replace -1) (replace -3 1) (assert))
            ("2"
             (case "i=n!1+1")
             (("1" (replace -1) (replace -3 2) (assert))
              ("2"
               (assert)
               (replace -2 3)
               (inst-cp -1 "i-1")
               (inst -1 "i")
               (lemma "int_plus_int_is_int"
                ("i"
                 "factorial(n!1) / (factorial(i - 1) * factorial(1 - i + n!1))"
                 "j"
                 "factorial(n!1) / (factorial(i) * factorial(n!1 - i))"))
               (("1" (propax)) ("2" (propax))
                ("3" (replace -2 1) (propax))))))))))))
      ("2"
       (hide -2 2)
       (skosimp*)
       (typepred "j!1")
       (case "j!1 = 0")
       (("1"
         (replace -1)
         (expand "factorial" 1 2)
         (inst - "n!1+1")
         (assert))
        ("2"
         (expand "<=" -1)
         (split -1)
         (("1"
           (assert)
           (expand "factorial" 2 8)
           (expand "factorial" 2 6)
           (expand "factorial" 2 3)
           (expand "factorial" 2 7)
           (expand "factorial" 2 5)
           (expand "factorial" 2 3)
           (expand "factorial" 2 1)
           (name-replace "FACN" "factorial(n!1)")
           (name-replace "FACJ1" "factorial(j!1-1)")
           (name-replace "FACNJ" "factorial(n!1-j!1)")
           (lemma "add_div"
            ("x" "1" "n0x" "n!1+1-j!1" "y" "1" "n0y" "j!1"))
           (lemma "both_sides_times1"
            ("x"
             "(1 / (n!1 + 1 - j!1)) + (1 / j!1)"
             "y"
             "(1 * j!1 + 1 * (n!1 + 1 - j!1)) / ((n!1 + 1 - j!1) * j!1)"
             "n0z"
             "FACN/(FACJ1*FACNJ)"))
           (assert)
           (rewrite "div_times" -1)
           (rewrite "div_times" -1)
           (rewrite "div_times" -1)
           (("1" (assert)) ("2" (replace -1) (inst - "n!1+1") (assert))))
          ("2"
           (replace -1)
           (inst - "n!1+1")
           (expand "factorial" 2 3)
           (assert))))))
      ("3" (skosimp*) (assert)) ("4" (skosimp*) (assert))))
    ("2"
     (hide-all-but 1)
     (skosimp*)
     (lemma "div_simp" ("n0x" "factorial(n!1)"))
     (propax))))


proof_type: t_proof
decl_type: tcc
library: reals
theory: binomial
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "product_it")
   (lemma "for_induction")
   (inst?)
   (inst -1 "LAMBDA(i:upto(k),a:real):rational_pred(a)")
   (assert)
   (hide 2)
   (skeep)
   (rewrite "closed_times"))


proof_type: f_proof
decl_type: formula
library: reals
theory: sigma_swap
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (case "NOT (FORALL (lowz: T_low, highz: T_high): NOT lowz > highz IMPLIES T_pred(highz))")
   (("1"
     (hide 2)
     (skosimp* t)
     (assert)
     (skosimp*)
     (typepred "j!1")
     (lemma "connected_domain")
     (inst - "lowz!1" "j!1" "highz!1")
     (("1" (assert))
      ("2"
       (prop)
       (skosimp*)
       (lemma "connected_domain")
       (assert)
       (inst - "j!2" "j!1" "lowz!1")
       (assert))))
    ("2"
     (label "Tplem" -1)
     (hide "Tplem")
     (skeep)
     (case "high1 >= low1 AND high2 >= low2")
     (("1"
       (flatten)
       (name "k1" "high1-low1")
       (name "k2" "high2-low2")
       (case "high1 = low1 + k1 AND high2 = low2 + k2")
       (("1"
         (flatten)
         (replace -1)
         (replace -2)
         (case "FORALL (kk1: nat): T_high?(low1+kk1) IMPLIES sigma(low1,low1+kk1,LAMBDA (i: T): sigma(low2, low2 + k2, LAMBDA (j: T): F(i, j))) = sigma(low2, low2 + k2,
                                                                          LAMBDA (j: T): sigma(low1, low1 + kk1, LAMBDA (i: T): F(i, j)))")
         (("1"
           (inst - "k1")
           (("1"
             (assert)
             (typepred "high1")
             (split -)
             (("1" (inst + "high1") (assert)) ("2" (assert))))
            ("2" (assert))))
          ("2"
           (hide 2)
           (induct "kk1")
           (("1"
             (flatten)
             (assert)
             (expand "sigma" 1 1)
             (expand "sigma" 1 1)
             (expand "sigma" 1 3)
             (expand "sigma" 1 3)
             (propax))
            ("2"
             (skosimp*)
             (split -)
             (("1"
               (case "NOT T_pred(low1+(j!1+1))")
               (("1"
                 (reveal "Tplem")
                 (inst - "low1" "1+j!1+low1")
                 (("1" (assert)) ("2" (assert) (inst + "j!2"))))
                ("2"
                 (lemma "sigma_split")
                 (inst -
                  "LAMBDA (i: T): sigma(low2, low2 + k2, LAMBDA (j: T): F(i, j))"
                  "low1 + (j!1+1)" "low1" "low1 + j!1")
                 (assert)
                 (replace -1)
                 (hide -1)
                 (expand "sigma" 1 1)
                 (expand "sigma" 1 1)
                 (replace -2)
                 (hide -2)
                 (rewrite "sigma_sum")
                 (("1" (expand "sigma" 1 4) (propax))
                  ("2" (skosimp*) (inst + "j!2") (assert))))))
              ("2" (inst + "j!2") (assert))))
            ("3" (skosimp*) (inst + "j!1"))
            ("4" (skosimp*) (typepred "high2") (assert))
            ("5" (skosimp*) (typepred "high2") (assert))
            ("6" (skosimp*))))
          ("3" (skosimp*) (inst + "j!1")) ("4" (skosimp*))))
        ("2" (assert))))
      ("2"
       (split)
       (("1"
         (expand "sigma" 2 1)
         (assert)
         (expand "sigma" 2 2)
         (lemma "sigma_zero")
         (inst - "high2" "low2")
         (assert))
        ("2"
         (expand "sigma" 2 2)
         (assert)
         (expand "sigma" 2 2)
         (lemma "sigma_zero")
         (inst - "high1" "low1"))))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: sigma_swap
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (label "highge" -1)
   (hide "highge")
   (lemma "sigma_swap")
   (name "G" "LAMBDA (i,j: T): IF j<i THEN 0 ELSE F(i,j) ENDIF")
   (inst - "G" "high1" "high2" "low1" "low1")
   (lemma "sigma_restrict_eq")
   (inst-cp - "LAMBDA (i: T): sigma(low1, high2, LAMBDA (j: T): G(i, j))"
    "LAMBDA (i: T): sigma(i, high2, LAMBDA (j: T): F(i, j))" "high1"
    "low1")
   (inst - "LAMBDA (j: T): sigma(low1, high1, LAMBDA (i: T): G(i, j))"
    "LAMBDA (j: T): sigma(low1, j, LAMBDA (i: T): F(i, j))" "high2"
    "low1")
   (split -)
   (("1"
     (split -)
     (("1" (assert))
      ("2"
       (hide 2)
       (decompose-equality)
       (expand "restrict")
       (lift-if)
       (ground)
       (lemma "sigma_split")
       (inst - "LAMBDA (j: T): G(x!1, j)" "high2" "low1" "x!1-1")
       (assert)
       (split -)
       (("1"
         (replace -1)
         (hide -1)
         (lemma "sigma_restrict_eq")
         (inst - "LAMBDA (j: T): G(x!1, j)" "LAMBDA (j: T): 0" "x!1-1"
          "low1")
         (split -1)
         (("1"
           (replace -1)
           (lemma "sigma_zero")
           (inst?)
           (replace -1)
           (hide -1)
           (assert)
           (lemma "sigma_restrict_eq")
           (inst?)
           (assert)
           (hide 4)
           (decompose-equality)
           (expand "restrict")
           (lift-if)
           (ground)
           (replace -3 + :dir rl)
           (assert))
          ("2"
           (hide 4)
           (decompose-equality)
           (expand "restrict")
           (lift-if)
           (ground)
           (replace -2 + :dir rl)
           (assert))))
        ("2"
         (expand "sigma" + 2)
         (assert)
         (lemma "sigma_zero")
         (inst - "high2" "low1")
         (replace -1 + :dir rl)
         (lemma "sigma_restrict_eq")
         (inst?)
         (assert)
         (decompose-equality)
         (expand "restrict")
         (lift-if)
         (ground)
         (replace -3 :dir rl)
         (assert))))))
    ("2"
     (hide 2)
     (hide -1)
     (decompose-equality)
     (expand "restrict")
     (lift-if)
     (ground)
     (lemma "sigma_split")
     (inst - "LAMBDA (i: T): G(i, x!1)" "high1" "low1" "x!1")
     (assert)
     (split -)
     (("1"
       (replace -1)
       (hide -1)
       (lemma "sigma_restrict_eq")
       (inst - "LAMBDA (i: T): G(i, x!1)" "LAMBDA (i: T): 0" "high1"
        "1+x!1")
       (split -)
       (("1"
         (replace -1)
         (hide -1)
         (lemma "sigma_zero")
         (inst?)
         (replace -1)
         (hide -1)
         (assert)
         (lemma "sigma_restrict_eq")
         (inst?)
         (assert)
         (hide 4)
         (decompose-equality)
         (expand "restrict")
         (lift-if)
         (ground)
         (replace -1 :dir rl)
         (assert))
        ("2"
         (decompose-equality)
         (expand "restrict")
         (lift-if)
         (ground)
         (replace -1 :dir rl)
         (assert))))
      ("2" (reveal "highge") (assert))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: sigma_nat
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))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: sigma_nat
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")
     (expand "~")
     (assert)
     (skosimp*)
     (assert)
     (lift-if)
     (assert))
    ("2"
     (case "high!1<low!1")
     (("1" (expand "sigma") (assert)) ("2" (assert))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: sigma_nat
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (rewrite "sigma_shift_T2")
   (("1"
     (rewrite "sigma_restrict_eq")
     (("1" (hide 2) (expand "restrict") (propax))
      ("2" (skosimp*) (assert))))
    ("2" (case "low!1 <= high!1") (("1" (assert)) ("2" (grind))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: sigma_nat
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "n")
   (("1"
     (skeep)
     (assert)
     (rewrite "sigma_restrict_eq")
     (decompose-equality 1)
     (expand "restrict")
     (propax))
    ("2"
     (skeep)
     (induct "m")
     (("1" (assert))
      ("2"
       (skolem 1 "kk")
       (flatten)
       (assert)
       (skeep)
       (assert)
       (inst - "F")
       (case "NOT 1+j <=kk")
       (("1"
         (case "NOT kk=j")
         (("1" (assert))
          ("2"
           (replace -1)
           (assert)
           (expand "sigma" +)
           (expand "sigma" +)
           (propax))))
        ("2"
         (assert)
         (expand "sigma" 1 1)
         (replace -2 +)
         (assert)
         (expand "sigma" 1 2)
         (propax))))
      ("3" (hide 2) (skosimp*) (assert))))
    ("3" (skosimp*) (assert))))


proof_type: f_proof
decl_type: formula
library: reals
theory: sigma_nat
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (case "FORALL (F: [nat -> real], k: nat, low: nat):
                 sigma(low, low+k, F) =
                  sigma(low, low+k,
                        LAMBDA (n: nat):
                          IF n > k + 2*low THEN 0 ELSE F(2*low+k - n) ENDIF)")
   (("1"
     (skeep)
     (case "high < low")
     (("1" (expand "sigma" +) (assert))
      ("2"
       (inst - "F" "high-low" "low")
       (("1" (assert)) ("2" (assert))))))
    ("2"
     (hide 2)
     (induct "k")
     (("1" (skeep) (expand "sigma") (expand "sigma") (propax))
      ("2"
       (skeep)
       (skeep)
       (inst - "F" "low")
       (expand "sigma" 1 1)
       (lemma "sigma_split")
       (inst -
        "LAMBDA (n: nat):
                       IF n > 1 + j + 2 * low THEN 0
                       ELSE F(1 - n + j + 2 * low)
                       ENDIF"
        "1+j+low" "low" "low")
       (("1"
         (assert)
         (replace -1)
         (hide -1)
         (expand "sigma" + 3)
         (expand "sigma" + 3)
         (lemma "sigma_shift")
         (inst -
          "LAMBDA (n: nat):
                         IF n > 1 + j + 2 * low THEN 0
                         ELSE F(1 - n + j + 2 * low)
                         ENDIF"
          "low+j" "low" "1")
         (("1"
           (replace -1)
           (hide -1)
           (assert)
           (replace -1)
           (hide -1)
           (rewrite "sigma_restrict_eq")
           (("1"
             (hide 2)
             (decompose-equality)
             (("1" (expand "restrict") (propax))
              ("2" (skosimp*) (assert)) ("3" (skosimp*) (assert))))
            ("2" (skosimp*) (assert)) ("3" (skosimp*) (assert))))
          ("2" (skosimp*) (assert))))
        ("2" (skosimp*) (assert))))
      ("3" (skosimp*) (assert))))
    ("3" (skosimp*) (assert))))


proof_type: f_proof
decl_type: formula
library: reals
theory: sigma_nat
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (case "FORALL (F, G: [nat -> real], high1, high2: int, low1, low2,rn: nat):
                               rn = high1-low1 IMPLIES
                               sigma(low1, high1, F) * sigma(low2, high2, G) =
                                sigma(low1 + low2, high1 + high2,
                                      LAMBDA (k: nat):
                                        sigma(low1, high1,
                                              LAMBDA (i: nat):
                                                IF (i < k - high2 OR i > k - low2) THEN 0
                                                ELSE F(i) * G(k - i)
                                                ENDIF))")
   (("1"
     (skeep)
     (case "high1 >= low1")
     (("1" (inst?) (inst - "high1-low1") (assert))
      ("2"
       (hide -)
       (expand "sigma" + 1)
       (assert)
       (assert)
       (case "FORALL (eg1:real): 0*eg1 = 0")
       (("1"
         (rewrite -1)
         (hide -1)
         (rewrite "sigma_restrict_eq_0")
         (("1" (hide 3) (skosimp*) (expand "sigma") (propax))
          ("2" (hide 3) (grind)) ("3" (hide 3) (flatten) (assert))))
        ("2" (hide 3) (assert))))))
    ("2"
     (hide 2)
     (induct "rn")
     (("1"
       (skeep)
       (case "high1 = low1")
       (("1"
         (replace -1)
         (assert)
         (expand "sigma" + 1)
         (expand "sigma" + 2)
         (rewrite "sigma_scal" :dir rl)
         (expand "sigma" + 3)
         (expand "sigma" + 3)
         (assert)
         (lemma "sigma_shift")
         (invoke (inst - "%1" _ _ _) (! 1 2 3))
         (("1"
           (inst - "high2" "low2" "low1")
           (replace -1)
           (hide -1)
           (rewrite "sigma_eq"))
          ("2" (hide 2) (skosimp*) (assert))))
        ("2" (assert))))
      ("2"
       (skeep)
       (skeep)
       (case "high1 >= low1 AND high2 >= low2")
       (("1"
         (flatten)
         (inst - "F" "G" "high1-1" "high2" "low1" "low2")
         (assert)
         (expand "sigma" + 1)
         (replace -3)
         (hide -3)
         (expand "sigma" + 5)
         (lemma "sigma_sum")
         (inst -
          "LAMBDA (k: nat):
                         IF (high1 < k - high2 OR high1 > k - low2) THEN 0
                         ELSE F(high1) * G(k - high1)
                         ENDIF"
          "LAMBDA (k: nat):
                          sigma(low1, high1 - 1,
                                LAMBDA (i: nat):
                                  IF (i < k - high2 OR i > k - low2) THEN 0
                                  ELSE F(i) * G(k - i)
                                  ENDIF)"
          "high1+high2" "low1+low2")
         (("1"
           (replace -1 :dir rl)
           (hide -1)
           (case "FORALL (a1,a2,b1,b2:real): a1=b1 AND a2=b2 IMPLIES a1+a2=b2+b1")
           (("1"
             (inst?)
             (("1"
               (assert)
               (hide 2)
               (split +)
               (("1"
                 (expand "sigma" + 3)
                 (lemma "sigma_restrict_eq_0")
                 (inst?)
                 (("1" (assert)) ("2" (hide 2) (grind))))
                ("2"
                 (lemma "sigma_split")
                 (inst -
                  "LAMBDA (k: nat):
                                 IF (high1 < k - high2 OR high1 > k - low2) THEN 0
                                 ELSE F(high1) * G(k - high1)
                                 ENDIF"
                  "high1+high2" "low1+low2" "high1+low2-1")
                 (("1"
                   (assert)
                   (replace -1)
                   (hide -1)
                   (case "NOT sigma(low1 + low2, high1 - 1 + low2,
                                       LAMBDA (k: nat):
                                         IF (high1 < k - high2 OR high1 > k - low2) THEN 0
                                         ELSE F(high1) * G(k - high1)
                                         ENDIF)
                          = 0")
                   (("1" (hide 2) (rewrite "sigma_restrict_eq_0"))
                    ("2"
                     (replaces -1)
                     (assert)
                     (lemma "sigma_shift")
                     (inst -
                      "LAMBDA (k: nat):
                                     IF (high1 < k - high2 OR high1 > k - low2) THEN 0
                                     ELSE F(high1) * G(k - high1)
                                     ENDIF"
                      "high2" "low2" "high1")
                     (("1"
                       (replace -1)
                       (hide -1)
                       (rewrite "sigma_scal" :dir rl)
                       (rewrite "sigma_eq"))
                      ("2" (hide 2) (skosimp*) (assert))))
                    ("3" (hide 2) (skosimp*) (assert))))
                  ("2" (hide 2) (skosimp*) (assert))))))
              ("2" (hide 2) (skosimp*) (assert))
              ("3" (hide 2) (skosimp*) (assert))))
            ("2" (hide 2) (skosimp*) (assert))))
          ("2" (hide 2) (skosimp*) (assert))
          ("3" (hide 2) (skosimp*) (assert))))
        ("2"
         (hide -1)
         (ground)
         (expand "sigma" + 2)
         (rewrite "sigma_restrict_eq_0")
         (("1"
           (hide 3)
           (skosimp*)
           (rewrite "sigma_restrict_eq_0")
           (("1" (hide 2) (skosimp*) (assert) (lift-if) (ground))
            ("2" (hide 2) (skosimp*) (assert))))
          ("2" (hide 3) (skosimp*) (assert))))))
      ("3" (hide 2) (skosimp*) (assert))
      ("4" (hide 2) (skosimp*) (assert))
      ("5" (hide 2) (skosimp*) (assert))
      ("6" (hide 2) (skosimp*) (assert))))
    ("3" (hide 2) (skosimp*) (assert)) ("4" (hide 2) (skosimp*) (assert))
    ("5" (hide 2) (skosimp*) (assert))
    ("6" (hide 2) (skosimp*) (assert))))


proof_type: f_proof
decl_type: formula
library: reals
theory: sigma_nat
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (label "ontoz" -2)
   (label "rangez" -1)
   (label "injz" -3)
   (case "NOT low<=high")
   (("1" (expand "sigma" +) (assert))
    ("2"
     (name "FF"
           "LAMBDA (k:nat): (LAMBDA (i:nat): IF low<=i AND i<=low+k THEN F(i) ELSE 0 ENDIF)")
     (case "FORALL (k:nat): low+k<=high IMPLIES sigma(low,high, FF(k)) = sigma(low,high,FF(k) o sig)")
     (("1"
       (inst - "high-low")
       (("1"
         (assert)
         (case "sigma(low, high, FF(high - low)) = sigma(low, high,F) AND  sigma(low, high, FF(high - low) o sig) = sigma(low, high, F o sig)")
         (("1" (flatten) (assert))
          ("2"
           (split 1)
           (("1"
             (rewrite "sigma_eq" 1)
             (skosimp*)
             (typepred "n!1")
             (expand "FF" 1)
             (propax))
            ("2"
             (rewrite "sigma_eq" 1)
             (expand "o")
             (skosimp*)
             (expand "FF" 1)
             (lift-if)
             (inst - "n!1")
             (ground))))))
        ("2" (assert))))
      ("2"
       (hide 2)
       (induct "k")
       (("1"
         (assert)
         (inst -4 "low")
         (skosimp*)
         (lemma "sigma_eq_one_arg")
         (inst?)
         (inst - "low")
         (assert)
         (split -)
         (("1"
           (replaces -1)
           (lemma "sigma_eq_one_arg")
           (inst?)
           (inst - "j!1")
           (assert)
           (split -)
           (("1" (replaces -1) (expand "o") (assert))
            ("2"
             (skosimp*)
             (expand "o" 1)
             (expand "FF" 1)
             (inst - "j!1" "i!1")
             (lift-if)
             (ground))
            ("3"
             (skosimp*)
             (inst - "i!1" "j!1")
             (expand "o" 1)
             (assert)
             (expand "FF" 1)
             (lift-if)
             (inst - "i!1")
             (ground))))
          ("2" (skosimp*))
          ("3"
           (skosimp*)
           (inst - "i!1" "j!1")
           (expand "FF" 1)
           (propax))))
        ("2"
         (skolem 1 "k")
         (flatten)
         (name "GG"
               "LAMBDA (i:nat): IF i=low+k+1 THEN F(i) ELSE 0 ENDIF")
         (assert)
         (case "NOT (FF(k+1) = (LAMBDA (d:nat): FF(k)(d) + GG(d)))")
         (("1"
           (decompose-equality 1)
           (expand "FF" 1)
           (expand "GG" 1)
           (assert)
           (lift-if)
           (lift-if)
           (lift-if)
           (lift-if)
           (lift-if)
           (lift-if)
           (lift-if)
           (assert)
           (ground))
          ("2"
           (name "HH"
                 "LAMBDA (i:nat): IF sig(i)=(low+k+1) THEN F(sig(i)) ELSE 0 ENDIF")
           (case "NOT ((FF(k+1) o sig) = (LAMBDA (d:nat): (FF(k) o sig)(d) + HH(d)))")
           (("1"
             (decompose-equality 1)
             (expand "o" 1)
             (expand "FF" 1)
             (expand "HH" 1)
             (lift-if)
             (assert)
             (lift-if)
             (assert)
             (lift-if)
             (assert)
             (lift-if)
             (ground))
            ("2"
             (replaces -1 +)
             (replaces -2 +)
             (rewrite "sigma_sum" :dir rl)
             (rewrite "sigma_sum" :dir rl)
             (case "sigma(low,high,GG) = sigma(low,high,HH)")
             (("1"
               (replaces -1)
               (assert)
               (rewrite "sigma_tolambda" -3)
               (replaces -3)
               (rewrite "sigma_tolambda" 1))
              ("2"
               (hide 2)
               (lemma "sigma_eq_one_arg2")
               (inst - "GG" "high" "low" "low+k+1")
               (assert)
               (split -)
               (("1"
                 (replaces -1)
                 (lemma "sigma_eq_one_arg2")
                 (inst "ontoz" "low+k+1")
                 (skosimp*)
                 (inst - "HH" "high" "low" "j!1")
                 (assert)
                 (split -)
                 (("1"
                   (replaces -1)
                   (expand "GG" 1)
                   (expand "HH" 1)
                   (assert))
                  ("2"
                   (skosimp*)
                   (expand "HH" 2)
                   (lift-if)
                   (ground)
                   (inst - "i!1" "j!1")
                   (assert))))
                ("2"
                 (hide 2)
                 (skosimp*)
                 (expand "GG" +)
                 (assert))))))))))
        ("3" (skosimp*) (assert)) ("4" (skosimp*) (assert))
        ("5" (skosimp*) (assert))))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: sigma_nat
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (label "Gdef" -4)
   (label "ontoz" -3)
   (label "rangez" -1)
   (label "injz" -2)
   (case "NOT low1<=high1")
   (("1"
     (expand "sigma" + 1)
     (assert)
     (rewrite "sigma_restrict_eq_0" +)
     (skosimp*)
     (inst "ontoz" "i!1")
     (assert)
     (skosimp*))
    ("2"
     (case "NOT low2<=high2")
     (("1" (assert) (inst - "low1") (assert) (ground))
      ("2"
       (name "FF"
             "LAMBDA (k:nat): (LAMBDA (i:nat): IF low1<=i AND i<=low1+k THEN F(i) ELSE 0 ENDIF)")
       (name "GG"
             "LAMBDA (k:nat): (LAMBDA (i:nat): IF (EXISTS (j:nat): low1<=j AND j<=low1+k AND sig(j)=i) THEN G(i) ELSE 0 ENDIF)")
       (case "FORALL (k:nat): low1+k<=high1 IMPLIES sigma(low1,high1, FF(k)) = sigma(low2,high2,GG(k))")
       (("1"
         (inst - "high1-low1")
         (("1"
           (assert)
           (case "sigma(low1, high1, FF(high1 - low1)) = sigma(low1, high1,F) AND  sigma(low2, high2, GG(high1 - low1)) = sigma(low2, high2, G)")
           (("1" (flatten) (assert))
            ("2"
             (split 1)
             (("1"
               (rewrite "sigma_eq" 1)
               (skosimp*)
               (expand "FF" 1)
               (propax))
              ("2"
               (rewrite "sigma_eq" 1)
               (skosimp*)
               (expand "GG" 1)
               (lift-if)
               (ground)
               (copy "ontoz")
               (inst - "n!1")
               (assert)
               (skeep -)
               (inst + "j")
               (assert))))))
          ("2" (assert))))
        ("2"
         (hide 2)
         (induct "k")
         (("1"
           (assert)
           (lemma "sigma_eq_one_arg2")
           (inst?)
           (inst - "low1")
           (assert)
           (split -)
           (("1"
             (replaces -1)
             (lemma "sigma_eq_one_arg2")
             (inst?)
             (inst - "sig(low1)")
             (assert)
             (split -)
             (("1"
               (replaces -1)
               (expand "FF" 1)
               (expand "GG" 1)
               (lift-if)
               (ground)
               (("1" (inst? "Gdef")) ("2" (inst + "low1") (assert))))
              ("2" (inst "rangez" "low1") (assert))
              ("3" (inst "rangez" "low1") (assert))
              ("4"
               (skosimp*)
               (expand "GG" 2)
               (lift-if)
               (ground)
               (skosimp*)
               (assert))))
            ("2" (skeep) (expand "FF" 2) (assert))))
          ("2"
           (skolem 1 "k")
           (assert)
           (flatten)
           (assert)
           (case "sigma(low1, high1, FF(1 + k)) = sigma(low1, high1, FF(k))+F(low1+k+1)")
           (("1"
             (case "sigma(low2, high2, GG(1 + k)) = sigma(low2, high2, GG(k)) + G(sig(low1+k+1))")
             (("1" (copy "Gdef") (inst - "low1+k+1") (assert))
              ("2"
               (hide (-1 2))
               (name "RD5"
                     "LAMBDA (i:nat): IF i = sig(low1 + k + 1) THEN G(i) ELSE 0 ENDIF")
               (case "GG(1+k) = (LAMBDA (pz:nat): GG(k)(pz) + RD5(pz))")
               (("1"
                 (replaces -1 +)
                 (rewrite "sigma_sum" :dir rl)
                 (lemma "sigma_tolambda")
                 (inst - "GG(k)" "high2" "low2")
                 (replaces -1 :dir rl)
                 (lemma "sigma_eq_one_arg2")
                 (inst - "RD5" "high2" "low2" "sig(low1+k+1)")
                 (assert)
                 (split -)
                 (("1" (expand "RD5" -1 2) (propax))
                  ("2" (inst? "rangez") (assert))
                  ("3" (inst? "rangez") (assert))
                  ("4" (skosimp*) (expand "RD5" 2) (assert))))
                ("2"
                 (hide 2)
                 (decompose-equality 1)
                 (expand "GG" 1)
                 (expand "RD5" +)
                 (lift-if)
                 (lift-if)
                 (lift-if)
                 (lift-if)
                 (lift-if)
                 (lift-if)
                 (lift-if)
                 (assert)
                 (ground)
                 (("1"
                   (skeep -2)
                   (copy "injz")
                   (inst - "j" "1+k+low1")
                   (("1" (assert)) ("2" (assert))))
                  ("2" (skeep) (inst + "j") (assert))
                  ("3" (inst + "1+k+low1") (assert))
                  ("4" (skeep -1) (inst + "j") (assert))
                  ("5"
                   (inst + "1+k+low1")
                   (inst + "1+k+low1")
                   (assert))))))))
            ("2"
             (name "R2D2"
                   "LAMBDA (i:nat): IF i = low1+k+1 THEN F(i) ELSE 0 ENDIF")
             (case "FF(1+k) = (LAMBDA (j:nat): FF(k)(j) + R2D2(j))")
             (("1"
               (replace -1)
               (hide 2)
               (rewrite "sigma_sum" :dir rl)
               (lemma "sigma_tolambda")
               (inst - "FF(k)" "high1" "low1")
               (replaces -1 :dir rl)
               (assert)
               (lemma "sigma_eq_one_arg2")
               (inst?)
               (inst - "1+k+low1")
               (assert)
               (split -)
               (("1" (replaces -1) (expand "R2D2" +) (propax))
                ("2" (skosimp*) (expand "R2D2" 2) (assert))))
              ("2"
               (hide (2 3))
               (decompose-equality 1)
               (expand "FF" 1)
               (expand "R2D2" +)
               (lift-if)
               (assert)
               (lift-if)
               (assert)
               (lift-if)
               (assert)
               (lift-if)
               (ground))))))
          ("3" (skosimp*) (assert)) ("4" (skosimp*) (assert))
          ("5" (skosimp*) (assert)) ("6" (skosimp*) (assert))
          ("7" (skosimp*) (assert)) ("8" (skosimp*) (assert))))))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: sigma_nat
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "M")
   (("1" (grind)) ("2" (grind))
    ("3"
     (skeep)
     (skeep)
     (lemma "sigma_split_ge")
     (inst-cp -1 "F" "j" "j-1" "0")
     (inst -1 "LAMBDA (k: nat): F((k - mod(k, N)) / N) * G(mod(k, N))"
      "(j+1)*N-1" "j*N-1" "0")
     (("1"
       (split -2)
       (("1"
         (split -2)
         (("1"
           (case-replace "j+1-1=j")
           (("1"
             (hide -1)
             (replace -2)
             (replace -1)
             (case-replace "j*N-1+1 = j*N")
             (("1"
               (simplify 1)
               (split -4)
               (("1"
                 (inst -1 "F" "G" "N")
                 (replace -1)
                 (simplify 1)
                 (hide -)
                 (lemma "sigma_shift_to_zero")
                 (inst -1
                  "LAMBDA (k: nat): F((k - mod(k, N)) / N) * G(mod(k, N))"
                  "N-1 +N*j" "j*N")
                 (("1"
                   (split -1)
                   (("1"
                     (replace -1)
                     (case-replace "N-1+N*j-j*N = N-1")
                     (("1"
                       (hide -)
                       (lemma "sigma_eq")
                       (inst -1
                        "LAMBDA (i: nat):
                                       F((i + j * N - mod(i + j * N, N)) / N) *
                                        G(mod(i + j * N, N))"
                        "LAMBDA (i: nat): G(i)*F(j)" "N-1" "0")
                       (("1"
                         (split -1)
                         (("1"
                           (replace -1)
                           (lemma "sigma_scal_right")
                           (inst -1 "G" "F(j)" "N-1" "0")
                           (replace -1)
                           (lemma "sigma_eq_arg")
                           (inst -1 "F" "j")
                           (replace -1)
                           (propax))
                          ("2"
                           (hide 2)
                           (skeep)
                           (case-replace "mod(n+j*N, N) = n")
                           (("1" (ground))
                            ("2"
                             (hide 2)
                             (expand "mod")
                             (case-replace "(j*N+n)/N = n/N + j")
                             (("1"
                               (lemma "floor_plus_int")
                               (inst -1 "j" "n/N")
                               (replace -1)
                               (simplify 1)
                               (lemma "floor_0")
                               (inst -1 "n/N")
                               (flatten)
                               (hide -1)
                               (split -1)
                               (("1" (replace -1) (ground))
                                ("2" (cross-mult 1))
                                ("3" (cross-mult 1))))
                              ("2" (ground))))))))
                        ("2" (skosimp*) (grind))))
                      ("2" (ground))))
                    ("2" (hide 2) (grind))))
                  ("2" (hide 2) (grind))))
                ("2"
                 (typepred (j))
                 (split-ineq -1)
                 (replace -1)
                 (lemma "sigma_eq_arg")
                 (inst -1 "F" "0")
                 (replace -1)
                 (lemma "sigma_eq")
                 (inst -1
                  "LAMBDA (k: nat): F((k - mod(k, N)) / N) * G(mod(k, N))"
                  "LAMBDA (k:nat): F(0)*G(k)" "N-1" "0")
                 (("1"
                   (split -1)
                   (("1"
                     (replace -1)
                     (lemma "sigma_scal_right")
                     (inst -1 "G" "F(0)" "N-1" "0")
                     (replace -1)
                     (propax))
                    ("2"
                     (hide-all-but 1)
                     (skeep)
                     (case-replace "mod(n, N) = n")
                     (("1" (ground))
                      ("2"
                       (hide 2)
                       (typepred (n))
                       (grind)
                       (case-replace "floor(n/N)=0")
                       (("1" (ground))
                        ("2"
                         (hide 2)
                         (grind)
                         (typepred (N))
                         (grind)
                         (lemma "floor_0")
                         (inst -1 "n/N")
                         (flatten)
                         (hide -1)
                         (case "n/N<1")
                         (("1" (div-by -4 "N") (simplify -4) (grind))
                          ("2" (cross-mult 1))))))))))
                  ("2" (hide-all-but 1) (skosimp*) (grind))))))
              ("2" (ground))))
            ("2" (ground))))
          ("2" (ground)) ("3" (ground))))
        ("2" (ground)) ("3" (ground))))
      ("2" (skeep) (hide-all-but 1) (grind))))
    ("4"
     (hide 2)
     (skeep)
     (skeep)
     (lemma "mod_pos")
     (inst -1 "k" "N")
     (flatten)
     (grind))
    ("5" (hide 2) (skosimp*) (grind)) ("6" (skeep 1) (grind))))


proof_type: f_proof
decl_type: formula
library: reals
theory: sigma_nat
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (case "FORALL (m, n: nat, r: real):
                 r /= 1 IMPLIES
                  (1-r)*sigma(n, n+m, LAMBDA (k: nat): r ^ k) =
                   (r ^ n - r ^ (n+m + 1))")
   (("1" (skeep) (inst - "m-n" "n" "r") (("1" (assert)) ("2" (assert))))
    ("2"
     (hide 2)
     (induct "m")
     (("1"
       (skeep)
       (assert)
       (expand "sigma")
       (expand "sigma")
       (assert)
       (expand "^")
       (expand "expt" + 2)
       (assert))
      ("2"
       (skolem 1 "m")
       (flatten)
       (assert)
       (skeep)
       (inst - "n" "r")
       (assert)
       (expand "sigma" +)
       (assert)
       (name "A" "sigma(n, m + n, LAMBDA (k: nat): r ^ k)")
       (replace -1)
       (hide -1)
       (both-sides "+" "r ^ (1 + m + n) - (r ^ (1 + m + n)) * r" -1)
       (replace -1)
       (hide -1)
       (assert)
       (expand "^")
       (expand "expt" + 2)
       (assert))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: polynomials
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "i")
   (("1" (grind))
    ("2"
     (skosimp*)
     (expand "^")
     (expand "expt" + 1)
     (expand "expt" + 2)
     (inst - "j!2" "x!1")
     (assert))))


proof_type: f_proof
decl_type: formula
library: reals
theory: polynomials
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem 1 ("a" "n"))
   (case "n=0")
   (("1" (replace -1) (rewrite "polynomial_n0") (simplify 1) (propax))
    ("2"
     (case "n>0")
     (("1"
       (hide 1)
       (expand "polynomial")
       (lemma "sigma_first[nat]"
        ("low"
         "0"
         "high"
         "n"
         "F"
         "LAMBDA (i: nat): a(i) * (IF i = 0 THEN 1 ELSE 0 ^ i ENDIF)"))
       (lemma "sigma_eq[nat]"
        ("low"
         "1"
         "high"
         "n"
         "F"
         "LAMBDA (i: nat): a(i) * (IF i = 0 THEN 1 ELSE 0 ^ i ENDIF)"
         "G"
         "LAMBDA (i:nat): 0"))
       (split -1)
       (("1"
         (lemma "sigma_zero[nat]" ("low" "1" "high" "n"))
         (replace -1)
         (simplify 1)
         (assert))
        ("2"
         (hide 2 -1)
         (skosimp*)
         (typepred "n!1")
         (expand "^")
         (expand "expt")
         (propax))))
      ("2" (assert))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: polynomials
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "polynomial")
   (skolem 1 ("a" "n"))
   (lemma "extensionality"
    ("f"
     "LAMBDA (i: nat): a(i) * (IF i = 0 THEN 1 ELSE 1 ^ i ENDIF)"
     "g"
     "a"))
   (split -1)
   (("1" (replace -1) (propax))
    ("2"
     (hide 2)
     (skolem 1 ("i"))
     (case "i=0")
     (("1" (assert)) ("2" (assert) (rewrite "expt_1i") (assert))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: polynomials
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "polynomial" + 1)
   (lemma "sigma_split")
   (inst?)
   (inst - "0")
   (assert)
   (replaces -1)
   (case "FORALL (aa,bb,cc,dd:real): aa = cc AND bb=dd IMPLIES aa+bb=cc+dd")
   (("1"
     (rewrite -1)
     (("1" (hide-all-but 1) (grind))
      ("2"
       (hide-all-but 1)
       (expand "polynomial")
       (rewrite "sigma_scal" :dir rl)
       (rewrite "sigma_shift_fun_eq")
       (hide 2)
       (skosimp*)
       (grind))))
    ("2" (hide-all-but 1) (grind))))


proof_type: f_proof
decl_type: formula
library: reals
theory: polynomials
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem 1 ("a" "_" "n"))
   (induct "m")
   (("1" (flatten) (assert))
    ("2"
     (skolem 1 ("j"))
     (flatten)
     (replace -2 -1)
     (replace -1 1)
     (hide -1)
     (expand "polynomial")
     (expand "sigma" 1 2)
     (inst - "1+j")
     (replace -1 1)
     (assert))))


proof_type: f_proof
decl_type: formula
library: reals
theory: polynomials
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem 1 ("a" "b" "m" "n"))
   (flatten)
   (expand "max")
   (case "n<m")
   (("1"
     (assert)
     (lemma "extend_polynomial" ("a" "a" "n" "n" "m" "m-n"))
     (replace -3 -1)
     (replace -1 1)
     (simplify 1)
     (expand "polynomial" 1)
     (expand "+" 1)
     (lemma "extensionality"
      ("f"
       "(LAMBDA (x_1: real):
                sigma(0, m,
                      LAMBDA (i: nat):
                        b(i) * (IF i = 0 THEN 1 ELSE x_1 ^ i ENDIF))
                 +
                 sigma(0, m,
                       LAMBDA (i: nat):
                         a(i) * (IF i = 0 THEN 1 ELSE x_1 ^ i ENDIF)))"
       "g"
       "(LAMBDA (x: real):
                 sigma(0, m,
                       LAMBDA (i: nat):
                         a(i) * (IF i = 0 THEN 1 ELSE x ^ i ENDIF) +
                          b(i) * (IF i = 0 THEN 1 ELSE x ^ i ENDIF)))"))
     (("1"
       (split -1)
       (("1" (propax))
        ("2"
         (hide 2)
         (skolem 1 ("x"))
         (lemma "sigma_sum[nat]"
          ("low"
           "0"
           "high"
           "m"
           "F"
           "LAMBDA (i: nat): a(i) * (IF i = 0 THEN 1 ELSE x ^ i ENDIF)"
           "G"
           "LAMBDA (i: nat): b(i) * (IF i = 0 THEN 1 ELSE x ^ i ENDIF)"))
         (simplify -1)
         (propax))))
      ("2" (hide-all-but 1) (grind))))
    ("2"
     (assert)
     (lemma "extend_polynomial" ("a" "b" "n" "m" "m" "n-m"))
     (replace -3 -1)
     (replace -1 2)
     (simplify 2)
     (hide-all-but 2)
     (expand "polynomial")
     (expand "+")
     (lemma "extensionality"
      ("f"
       "(LAMBDA (x_1: real):
                sigma(0, n,
                      LAMBDA (i: nat):
                        b(i) * (IF i = 0 THEN 1 ELSE x_1 ^ i ENDIF))
                 +
                 sigma(0, n,
                       LAMBDA (i: nat):
                         a(i) * (IF i = 0 THEN 1 ELSE x_1 ^ i ENDIF)))"
       "g"
       "(LAMBDA (x: real):
                 sigma(0, n,
                       LAMBDA (i: nat):
                         a(i) * (IF i = 0 THEN 1 ELSE x ^ i ENDIF) +
                          b(i) * (IF i = 0 THEN 1 ELSE x ^ i ENDIF)))"))
     (("1"
       (split -1)
       (("1" (propax))
        ("2"
         (hide 2)
         (skolem 1 ("x"))
         (lemma "sigma_sum[nat]"
          ("low"
           "0"
           "high"
           "n"
           "F"
           "LAMBDA (i: nat): a(i) * (IF i = 0 THEN 1 ELSE x ^ i ENDIF)"
           "G"
           "LAMBDA (i: nat): b(i) * (IF i = 0 THEN 1 ELSE x ^ i ENDIF)"))
         (simplify -1)
         (propax))))
      ("2" (hide-all-but 1) (grind))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: polynomials
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "polynomial")
   (decompose-equality)
   (expand "+")
   (rewrite "sigma_sum")
   (rewrite "sigma_eq"))


proof_type: f_proof
decl_type: formula
library: reals
theory: polynomials
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem 1 ("a" "n"))
   (expand "polynomial")
   (expand "-")
   (lemma "extensionality"
    ("f"
     "(LAMBDA (x_1: real):
              -sigma(0, n,
                     LAMBDA (i: nat):
                       a(i) * (IF i = 0 THEN 1 ELSE x_1 ^ i ENDIF)))"
     "g"
     "(LAMBDA (x: real):
               sigma(0, n,
                     LAMBDA (i: nat):
                       -a(i) * (IF i = 0 THEN 1 ELSE x ^ i ENDIF)))"))
   (("1"
     (split -1)
     (("1" (propax))
      ("2"
       (hide 2)
       (skolem 1 ("x"))
       (lemma "sigma_scal[nat]"
        ("low"
         "0"
         "high"
         "n"
         "F"
         "LAMBDA (i: nat): a(i) * (IF i = 0 THEN 1 ELSE x ^ i ENDIF)"
         "a"
         "-1"))
       (assert)
       (replace -1 1 rl)
       (assert)
       (lemma "extensionality"
        ("f"
         "LAMBDA (i_1: nat): -1 * (a(i_1) * (IF i_1 = 0 THEN 1 ELSE x ^ i_1 ENDIF))"
         "g"
         "LAMBDA (i: nat): -a(i) * (IF i = 0 THEN 1 ELSE x ^ i ENDIF)"))
       (split -1)
       (("1" (replace -1 1) (propax))
        ("2"
         (hide -1 2)
         (skolem 1 ("i"))
         (assert)
         (name-replace "X" "(IF i = 0 THEN 1 ELSE x ^ i ENDIF)")
         (assert))))))
    ("2" (hide 2) (grind))))


proof_type: f_proof
decl_type: formula
library: reals
theory: polynomials
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem 1 ("a" "b" "m" "n"))
   (flatten)
   (lemma "sum_polynomial" ("a" "a" "n" "n" "b" "-b" "m" "m"))
   (replace -2 -1)
   (split -1)
   (("1"
     (lemma "neg_polynomial" ("a" "b" "n" "m"))
     (replace -1 -2 rl)
     (assert)
     (case "a+ -b = a-b")
     (("1"
       (replace -1 -3)
       (replace -3 1 rl)
       (assert)
       (name-replace "AN" "polynomial(a,n)")
       (name-replace "BM" "polynomial(b,m)")
       (assert)
       (expand "-" 1)
       (expand "+" 1)
       (assert))
      ("2" (assert) (hide 2) (expand "+" 1) (expand "-" 1) (assert))))
    ("2"
     (hide (-1 2))
     (skosimp*)
     (inst - "i!1")
     (assert)
     (name-replace "IM" "i!1+m")
     (expand "-")
     (assert))))


proof_type: f_proof
decl_type: formula
library: reals
theory: polynomials
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem 1 ("a" "n" "pn"))
   (expand "*")
   (expand "polynomial")
   (lemma "extensionality"
    ("f"
     "(LAMBDA (x_1: real):
                    sigma(0, n,
                          LAMBDA (i: nat):
                            a(i) * (IF i = 0 THEN 1 ELSE x_1 ^ i ENDIF))
                     * x_1 ^ pn)"
     "g"
     "(LAMBDA (x: real):
                     sigma(0, n + pn,
                           LAMBDA (i_1: nat):
                             IF i_1 < pn THEN 0 ELSE a(i_1 - pn) ENDIF *
                              (IF i_1 = 0 THEN 1 ELSE x ^ i_1 ENDIF)))"))
   (("1"
     (split -1)
     (("1" (propax))
      ("2"
       (hide 2)
       (skolem 1 ("x"))
       (lemma "sigma_scal[nat]"
        ("low"
         "0"
         "high"
         "n"
         "F"
         "LAMBDA (i: nat): a(i) * (IF i = 0 THEN 1 ELSE x ^ i ENDIF)"
         "a"
         "x^pn"))
       (replace -1 1 rl)
       (simplify 1)
       (hide -1)
       (lemma "sigma_split[nat]")
       (inst -
        "LAMBDA (i_1: nat):
                                    IF i_1 < pn THEN 0 ELSE a(i_1 - pn) ENDIF *
                                     (IF i_1 = 0 THEN 1 ELSE x ^ i_1 ENDIF)"
        "n+pn" "0" "pn-1")
       (("1"
         (assert)
         (assert)
         (case "sigma(0, pn - 1,
                                                    LAMBDA (i_1: nat):
                                                      IF i_1 < pn THEN 0 ELSE a(i_1 - pn) ENDIF *
                                                       (IF i_1 = 0 THEN 1 ELSE x ^ i_1 ENDIF)) = 0")
         (("1"
           (replace -1 -2)
           (replace -2 1)
           (hide -1 -2)
           (lemma "sigma_shift_T[nat]"
            ("low"
             "0"
             "high"
             "n"
             "z"
             "pn"
             "F"
             "LAMBDA (i_1: nat): IF i_1 < pn THEN 0 ELSE a(i_1 - pn) ENDIF * (IF i_1 = 0 THEN 1 ELSE x ^ i_1 ENDIF)"))
           (split -1)
           (("1"
             (replace -1 1)
             (lemma "extensionality"
              ("f"
               "LAMBDA (i_1: nat):
                                                     x ^ pn * (a(i_1) * (IF i_1 = 0 THEN 1 ELSE x ^ i_1 ENDIF))"
               "g"
               "LAMBDA (i: nat):
                                                      (LAMBDA (i_1: nat):
                                                         IF i_1 < pn THEN 0 ELSE a(i_1 - pn) ENDIF *
                                                          (IF i_1 = 0 THEN 1 ELSE x ^ i_1 ENDIF))
                                                          (i + pn)"))
             (("1"
               (split -1)
               (("1" (replace -1 1 rl) (propax))
                ("2"
                 (hide 2 -1)
                 (skolem 1 ("i"))
                 (typepred "i")
                 (expand ">=" -1)
                 (expand "<=" -1)
                 (split -1)
                 (("1"
                   (assert)
                   (case "x = 0")
                   (("1"
                     (replace -1)
                     (expand "^" 1)
                     (expand "expt")
                     (propax))
                    ("2"
                     (lemma "expt_plus" ("n0x" "x" "i" "i" "j" "pn"))
                     (("1" (assert)) ("2" (assert))))))
                  ("2" (replace -1 1 rl) (assert))))))
              ("2" (hide -1 2) (grind))))
            ("2" (hide 2) (grind))))
          ("2"
           (hide -1 2)
           (lemma "sigma_eq[nat]"
            ("low"
             "0"
             "high"
             "pn-1"
             "F"
             "LAMBDA (i_1: nat):
                                               IF i_1 < pn THEN 0 ELSE a(i_1 - pn) ENDIF *
                                                (IF i_1 = 0 THEN 1 ELSE x ^ i_1 ENDIF)"
             "G"
             "LAMBDA (i:nat): 0"))
           (split -1)
           (("1"
             (lemma "sigma_zero[nat]" ("low" "0" "high" "pn-1"))
             (assert))
            ("2"
             (hide 2)
             (skolem 1 ("j"))
             (assert)
             (assert)
             (lift-if)
             (ground))))))
        ("2" (hide 2) (grind))))))
    ("2" (hide 2) (grind))))


proof_type: f_proof
decl_type: formula
library: reals
theory: polynomials
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem 1 ("a" "_" "x"))
   (induct "pn")
   (("1" (assert)) ("2" (assert))
    ("3"
     (skolem 1 ("j"))
     (flatten)
     (lemma "trichotomy" ("x" "j"))
     (split -1)
     (("1"
       (assert)
       (expand "polynomial")
       (expand "sigma" 1)
       (replace -2 1)
       (simplify 1)
       (hide -2)
       (case "x=0")
       (("1" (replace -1) (assert) (expand "^") (expand "expt") (propax))
        ("2"
         (lemma "expt_plus" ("n0x" "x" "i" "1" "j" "j"))
         (("1" (rewrite "expt_x1" -1) (replace -1) (assert))
          ("2" (assert))))))
      ("2" (replace -1) (hide -3 -2) (grind)) ("3" (assert))))
    ("4" (hide 2) (grind))))


proof_type: f_proof
decl_type: formula
library: reals
theory: polynomials
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem 1 ("a" "n" "y"))
   (expand "const_fun")
   (expand "*")
   (expand "polynomial")
   (lemma "extensionality"
    ("f"
     "(LAMBDA (x_1: real):
              y *
               sigma(0, n,
                     LAMBDA (i: nat):
                       a(i) * (IF i = 0 THEN 1 ELSE x_1 ^ i ENDIF)))"
     "g"
     "(LAMBDA (x: real):
               sigma(0, n,
                     LAMBDA (i: nat):
                       a(i) * (IF i = 0 THEN 1 ELSE x ^ i ENDIF) * y))"))
   (("1"
     (split -1)
     (("1" (propax))
      ("2"
       (hide 2)
       (skolem 1 ("x"))
       (lemma "sigma_scal[nat]"
        ("low"
         "0"
         "high"
         "n"
         "F"
         "LAMBDA (i: nat): a(i) * (IF i = 0 THEN 1 ELSE x ^ i ENDIF)"
         "a"
         "y"))
       (replace -1 1 rl)
       (simplify 1)
       (lemma "extensionality"
        ("f"
         "LAMBDA (i_1: nat): y * (a(i_1) * (IF i_1 = 0 THEN 1 ELSE x ^ i_1 ENDIF))"
         "g"
         "LAMBDA (i: nat): a(i) * (IF i = 0 THEN 1 ELSE x ^ i ENDIF) * y"))
       (split -1)
       (("1" (replace -1 1) (propax))
        ("2"
         (hide -1 2)
         (skolem 1 ("i"))
         (assert)
         (name-replace "IX" "(IF i = 0 THEN 1 ELSE x ^ i ENDIF)")
         (assert))))))
    ("2" (hide 2) (grind))))


proof_type: f_proof
decl_type: formula
library: reals
theory: polynomials
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "polynomial")
   (rewrite "sigma_scal" :dir rl)
   (rewrite "sigma_eq")
   (hide 2)
   (skosimp*)
   (expand "*")
   (assert)
   (lift-if)
   (ground))


proof_type: f_proof
decl_type: formula
library: reals
theory: polynomials
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "n")
   (("1"
     (expand "polynomial")
     (expand "sigma")
     (skosimp*)
     (expand "sigma")
     (propax))
    ("2"
     (skolem 1 ("j"))
     (flatten)
     (skolem 1 ("a" "x"))
     (flatten)
     (inst - "a" "x")
     (assert)
     (expand "polynomial")
     (expand "sigma" 1)
     (expand "sigma" 1 1)
     (replace -1 1 rl)
     (assert)
     (hide -1)
     (expand "even_fs?")
     (inst - "1+2*j")
     (assert)
     (replace -1)
     (simplify 1)
     (hide -1)
     (case "x=0")
     (("1" (replace -1) (expand "^") (expand "expt") (propax))
      ("2"
       (lemma "expt_times" ("n0x" "x" "i" "2" "j" "1+j"))
       (("1" (replace -1 2) (propax)) ("2" (assert))))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: polynomials
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "n")
   (("1"
     (expand "polynomial")
     (expand "sigma")
     (expand "sigma")
     (skolem 1 ("a" "x"))
     (flatten)
     (rewrite "expt_x1")
     (expand "odd_fs?")
     (inst - "0")
     (assert)
     (expand "sigma")
     (assert))
    ("2"
     (skolem 1 ("j"))
     (flatten)
     (skolem 1 ("a" "x"))
     (flatten)
     (inst - "a" "x")
     (assert)
     (expand "polynomial")
     (expand "sigma" 1)
     (expand "sigma" 1 1)
     (replace -1 1)
     (assert)
     (name-replace "K1"
      "sigma(0, j,
                   LAMBDA (i_1: nat):
                     a(1 + 2 * i_1) * (IF i_1 = 0 THEN 1 ELSE x ^ 2 ^ i_1 ENDIF))")
     (assert)
     (hide -1)
     (expand "odd_fs?")
     (inst - "2+2*j")
     (assert)
     (replace -1 1)
     (hide -1)
     (simplify 1)
     (case "x = 0")
     (("1" (replace -1) (assert) (expand "^") (expand "expt") (propax))
      ("2"
       (lemma "expt_plus" ("n0x" "x" "i" "1" "j" "2+2*j"))
       (("1"
         (expand "^" -1 2)
         (expand "expt")
         (expand "expt")
         (replace -1 2)
         (lemma "expt_times" ("n0x" "x" "i" "2" "j" "1+j"))
         (replace -1 2)
         (assert))
        ("2" (assert))))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: polynomials
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "n")
   (("1"
     (skosimp*)
     (expand "polynomial")
     (expand "sigma")
     (expand "sigma")
     (propax))
    ("2"
     (skolem 1 ("j"))
     (flatten)
     (skolem 1 ("a" "x"))
     (flatten)
     (inst - "a" "x")
     (assert)
     (expand "even_fs?")
     (expand "polynomial")
     (expand "sigma" 1)
     (replace -1 1)
     (simplify 1)
     (hide -1)
     (case "even?(1+j)")
     (("1"
       (hide -2)
       (expand "even?")
       (skosimp*)
       (replace -1)
       (hide -1)
       (case "x=0")
       (("1" (replace -1) (assert))
        ("2"
         (lemma "expt_times" ("n0x" "x" "i" "2" "j" "j!1"))
         (replace -1)
         (lemma "expt_times" ("n0x" "-x" "i" "2" "j" "j!1"))
         (case "(-x) ^ 2 = x^2")
         (("1" (replace -1 -2) (replace -2) (propax))
          ("2" (hide 3 -1 -2) (grind))))))
      ("2" (rewrite "even_or_odd" 1) (inst - "1+j") (assert))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: polynomials
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem 1 ("a" "_" "x"))
   (induct "n")
   (("1"
     (expand "polynomial")
     (expand "sigma")
     (assert)
     (expand "sigma")
     (assert))
    ("2"
     (skolem 1 ("j"))
     (flatten)
     (expand "polynomial")
     (expand "sigma" 1)
     (lemma "triangle"
      ("x"
       "sigma(0, j, LAMBDA (i: nat): a(i) * (IF i = 0 THEN 1 ELSE x ^ i ENDIF))"
       "y"
       "a(1 + j) * x ^ (1 + j)"))
     (assert)
     (name-replace "S1"
      "sigma(0, j,
                   LAMBDA (i_1: nat):
                     abs(a(i_1)) * (IF i_1 = 0 THEN 1 ELSE abs(x) ^ i_1 ENDIF))")
     (name-replace "S2"
      "sigma(0, j,
                      LAMBDA (i: nat): a(i) * (IF i = 0 THEN 1 ELSE x ^ i ENDIF))")
     (rewrite "abs_mult" -1)
     (assert)
     (name-replace "K1" "a(1 + j)")
     (case "FORALL (pn:posnat): abs(x)^pn = abs(x^pn)")
     (("1" (inst - "1+j") (assert))
      ("2"
       (hide-all-but 1)
       (induct "pn")
       (("1" (assert)) ("2" (assert))
        ("3"
         (skolem 1 ("k"))
         (flatten)
         (case "k=0")
         (("1" (replace -1) (grind))
          ("2"
           (assert)
           (case "x=0")
           (("1"
             (replace -1)
             (expand "^")
             (expand "expt")
             (expand "abs" 2)
             (propax))
            ("2"
             (lemma "expt_plus" ("n0x" "x" "i" "1" "j" "k"))
             (("1"
               (expand "^" -1 2)
               (lemma "expt_plus" ("n0x" "abs(x)" "i" "1" "j" "k"))
               (("1"
                 (expand "^" -1 2)
                 (expand "expt")
                 (expand "expt")
                 (replace -1 3)
                 (replace -2 3)
                 (rewrite "abs_mult" 3)
                 (replace -3 3)
                 (assert))
                ("2"
                 (expand "abs")
                 (assert)
                 (hide -1 -2 -3 3 4)
                 (grind))))
              ("2" (assert))))))))))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: polynomials
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem 1 ("a" "b" "m" "n" "x"))
   (flatten)
   (expand ">=")
   (expand "<=" -3)
   (split -3)
   (("1"
     (expand "polynomial")
     (lemma "sigma_le[nat]"
      ("low"
       "0"
       "high"
       "n"
       "F"
       "LAMBDA (i: nat): a(i) * (IF i = 0 THEN 1 ELSE x ^ i ENDIF)"
       "G"
       "LAMBDA (i: nat): b(i) * (IF i = 0 THEN 1 ELSE x ^ i ENDIF)"))
     (split -1)
     (("1"
       (expand "<=" -5)
       (split -5)
       (("1"
         (lemma "sigma_split[nat]")
         (inst -
          "LAMBDA (i: nat): b(i) * (IF i = 0 THEN 1 ELSE x ^ i ENDIF)"
          "m" "0" "n")
         (assert)
         (lemma "sigma_ge_0[nat]"
          ("low"
           "n+1"
           "high"
           "m"
           "F"
           "LAMBDA (i: nat): b(i) * (IF i = 0 THEN 1 ELSE x ^ i ENDIF)"))
         (split -1)
         (("1" (assert))
          ("2"
           (hide -1 -3 2)
           (skosimp*)
           (inst - "n!1")
           (inst - "n!1")
           (lemma "expt_pos" ("px" "x" "i" "n!1"))
           (lemma "both_sides_times_pos_ge1"
            ("x"
             "b(n!1)"
             "y"
             "0"
             "pz"
             "IF n!1 = 0 THEN 1 ELSE x ^ n!1 ENDIF"))
           (("1" (assert)) ("2" (assert))))))
        ("2" (assert))))
      ("2"
       (hide 2)
       (skosimp*)
       (inst -3 "n!1")
       (typepred "n!1")
       (expand "<=" -1)
       (split -1)
       (("1"
         (lemma "expt_pos" ("px" "x" "i" "n!1"))
         (("1"
           (assert)
           (lemma "both_sides_times_pos_le1"
            ("x" "a(n!1)" "y" "b(n!1)" "pz" "x^n!1"))
           (assert))
          ("2" (assert))))
        ("2" (replace -1) (assert))))))
    ("2"
     (replace -1 * rl)
     (rewrite "polynomial_x0")
     (rewrite "polynomial_x0")
     (inst -3 "0"))))


proof_type: f_proof
decl_type: formula
library: reals
theory: polynomials
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "pn")
   (("1" (assert)) ("2" (assert))
    ("3"
     (skolem 1 ("j"))
     (flatten)
     (case "j=0")
     (("1"
       (replace -1)
       (hide -2 -3)
       (expand "polynomial")
       (expand "sigma")
       (expand "sigma")
       (expand "power_fs")
       (rewrite "C_0")
       (rewrite "C_1")
       (expand "^")
       (expand "expt")
       (expand "expt")
       (assert)
       (expand "sigma")
       (propax))
      ("2"
       (case "j>0")
       (("1"
         (hide -3 1)
         (assert)
         (lemma "extensionality_postulate"
          ("f"
           "(LAMBDA (x: real): (1 + x) ^ j)"
           "g"
           "polynomial(power_fs(j), j)"))
         (replace -1 -3 rl)
         (lemma "extensionality_postulate"
          ("f"
           "(LAMBDA (x: real): (1 + x) ^ (1+j))"
           "g"
           "polynomial(power_fs(1+j), 1+j)"))
         (replace -1 1 rl)
         (hide -1 -2)
         (skolem 1 ("x"))
         (inst - "x")
         (lemma "mul_x_to_n_polynomial"
          ("a" "power_fs(j)" "n" "j" "pn" "1"))
         (lemma "sum_polynomial"
          ("a"
           "power_fs(j)"
           "n"
           "j"
           "b"
           "LAMBDA (i: nat): IF i < 1 THEN 0 ELSE power_fs(j)(i - 1) ENDIF"
           "m"
           "j + 1"))
         (("1"
           (split -1)
           (("1"
             (expand "max" -1)
             (lemma "extensionality"
              ("f"
               "power_fs(j) + (LAMBDA (i: nat): IF i < 1 THEN 0 ELSE power_fs(j)(i - 1) ENDIF)"
               "g"
               "power_fs(1 + j)"))
             (split -1)
             (("1"
               (replace -1 -2)
               (hide -1)
               (replace -2 -1 rl)
               (hide -2)
               (replace -1 1 rl)
               (hide -1)
               (expand "+" 1)
               (expand "*")
               (replace -2 1 rl)
               (expand "^" 1)
               (expand "expt" 1 1)
               (expand "expt" 1 3)
               (expand "expt" 1 3)
               (propax))
              ("2"
               (hide-all-but (-3 1))
               (skolem 1 ("i"))
               (expand "+")
               (expand "power_fs")
               (case "i=0")
               (("1"
                 (assert)
                 (replace -1)
                 (rewrite "C_0")
                 (rewrite "C_0"))
                ("2"
                 (case "i<=j")
                 (("1"
                   (assert)
                   (lemma "C_n_plus_1" ("n" "j" "k" "i"))
                   (assert))
                  ("2"
                   (case "i = j+1")
                   (("1"
                     (assert)
                     (replace -1)
                     (rewrite "C_n")
                     (rewrite "C_n"))
                    ("2" (assert))))))))))
            ("2" (hide-all-but (-2 1)) (expand "power_fs") (propax))
            ("3" (hide-all-but (-2 1)) (expand "power_fs") (propax))))
          ("2" (hide-all-but 1) (grind))))
        ("2" (assert))))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: polynomials
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem 1 ("pn"))
   (lemma "extensionality"
    ("f"
     "(LAMBDA (x: real): (1 - x) ^ pn)"
     "g"
     "polynomial(neg_power_fs(pn), pn)"))
   (split -1)
   (("1" (propax))
    ("2"
     (hide 2)
     (skolem 1 ("x"))
     (lemma "power_polynomial" ("pn" "pn"))
     (lemma "extensionality_postulate"
      ("f"
       "(LAMBDA (x: real): (1 + x) ^ pn)"
       "g"
       "polynomial(power_fs(pn), pn)"))
     (replace -1 -2 rl)
     (hide -1)
     (inst - "-x")
     (replace -1 1)
     (hide -1)
     (expand "polynomial")
     (lemma "extensionality"
      ("f"
       "LAMBDA (i: nat): power_fs(pn)(i) * (IF i = 0 THEN 1 ELSE (-x) ^ i ENDIF)"
       "g"
       "LAMBDA (i: nat): neg_power_fs(pn)(i) * (IF i = 0 THEN 1 ELSE x ^ i ENDIF)"))
     (split -1)
     (("1" (replace -1) (propax))
      ("2"
       (hide 2)
       (skolem 1 ("k"))
       (expand "power_fs")
       (expand "neg_power_fs")
       (case "k=0")
       (("1" (assert) (replace -1) (expand "^") (expand "expt") (propax))
        ("2"
         (case "k>pn")
         (("1" (assert))
          ("2"
           (assert)
           (expand "^")
           (lemma "expt_of_mult" ("x" "-1" "y" "x" "n" "k"))
           (assert))))))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: polynomials
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (case "y /= 0")
   (("1"
     (flatten)
     (case "n > 0")
     (("1"
       (lemma "power_polynomial")
       (inst - "n")
       (decompose-equality)
       (inst - "x/y")
       (("1"
         (lemma "expt_of_mult")
         (inst - "n" "(1+x/y)" "y")
         (case "expt((1+x/y)*y,n) = (x+y)^n")
         (("1"
           (replace -1)
           (hide -1)
           (expand "^" -2)
           (replace -2)
           (replace -1)
           (hide -1)
           (hide -1)
           (expand "polynomial")
           (lemma "sigma_scal")
           (inst -
            "LAMBDA (i: nat):
                          power_fs(n)(i) * (IF i = 0 THEN 1 ELSE (x / y) ^ i ENDIF)"
            "expt(y,n)" "n" "0")
           (("1"
             (replace -1 :dir rl)
             (hide -1)
             (rewrite "sigma_restrict_eq")
             (("1"
               (hide 3)
               (decompose-equality)
               (("1"
                 (expand "restrict")
                 (lift-if)
                 (ground)
                 (("1"
                   (replace -1)
                   (assert)
                   (expand "^")
                   (expand "expt" 1 2)
                   (expand "power_fs")
                   (assert))
                  ("2"
                   (expand "^")
                   (lemma "expt_of_div")
                   (inst - "x!1" "y" "x")
                   (replace -1)
                   (hide -1)
                   (lemma "expt_div")
                   (inst - "n" "x!1" "y")
                   (expand "^")
                   (replace -1 :dir rl)
                   (hide -1)
                   (expand "power_fs")
                   (assert))))
                ("2" (skeep) (assert))))
              ("2" (skeep) (assert))))
            ("2" (skeep))))
          ("2" (expand "^") (assert))))
        ("2" (assert))))
      ("2"
       (case "n = 0")
       (("1"
         (replace -1)
         (expand "^")
         (expand "expt" 3 1)
         (expand "sigma")
         (assert)
         (expand "expt")
         (expand "C")
         (assert))
        ("2" (assert))))))
    ("2"
     (flatten)
     (replace -1)
     (hide -1)
     (assert)
     (lemma "sigma_split")
     (inst -
      "LAMBDA (i: nat):
                     IF i > n THEN 0 ELSE C(n, i) * 0 ^ (n - i) * x ^ i ENDIF"
      "n" "0" "n-1")
     (("1"
       (assert)
       (replace -1)
       (hide -1)
       (lemma "sigma_zero")
       (inst - "n-1" "0")
       (lemma "sigma_restrict_eq")
       (inst -
        "LAMBDA (i: nat):
                       IF i > n THEN 0 ELSE C(n, i) * 0 ^ (n - i) * x ^ i ENDIF"
        "LAMBDA (i: nat): 0" "n-1" "0")
       (("1"
         (split -1)
         (("1"
           (replace -2)
           (replace -1)
           (expand "sigma" +)
           (expand "sigma" +)
           (expand "^" +)
           (expand "expt" 1 2)
           (expand "C" +)
           (assert))
          ("2"
           (hide 2)
           (hide -1)
           (decompose-equality)
           (("1"
             (expand "restrict")
             (lift-if)
             (ground)
             (expand "^")
             (expand "expt")
             (lift-if)
             (ground))
            ("2" (skeep) (assert)) ("3" (skeep) (assert))))))
        ("2" (skeep) (assert)) ("3" (skeep) (assert))))
      ("2" (skeep) (assert)) ("3" (skeep) (assert))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: polynomials
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "binomial_theorem")
   (inst - "n" "r*x" "c")
   (assert)
   (replaces -1)
   (expand "polynomial")
   (lemma "sigma_split")
   (invoke (name "iggypop" "%1") (! 1 1))
   (("1"
     (label "iggypopname" -1)
     (replace "iggypopname")
     (hide "iggypopname")
     (inst?)
     (inst - "n")
     (assert)
     (invoke (case "NOT %1 = 0") (! -1 2 2))
     (("1"
       (hide-all-but 1)
       (rewrite "sigma_restrict_eq_0")
       (hide 2)
       (skosimp*)
       (expand "power_linear")
       (assert))
      ("2"
       (replaces -1)
       (assert)
       (replaces -1)
       (expand "iggypop")
       (rewrite "sigma_eq")
       (("1"
         (hide 2)
         (skosimp*)
         (rewrite "mult_expt")
         (("1"
           (expand "power_linear")
           (lift-if)
           (ground)
           (replace -1)
           (expand "^")
           (expand "expt")
           (propax))
          ("2"
           (flatten)
           (replaces -1)
           (assert)
           (lift-if)
           (ground)
           (("1"
             (expand "^")
             (expand "expt")
             (assert)
             (lift-if)
             (ground)
             (("1"
               (expand "power_linear")
               (replaces -2)
               (assert)
               (replaces -1)
               (expand "^")
               (expand "expt")
               (propax))
              ("2"
               (expand "power_linear")
               (replaces -1)
               (assert)
               (typepred "n")
               (expand "^")
               (expand "expt" + 2)
               (assert)
               (expand "expt" + 3)
               (assert))))
            ("2"
             (expand "^")
             (expand "expt")
             (assert)
             (lift-if)
             (ground))))
          ("3"
           (flatten)
           (replaces -1)
           (assert)
           (lift-if)
           (ground)
           (("1"
             (replaces -1)
             (assert)
             (expand "power_linear")
             (expand "^")
             (expand "expt")
             (propax))
            ("2"
             (expand "^")
             (expand "expt")
             (lift-if)
             (ground)
             (("1"
               (expand "power_linear")
               (expand "^")
               (expand "expt")
               (propax))
              ("2"
               (expand "power_linear")
               (expand "^")
               (expand "expt")
               (lift-if)
               (ground))))))))
        ("2" (hide 2) (grind)) ("3" (hide 2) (grind))))))
    ("2" (hide-all-but 1) (grind)) ("3" (hide-all-but 1) (grind))))


proof_type: f_proof
decl_type: formula
library: reals
theory: polynomials
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (lemma "sigma_product")
   (skeep)
   (expand "polynomial" + (1 2))
   (rewrite -1)
   (hide -1)
   (expand "polynomial")
   (rewrite "sigma_eq")
   (("1"
     (hide 2)
     (skosimp*)
     (lemma "sigma_split")
     (inst?)
     (("1"
       (inst - "max(n!1 - m, 0)-1")
       (assert)
       (split -)
       (("1"
         (replaces -1)
         (invoke (case "NOT %1 = 0") (! 1 1 1))
         (("1"
           (hide 2)
           (rewrite "sigma_restrict_eq_0")
           (("1"
             (hide 2)
             (skosimp*)
             (typepred "i!1")
             (expand "max")
             (lift-if)
             (lift-if)
             (ground))
            ("2" (hide 2) (grind)) ("3" (hide 2) (grind))))
          ("2"
           (replaces -1)
           (assert)
           (expand "polynomial_prod")
           (rewrite "sigma_scal_right" :dir rl)
           (("1"
             (rewrite "sigma_eq")
             (("1"
               (hide 2)
               (skosimp*)
               (lift-if)
               (lift-if)
               (lift-if)
               (lift-if)
               (lift-if)
               (lift-if)
               (lift-if)
               (lift-if)
               (lift-if)
               (lift-if)
               (lift-if)
               (assert)
               (lift-if)
               (assert)
               (ground)
               (lemma "expt_plus")
               (inst - "n!1-n!2" "n!2" "x")
               (("1" (assert))
                ("2"
                 (flatten)
                 (assert)
                 (replaces -1)
                 (assert)
                 (expand "^")
                 (expand "expt")
                 (propax))))
              ("2" (hide 2) (grind)) ("3" (hide 2) (grind))
              ("4" (hide 2) (grind))))
            ("2" (hide 2) (grind))))
          ("3" (hide 2) (grind)) ("4" (hide 2) (grind))))
        ("2" (hide 2) (grind)) ("3" (hide 2) (grind))))
      ("2" (hide 2) (grind)) ("3" (hide 2) (grind))))
    ("2" (hide 2) (grind)) ("3" (hide 2) (grind))))


proof_type: f_proof
decl_type: formula
library: reals
theory: polynomials
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "polynomial")
   (expand "poly_shift")
   (case "NOT ((LAMBDA (i: nat):
                                            a(i) * (IF i = 0 THEN 1 ELSE (c + x) ^ i ENDIF)) = (LAMBDA (i: nat):
                                            a(i) * (c+x)^i))")
   (("1"
     (hide 2)
     (decompose-equality 1)
     (lift-if)
     (ground)
     (replace -1)
     (expand "^")
     (expand "expt")
     (propax))
    ("2"
     (replace -1)
     (hide -1)
     (case "NOT ((LAMBDA (i: nat):
                                            sigma(i, n,
                                                  LAMBDA (i_1: nat):
                                                    IF (i_1 < i OR i_1 > n) THEN 0
                                                    ELSE a(i_1) * C(i_1,i) * c ^ (i_1 - i)
                                                    ENDIF)
                                             * (IF i = 0 THEN 1 ELSE x ^ i ENDIF)) = (LAMBDA (i: nat):
                                            sigma(i, n,
                                                  LAMBDA (i_1: nat):
                                                    IF (i_1 < i OR i_1 > n) THEN 0
                                                    ELSE a(i_1) * C(i_1,i) * c ^ (i_1 - i)
                                                    ENDIF)
                                             * x^i))")
     (("1"
       (hide-all-but 1)
       (decompose-equality 1)
       (("1"
         (lift-if)
         (ground)
         (replace -1)
         (expand "^")
         (expand "expt" 1 3)
         (propax))
        ("2" (skosimp*) (assert)) ("3" (skosimp*) (assert))))
      ("2"
       (replace -1)
       (hide -)
       (case "NOT ((LAMBDA (i: nat):
                             sigma(i, n,
                                   LAMBDA (i_1: nat):
                                     IF (i_1 < i OR i_1 > n) THEN 0
                                     ELSE a(i_1) * C(i_1, i) * c ^ (i_1 - i)
                                     ENDIF)
                              * x ^ i) = (LAMBDA (j: nat):
                             sigma(j, n,
                                   LAMBDA (i: nat):
                                     IF (i < j OR i > n) THEN 0
                                     ELSE a(i) * C(i, j) * c ^ (i - j)
                                     ENDIF)
                              * x ^ j))")
       (("1" (propax))
        ("2"
         (replace -1)
         (hide -1)
         (name "F"
               "LAMBDA (j,i:nat): IF (i < j OR i > n) THEN 0
                                       ELSE a(i) * C(i, j) * c ^ (i - j) * x^j
                                       ENDIF")
         (case "NOT ((LAMBDA (j: nat):
                               sigma(j, n,
                                     LAMBDA (i: nat):
                                       IF (i < j OR i > n) THEN 0
                                       ELSE a(i) * C(i, j) * c ^ (i - j)
                                       ENDIF)
                                * x ^ j) = (LAMBDA (j: nat):
                               sigma(j, n,
                                     LAMBDA (i: nat):
                                       F(j,i))))")
         (("1"
           (hide 2)
           (decompose-equality 1)
           (("1"
             (lemma "sigma_restrict_eq")
             (lemma "sigma_scal")
             (inst -
              "LAMBDA (i: nat):
                            IF (i < x!1 OR i > n) THEN 0
                            ELSE a(i) * C(i, x!1) * c ^ (i - x!1)
                            ENDIF"
              "x^x!1" "n" "x!1")
             (("1"
               (assert)
               (replace -1 :dir rl)
               (hide -1)
               (inst?)
               (("1"
                 (assert)
                 (hide 2)
                 (decompose-equality 1)
                 (("1"
                   (expand "restrict")
                   (lift-if)
                   (ground)
                   (expand "F" 3)
                   (assert))
                  ("2" (skosimp*) (assert)) ("3" (skosimp*) (assert))))
                ("2" (skosimp*) (assert)) ("3" (skosimp*) (assert))))
              ("2" (skosimp*) (assert)) ("3" (skosimp*) (assert))))
            ("2" (skosimp*) (assert)) ("3" (skosimp*) (assert))))
          ("2"
           (replace -1)
           (hide -1)
           (lemma "sigma_swap_triangle")
           (inst - "F" "n" "n" "0")
           (assert)
           (replace -1)
           (hide -1)
           (lemma "sigma_restrict_eq")
           (inst?)
           (assert)
           (hide 2)
           (decompose-equality 1)
           (expand "restrict")
           (lift-if)
           (ground)
           (expand "F" 2)
           (lemma "binomial_theorem")
           (inst - "x!1" "x" "c")
           (replace -1 +)
           (hide -1)
           (lemma "sigma_scal")
           (inst?)
           (("1"
             (replace -1 :dir rl)
             (hide -1)
             (lemma "sigma_restrict_eq")
             (inst?)
             (("1"
               (assert)
               (hide 3)
               (decompose-equality 1)
               (("1" (expand "restrict") (lift-if) (ground))
                ("2" (skosimp*) (assert)) ("3" (skosimp*) (assert))
                ("4" (skosimp*) (assert)) ("5" (skosimp*) (assert))))
              ("2" (skosimp*) (assert)) ("3" (skosimp*) (assert))
              ("4" (skosimp*) (assert)) ("5" (skosimp*) (assert))))
            ("2" (skosimp*) (assert)) ("3" (skosimp*) (assert))))))))
      ("3" (skosimp*) (assert)) ("4" (skosimp*) (assert))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: polynomials
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "poly_scal")
   (expand "polynomial")
   (rewrite "sigma_eq")
   (hide 2)
   (skosimp*)
   (lift-if)
   (ground)
   (("1" (replace -1) (grind))
    ("2"
     (lemma "mult_expt")
     (inst - "n!1" "c" "x")
     (("1" (assert))
      ("2"
       (flatten)
       (replace -1)
       (assert)
       (case "0^n!1 = 0")
       (("1" (assert)) ("2" (hide-all-but (1 2)) (grind))))
      ("3"
       (flatten)
       (replace -1)
       (assert)
       (case "0^n!1 = 0")
       (("1" (assert)) ("2" (hide-all-but (1 2)) (grind))))))))


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


proof_type: f_proof
decl_type: formula
library: reals
theory: polynomials
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "polynomial")
   (lemma "sigma_split")
   (inst?)
   (inst - "m")
   (assert)
   (replaces -1)
   (assert)
   (rewrite "sigma_restrict_eq_0")
   (hide 2)
   (skosimp*)
   (inst - "i!1")
   (assert))


proof_type: f_proof
decl_type: formula
library: reals
theory: polynomials
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (case "n >= m")
   (("1"
     (lemma "poly_reduce_degree")
     (inst - "a" "m" "n" "x")
     (assert)
     (split -)
     (("1"
       (replaces -1)
       (rewrite "poly_eq_le_degree" 1)
       (skosimp*)
       (inst -4 "ii!1")
       (assert)
       (expand "min")
       (assert)
       (lift-if)
       (ground))
      ("2"
       (skeep)
       (inst - "ii")
       (split -)
       (("1" (assert)) ("2" (expand "min") (lift-if) (ground))))))
    ("2"
     (lemma "poly_reduce_degree")
     (inst - "b" "n" "m" "x")
     (assert)
     (split -)
     (("1"
       (replaces -1)
       (rewrite "poly_eq_le_degree" 2)
       (skosimp*)
       (inst -3 "ii!1")
       (assert)
       (expand "min" +)
       (propax))
      ("2"
       (skeep)
       (inst - "ii")
       (split -)
       (("1" (assert)) ("2" (expand "min" 1) (propax))))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: polynomials
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skoletin 1)
   (skeep)
   (case "FORALL (kk:nat): FORALL (a): eventzero(a) AND (FORALL (mm:nat):mm>kk IMPLIES a(mm) = 0) IMPLIES P(a)")
   (("1"
     (skeep)
     (expand "eventzero" -4)
     (skosimp*)
     (inst - "kk!1")
     (inst - "a")
     (assert)
     (replace -3)
     (expand "eventzero" 1)
     (inst + "kk!1"))
    ("2"
     (hide 2)
     (induct "kk")
     (("1"
       (skeep)
       (assert)
       (inst -3 "0" "a(0)")
       (invoke (case "NOT (%1) = a") (! -3 1))
       (("1"
         (decompose-equality)
         (lift-if)
         (ground)
         (inst - "x!1")
         (assert))
        ("2" (assert))))
      ("2"
       (skeep)
       (skeep)
       (name "alow" "LAMBDA (ii:nat): IF ii<=j THEN a(ii) ELSE 0 ENDIF")
       (name "ahigh"
             "LAMBDA (ii:nat): IF ii = 1+j THEN a(1+j) ELSE 0 ENDIF")
       (inst -7 "alow" "ahigh")
       (case "alow + ahigh = a")
       (("1"
         (replace -1)
         (assert)
         (split +)
         (("1"
           (inst - "alow")
           (assert)
           (invoke (case "%1") (! 2 2))
           (("1"
             (assert)
             (replace -1)
             (expand "eventzero" +)
             (inst + "j"))
            ("2"
             (hide 3)
             (skosimp*)
             (inst - "mm!1")
             (case "NOT mm!1 = 1+j")
             (("1" (assert) (expand "alow" +) (propax))
              ("2" (replace -1) (assert) (expand "alow" +) (propax))))))
          ("2" (expand "ahigh" +) (inst -7 "1+j" "a(1+j)"))))
        ("2"
         (assert)
         (decompose-equality +)
         (case "x!1 > 1+j")
         (("1"
           (inst -6 "x!1")
           (assert)
           (replace -6)
           (expand "+" +)
           (expand "ahigh")
           (expand "alow")
           (propax))
          ("2" (hide -) (expand "ahigh") (expand "alow") (grind))))))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: polynomials
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (case "FORALL (A, B: real, a: sequence[real], n: nat, x: real):
                        A /= B IMPLIES
                         polynomial(a, n)((B-A)*x+A) =
                          polynomial(poly_translate(a, n)(A, B), n)(x)")
   (("1"
     (skeep)
     (name "xx" "(x - A) / (B - A)")
     (case "(B-A)*xx+A = x")
     (("1"
       (inst - "A" "B" "a" "n" "xx")
       (assert)
       (replace -1)
       (replace -2 :dir rl)
       (propax))
      ("2" (hide-all-but (1 2)) (expand "xx") (field))))
    ("2"
     (hide 2)
     (skeep)
     (lemma "poly_shift_id")
     (inst - "a" "A" "n" "(B-A)*x")
     (replace -1)
     (hide -1)
     (expand "poly_shift")
     (expand "poly_translate")
     (expand "polynomial")
     (rewrite "sigma_restrict_eq")
     (("1"
       (hide 3)
       (decompose-equality)
       (("1"
         (expand "restrict")
         (lift-if)
         (split)
         (("1" (propax))
          ("2"
           (flatten)
           (split)
           (("1"
             (flatten)
             (replace -1)
             (expand "^")
             (expand "expt")
             (assert))
            ("2"
             (flatten)
             (case "(B-A)^x!1*x^x!1 = (B * x - A * x) ^ x!1")
             (("1" (assert))
              ("2"
               (hide 3)
               (lemma "mult_expt")
               (inst - "x!1" "B-A" "x")
               (("1" (assert))
                ("2"
                 (assert)
                 (flatten)
                 (replace -1)
                 (assert)
                 (expand "^")
                 (expand "expt")
                 (assert))))))))))
        ("2" (skosimp*) (assert)) ("3" (skosimp*) (assert))))
      ("2" (skosimp*) (assert)) ("3" (skosimp*) (assert))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: polynomials
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "poly_shift_id")
   (inst - "a" "y" "pn" "0")
   (replace -1)
   (name "bb" "poly_shift(a,pn)(y)")
   (replace -1)
   (case "bb(0) = 0")
   (("1"
     (name "rr" "(LAMBDA (i:nat): bb(i+1))")
     (name "PG" "poly_shift(rr,pn-1)(-y)")
     (inst + "PG")
     (skosimp*)
     (lemma "poly_shift_id")
     (inst - "a" "y" "pn" "x!1-y")
     (replace -1)
     (hide -1)
     (name "K1" "x!1-y")
     (replace -1)
     (expand "PG" 1)
     (lemma "poly_shift_id")
     (inst - "rr" "-y" "pn-1" "x!1")
     (replace -1 :dir rl)
     (replace -2)
     (expand "polynomial" 1)
     (lemma "sigma_split")
     (inst -
      "LAMBDA (i: nat):
                                      poly_shift(a, pn)(y)(i) * (IF i = 0 THEN 1 ELSE K1 ^ i ENDIF)"
      "pn" "0" "0")
     (assert)
     (replace -1)
     (hide -1)
     (expand "sigma" 1 1)
     (expand "sigma" 1 1)
     (case "poly_shift(a,pn)(y)(0) = 0")
     (("1"
       (replace -1)
       (assert)
       (lemma "sigma_scal")
       (inst?)
       (replace -1 :dir rl)
       (hide -1)
       (lemma "sigma_shift_T2")
       (inst -
        "LAMBDA (i_1: nat):
                                           K1 * (rr(i_1) * (IF i_1 = 0 THEN 1 ELSE K1 ^ i_1 ENDIF))"
        "pn" "1" "-1")
       (assert)
       (assert)
       (replace -1)
       (hide -1)
       (lemma "sigma_restrict_eq")
       (inst?)
       (("1"
         (assert)
         (hide 2)
         (decompose-equality 1)
         (("1"
           (expand "restrict")
           (lift-if)
           (ground)
           (lift-if)
           (ground)
           (("1"
             (case "x!2 = 1")
             (("1"
               (replace -1)
               (assert)
               (expand "rr" 1)
               (expand "bb" 1)
               (expand "^" 1)
               (expand "expt" 1)
               (expand "expt" 1)
               (assert))
              ("2" (assert))))
            ("2"
             (expand "rr" +)
             (expand "bb" +)
             (expand "^" +)
             (expand "expt" 2 1)
             (assert))))
          ("2" (skosimp*))))
        ("2" (assert) (skosimp*))))
      ("2" (assert))))
    ("2"
     (assert)
     (hide 2)
     (lemma "polynomial_x0")
     (inst - "bb" "pn")
     (assert))))


proof_type: f_proof
decl_type: formula
library: reals
theory: polynomials
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "poly_shift_id")
   (inst - "a" "y" "pn" "0")
   (replace -1)
   (name "bb" "poly_shift(a,pn)(y)")
   (replace -1)
   (case "bb(0) = 0")
   (("1"
     (name "rr" "(LAMBDA (i:nat): bb(i+1))")
     (name "PG" "poly_shift(rr,pn-1)(-y)")
     (skoletin 1)
     (case "NOT g = PG")
     (("1" (assert))
      ("2"
       (replaces -1)
       (hide -1)
       (skosimp*)
       (lemma "poly_shift_id")
       (inst - "a" "y" "pn" "x!1-y")
       (replace -1)
       (hide -1)
       (name "K1" "x!1-y")
       (replace -1)
       (expand "PG" 1)
       (lemma "poly_shift_id")
       (inst - "rr" "-y" "pn-1" "x!1")
       (replace -1 :dir rl)
       (replace -2)
       (expand "polynomial" 1)
       (lemma "sigma_split")
       (inst -
        "LAMBDA (i: nat):
                                                poly_shift(a, pn)(y)(i) * (IF i = 0 THEN 1 ELSE K1 ^ i ENDIF)"
        "pn" "0" "0")
       (assert)
       (replace -1)
       (hide -1)
       (expand "sigma" 1 1)
       (expand "sigma" 1 1)
       (case "poly_shift(a,pn)(y)(0) = 0")
       (("1"
         (replace -1)
         (assert)
         (lemma "sigma_scal")
         (inst?)
         (replace -1 :dir rl)
         (hide -1)
         (lemma "sigma_shift_T2")
         (inst -
          "LAMBDA (i_1: nat):
                                                         K1 * (rr(i_1) * (IF i_1 = 0 THEN 1 ELSE K1 ^ i_1 ENDIF))"
          "pn" "1" "-1")
         (assert)
         (assert)
         (replace -1)
         (hide -1)
         (lemma "sigma_restrict_eq")
         (inst?)
         (("1"
           (assert)
           (hide 2)
           (decompose-equality 1)
           (("1"
             (expand "restrict")
             (lift-if)
             (ground)
             (lift-if)
             (ground)
             (("1"
               (case "x!2 = 1")
               (("1"
                 (replace -1)
                 (assert)
                 (expand "rr" 1)
                 (expand "bb" 1)
                 (expand "^" 1)
                 (expand "expt" 1)
                 (expand "expt" 1)
                 (assert))
                ("2" (assert))))
              ("2"
               (expand "rr" +)
               (expand "bb" +)
               (expand "^" +)
               (expand "expt" 2 1)
               (assert))))
            ("2" (skosimp*))))
          ("2" (assert) (skosimp*))))
        ("2" (assert))))))
    ("2"
     (assert)
     (hide 2)
     (lemma "polynomial_x0")
     (inst - "bb" "pn")
     (assert))))


proof_type: f_proof
decl_type: formula
library: reals
theory: polynomials
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "polynomial_zero_factor")
   (inst - "a WITH [0:=a(0)-polynomial(a,pn)(y)]" "pn" "y")
   (split -1)
   (("1"
     (skeep -1)
     (inst + "g")
     (skeep)
     (inst - "x")
     (replace -1 :dir rl)
     (hide -1)
     (expand "polynomial" + 2)
     (lemma "sigma_split")
     (inst?)
     (inst - "0")
     (assert)
     (expand "sigma" - 2)
     (expand "sigma" - 2)
     (lemma "sigma_restrict_eq")
     (inst - _ _ "pn" "1")
     (inst -
      "LAMBDA (i: nat):
                          a WITH [(0) := a(0) - polynomial(a, pn)(y)](i) *
                           (IF i = 0 THEN 1 ELSE x ^ i ENDIF)"
      _)
     (inst -
      "LAMBDA (i: nat):
                          a(i) *
                           (IF i = 0 THEN 1 ELSE x ^ i ENDIF)")
     (split -1)
     (("1"
       (replace -1)
       (hide -1)
       (replace -1)
       (hide -)
       (assert)
       (expand "polynomial" + 1)
       (lemma "sigma_split")
       (inst?)
       (inst - "0")
       (assert)
       (expand "sigma" - 2)
       (expand "sigma" - 2)
       (propax))
      ("2" (hide (-1 2)) (expand "restrict") (propax))))
    ("2"
     (hide 2)
     (expand "polynomial" + 1)
     (lemma "sigma_split")
     (inst?)
     (inst - "0")
     (assert)
     (replace -1)
     (hide -)
     (expand "sigma" + 1)
     (expand "sigma" + 1)
     (lemma "sigma_restrict_eq")
     (inst - _ _ "pn" "1")
     (inst -
      "LAMBDA (i: nat):
                          a WITH [(0) := a(0) - polynomial(a, pn)(y)](i) *
                           (IF i = 0 THEN 1 ELSE y ^ i ENDIF)"
      _)
     (inst -
      "LAMBDA (i: nat):
                          a(i) *
                           (IF i = 0 THEN 1 ELSE y ^ i ENDIF)")
     (split -1)
     (("1"
       (replace -1)
       (hide -1)
       (expand "polynomial")
       (lemma "sigma_split")
       (inst - _ _ 0 _)
       (inst - _ _ 0)
       (inst?)
       (assert)
       (expand "sigma" - 2)
       (expand "sigma" - 2)
       (assert))
      ("2" (hide 2) (decompose-equality) (expand "restrict") (propax))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: polynomials
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (case "FORALL (a:sequence[real],n:nat): polynomial(a,n) = (LAMBDA (x:real): 0) IFF FORALL (jj:upto(n)): a(jj) = 0")
   (("1"
     (skeep)
     (inst - "a-b" "n")
     (ground)
     (("1" (skeep) (inst - "jj") (expand "-") (assert))
      ("2"
       (case "polynomial(a,n) - polynomial(b,n) = polynomial(a-b,n)")
       (("1"
         (replace -3)
         (hide-all-but (-1 1))
         (decompose-equality +)
         (decompose-equality)
         (inst - "x!1")
         (expand "-")
         (assert))
        ("2"
         (hide-all-but 1)
         (decompose-equality)
         (expand "-" 1 1)
         (expand "polynomial")
         (lemma "sigma_minus")
         (inst?)
         (replace -1)
         (hide -1)
         (lemma "sigma_eq")
         (inst?)
         (assert)
         (hide 2)
         (skosimp*)
         (expand "-")
         (propax))))
      ("3"
       (hide 1)
       (hide 1)
       (decompose-equality +)
       (decompose-equality -)
       (inst - "x!1")
       (expand "polynomial")
       (lemma "sigma_minus")
       (inst -
        "LAMBDA (i: nat): a(i) * (IF i = 0 THEN 1 ELSE x!1 ^ i ENDIF)"
        "LAMBDA (i: nat): b(i) * (IF i = 0 THEN 1 ELSE x!1 ^ i ENDIF)"
        "n" "0")
       (replace -2)
       (assert)
       (hide -2)
       (expand "-")
       (assert))
      ("4"
       (hide 2)
       (hide 2)
       (case "FORALL (jjj: upto(n)): polynomial(a,jjj) = polynomial(b,jjj)")
       (("1" (inst - "n"))
        ("2"
         (hide 2)
         (induct "jjj")
         (("1"
           (inst - "0")
           (expand "polynomial")
           (expand "sigma")
           (expand "sigma")
           (assert))
          ("2"
           (skeep 1)
           (expand "polynomial")
           (expand "sigma" +)
           (inst - "1+jt")
           (("1"
             (decompose-equality +)
             (decompose-equality -)
             (inst - "x!1")
             (assert))
            ("2" (assert))))))))))
    ("2"
     (hide 2)
     (skeep)
     (ground)
     (("1"
       (case "EXISTS (m:upto(n)): polynomial(a,n) = polynomial(a,m) and a(m) /= 0")
       (("1"
         (skosimp*)
         (replace -1)
         (hide -1)
         (case "EXISTS (rr: posreal): rr > 1 AND abs(a(m!1))*rr > sigma(0,m!1-1,(LAMBDA (j: nat): abs(a(j))))")
         (("1"
           (skosimp*)
           (mult-by -2 "rr!1^(m!1-1)")
           (case "abs(a(m!1)) * rr!1 * rr!1 ^ (m!1 - 1) = abs(a(m!1)*rr!1^m!1)")
           (("1"
             (replace -1)
             (case "sigma(0, m!1 - 1, (LAMBDA (j: nat): abs(a(j)))) * rr!1 ^ (m!1 - 1) = sigma(0, m!1 - 1, (LAMBDA (j: nat): abs(a(j))*rr!1^(m!1-1)))")
             (("1"
               (replace -1)
               (hide -1)
               (case "sigma(0, m!1 - 1, (LAMBDA (j: nat): abs(a(j)) * rr!1 ^ (m!1 - 1))) >= abs(polynomial(a,m!1-1)(rr!1))")
               (("1"
                 (case "abs(a(m!1) * rr!1 ^ m!1) = abs(polynomial(a, m!1 - 1)(rr!1))")
                 (("1" (assert))
                  ("2"
                   (hide -1)
                   (hide -1)
                   (hide -2)
                   (case "a(m!1)*rr!1^m!1 = -polynomial(a,m!1-1)(rr!1)")
                   (("1"
                     (replace -1)
                     (expand "abs")
                     (lift-if)
                     (ground)
                     (lift-if)
                     (ground))
                    ("2"
                     (hide 2)
                     (decompose-equality -)
                     (inst - "rr!1")
                     (expand "polynomial")
                     (expand "sigma" -1)
                     (assert)
                     (case "rr!1^m!1 = (IF m!1 = 0 THEN 1 ELSE rr!1 ^ m!1 ENDIF)")
                     (("1" (replace -1 :dir rl) (hide -1) (assert))
                      ("2"
                       (hide-all-but 1)
                       (lift-if)
                       (ground)
                       (replace -1)
                       (expand "^")
                       (expand "expt")
                       (propax))))))))
                ("2"
                 (hide-all-but (1 -2))
                 (expand "polynomial")
                 (lemma "sigma_abs")
                 (inst -
                  "LAMBDA (i: nat):
                                                                     a(i) * (IF i = 0 THEN 1 ELSE rr!1 ^ i ENDIF)"
                  "m!1-1" "0")
                 (case "sigma(0, m!1 - 1,
                                                                              LAMBDA (n: nat):
                                                                                abs(a(n) * (IF n = 0 THEN 1 ELSE rr!1 ^ n ENDIF))) <= sigma(0, m!1 - 1, (LAMBDA (j: nat): abs(a(j)) * rr!1 ^ (m!1 - 1)))")
                 (("1" (assert))
                  ("2"
                   (hide-all-but (1 -2))
                   (lemma "sigma_le")
                   (inst?)
                   (assert)
                   (hide 2)
                   (skosimp*)
                   (case "rr!1^n!1 = (IF n!1 = 0 THEN 1 ELSE rr!1 ^ n!1 ENDIF)")
                   (("1"
                     (replace -1 :dir rl)
                     (hide -1)
                     (rewrite "abs_mult")
                     (case "abs(rr!1^n!1) <= rr!1^(m!1-1)")
                     (("1" (mult-by -1 "abs(a(n!1))") (assert))
                      ("2"
                       (hide 2)
                       (case "rr!1 ^n!1 > 0")
                       (("1"
                         (expand "abs")
                         (case "FORALL (jj:nat): rr!1^(n!1+jj) >= rr!1^n!1")
                         (("1" (inst - "m!1-1-n!1") (assert))
                          ("2"
                           (hide 2)
                           (induct "jj")
                           (("1" (assert))
                            ("2"
                             (skosimp*)
                             (expand "^")
                             (expand "expt" 1 1)
                             (mult-by -1 "rr!1")
                             (assert)
                             (mult-by -3 "expt(rr!1,n!1)")
                             (assert))))))
                        ("2"
                         (hide 2)
                         (case "FORALL (jj:nat): rr!1^jj > 0")
                         (("1" (inst?))
                          ("2"
                           (induct "jj")
                           (("1" (expand "^") (expand "expt") (assert))
                            ("2"
                             (skosimp*)
                             (expand "^")
                             (expand "expt" 1)
                             (assert))))))))))
                    ("2"
                     (hide 2)
                     (lift-if)
                     (ground)
                     (replace -1)
                     (expand " ^")
                     (expand "expt")
                     (propax))))))
                ("3"
                 (expand "sigma")
                 (assert)
                 (case "m!1 = 0")
                 (("1"
                   (replace -1)
                   (decompose-equality -5)
                   (inst - "0")
                   (expand "polynomial")
                   (expand "sigma")
                   (expand "sigma")
                   (propax))
                  ("2" (assert))))))
              ("2"
               (hide-all-but 1)
               (lemma "sigma_scal")
               (inst - "(LAMBDA (j: nat): abs(a(j)))" "rr!1^(m!1-1)"
                "m!1-1" "0")
               (assert))))
            ("2"
             (rewrite "abs_mult")
             (expand "abs" 1 3)
             (case "m!1 > 0")
             (("1" (expand "^") (assert) (expand "expt" 1 2) (grind))
              ("2"
               (case "m!1 = 0")
               (("1"
                 (replace -1)
                 (expand "polynomial")
                 (expand "sigma")
                 (expand "sigma")
                 (hide-all-but (-4 3))
                 (name "F"
                       "LAMBDA (nn:nat): (LAMBDA (x: real): a(0))(nn)")
                 (name "G" "LAMBDA (nn:nat): (LAMBDA (x: real): 0)(nn)")
                 (case "sigma(1,1,G) = sigma(1,1,F)")
                 (("1"
                   (replace -2 -1 :dir rl)
                   (replace -3 -1 :dir rl)
                   (assert)
                   (expand "sigma")
                   (expand "sigma")
                   (assert))
                  ("2" (assert))))
                ("2" (assert))))))))
          ("2"
           (name "ccc"
                 "sigma(0, m!1 - 1, (LAMBDA (j: nat): abs(a(j))))/abs(a(m!1))")
           (("1"
             (name "r1" "max(2,ccc+1)")
             (inst + "r1")
             (("1"
               (assert)
               (typepred "r1")
               (case "r1 > ccc")
               (("1" (expand "ccc" -1) (cross-mult -1)) ("2" (assert))))
              ("2" (assert))))
            ("2" (assert))
            ("3"
             (assert)
             (flatten)
             (case "m!1 = 0")
             (("1" (replace -1) (inst + "0") (assert)) ("2" (assert))))))
          ("3"
           (skosimp*)
           (case "m!1 = 0")
           (("1" (replace -1) (inst + "0") (assert)) ("2" (assert))))))
        ("2"
         (name "m1"
               "min({mm: upto(n) | FORALL (jj:upto(n)): jj> mm IMPLIES a(jj) = 0})")
         (("1"
           (inst + "m1")
           (typepred "m1")
           (case "a(m1) /= 0")
           (("1"
             (assert)
             (decompose-equality 1)
             (expand "polynomial" 1)
             (lemma "sigma_split")
             (inst -
              "LAMBDA (i: nat): a(i) * (IF i = 0 THEN 1 ELSE x!1 ^ i ENDIF)"
              "n" "0" "m1")
             (assert)
             (replace -1)
             (hide -1)
             (lemma "sigma_restrict_eq")
             (inst -
              "LAMBDA (i: nat): a(i) * (IF i = 0 THEN 1 ELSE x!1 ^ i ENDIF)"
              "LAMBDA (i:nat): 0" "n" "1+m1")
             (assert)
             (lemma "sigma_zero")
             (inst - "n" "1+m1")
             (assert)
             (decompose-equality 1)
             (expand "restrict")
             (lift-if)
             (ground)
             (inst - "x!2")
             (assert))
            ("2"
             (hide 2)
             (flatten)
             (inst -4 "m1-1")
             (("1"
               (assert)
               (skosimp 1)
               (case "jj!1 = m1")
               (("1" (assert)) ("2" (inst -3 "jj!1") (assert))))
              ("2"
               (assert)
               (case "m1 = 0")
               (("1"
                 (skosimp 2)
                 (case "jj!1 = 0")
                 (("1" (assert)) ("2" (inst -4 "jj!1") (assert))))
                ("2" (assert))))))))
          ("2"
           (expand "nonempty?")
           (expand "empty?")
           (inst - "n")
           (expand "member")
           (propax))))))
      ("2"
       (decompose-equality 1)
       (expand "polynomial" 1)
       (lemma "sigma_restrict_eq")
       (inst -
        "LAMBDA (i: nat): a(i) * (IF i = 0 THEN 1 ELSE x!1 ^ i ENDIF)"
        "LAMBDA (i:nat): 0" "n" "0")
       (lemma "sigma_zero")
       (inst?)
       (assert)
       (decompose-equality 1)
       (expand "restrict")
       (lift-if)
       (ground)
       (("1" (inst - "x!2")) ("2" (inst - "x!2") (assert))))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: polynomials
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (ground)
   (("1"
     (skeep)
     (expand "polynomial")
     (rewrite "sigma_restrict_eq_0")
     (skosimp*)
     (inst - "i!1")
     (lift-if)
     (ground))
    ("2"
     (lemma "polynomial_eq_coeff")
     (inst - "a" "LAMBDA (ii:nat): 0" "n")
     (ground)
     (("1" (skeep) (inst - "ii"))
      ("2"
       (decompose-equality 2)
       (inst - "x!1")
       (replace -1)
       (expand "polynomial" 1)
       (rewrite "sigma_restrict_eq_0")
       (skosimp*)
       (lift-if)
       (ground))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: polynomials
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (case "FORALL (a: sequence[real], m: nat): LET n=m+1 IN
                                             (EXISTS (fp: [below(1 + n) -> real]):
                                                (FORALL (i, j: below(1 + n)):
                                                  i/=j IMPLIES fp(i) /= fp(j)) AND (FORALL (i:below(1+n)): polynomial(a,n)(fp(i))=0))
                                              IMPLIES FORALL (k:subrange(0,n)): a(k)=0")
   (("1"
     (skeep)
     (skeep)
     (assert)
     (skeep)
     (assert)
     (name "bb" "a WITH [0:=a(0)-polynomial(a,n)(fp(0))]")
     (inst - "bb" "n-1")
     (assert)
     (split -)
     (("1" (inst - "k") (expand "bb" -1) (propax))
      ("2"
       (inst + "fp")
       (split)
       (("1" (skeep) (inst - "i" "j") (ground))
        ("2"
         (skeep)
         (inst - "0" "i")
         (assert)
         (flatten)
         (rewrite "polynomial_eq_a0_plus")
         (lemma "polynomial_eq_a0_plus")
         (inst - "a" "n" "fp(i)")
         (assert)
         (case "(LAMBDA (i_1: nat): a(1 + i_1)) = (LAMBDA (i_1: nat): bb(1 + i_1))")
         (("1" (replace -1) (assert)) ("2" (decompose-equality 1))))))))
    ("2"
     (assert)
     (hide 2)
     (induct "m")
     (("1"
       (assert)
       (skeep)
       (skeep)
       (skeep)
       (typepred "k")
       (case "NOT polynomial(a,1) = (LAMBDA (x:real): a(0) + a(1)*x)")
       (("1" (decompose-equality 1) (hide -) (grind))
        ("2"
         (replace -1)
         (assert)
         (inst-cp - "0" "1")
         (assert)
         (flatten)
         (hide -4)
         (inst-cp - "0")
         (inst - "1")
         (assert)
         (case "a(1)/=0")
         (("1" (mult-by 1 "a(1)") (assert))
          ("2"
           (flatten)
           (replace -1)
           (assert)
           (typepred "k")
           (case "NOT (k=0 OR k=1)")
           (("1"
             (ground)
             (case "NOT FORALL (kv:subrange(0,1)): kv=0 OR kv=1")
             (("1" (eval-formula 1)) ("2" (inst - "k") (ground))))
            ("2" (ground))))))))
      ("2"
       (skolem 1 "k")
       (assert)
       (flatten)
       (skeep)
       (assert)
       (skolem 1 "m")
       (skeep -2)
       (typepred "m")
       (inst-cp -5 "2+k")
       (lemma "polynomial_linear_divisor")
       (inst - "a" "2+k" "fp(2+k)")
       (name "ry" "fp(2+k)")
       (replace -1)
       (replace -8 -2)
       (skeep)
       (inst -5 "g")
       (split -)
       (("1"
         (case "polynomial(g,2+k-1) = (LAMBDA (xy:real): 0)")
         (("1"
           (replace -1)
           (assert)
           (lemma "poly_eq_0_le_degree")
           (inst - "a" "2+k")
           (replace -5)
           (assert)
           (inst - "m")
           (assert))
          ("2"
           (lemma "poly_eq_0_le_degree")
           (inst - "g" "k+1")
           (assert)
           (flatten)
           (hide -2)
           (split -1)
           (("1" (decompose-equality 1)) ("2" (skeep) (inst - "ii"))))))
        ("2"
         (name "IZ" "LAMBDA (ij:below(2+k)): fp(ij)")
         (inst + "IZ")
         (split +)
         (("1"
           (skeep)
           (inst - "i" "j")
           (assert)
           (expand "IZ" -1)
           (assert))
          ("2"
           (skeep)
           (expand "IZ" +)
           (inst - "i" "2+k")
           (assert)
           (replace -2)
           (inst - "fp(i)")
           (inst - "i")
           (replace -7)
           (lemma "nzreal_times_nzreal_is_nzreal")
           (inst - "fp(i)-ry" "polynomial(g,1+k)(fp(i))")
           (assert))))))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: polynomials
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (case "n = 0")
   (("1" (skosimp*) (assert))
    ("2"
     (lemma "poly_image_size")
     (inst - "a" "n")
     (assert)
     (replace 2)
     (name "KP" "LAMBDA (j:below(1+n)): x + (y-x)/(j+2)")
     (inst + "KP")
     (hide 3)
     (skeep)
     (split)
     (("1"
       (flatten)
       (expand "KP" -1)
       (name "e" "y-x")
       (replace -1)
       (assert)
       (cross-mult -2)
       (div-by -2 "e")
       (assert))
      ("2"
       (case "FORALL (ii,jj:below(1+n)): ii<jj IMPLIES polynomial(a, n)(KP(ii)) = polynomial(a, n)(KP(jj))")
       (("1" (inst-cp - "i" "j") (inst - "j" "i") (ground))
        ("2"
         (hide 2)
         (skeep)
         (inst - "KP(jj)" "KP(ii)")
         (assert)
         (split +)
         (("1"
           (expand "KP" 1)
           (lemma "posreal_div_posreal_is_posreal")
           (inst - "y-x" "2+jj")
           (assert))
          ("2"
           (expand "KP" 1)
           (name "e" "y-x")
           (replace -1)
           (assert)
           (case "e/(2+jj)<=e/(2+ii)")
           (("1" (assert))
            ("2" (cross-mult 1) (mult-by -2 "e") (assert))))
          ("3"
           (expand "KP" 1)
           (name "e" "y-x")
           (case "e/(2+ii)<e")
           (("1" (assert))
            ("2"
             (cross-mult 1)
             (assert)
             (lemma "nnreal_times_nnreal_is_nnreal")
             (inst - "e" "ii")
             (assert))))))))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: polynomials
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (name "idf" "(LAMBDA (x:real): x)")
   (case "FORALL (ss:sequence[real],nn:nat): idf*polynomial(ss,nn) = polynomial((LAMBDA (i:nat): IF i = 0 THEN 0 ELSE ss(i-1) ENDIF),nn+1)")
   (("1"
     (skeep)
     (replace -2)
     (assert)
     (flatten)
     (lemma "polynomial_eq_coeff")
     (inst?)
     (assert)
     (hide 2)
     (name "aa" "(LAMBDA (i:nat): IF i = 0 THEN 0 ELSE a(i-1) ENDIF)")
     (name "bb" "(LAMBDA (i:nat): IF i = 0 THEN 0 ELSE b(i-1) ENDIF)")
     (case "idf*polynomial(a,n) = polynomial(aa,n+1)")
     (("1"
       (replace -1)
       (case "idf*polynomial(b,n) = polynomial(bb,n+1)")
       (("1"
         (replace -1)
         (lemma "polynomial_eq_coeff")
         (inst - "aa" "bb" "n+1")
         (assert)
         (skosimp*)
         (inst - "jj!1+1")
         (expand "aa" -1)
         (expand "bb" -1)
         (propax))
        ("2" (hide 2) (inst - "b" "n") (assert))))
      ("2" (inst - "a" "n") (assert))))
    ("2"
     (hide 2)
     (skeep)
     (decompose-equality 1)
     (("1"
       (expand "*")
       (expand "idf" +)
       (expand "polynomial" 1)
       (lemma "sigma_scal")
       (inst -
        "LAMBDA (i: nat): ss(i) * (IF i = 0 THEN 1 ELSE x!1 ^ i ENDIF)"
        "x!1" "nn" "0")
       (replace -1 :dir rl)
       (hide -1)
       (lemma "sigma_split")
       (inst -
        "LAMBDA (i_1: nat):
                       IF i_1 = 0 THEN 0 ELSE ss(i_1 - 1) ENDIF *
                        (IF i_1 = 0 THEN 1 ELSE x!1 ^ i_1 ENDIF)"
        "1+nn" "0" "0")
       (("1"
         (assert)
         (replace -1)
         (hide -1)
         (expand "sigma" 1 2)
         (expand "sigma" 1 2)
         (lemma "sigma_shift_T2")
         (inst -
          "LAMBDA (i_1: nat):
                         IF i_1 = 0 THEN 0 ELSE ss(i_1 - 1) ENDIF *
                          (IF i_1 = 0 THEN 1 ELSE x!1 ^ i_1 ENDIF)"
          "nn" "0" "1")
         (("1"
           (assert)
           (replace -1)
           (hide -1)
           (lemma "sigma_restrict_eq")
           (inst?)
           (assert)
           (hide 2)
           (decompose-equality 1)
           (expand "restrict")
           (lift-if)
           (ground)
           (("1"
             (replace -1)
             (assert)
             (expand "^")
             (expand "expt")
             (expand "expt")
             (assert))
            ("2" (expand "^") (expand "expt" 2 2) (assert))))
          ("2" (hide 2) (skosimp*) (assert))))
        ("2" (skosimp*) (assert))))
      ("2" (skosimp*) (assert))))
    ("3" (skosimp*) (assert))))


proof_type: f_proof
decl_type: formula
library: reals
theory: polynomials
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (deftactic step_and_grind (step)
    (branch step ((skip) (then (hide-all-but 1) (finalize (grind))))))
   (skeep)
   (expand "polynomial")
   (rewrite "sigma_scal" :dir rl)
   (expand "poly_translate_rat")
   (case "sigma(0, n,
                                           LAMBDA (i: nat):
                                             sigma(0, n,
                                                   LAMBDA (i_1: nat):
                                                     a(i_1) *
                                                      sigma(0, n - i_1,
                                                            LAMBDA (k: nat):
                                                              IF (k < i - i_1 OR k > i OR k > n - i_1)
                                                                THEN 0
                                                              ELSE (C(i_1, i - k) * C(n - i_1, k)
                                                                    *
                                                                    A ^ (i - k)
                                                                    *
                                                                    B ^ (i_1 + k - i))
                                                                   *
                                                                   C ^ k
                                                                   *
                                                                   D ^ (-1 * i_1 - k + n)
                                                              ENDIF))
                                              * (IF i = 0 THEN 1 ELSE x ^ i ENDIF)) = sigma(0, n,
                                           LAMBDA (i: nat):
                                             sigma(0, n,
                                                   LAMBDA (i_1: nat):
                                                     a(i_1) *
                                                      sigma(0, n - i_1,
                                                            LAMBDA (k: nat):
                                                              IF (k < i - i_1 OR k > i OR k > n - i_1)
                                                                THEN 0
                                                              ELSE (C(i_1, i - k) * C(n - i_1, k)
                                                                    *
                                                                    A ^ (i - k)
                                                                    *
                                                                    B ^ (i_1 + k - i))
                                                                   *
                                                                   C ^ k
                                                                   *
                                                                   D ^ (-1 * i_1 - k + n)
                                                              ENDIF
                                              * (IF i = 0 THEN 1 ELSE x ^ i ENDIF))))")
   (("1"
     (replace -1)
     (hide -1)
     (step_and_grind (rewrite "sigma_swap"))
     (step_and_grind (rewrite "sigma_eq"))
     (hide 3)
     (skolem 1 "vv")
     (case "(D + C * x) ^ n *
                                                                                                          (a(vv) *
                                                                                                            (IF vv = 0 THEN 1 ELSE ((B + A * x) / (D + C * x)) ^ vv ENDIF)) = a(vv)*((D + C*x)^(n-vv) * (B+A*x)^vv)")
     (("1"
       (replace -1)
       (hide -1)
       (lemma "binomial_theorem")
       (inst - "vv" "A*x" "B")
       (lemma "binomial_theorem")
       (inst - "n-vv" "C*x" "D")
       (replaces -1)
       (replaces -1)
       (step_and_grind (rewrite "sigma_product"))
       (step_and_grind (rewrite "sigma_scal"))
       (case "FORALL (aa1,aa2:real): aa1=aa2 IMPLIES a(vv)*aa1 = a(vv)*aa2")
       (("1"
         (rewrite -1)
         (("1"
           (hide 2)
           (hide -1)
           (step_and_grind (rewrite "sigma_eq"))
           (hide 2)
           (skosimp*)
           (step_and_grind (rewrite "sigma_eq"))
           (hide 2)
           (skosimp*)
           (lift-if)
           (split +)
           (("1"
             (ground)
             (case "FORALL (eg1:real): 0*eg1 = 0")
             (("1" (rewrite -1)) ("2" (hide-all-but 1) (grind))))
            ("2"
             (flatten)
             (case "x = 0")
             (("1"
               (replaces -1)
               (assert)
               (case "n!2 = 0")
               (("1"
                 (replaces -1)
                 (assert)
                 (case "n!1 = 0")
                 (("1"
                   (assert)
                   (case "0^0 = 1")
                   (("1"
                     (case "C^0 = 1")
                     (("1"
                       (assert)
                       (replaces -1)
                       (replaces -2)
                       (replaces -1)
                       (case "A^0 = 1")
                       (("1" (assert)) ("2" (hide-all-but 1) (grind))))
                      ("2" (hide-all-but 1) (grind))))
                    ("2" (hide-all-but 1) (grind))))
                  ("2"
                   (assert)
                   (case "0^n!1 = 0")
                   (("1" (assert)) ("2" (hide-all-but (1 2)) (grind))))))
                ("2"
                 (assert)
                 (case "0^n!2 = 0 AND 0^n!1 = 0")
                 (("1" (flatten) (assert))
                  ("2" (hide-all-but (1 2 3 4)) (grind))))))
              ("2"
               (case "n!2 = 0")
               (("1"
                 (replaces -1)
                 (assert)
                 (case "n!1 = 0")
                 (("1"
                   (replaces -1)
                   (assert)
                   (case "A^0 = 1 AND C^0 = 1 AND (A*x)^0 = 1 AND (C*x)^0 = 1")
                   (("1" (flatten) (assert))
                    ("2" (hide-all-but 1) (grind))))
                  ("2"
                   (assert)
                   (rewrite "mult_expt")
                   (("1"
                     (assert)
                     (case "C^0 = 1 AND (C*x)^0 = 1")
                     (("1" (flatten) (assert))
                      ("2" (hide-all-but 1) (grind))))
                    ("2"
                     (flatten)
                     (replace -1)
                     (case "0^n!1 = 0")
                     (("1" (assert))
                      ("2" (hide-all-but (1 2)) (grind))))))))
                ("2"
                 (case "n!1 = 0")
                 (("1" (assert))
                  ("2"
                   (label "hyp" 6)
                   (case "(IF n!1 = 0 THEN 1 ELSE x ^ n!1 ENDIF) = x^n!1")
                   (("1"
                     (replaces -1)
                     (rewrite "mult_expt")
                     (("1"
                       (rewrite "mult_expt")
                       (("1"
                         (case "x^(n!1-n!2)*x^n!2 = x^n!1")
                         (("1" (assert))
                          ("2"
                           (hide "hyp")
                           (rewrite "expt_plus" :dir rl))))
                        ("2"
                         (flatten)
                         (replaces -1)
                         (case "0^n!2 = 0")
                         (("1" (assert))
                          ("2" (hide-all-but (1 2 3)) (grind))))))
                      ("2"
                       (flatten)
                       (replaces -1)
                       (lemma "mult_expt")
                       (inst - "n!2" "C" "x")
                       (("1"
                         (assert)
                         (replaces -1)
                         (assert)
                         (case "n!1 = n!2")
                         (("1" (replaces -1) (assert))
                          ("2"
                           (case "0^(n!1 -n!2) = 0")
                           (("1" (assert)) ("2" (hide "hyp") (grind))))))
                        ("2"
                         (flatten)
                         (case "0^n!2 = 0")
                         (("1" (assert)) ("2" (hide "hyp") (grind))))))))
                    ("2" (lift-if 1) (assert))))))))))))
          ("2" (hide 2) (grind)) ("3" (hide 2) (grind))
          ("4" (hide 2) (grind)) ("5" (hide 2) (grind))
          ("6" (hide 2) (grind)) ("7" (hide 2) (grind))
          ("8" (hide 2) (grind)) ("9" (hide 2) (grind))
          ("10" (hide 2) (grind)) ("11" (hide 2) (grind))))
        ("2" (hide 2) (grind))))
      ("2"
       (hide 2)
       (lift-if)
       (ground)
       (("1"
         (replaces -1)
         (assert)
         (case "(B+A*x)^ 0 = 1")
         (("1" (assert)) ("2" (hide 2) (grind))))
        ("2"
         (rewrite "div_expt")
         (("1"
           (cross-mult 2)
           (lemma "expt_plus")
           (inst - "n-vv" "vv" "D+C*x")
           (assert))
          ("2"
           (flatten)
           (replace -1)
           (case "0^vv = 0")
           (("1" (assert)) ("2" (hide-all-but (1 2)) (grind))))))))))
    ("2"
     (hide 3)
     (rewrite "sigma_eq")
     (("1"
       (hide 2)
       (skosimp*)
       (step_and_grind (rewrite "sigma_scal_right" :dir rl))
       (assert)
       (step_and_grind (rewrite "sigma_eq"))
       (hide 2)
       (skosimp*)
       (step_and_grind (rewrite "sigma_scal" :dir rl))
       (step_and_grind (rewrite "sigma_scal" :dir rl))
       (step_and_grind (rewrite "sigma_scal_right" :dir rl))
       (assert)
       (step_and_grind (rewrite "sigma_eq"))
       (hide 2)
       (skosimp*)
       (assert)
       (lift-if)
       (lift-if)
       (lift-if)
       (assert))
      ("2" (hide 2) (grind))))
    ("3" (hide 3) (grind)) ("4" (hide 3) (grind)) ("5" (hide 3) (grind))
    ("6" (hide 3) (grind)) ("7" (hide 3) (grind)) ("8" (hide 3) (grind))
    ("9" (hide 3) (grind))))


proof_type: f_proof
decl_type: formula
library: reals
theory: polynomials
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (deftactic step_and_grind (step)
    (branch step ((skip) (then (hide-all-but 1) (finalize (grind))))))
   (lemma "mult_expt")
   (case "NOT FORALL (i: nat, n0x, n0y: real): (n0x * n0y) ^ i = n0x ^ i * n0y ^ i")
   (("1"
     (hide 2)
     (skeep)
     (case "n0x = 0 OR n0y = 0")
     (("1"
       (hide -2)
       (split -)
       (("1"
         (replace -1)
         (case "i = 0")
         (("1" (replace -1) (grind)) ("2" (grind))))
        ("2"
         (replace -1)
         (case "i = 0")
         (("1" (replace -1) (grind)) ("2" (grind))))))
      ("2" (inst - "i" "n0x" "n0y") (("1" (ground)) ("2" (ground))))))
    ("2"
     (hide -2)
     (label "me1" -1)
     (hide "me1")
     (lemma "expt_plus")
     (case "NOT FORALL (i, j: nat, n0x: real): n0x ^ (i + j) = n0x ^ i * n0x ^ j")
     (("1"
       (hide 2)
       (skeep)
       (inst - "i" "j" "n0x")
       (flatten)
       (replace -1)
       (case "i = 0 AND j = 0")
       (("1" (flatten) (replace -1) (replace -2) (grind)) ("2" (grind))))
      ("2"
       (label "ep1" -1)
       (hide -2)
       (hide "ep1")
       (skeep)
       (label "hyp" 3)
       (expand "polynomial")
       (rewrite "sigma_scal" :dir rl)
       (("1"
         (case "sigma(0, n,
                                                                                                                                                                                                                                                    LAMBDA (i_1: nat):
                                                                                                                                                                                                                                                      a(i_1) * (D + C * x) ^ n * (F + E * x) ^ n *
                                                                                                                                                                                                                                                       (IF i_1 = 0 THEN 1
                                                                                                                                                                                                                                                        ELSE ((B + A * x) /
                                                                                                                                                                                                                                                               (D * F + D * E * x + (C * F * x + C * E * x * x)))
                                                                                                                                                                                                                                                              ^ i_1
                                                                                                                                                                                                                                                        ENDIF)) = sigma(0, n,
                                                                                                                                                                                                                                                    LAMBDA (i_1: nat):
                                                                                                                                                                                                                                                      a(i_1) * ((B + A * x)^i_1*(D+C*x)^(n-i_1)*(F+E*x)^(n-i_1)))")
         (("1"
           (replace -1)
           (hide -1)
           (expand "poly_translate_rat2")
           (step_and_grind
            (case "(LAMBDA (i: nat):
                                                                                                                                                                                                                                   sigma(0, n,
                                                                                                                                                                                                                                         LAMBDA (k: nat):
                                                                                                                                                                                                                                           a(k) *
                                                                                                                                                                                                                                            sigma(0, n,
                                                                                                                                                                                                                                                  LAMBDA (i_1: nat):
                                                                                                                                                                                                                                                    sigma(0,
                                                                                                                                                                                                                                                          k,
                                                                                                                                                                                                                                                          LAMBDA
                                                                                                                                                                                                                                                          (j: nat):
                                                                                                                                                                                                                                                          IF (    i > 2 * n - k
                                                                                                                                                                                                                                                               OR i_1 < n - i
                                                                                                                                                                                                                                                               OR i_1 > -1 * i - k + 2 * n
                                                                                                                                                                                                                                                               OR j < i_1 + k - n
                                                                                                                                                                                                                                                               OR j > i_1
                                                                                                                                                                                                                                                               OR j > k
                                                                                                                                                                                                                                                               OR k > n)
                                                                                                                                                                                                                                                          THEN 0
                                                                                                                                                                                                                                                          ELSE C(k, j) * C(n - k, i_1 - j)
                                                                                                                                                                                                                                                               *
                                                                                                                                                                                                                                                               C
                                                                                                                                                                                                                                                               (n - k,
                                                                                                                                                                                                                                                                -1 * i - i_1 - k + 2 * n)
                                                                                                                                                                                                                                                               *
                                                                                                                                                                                                                                                               A ^ (k - j)
                                                                                                                                                                                                                                                               *
                                                                                                                                                                                                                                                               B ^ j
                                                                                                                                                                                                                                                               *
                                                                                                                                                                                                                                                               C ^ (j - i_1 - k + n)
                                                                                                                                                                                                                                                               *
                                                                                                                                                                                                                                                               D ^ (i_1 - j)
                                                                                                                                                                                                                                                               *
                                                                                                                                                                                                                                                               E ^ (i + i_1 - n)
                                                                                                                                                                                                                                                               *
                                                                                                                                                                                                                                                               F ^ (-1 * i - i_1 - k + 2 * n)
                                                                                                                                                                                                                                                          ENDIF)))
                                                                                                                                                                                                                                    * (IF i = 0 THEN 1 ELSE x ^ i ENDIF)) = (LAMBDA (i: nat):
                                                                                                                                                                                                                                   sigma(0, n,
                                                                                                                                                                                                                                         LAMBDA (k: nat):
                                                                                                                                                                                                                                           a(k) *
                                                                                                                                                                                                                                            sigma(0, n,
                                                                                                                                                                                                                                                  LAMBDA (i_1: nat):
                                                                                                                                                                                                                                                    sigma(0,
                                                                                                                                                                                                                                                          k,
                                                                                                                                                                                                                                                          LAMBDA
                                                                                                                                                                                                                                                          (j: nat):
                                                                                                                                                                                                                                                          IF (    i > 2 * n - k
                                                                                                                                                                                                                                                               OR i_1 < n - i
                                                                                                                                                                                                                                                               OR i_1 > -1 * i - k + 2 * n
                                                                                                                                                                                                                                                               OR j < i_1 + k - n
                                                                                                                                                                                                                                                               OR j > i_1
                                                                                                                                                                                                                                                               OR j > k
                                                                                                                                                                                                                                                               OR k > n)
                                                                                                                                                                                                                                                          THEN 0
                                                                                                                                                                                                                                                          ELSE C(k, j) * C(n - k, i_1 - j)
                                                                                                                                                                                                                                                               *
                                                                                                                                                                                                                                                               C
                                                                                                                                                                                                                                                               (n - k,
                                                                                                                                                                                                                                                                -1 * i - i_1 - k + 2 * n)
                                                                                                                                                                                                                                                               *
                                                                                                                                                                                                                                                               A ^ (k - j)
                                                                                                                                                                                                                                                               *
                                                                                                                                                                                                                                                               B ^ j
                                                                                                                                                                                                                                                               *
                                                                                                                                                                                                                                                               C ^ (j - i_1 - k + n)
                                                                                                                                                                                                                                                               *
                                                                                                                                                                                                                                                               D ^ (i_1 - j)
                                                                                                                                                                                                                                                               *
                                                                                                                                                                                                                                                               E ^ (i + i_1 - n)
                                                                                                                                                                                                                                                               *
                                                                                                                                                                                                                                                               F ^ (-1 * i - i_1 - k + 2 * n)
                                                                                                                                                                                                                                                          ENDIF))
                                                                                                                                                                                                                                    * (IF i = 0 THEN 1 ELSE x ^ i ENDIF)))"))
           (("1"
             (replace -1)
             (hide -1)
             (step_and_grind (rewrite "sigma_swap"))
             (step_and_grind (rewrite "sigma_eq"))
             (skolem 1 "k")
             (rewrite "binomial_theorem")
             (rewrite "binomial_theorem")
             (rewrite "binomial_theorem")
             (step_and_grind (invoke (name-replace "AAC2" "%1") (! 1 2)))
             (step_and_grind (rewrite "sigma_product"))
             (step_and_grind (rewrite "sigma_product"))
             (expand "AAC2")
             (step_and_grind (rewrite "sigma_reverse"))
             (step_and_grind (rewrite "sigma_scal" :dir rl))
             (lemma "sigma_split")
             (step_and_grind
              (invoke (inst - "%1" "2*n" "0" "2*n-k") (! 1 2 3)))
             (assert)
             (step_and_grind (invoke (case-replace "%1 = 0") (! -1 2 2)))
             (("1"
               (hide -1)
               (replace -1)
               (hide -1)
               (assert)
               (step_and_grind (rewrite "sigma_eq"))
               (hide 2)
               (skolem 1 "q")
               (step_and_grind (rewrite "sigma_scal" :dir rl))
               (step_and_grind (rewrite "sigma_scal" :dir rl))
               (step_and_grind (rewrite "sigma_scal_right" :dir rl))
               (step_and_grind (rewrite "sigma_eq"))
               (hide 2)
               (skolem 1 "j")
               (lift-if)
               (assert)
               (split +)
               (("1"
                 (flatten)
                 (split -)
                 (("1"
                   (assert)
                   (rewrite "sigma_zero")
                   (assert)
                   (case "FORALL (eg1:real): 0*eg1 = 0")
                   (("1" (rewrite -1)) ("2" (assert))))
                  ("2" (assert) (rewrite "sigma_zero") (assert))))
                ("2"
                 (flatten)
                 (step_and_grind (rewrite "sigma_scal_right" :dir rl))
                 (step_and_grind (rewrite "sigma_scal" :dir rl))
                 (step_and_grind (rewrite "sigma_scal" :dir rl))
                 (step_and_grind (rewrite "sigma_scal_right" :dir rl))
                 (step_and_grind (rewrite "sigma_eq"))
                 (hide "hyp")
                 (skolem 1 "i")
                 (lift-if)
                 (ground)
                 (reveal "me1")
                 (rewrite "me1")
                 (rewrite "me1")
                 (rewrite "me1")
                 (case "x ^ (k - i)*x ^ (-1 * j - k + i + n)*x ^ (j - n + q)=x^q")
                 (("1"
                   (case "(IF q = 0 THEN 1 ELSE x ^ q ENDIF) = x^q")
                   (("1" (replace -1) (assert))
                    ("2"
                     (hide-all-but 1)
                     (lift-if)
                     (ground)
                     (replace -1)
                     (expand "^")
                     (expand "expt")
                     (propax))))
                  ("2"
                   (assert)
                   (hide (3 4 5 6 7 8 9 10))
                   (reveal "ep1")
                   (rewrite "ep1" :dir rl)
                   (rewrite "ep1" :dir rl))))))
              ("2"
               (step_and_grind (rewrite "sigma_restrict_eq_0"))
               (hide 2)
               (skosimp*)
               (rewrite "sigma_zero")
               (rewrite "sigma_zero")
               (assert))))
            ("2"
             (step_and_grind (decompose-equality))
             (step_and_grind (rewrite "sigma_scal_right" :dir rl))
             (assert)
             (step_and_grind (rewrite "sigma_eq"))
             (hide-all-but 1)
             (grind))))
          ("2"
           (hide "hyp")
           (step_and_grind (rewrite "sigma_eq"))
           (("1"
             (hide 2)
             (skosimp*)
             (lift-if)
             (ground)
             (("1"
               (replace -1)
               (assert)
               (expand "^")
               (expand "expt")
               (lift-if)
               (ground))
              ("2"
               (rewrite "div_expt")
               (("1"
                 (reveal "me1")
                 (copy "me1")
                 (inst - "n!1" "D+C*x" "F+E*x")
                 (replace -1)
                 (hide -1)
                 (cross-mult 2)
                 (lemma "expt_plus")
                 (inst - "n-n!1" "n!1" _)
                 (inst-cp - "F + E*x")
                 (inst - "D+C*x")
                 (assert))
                ("2"
                 (flatten)
                 (replace -1)
                 (case "0^n!1 = 0")
                 (("1" (assert)) ("2" (hide-all-but (1 2)) (grind))))))))
            ("2"
             (lemma "nzreal_times_nzreal_is_nzreal")
             (skeep)
             (inst - "D+C*x" "F+E*x")
             (assert))))
          ("3"
           (hide "hyp")
           (lemma "nzreal_times_nzreal_is_nzreal")
           (skeep)
           (inst - "D+C*x" "F+E*x")
           (("1" (assert)) ("2" (assert)) ("3" (assert))))
          ("4" (assert))
          ("5"
           (lemma "nzreal_times_nzreal_is_nzreal")
           (skeep)
           (inst - "D+C*x" "F+E*x")
           (("1" (assert)) ("2" (assert)) ("3" (assert))))))
        ("2"
         (lemma "nzreal_times_nzreal_is_nzreal")
         (skeep)
         (inst - "D+C*x" "F+E*x")
         (assert))))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: polynomials
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (name "yy" "1+x*(A-1)")
   (replace -1)
   (label "yyname" -1)
   (expand "polynomial")
   (expand "poly_translate_inf_pos")
   (rewrite "sigma_scal" :dir rl)
   (case "NOT (LAMBDA (i_1: nat):
                                                                                                    x ^ n *
                                                                                                     (a(i_1) * (IF i_1 = 0 THEN 1 ELSE (yy / x) ^ i_1 ENDIF))) = (LAMBDA (j:nat): a(j)*yy^j*x^(n-j))")
   (("1"
     (hide 3)
     (decompose-equality +)
     (case "(IF x!1 = 0 THEN 1 ELSE (yy / x) ^ x!1 ENDIF) = yy^x!1/x^x!1")
     (("1"
       (replace -1)
       (hide -1)
       (cross-mult 1)
       (lemma "expt_plus")
       (inst - "n-x!1" "x!1" "x")
       (assert))
      ("2"
       (hide 2)
       (lift-if)
       (ground)
       (("1" (expand "^") (replace -1) (expand "expt") (assert))
        ("2"
         (lemma "div_expt")
         (inst - "x!1" "yy" "x")
         (flatten)
         (replace -1)
         (assert)
         (expand "^" +)
         (expand "expt" +)
         (ground))))
      ("3"
       (lemma "expt_eq_0")
       (inst?)
       (("1" (assert))
        ("2"
         (case "x!1 = 0")
         (("1"
           (replace -1)
           (assert)
           (expand "^" +)
           (assert)
           (expand "expt" +)
           (propax))
          ("2" (assert))))))))
    ("2"
     (replace -1)
     (hide -1)
     (case "NOT (LAMBDA (j: nat): a(j) * yy ^ j * x ^ (n - j)) = (LAMBDA (j: nat): sigma(0,j,LAMBDA (i:nat): IF i>j THEN 0 ELSE C(j,i)*a(j)*(A-1)^i * x ^ (n - j+i) ENDIF))")
     (("1"
       (hide 3)
       (decompose-equality +)
       (("1"
         (lemma "binomial_theorem")
         (inst - "x!1" "x*(A-1)" "1")
         (replace "yyname")
         (replace -1)
         (hide -1)
         (rewrite "sigma_scal" :dir rl)
         (("1"
           (rewrite "sigma_restrict_eq")
           (("1"
             (hide 2)
             (decompose-equality +)
             (("1"
               (expand "restrict")
               (lift-if)
               (ground)
               (case "FORALL (jj:nat): 1^jj=1")
               (("1"
                 (inst - "x!1-x!2")
                 (replace -1)
                 (hide -1)
                 (assert)
                 (lemma "mult_expt")
                 (inst - "x!2" "x" "A-1")
                 (("1"
                   (assert)
                   (replace -1)
                   (hide -1)
                   (lemma "expt_plus")
                   (inst - "n-x!1" "x!2" "x")
                   (assert))
                  ("2"
                   (assert)
                   (flatten)
                   (case "A = 1")
                   (("1"
                     (replace -1)
                     (hide -1)
                     (hide -1)
                     (assert)
                     (expand "^" +)
                     (expand "expt" +)
                     (lift-if)
                     (ground)
                     (lift-if)
                     (ground))
                    ("2" (assert))))))
                ("2"
                 (hide-all-but 1)
                 (induct "jj")
                 (("1" (expand "^") (expand "expt") (propax))
                  ("2"
                   (skeep)
                   (expand "^")
                   (expand "expt" +)
                   (assert))))))
              ("2" (skosimp*) (assert))))
            ("2" (skosimp*) (assert))))
          ("2" (skosimp*) (assert))))
        ("2" (skosimp*) (assert))))
      ("2"
       (replace -1)
       (hide -1)
       (case "NOT (LAMBDA (j: nat):
                                                                        sigma(0, j,
                                                                              LAMBDA (i: nat):
                                                                                IF i > j THEN 0
                                                                                ELSE C(j, i) * a(j) * (A - 1) ^ i * x ^ (n - j + i)
                                                                                ENDIF)) = (LAMBDA (j: nat):
                                                                        sigma(0, j,
                                                                              LAMBDA (i: nat):
                                                                                IF i > j THEN 0
                                                                                ELSE C(j, j-i) * a(j) * (A - 1) ^ (j-i) * x ^ (n -i)
                                                                                ENDIF))")
       (("1"
         (hide 3)
         (decompose-equality +)
         (("1"
           (lemma "sigma_reverse")
           (inst -
            "LAMBDA (i: nat):
                                                                  IF i > x!1 THEN 0
                                                                  ELSE a(x!1) * C(x!1, i) * (A - 1) ^ i * x ^ (i - x!1 + n)
                                                                  ENDIF"
            "x!1" "0")
           (("1" (assert)) ("2" (skosimp*) (assert))))
          ("2" (skosimp*) (assert)) ("3" (skosimp*) (assert))
          ("4" (skosimp*) (assert))))
        ("2"
         (replace -1)
         (hide -1)
         (name "FF"
               "LAMBDA (i,j:nat): IF i > j THEN 0
                                                                             ELSE C(j, j - i) * a(j) * (A - 1) ^ (j - i) *
                                                                                   x ^ (n - i)
                                                                             ENDIF")
         (("1"
           (lemma "sigma_swap_triangle")
           (inst - "FF" "n" "n" "0")
           (assert)
           (expand "FF" -1 2)
           (replace -1 :dir rl)
           (hide -1)
           (hide -1)
           (lemma "sigma_reverse")
           (inst -
            "LAMBDA (i: nat): sigma(i, n, LAMBDA (j: nat): FF(i, j))" "n"
            "0")
           (replace -1)
           (hide -1)
           (assert)
           (rewrite "sigma_restrict_eq")
           (("1"
             (hide 3)
             (decompose-equality +)
             (("1"
               (expand "restrict")
               (lift-if)
               (ground)
               (rewrite "sigma_scal_right" :dir rl)
               (("1"
                 (rewrite "sigma_restrict_eq")
                 (("1"
                   (hide 3)
                   (decompose-equality +)
                   (("1"
                     (expand "restrict")
                     (lift-if)
                     (ground)
                     (expand "FF")
                     (lift-if)
                     (ground)
                     (replace -1)
                     (expand "^" + 2)
                     (expand "expt")
                     (propax))
                    ("2" (skosimp*) (assert)) ("3" (skosimp*) (assert))))
                  ("2" (skosimp*) (assert)) ("3" (skosimp*) (assert))))
                ("2" (skosimp*) (assert)) ("3" (skosimp*) (assert))))
              ("2" (skosimp*) (assert)) ("3" (skosimp*) (assert))
              ("4" (skosimp*) (assert)) ("5" (skosimp*) (assert))))
            ("2" (skosimp*) (assert)) ("3" (skosimp*) (assert))
            ("4" (skosimp*) (assert)) ("5" (skosimp*) (assert))))
          ("2" (skosimp*)) ("3" (assert) (skosimp*) (assert))
          ("4" (skosimp*) (assert))))
        ("3" (skosimp*)) ("4" (assert) (skosimp*) (assert))
        ("5" (skosimp*) (assert)) ("6" (skosimp*))))
      ("3" (assert)) ("4" (skosimp*) (assert))))
    ("3" (skosimp*)) ("4" (assert))))


proof_type: f_proof
decl_type: formula
library: reals
theory: polynomials
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "poly_translate_inf_pos_def")
   (inst - "A" "a" "n" "1/(x-A+1)")
   (assert)
   (case "NOT (1 + A * (1 / (1 - A + x)) - 1 / (1 - A + x)) /
                                     (1 / (1 - A + x)) = x")
   (("1" (cross-mult 1))
    ("2"
     (replace -1)
     (hide -1)
     (lemma "div_expt")
     (inst - "n" "1" "x-A+1")
     (replace -1)
     (hide -1)
     (case "FORALL (rr:nat): 1^rr = 1")
     (("1" (inst - "n") (replace -1) (hide -1) (assert))
      ("2"
       (induct "rr")
       (("1" (expand "^" 1) (expand "expt" 1) (propax))
        ("2" (skeep) (expand "^") (expand "expt" +) (assert))))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: polynomials
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "poly_translate_inf_pos_def")
   (inst - "-A" "LAMBDA (i:nat): (-1)^i*a(i)" "n" "x")
   (assert)
   (name "yy" "(1 - x + -A * x) / x")
   (replace -1)
   (case "(-1 - -A * x + x) / x=-yy")
   (("1"
     (assert)
     (replace -1)
     (case "NOT polynomial(a,n)(-yy) = polynomial(LAMBDA (i: nat): (-1) ^ i * a(i), n)(yy)")
     (("1"
       (hide -3)
       (hide 3)
       (hide -1)
       (hide -1)
       (expand "polynomial")
       (rewrite "sigma_eq")
       (hide 2)
       (skosimp*)
       (case "FORALL (rr:real): IF n!1=0 THEN 1 ELSE rr^n!1 ENDIF = rr^n!1")
       (("1"
         (inst-cp - "-yy")
         (replace -2)
         (hide -2)
         (inst - "yy")
         (replace -1)
         (hide -1)
         (case "FORALL (mm:nat): (-yy)^mm = (-1)^mm*yy^mm")
         (("1" (inst - "n!1") (assert))
          ("2"
           (hide 2)
           (induct "mm")
           (("1" (grind))
            ("2" (skeep) (expand "^") (expand "expt" +) (assert))))))
        ("2"
         (hide 2)
         (skeep)
         (lift-if)
         (ground)
         (replace -1)
         (expand "^")
         (expand "expt")
         (propax))))
      ("2"
       (case "NOT polynomial(poly_translate_inf_neg(a, n)(A), n)(x) = polynomial(poly_translate_inf_pos(LAMBDA (i: nat): (-1) ^ i * a(i),
                                                      n)
                                                     (-A),
                               n)
                              (x)")
       (("1"
         (hide -4)
         (hide 3)
         (hide -)
         (expand "polynomial")
         (expand "poly_translate_inf_pos")
         (expand "poly_translate_inf_neg")
         (propax))
        ("2" (assert))))))
    ("2" (assert))))


proof_type: f_proof
decl_type: formula
library: reals
theory: polynomials
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "poly_translate_inf_neg_def")
   (inst - "A" "a" "n" "1/(A+1-x)")
   (assert)
   (case "NOT (1 / (1 + A - x) - 1 - 1 / (1 + A - x) * -A) /
                                   (1 / (1 + A - x)) = x")
   (("1" (cross-mult 1))
    ("2"
     (replace -1)
     (hide -1)
     (lemma "div_expt")
     (inst - "n" "1" "A+1-x")
     (replace -1)
     (hide -1)
     (case "FORALL (rr:nat): 1^rr = 1")
     (("1" (inst - "n") (replace -1) (hide -1) (assert))
      ("2"
       (induct "rr")
       (("1" (expand "^" 1) (expand "expt" 1) (propax))
        ("2" (skeep) (expand "^") (expand "expt" +) (assert))))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: polynomials
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (label "reldef" -1)
   (hide "reldef")
   (ground)
   (("1"
     (skosimp*)
     (lemma "poly_translate_inf_pos_def")
     (case "FORALL (ii:nat): x!1^ii>0")
     (("1"
       (inst - "n")
       (inst - "A" "a" "n" "x!1")
       (assert)
       (replace -2 :dir rl)
       (case "rel(polynomial(a, n)((1 + A * x!1 - x!1) / x!1), 0)")
       (("1"
         (reveal "reldef")
         (split -)
         (("1" (replace -1) (mult-by -2 "x!1^n") (assert))
          ("2" (replace -1) (mult-by -2 "x!1^n") (assert))
          ("3" (replace -1) (mult-by -2 "x!1^n") (assert))
          ("4" (replace -1) (mult-by -2 "x!1^n") (assert))))
        ("2"
         (hide 2)
         (hide -2)
         (inst?)
         (assert)
         (cross-mult 2)
         (assert))))
      ("2"
       (induct "ii")
       (("1" (expand "^") (expand "expt") (assert))
        ("2"
         (skeep)
         (expand "^")
         (expand "expt" +)
         (mult-by -1 "x!1")
         (assert))))))
    ("2"
     (skosimp*)
     (lemma "poly_translate_inf_pos_def")
     (inst - "A" "a" "n" "1/(x!1-A+1)")
     (("1"
       (assert)
       (case "NOT ((1 + A * (1 / (1 - A + x!1)) - 1 / (1 - A + x!1)) /
                                                      (1 / (1 - A + x!1))) = x!1")
       (("1" (field))
        ("2"
         (replace -1)
         (hide -1)
         (inst - "1 / (1 - A + x!1)")
         (assert)
         (case "1 / (1 - A + x!1) > 0 AND 1 / (1 - A + x!1) <= 1")
         (("1"
           (flatten)
           (assert)
           (case "FORALL (ii:nat): (1/(1-A+x!1))^ii > 0")
           (("1"
             (inst - "n")
             (reveal "reldef")
             (split -)
             (("1" (replace -1) (mult-by 1 "(1/(1-A+x!1))^n") (assert))
              ("2" (replace -1) (mult-by 1 "(1/(1-A+x!1))^n") (assert))
              ("3" (replace -1) (mult-by 1 "(1/(1-A+x!1))^n") (assert))
              ("4" (replace -1) (mult-by 1 "(1/(1-A+x!1))^n") (assert))))
            ("2"
             (assert)
             (induct "ii")
             (("1" (expand "^") (expand "expt") (assert))
              ("2"
               (skeep)
               (expand "^")
               (expand "expt" +)
               (mult-by -1 "(1/(1-A+x!1))")
               (assert))))))
          ("2"
           (split)
           (("1" (cross-mult 1) (assert))
            ("2" (cross-mult 1) (assert))))))))
      ("2" (assert))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: polynomials
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (name "aneg" "LAMBDA (i:nat): (-1)^i*a(i)")
   (lemma "poly_translate_inf_pos_rel")
   (inst - "-A" "aneg" "n" "rel")
   (assert)
   (replace -3)
   (case "poly_translate_inf_pos(aneg, n)(-A)=
                poly_translate_inf_neg(a, n)(A)")
   (("1"
     (replace -1)
     (hide -1)
     (replace -1 :dir rl)
     (hide -1)
     (case "FORALL (xy:real): polynomial(a,n)(xy) = polynomial(aneg,n)(-xy)")
     (("1"
       (hide -3)
       (ground)
       (("1" (skeep) (inst - "-x") (inst - "-x") (assert))
        ("2" (skeep) (inst - "-x") (inst - "x") (assert))))
      ("2"
       (hide 2)
       (skeep)
       (expand "polynomial" +)
       (rewrite "sigma_restrict_eq")
       (hide 2)
       (decompose-equality +)
       (expand "restrict")
       (lift-if)
       (split +)
       (("1" (propax))
        ("2"
         (flatten)
         (split +)
         (("1"
           (flatten)
           (replace -1)
           (expand "aneg" +)
           (expand "^" +)
           (expand "expt" +)
           (propax))
          ("2"
           (flatten)
           (expand "aneg" +)
           (lemma "mult_expt")
           (inst - "x!1" "-1" "-xy")
           (("1" (assert))
            ("2"
             (flatten)
             (replace -1)
             (assert)
             (expand "^" +)
             (expand "expt" +)
             (assert))))))))))
    ("2"
     (hide 2)
     (hide -3)
     (hide -1)
     (expand "poly_translate_inf_pos")
     (expand "poly_translate_inf_neg")
     (decompose-equality +)
     (("1"
       (lift-if)
       (ground)
       (rewrite "sigma_restrict_eq")
       (("1"
         (hide 3)
         (decompose-equality +)
         (("1"
           (expand "restrict")
           (lift-if)
           (ground)
           (expand "aneg")
           (propax))
          ("2" (skosimp*) (assert)) ("3" (skosimp*) (assert))))
        ("2" (skosimp*) (assert)) ("3" (skosimp*) (assert))))
      ("2" (skosimp*) (assert)) ("3" (skosimp*) (assert))
      ("4" (skosimp*) (assert))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: polynomials
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (decompose-equality +)
   (expand "+" + 2)
   (expand "polynomial")
   (rewrite "sigma_sum")
   (rewrite "sigma_eq")
   (hide 2)
   (skosimp*)
   (rewrite "poly_deriv_plus")
   (assert))


proof_type: f_proof
decl_type: formula
library: reals
theory: polynomials
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (label "ngt0" -1)
   (hide -1)
   (name "P"
         "LAMBDA (aa:sequence[real]): EXISTS (nseq: [nat -> nat], pseq: [nat -> sequence[real]]):
                                                                  FORALL (h: real, x):
                                                                    polynomial(aa, n)(x + h) =
                                                                     polynomial(aa, n)(x) + h * polynomial(poly_deriv(aa), n - 1)(x) +
                                                                      h ^ 2 *
                                                                       polynomial(LAMBDA (ii: nat):
                                                                                    polynomial(pseq(ii), nseq(ii))(h),
                                                                                  n - 1)
                                                                                 (x)")
   (("1"
     (lemma "prop_extends_monomial")
     (skoletin -1)
     (case "(FORALL (aa:sequence[real]): eventzero(aa) IMPLIES P(aa)) IMPLIES (FORALL (aa:sequence[real]): P(aa))")
     (("1"
       (split -)
       (("1" (inst - "a") (assert) (expand "P" -1) (propax))
        ("2"
         (hide 2)
         (inst - "P")
         (assert)
         (replace 1)
         (hide 1)
         (hide -)
         (split +)
         (("1"
           (skeep)
           (expand "P")
           (assert)
           (case "j<=n IMPLIES polynomial(LAMBDA (i: nat): IF i = j THEN ar ELSE 0 ENDIF, n) = LAMBDA (x:real):ar*x^j")
           (("1"
             (assert)
             (expand "poly_deriv")
             (assert)
             (case "NOT (LAMBDA (n):
                                                                                                                                                          IF 1 + n = j THEN ar ELSE 0 ENDIF +
                                                                                                                                                           n * IF 1 + n = j THEN ar ELSE 0 ENDIF) =  (LAMBDA (n): IF n = j-1 THEN (1+n)*ar ELSE 0 ENDIF)")
             (("1" (hide-all-but 1) (decompose-equality) (grind))
              ("2"
               (replace -1)
               (hide -1)
               (case "NOT (LAMBDA (n):
                                                                                                                                                                  IF 1 + n = j THEN ar ELSE 0 ENDIF +
                                                                                                                                                                   n * IF 1 + n = j THEN ar ELSE 0 ENDIF) =  (LAMBDA (n): IF n = j-1 THEN (1+n)*ar ELSE 0 ENDIF)")
               (("1" (hide-all-but 1) (decompose-equality) (grind))
                ("2"
                 (case "j<=n")
                 (("1"
                   (assert)
                   (replace -3)
                   (case "j>=2")
                   (("1"
                     (label "jge2" -1)
                     (label "jlen" -2)
                     (case "polynomial((LAMBDA (m):
                                                                                                                                                                                                 IF m = j - 1 THEN (1 + m) * ar ELSE 0 ENDIF),
                                                                                                                                                                                              n - 1) = LAMBDA (x:real): j*ar*x^(j-1)")
                     (("1"
                       (replace -1)
                       (assert)
                       (name "FF"
                             "LAMBDA (h:real): LAMBDA (x:real): (LAMBDA (nn: nat):
                                                                                                                                                                                                                        IF 2 + nn > j THEN 0
                                                                                                                                                                                                                        ELSE (C(j, 2 + nn) * h ^ (2 + nn)) * x ^ (-2 - nn + j)
                                                                                                                                                                                                                        ENDIF)")
                       (("1"
                         (name "GG"
                               "LAMBDA (h:real): LAMBDA (x:real): (LAMBDA (nn: nat):
                                                                                                                                                                                                                                  IF 2 + nn > j THEN 0
                                                                                                                                                                                                                                  ELSE (C(j, 2 + nn) * h ^ (nn)) * x ^ (-2 - nn + j)
                                                                                                                                                                                                                                  ENDIF)")
                         (("1"
                           (case "FORALL (h,x:real): FF(h)(x) = h^2*GG(h)(x)")
                           (("1"
                             (case "EXISTS (nseq: [nat -> nat], pseq: [nat -> sequence[real]]): FORALL (h,x:real):
                                                                                                                                                                                                                                               sigma(0, j - 2, GG(h)(x))
                                                                                                                                                                                                                                                =
                                                                                                                                                                                                                                                 polynomial(LAMBDA (ii: nat): polynomial(pseq(ii), nseq(ii))(h),
                                                                                                                                                                                                                                                            n - 1)
                                                                                                                                                                                                                                                           (x)")
                             (("1"
                               (skeep -)
                               (inst + "nseq"
                                "LAMBDA (ii:nat): ar*pseq(ii)")
                               (skeep)
                               (inst - "h" "x")
                               (inst - "h" "x")
                               (assert)
                               (case "polynomial(LAMBDA (ii_1: nat):
                                                                                                                                                                                                                                                                          polynomial(ar * pseq(ii_1), nseq(ii_1))(h),
                                                                                                                                                                                                                                                                        n - 1)
                                                                                                                                                                                                                                                                       (x) = ar*polynomial(LAMBDA (ii: nat): polynomial(pseq(ii), nseq(ii))(h),
                                                                                                                                                                                                                                                                       n - 1)
                                                                                                                                                                                                                                                                      (x)")
                               (("1"
                                 (assert)
                                 (replace -1)
                                 (replace -2 :dir rl)
                                 (assert)
                                 (lemma "sigma_scal")
                                 (inst - "GG(h)(x)" "h^2" "j-2" "0")
                                 (mult-by -1 "ar")
                                 (replace -1 :dir rl)
                                 (assert)
                                 (expand "*" -4)
                                 (replace -4 :dir rl)
                                 (lemma "binomial_theorem")
                                 (inst - "j" "h" "x")
                                 (replace -1)
                                 (hide (-1 -2 -3 -4 -5 -6 -7))
                                 (lemma "sigma_split")
                                 (inst?)
                                 (("1"
                                   (inst - "1")
                                   (assert)
                                   (replace -1)
                                   (hide -1)
                                   (expand "sigma" + 1)
                                   (expand "sigma" + 1)
                                   (expand "sigma" + 1)
                                   (case "C(j,0) = 1")
                                   (("1"
                                     (replace -1)
                                     (case "C(j,1) = j")
                                     (("1"
                                       (replace -1)
                                       (assert)
                                       (case "h^0 = 1 AND h^1 = h")
                                       (("1"
                                         (flatten)
                                         (replace -1)
                                         (replace -2)
                                         (assert)
                                         (lemma "sigma_shift")
                                         (inst
                                          -
                                          "LAMBDA (i: nat):
                                                                                                                                                                                                                                                                             IF i > j THEN 0 ELSE C(j, i) * h ^ i * x ^ (j - i) ENDIF"
                                          "j-2"
                                          "0"
                                          "2")
                                         (("1"
                                           (assert)
                                           (replace -1)
                                           (hide -1)
                                           (expand "FF" +)
                                           (assert))
                                          ("2"
                                           (hide 2)
                                           (skosimp*)
                                           (assert))
                                          ("3"
                                           (hide 2)
                                           (skosimp*)
                                           (assert))))
                                        ("2" (hide-all-but 1) (grind))))
                                      ("2"
                                       (expand "C" +)
                                       (assert)
                                       (expand "factorial" + 1)
                                       (assert))))
                                    ("2" (expand "C" +) (assert))))
                                  ("2" (hide 2) (skosimp*) (assert))
                                  ("3" (hide 2) (skosimp*) (assert))))
                                ("2"
                                 (hide-all-but 1)
                                 (expand "polynomial")
                                 (reveal "jlen")
                                 (reveal "jge2")
                                 (rewrite "sigma_scal" :dir rl)
                                 (("1"
                                   (rewrite "sigma_eq")
                                   (("1"
                                     (hide 2)
                                     (skosimp*)
                                     (case
                                      "FORALL (a,b,cc:real): a=ar*b IMPLIES a*cc = ar*(b*cc)")
                                     (("1"
                                       (rewrite -1)
                                       (hide (-1 2))
                                       (rewrite "sigma_scal" :dir rl)
                                       (rewrite "sigma_eq")
                                       (hide 2)
                                       (skosimp*)
                                       (assert)
                                       (grind))
                                      ("2"
                                       (hide-all-but 1)
                                       (assert)
                                       (grind))))
                                    ("2" (hide 2) (skosimp*) (assert))))
                                  ("2" (hide 2) (skosimp*) (assert))))))
                              ("2"
                               (hide-all-but (1 "jge2" "jlen"))
                               (inst + "LAMBDA (ii:nat): j-2"
                                "LAMBDA (ii:nat): LAMBDA (k:nat): IF k = -2-ii+j THEN C(j,j-ii) ELSE 0 ENDIF")
                               (("1"
                                 (skeep)
                                 (case
                                  "(LAMBDA (ii_1: nat):
                                                                                                                                                                                                                                                                                    polynomial(LAMBDA (k: nat):
                                                                                                                                                                                                                                                                                                 IF k = -2 - ii_1 + j THEN C(j, j - ii_1)
                                                                                                                                                                                                                                                                                                 ELSE 0
                                                                                                                                                                                                                                                                                                 ENDIF,
                                                                                                                                                                                                                                                                                               j - 2)
                                                                                                                                                                                                                                                                                              (h)) = LAMBDA (ii:nat): IF ii>j-2 THEN 0 ELSE C(j,j-ii)*h^(-2-ii+j) ENDIF")
                                 (("1"
                                   (replace -1)
                                   (hide -1)
                                   (expand "GG")
                                   (expand "polynomial")
                                   (lemma "sigma_split")
                                   (inst - _ "n-1" _ _)
                                   (inst - _ _ "j-2")
                                   (inst?)
                                   (("1"
                                     (assert)
                                     (invoke (case "%1 = 0") (! -1 2 2))
                                     (("1"
                                       (replace -1)
                                       (hide -1)
                                       (assert)
                                       (replace -1)
                                       (hide -1)
                                       (lemma "sigma_reverse")
                                       (invoke
                                        (inst - "%1" _ _)
                                        (! 1 2 3))
                                       (("1"
                                         (inst?)
                                         (assert)
                                         (replace -1)
                                         (hide -1)
                                         (rewrite "sigma_eq")
                                         (("1"
                                           (hide 2)
                                           (skosimp*)
                                           (assert)
                                           (lift-if)
                                           (ground)
                                           (replace -1)
                                           (assert)
                                           (case "x^0 = 1")
                                           (("1" (assert))
                                            ("2"
                                             (hide-all-but 1)
                                             (grind))))
                                          ("2"
                                           (hide 2)
                                           (skosimp*)
                                           (assert))
                                          ("3" (skosimp*) (assert))
                                          ("4"
                                           (hide 2)
                                           (skosimp*)
                                           (assert))))
                                        ("2"
                                         (hide 2)
                                         (skosimp*)
                                         (assert))
                                        ("3"
                                         (hide 2)
                                         (skosimp*)
                                         (assert))))
                                      ("2"
                                       (hide (-1 2))
                                       (rewrite "sigma_restrict_eq_0")
                                       (("1"
                                         (hide 2)
                                         (skosimp*)
                                         (assert))
                                        ("2" (hide 2) (grind))))
                                      ("3"
                                       (hide (-1 2))
                                       (skosimp*)
                                       (assert))
                                      ("4" (hide-all-but 1) (grind))))
                                    ("2"
                                     (hide (-1 2))
                                     (skosimp*)
                                     (assert))
                                    ("3"
                                     (hide (-1 2))
                                     (skosimp*)
                                     (assert))))
                                  ("2"
                                   (hide 2)
                                   (decompose-equality)
                                   (("1"
                                     (expand "polynomial")
                                     (assert)
                                     (lemma "sigma_eq_one_arg")
                                     (inst?)
                                     (("1"
                                       (inst - "-2-x!1+j")
                                       (assert)
                                       (case "x!1 > j-2")
                                       (("1"
                                         (assert)
                                         (rewrite "sigma_restrict_eq_0")
                                         (hide 2)
                                         (skosimp*)
                                         (lift-if)
                                         (ground))
                                        ("2"
                                         (assert)
                                         (split -)
                                         (("1"
                                           (replace -1)
                                           (lift-if)
                                           (ground)
                                           (replace -1)
                                           (case "h^0 = 1")
                                           (("1" (assert))
                                            ("2"
                                             (hide-all-but 1)
                                             (grind))))
                                          ("2"
                                           (skosimp*)
                                           (lift-if)
                                           (ground))))))
                                      ("2"
                                       (skosimp*)
                                       (lift-if)
                                       (assert))))
                                    ("2" (skosimp*) (assert))
                                    ("3" (skosimp*) (assert))
                                    ("4" (skosimp*) (assert))))
                                  ("3" (hide 2) (skosimp*) (assert))
                                  ("4" (hide 2) (skosimp*) (assert))
                                  ("5" (hide 2) (skosimp*) (assert))))
                                ("2" (skosimp*) (assert))))))
                            ("2"
                             (hide (-1 -2 2))
                             (skeep)
                             (decompose-equality)
                             (expand "FF")
                             (expand "GG")
                             (lemma "expt_plus")
                             (expand "*")
                             (assert)
                             (lemma "expt_plus")
                             (inst - "2" "x!1" "h")
                             (("1" (lift-if) (ground))
                              ("2"
                               (flatten)
                               (replace -1)
                               (assert)
                               (expand "^" +)
                               (expand "expt" +)
                               (lift-if)
                               (ground))))))
                          ("2" (hide-all-but 1) (grind))))
                        ("2" (hide 2) (skosimp*) (assert))
                        ("3" (skosimp*) (assert))))
                      ("2"
                       (hide 2)
                       (decompose-equality)
                       (expand "polynomial")
                       (lemma "sigma_eq_one_arg")
                       (inst?)
                       (inst - "j-1")
                       (assert)
                       (skosimp*)
                       (lift-if)
                       (assert))
                      ("3" (assert))))
                    ("2"
                     (inst + "LAMBDA (i:nat): 0"
                      "LAMBDA (i:nat): LAMBDA (k:nat): 0")
                     (skeep 2)
                     (assert)
                     (case "polynomial(LAMBDA (ii: nat): polynomial(LAMBDA (k: nat): 0, 0)(h),
                                                                                                n - 1)
                                                                                               (x) = 0")
                     (("1"
                       (replace -1)
                       (assert)
                       (expand "polynomial" +)
                       (lemma "sigma_split")
                       (inst?)
                       (inst - "1")
                       (assert)
                       (case "n >= 2")
                       (("1"
                         (assert)
                         (invoke (case "%1 = 0") (! -2 2 2))
                         (("1"
                           (replace -1)
                           (assert)
                           (replace -3)
                           (case "j = 0 OR j = 1")
                           (("1"
                             (split -)
                             (("1" (replace -1) (hide -) (grind))
                              ("2" (replace -1) (hide -) (grind))))
                            ("2" (flatten) (assert))))
                          ("2" (rewrite "sigma_restrict_eq_0"))))
                        ("2"
                         (assert)
                         (case "j = 0 OR j = 1")
                         (("1"
                           (case "n = 0 OR n = 1")
                           (("1"
                             (hide -3)
                             (ground)
                             (("1"
                               (replaces -1)
                               (replaces -1)
                               (hide -)
                               (grind))
                              ("2"
                               (replaces -1)
                               (replaces -1)
                               (hide -)
                               (grind))
                              ("3"
                               (replaces -1)
                               (replaces -1)
                               (hide -)
                               (assert)
                               (grind))))
                            ("2" (flatten) (assert))))
                          ("2" (flatten) (assert))))))
                      ("2"
                       (hide-all-but 1)
                       (expand "polynomial")
                       (rewrite "sigma_restrict_eq_0")
                       (rewrite "sigma_restrict_eq_0")
                       (hide 2)
                       (grind))))))
                  ("2"
                   (hide -2)
                   (assert)
                   (inst + "LAMBDA (i:nat): 0"
                    "LAMBDA (i:nat): LAMBDA (k:nat): 0")
                   (skeep 2)
                   (assert)
                   (hide -)
                   (invoke (case "%1 = 0") (! 2 1))
                   (("1"
                     (invoke (case "%1 = 0") (! 2 2 1))
                     (("1"
                       (invoke (case "%1 = 0") (! 2 2 2 2))
                       (("1"
                         (invoke (case "%1 = 0") (! 2 2 3 2))
                         (("1" (assert))
                          ("2"
                           (hide (- 3))
                           (expand "polynomial")
                           (rewrite "sigma_restrict_eq_0")
                           (skosimp*)
                           (lift-if)
                           (ground))))
                        ("2"
                         (hide (- 3))
                         (expand "polynomial")
                         (rewrite "sigma_restrict_eq_0")
                         (rewrite "sigma_restrict_eq_0")
                         (skosimp*)
                         (lift-if)
                         (ground))))
                      ("2"
                       (hide (- 3))
                       (expand "polynomial")
                       (rewrite "sigma_restrict_eq_0")
                       (skosimp*)
                       (lift-if)
                       (ground))))
                    ("2"
                     (hide (- 3))
                     (expand "polynomial")
                     (rewrite "sigma_restrict_eq_0")
                     (skosimp*)
                     (lift-if)
                     (ground))))))))))
            ("2"
             (hide 2)
             (expand "polynomial")
             (flatten)
             (decompose-equality)
             (lemma "sigma_eq_one_arg")
             (inst?)
             (inst - "j")
             (assert)
             (split -)
             (("1"
               (lift-if)
               (assert)
               (ground)
               (replace -1)
               (assert)
               (case "x!1^0 = 1")
               (("1" (replace -1) (assert))
                ("2" (hide-all-but 1) (grind))))
              ("2" (skosimp*) (lift-if) (ground))))))
          ("2"
           (skolem 1 ("aa" "bb"))
           (flatten)
           (expand "P")
           (skolem -1 ("nseqa" _))
           (skolem -2 ("nseqb" _))
           (skolem -1 "psqueaka")
           (skolem -2 "psqueakb")
           (name "pseqa"
                 "LAMBDA (nn:nat): LAMBDA (ii:nat): IF ii>nseqa(nn) THEN 0 ELSE psqueaka(nn)(ii) ENDIF")
           (name "pseqb"
                 "LAMBDA (nn:nat): LAMBDA (ii:nat): IF ii>nseqb(nn) THEN 0 ELSE psqueakb(nn)(ii) ENDIF")
           (inst + "nseqa+nseqb"
            "LAMBDA (nn:nat): pseqa(nn) + pseqb(nn)")
           (("1"
             (skeep)
             (hide (-1 -2))
             (inst - "h" "x")
             (inst - "h" "x")
             (assert)
             (rewrite "sum_polynomial_eq_degree" :dir rl)
             (expand "+" +)
             (replaces -1)
             (replaces -1)
             (assert)
             (invoke (case "%1 + %2 = %3") (! 1 1 1 2) (! 1 1 2 2)
              (! 1 2 1 2))
             (("1"
               (replace -1 :dir rl)
               (invoke (case "%1 + %2 = %3") (! 1 1 3 2) (! 1 1 4 2)
                (! 1 2 2 2))
               (("1" (assert))
                ("2"
                 (hide-all-but 1)
                 (expand "polynomial")
                 (rewrite "sigma_sum")
                 (rewrite "sigma_eq")
                 (hide 2)
                 (skeep)
                 (expand "poly_deriv")
                 (propax))))
              ("2"
               (hide 2)
               (expand "polynomial")
               (rewrite "sigma_sum")
               (("1"
                 (rewrite "sigma_eq")
                 (("1"
                   (hide 2)
                   (skolem 1 "nn")
                   (assert)
                   (rewrite "sigma_scal_right" :dir rl)
                   (rewrite "sigma_scal_right" :dir rl)
                   (rewrite "sigma_scal_right" :dir rl)
                   (rewrite "sigma_sum" :dir rl)
                   (invoke (case "%1 = %2 AND %3 = %4") (! 1 1 1)
                    (! 1 2 1) (! 1 1 2) (! 1 2 2))
                   (("1" (flatten) (assert))
                    ("2"
                     (hide 2)
                     (split)
                     (("1"
                       (lemma "sigma_split")
                       (invoke (inst - "%1" _ _ _) (! 1 2 3))
                       (inst - "nseqa(nn) + nseqb(nn)" "0" "nseqb(nn)")
                       (assert)
                       (replace -1)
                       (invoke (case "%1 = 0") (! 1 2 2))
                       (("1"
                         (assert)
                         (replace -1)
                         (hide -)
                         (assert)
                         (rewrite "sigma_eq")
                         (hide 2)
                         (skosimp*)
                         (expand "pseqb")
                         (propax))
                        ("2"
                         (hide-all-but 1)
                         (rewrite "sigma_restrict_eq_0")
                         (hide 2)
                         (skosimp*)
                         (expand "pseqb")
                         (propax))))
                      ("2"
                       (lemma "sigma_split")
                       (invoke (inst - "%1" _ _ _) (! 1 2 3))
                       (inst - "nseqa(nn) + nseqb(nn)" "0" "nseqa(nn)")
                       (assert)
                       (replace -1)
                       (invoke (case "%1 = 0") (! 1 2 2))
                       (("1"
                         (assert)
                         (replace -1)
                         (hide -)
                         (assert)
                         (rewrite "sigma_eq")
                         (hide 2)
                         (skosimp*)
                         (expand "pseqa")
                         (propax))
                        ("2"
                         (hide-all-but 1)
                         (rewrite "sigma_restrict_eq_0")
                         (hide 2)
                         (skosimp*)
                         (expand "pseqa")
                         (propax))))))))
                  ("2" (hide 2) (skosimp*) (assert))
                  ("3" (hide 2) (skosimp*) (assert))
                  ("4" (hide-all-but 1) (skosimp*) (assert))))
                ("2" (hide-all-but 1) (skosimp*) (assert))
                ("3" (hide-all-but 1) (skosimp*) (assert))))))
            ("2" (assert) (hide -) (grind))))))))
      ("2"
       (hide-all-but 1)
       (flatten)
       (skeep)
       (expand "P" +)
       (name "aaa" "LAMBDA (ii:nat): IF ii>n THEN 0 ELSE aa(ii) ENDIF")
       (inst -2 "aaa")
       (case "eventzero(aaa)")
       (("1"
         (assert)
         (hide (-1 -2))
         (expand "P")
         (skeep -1)
         (inst + "nseq" "pseq")
         (skeep)
         (inst - "h" "x")
         (invoke (case "%1 = %2") (! -1 1) (! 1 1))
         (("1"
           (invoke (case "%1 = %2") (! -2 2 1) (! 1 2 1))
           (("1"
             (invoke (case "%1 = %2") (! -3 2 2 2) (! 1 2 2 2))
             (("1" (assert))
              ("2"
               (hide-all-but 1)
               (rewrite "poly_eq_le_degree")
               (hide 2)
               (expand "aaa")
               (grind))))
            ("2"
             (rewrite "poly_eq_le_degree")
             (expand "aaa")
             (hide-all-but 1)
             (grind))))
          ("2"
           (hide-all-but 1)
           (rewrite "poly_eq_le_degree")
           (hide 2)
           (expand "aaa")
           (grind))))
        ("2"
         (hide 2)
         (expand "eventzero")
         (inst + "n")
         (hide-all-but 1)
         (expand "aaa")
         (grind))))))
    ("2"
     (assert)
     (case "NOT n = 0")
     (("1" (assert))
      ("2"
       (hide 1)
       (replace -1)
       (inst + "LAMBDA (ii:nat): 0"
        "LAMBDA (ii:nat): LAMBDA (nn:nat): 0")
       (grind))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: polynomials
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (rewrite "polynomial_prod_def")
   (rewrite "polynomial_prod_def")
   (assert)
   (rewrite "sum_polynomial_eq_degree_eval")
   (rewrite "poly_eq_le_degree")
   (hide 2)
   (skosimp*)
   (assert)
   (expand "+")
   (expand "poly_deriv" + 1 :assert? none)
   (name "jj" "ii!1+1")
   (replace -1)
   (assert)
   (expand "polynomial_prod")
   (case "FORALL (aa,bb,cc:real): aa-cc = bb IMPLIES aa=bb+cc")
   (("1"
     (rewrite -1)
     (("1"
       (hide 2)
       (rewrite "sigma_scal" :dir rl)
       (("1"
         (case "max(jj-m,0) = max(1-m+ii!1,0)")
         (("1"
           (replace -1)
           (rewrite "sigma_minus")
           (("1"
             (assert)
             (case "ii!1>=m")
             (("1"
               (expand "max")
               (assert)
               (rewrite "sigma_shift_fun_eq")
               (("1"
                 (hide 2)
                 (skosimp*)
                 (assert)
                 (expand "poly_deriv")
                 (lift-if)
                 (lift-if)
                 (lift-if)
                 (lift-if)
                 (lift-if)
                 (lift-if)
                 (lift-if)
                 (assert))
                ("2" (hide 2) (grind)) ("3" (hide 2) (grind))))
              ("2"
               (assert)
               (case "ii!1 = m-1")
               (("1"
                 (replaces -1)
                 (assert)
                 (expand "max")
                 (assert)
                 (replaces -3 :dir rl)
                 (assert)
                 (expand "poly_deriv")
                 (assert)
                 (invoke (name "FF1" "%1") (! 2 1 3))
                 (("1"
                   (replaces -1)
                   (invoke (name "FF2" "%1") (! 2 2 3))
                   (("1"
                     (replaces -1)
                     (case "FORALL (nn:nat): sigma(0,nn,FF1) = sigma(0,nn-1,FF2)")
                     (("1" (inst?))
                      ("2"
                       (hide 3)
                       (induct "nn")
                       (("1"
                         (hide -1)
                         (expand "FF1")
                         (expand "FF2")
                         (grind))
                        ("2"
                         (assert)
                         (hide -1)
                         (skeep)
                         (assert)
                         (expand "sigma" +)
                         (case "FF1(1+j) = FF2(j)")
                         (("1" (assert))
                          ("2"
                           (hide (-1 2))
                           (expand "FF1")
                           (expand "FF2")
                           (grind))))
                        ("3" (assert) (skeep) (assert))))
                      ("3" (skeep) (assert))))
                    ("2" (skeep) (assert))))
                  ("2" (skeep) (assert)) ("3" (skeep) (assert))))
                ("2"
                 (assert)
                 (expand "max")
                 (assert)
                 (invoke (name "FF1" "%1") (! 3 1 3))
                 (("1"
                   (replaces -1)
                   (invoke (name "FF2" "%1") (! 3 2 3))
                   (("1"
                     (replaces -1)
                     (case "FORALL (nn:nat): sigma(0,nn,FF1) = sigma(0,nn-1,FF2)")
                     (("1" (inst?))
                      ("2"
                       (hide (-1 4))
                       (induct "nn")
                       (("1" (expand "FF1") (expand "FF2") (grind))
                        ("2"
                         (skeep)
                         (expand "sigma" +)
                         (case "FF1(1+j) = FF2(j)")
                         (("1" (assert))
                          ("2"
                           (hide (-1 2))
                           (expand "FF1")
                           (expand "FF2")
                           (grind))))
                        ("3" (skosimp*) (assert))))
                      ("3" (skosimp*) (assert))))
                    ("2" (skosimp*) (assert))))
                  ("2" (skosimp*) (assert))
                  ("3" (skosimp*) (assert))))))))
            ("2" (skosimp*) (assert)) ("3" (skosimp*) (assert))))
          ("2" (assert))))
        ("2" (hide 2) (skosimp*) (assert))))
      ("2" (hide 2) (skosimp*) (assert))
      ("3" (hide 2) (skosimp*) (assert))))
    ("2" (hide 2) (skosimp*) (assert))))


proof_type: f_proof
decl_type: formula
library: reals
theory: polynomials
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "max")
   (lift-if)
   (ground)
   (("1"
     (case "n = 0")
     (("1" (replaces -1) (decompose-equality) (grind)) ("2" (assert))))
    ("2"
     (expand "poly_deriv")
     (expand "power_linear")
     (decompose-equality)
     (("1"
       (expand "*")
       (lift-if)
       (lift-if)
       (lift-if)
       (assert)
       (ground)
       (case "r^(x!1)*r = r^(x!1+1)")
       (("1"
         (replace -1 :dir rl)
         (hide -1)
         (case "(1+x!1)*C(n,1+x!1) = n*C(n-1,x!1)")
         (("1" (assert))
          ("2"
           (hide 3)
           (name "iguana" "1+x!1")
           (replace -1)
           (expand "C")
           (expand "factorial" + 1)
           (expand "factorial" + 2)
           (assert)
           (field))))
        ("2"
         (hide 3)
         (lemma "expt_plus")
         (inst - "x!1" "1" "r")
         (("1"
           (assert)
           (expand "^" - 3)
           (expand "expt")
           (expand "expt")
           (assert))
          ("2" (flatten) (assert) (replace -1) (grind))))))
      ("2" (grind)) ("3" (grind)) ("4" (grind)) ("5" (grind))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: polynomials
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (split)
   (("1" (decompose-equality) (grind))
    ("2"
     (assert)
     (expand "poly_n_deriv")
     (expand "poly_deriv")
     (decompose-equality)
     (expand "C")
     (expand "factorial" + 1)
     (assert))
    ("3"
     (assert)
     (skeep)
     (expand "poly_n_deriv")
     (expand "poly_deriv")
     (decompose-equality)
     (name "fd" "1+n")
     (replace -1)
     (expand "factorial" + 3)
     (assert)
     (case "fd -1 = n")
     (("1"
       (replace -1)
       (case "C(fd+x!1,n)*(1+x!1) = C(fd+x!1,fd)*fd")
       (("1" (assert))
        ("2"
         (hide 2)
         (name "dd" "1+x!1")
         (replace -1)
         (expand "C")
         (case "fd -n = 1")
         (("1"
           (replace -1)
           (expand "factorial" + 5)
           (expand "factorial" + 3)
           (assert)
           (field))
          ("2" (assert))))))
      ("2" (assert))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: polynomials
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "poly_eq_deriv_plus")
   (inst - "a" "n")
   (assert)
   (case "n = 0")
   (("1" (replaces -1) (inst + "epsil") (hide -) (grind))
    ("2"
     (assert)
     (skeep -1)
     (case "EXISTS (M:posreal): FORALL (ii:nat,h:real): abs(h) <= 1 AND ii<=n-1 IMPLIES abs(polynomial(pseq(ii), nseq(ii))(h)*x^ii) <= M")
     (("1"
       (case "EXISTS (M:posreal): FORALL (h:real): abs(h) <= 1 IMPLIES abs(polynomial(LAMBDA (ii: nat): polynomial(pseq(ii), nseq(ii))(h),
                                                                               n - 1)
                                                                              (x)) <= M")
       (("1"
         (hide -2)
         (case "EXISTS (M:posreal): FORALL (h:real): abs(h) <= 1 IMPLIES abs(polynomial(poly_deriv(a), n - 1)(x) +
                                                                             h *
                                                                              polynomial(LAMBDA (ii: nat): polynomial(pseq(ii), nseq(ii))(h),
                                                                                         n - 1)
                                                                                        (x)) <= M")
         (("1"
           (hide -2)
           (skeep -1)
           (name "delta" "min(1/2,epsil/(2*M))")
           (inst + "delta")
           (skeep 2)
           (name "h" "y-x")
           (case "y = x+h")
           (("1"
             (replaces -1)
             (hide -1)
             (assert)
             (rewrite "abs_mult")
             (expand "abs" -4 1)
             (assert)
             (inst - "h")
             (assert)
             (inst - "h" "x")
             (replaces -3)
             (assert)
             (mult-by -2 "abs(h)")
             (rewrite "abs_mult" :dir rl)
             (assert)
             (case "M*abs(h) < epsil")
             (("1"
               (assert)
               (expand "^")
               (expand "expt")
               (expand "expt")
               (expand "expt")
               (assert)
               (expand "abs")
               (lift-if)
               (lift-if)
               (lift-if)
               (assert))
              ("2"
               (hide 3)
               (mult-by -3 "M")
               (case "delta*M < epsil")
               (("1" (assert))
                ("2"
                 (expand "delta" 1)
                 (assert)
                 (hide-all-but 1)
                 (expand "min")
                 (lift-if)
                 (grind)
                 (cross-mult 1))))))
            ("2" (assert))))
          ("2"
           (hide 3)
           (skeep -1)
           (inst + "abs(polynomial(poly_deriv(a), n - 1)(x)) + M")
           (skeep)
           (inst - "h")
           (assert)
           (lemma "triangle")
           (inst?)
           (assert)
           (rewrite "abs_mult")
           (invoke (case "abs(h)*%1 <= M") (! -3 1))
           (("1" (assert))
            ("2"
             (mult-ineq -2 -3)
             (("1" (assert))
              ("2"
               (hide (3 4 5))
               (split)
               (("1" (hide-all-but 1) (grind))
                ("2"
                 (expand "abs" + 1)
                 (expand "abs" + 2)
                 (propax))))))))))
        ("2"
         (hide (-2 3))
         (skeep -1)
         (inst + "n*M")
         (("1"
           (skeep)
           (case "FORALL (jj:nat): jj<=n-1 IMPLIES abs(polynomial(LAMBDA (ii: nat): polynomial(pseq(ii), nseq(ii))(h),
                                                                                   jj)
                                                                                  (x))
                                                                     <= (jj+1) * M")
           (("1" (inst - "n-1") (assert))
            ("2"
             (hide 2)
             (induct "jj")
             (("1"
               (assert)
               (expand "polynomial" + 1)
               (expand "sigma")
               (expand "sigma")
               (inst - "0" "h")
               (expand "^")
               (expand "expt")
               (assert))
              ("2"
               (skeep)
               (assert)
               (expand "polynomial" + 1)
               (expand "sigma")
               (expand "polynomial" - 1)
               (lemma "triangle")
               (inst?)
               (invoke (case "%1<=M") (! -1 2 2))
               (("1" (assert))
                ("2" (hide (-1 2)) (inst - "1+j" "h") (assert))))))))
          ("2" (assert))))))
      ("2"
       (hide (-1 3))
       (case "FORALL (ii:nat): ii<=n-1 IMPLIES EXISTS (M: posreal):
                                FORALL (h: real):
                                  abs(h) <= 1 IMPLIES
                                   abs(polynomial(pseq(ii), nseq(ii))(h) * x ^ ii) <= M")
       (("1"
         (case "FORALL (KK:nat): KK<=n-1 IMPLIES EXISTS (M: posreal):
                                    FORALL (ii: nat, h: real):
                                      abs(h) <= 1 AND ii <= KK IMPLIES
                                       abs(polynomial(pseq(ii), nseq(ii))(h) * x ^ ii) <= M")
         (("1" (inst - "n-1") (assert))
          ("2"
           (hide 2)
           (induct "KK")
           (("1"
             (inst - "0")
             (assert)
             (skeep -1)
             (inst + "M")
             (assert)
             (skeep)
             (inst - "h")
             (assert))
            ("2"
             (skeep)
             (assert)
             (skeep -1)
             (inst -3 "1+j")
             (assert)
             (skosimp*)
             (inst + "M + M!1")
             (skeep)
             (inst - "ii" "h")
             (inst - "h")
             (assert))))))
        ("2"
         (hide 2)
         (skeep)
         (case "FORALL (KK:nat): EXISTS (M:posreal): FORALL (h:real): abs(h)<=1 IMPLIES abs(polynomial(pseq(ii), KK)(h))<=M")
         (("1"
           (inst - "nseq(ii)")
           (assert)
           (skeep -1)
           (inst + "M*abs(x^ii)+1")
           (skeep)
           (inst - "h")
           (assert)
           (mult-by -1 "abs(x^ii)")
           (rewrite "abs_mult")
           (assert))
          ("2"
           (hide 2)
           (induct "KK")
           (("1" (inst + "abs(pseq(ii)(0))+1") (grind))
            ("2"
             (skeep)
             (skeep -1)
             (inst + "M + abs(pseq(ii)(j+1)) + 1")
             (skeep)
             (inst - "h")
             (assert)
             (expand "polynomial")
             (expand "sigma" +)
             (lemma "triangle")
             (inst?)
             (assert)
             (case "abs(pseq(ii)(1 + j) * h ^ (1 + j)) <= 1 + abs(pseq(ii)(1 + j))")
             (("1" (assert))
              ("2"
               (hide (-1 -2 2))
               (rewrite "abs_mult")
               (case "abs(h^(1+j))<=1")
               (("1" (mult-by -1 "abs(pseq(ii)(1+j))") (assert))
                ("2"
                 (hide 2)
                 (lemma "abs_expt")
                 (rewrite -1 :dir rl)
                 (("1"
                   (hide -1)
                   (lemma "both_sides_expt_pos_ge")
                   (inst - "1+j" "1" "abs(h)")
                   (("1" (assert) (rewrite "expt_1i") (assert))
                    ("2"
                     (assert)
                     (case "abs(h) = 0")
                     (("1" (replaces -1) (assert) (grind))
                      ("2" (assert))))))
                  ("2"
                   (assert)
                   (flatten)
                   (replaces -1)
                   (grind))))))))))))))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: polynomials
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (case "FORALL (ss:[nat->real]): (FORALL (ii:nat): x<=ss(ii) AND ss(ii)<=y) IMPLIES (EXISTS (xy:real): x<=xy AND xy<=y AND (FORALL (epsil:posreal,N:nat): EXISTS (jj:nat): jj>=N AND abs(xy-ss(jj)) < epsil))")
   (("1"
     (label "thislem" -1)
     (name "f" "polynomial(a,n)")
     (label "fname" -1)
     (lemma "poly_continuous")
     (label "polycont" -1)
     (name "Fset"
           "LAMBDA (xy:real): EXISTS (cc:real): x<=cc AND cc<=y AND polynomial(a,n)(cc) = xy")
     (label "Fsetname" -1)
     (case "nonempty?[real](Fset)")
     (("1"
       (label "nonemptyFset" -1)
       (name "ismax" "lub(Fset)")
       (("1"
         (label "ismaxname" -1)
         (case "FORALL (N:nat): EXISTS (vv:real): x<=vv AND vv<=y AND f(vv)>ismax-1/(2*N+1)")
         (("1"
           (name "thisset"
                 "LAMBDA (ii:nat): LAMBDA (xii:real): x<=xii AND xii<=y AND f(xii)>ismax-1/(2*ii+1)")
           (case "FORALL (ii:nat): nonempty?[real](thisset(ii))")
           (("1"
             (name "ss" "LAMBDA (ii:nat): choose(thisset(ii))")
             (("1"
               (inst "thislem" "ss")
               (split "thislem")
               (("1"
                 (skeep "thislem")
                 (case "NOT f(xy) = ismax")
                 (("1"
                   (case "f(xy) <= ismax")
                   (("1"
                     (name "newep" "(ismax-f(xy))/10")
                     (case "NOT newep > 0")
                     (("1" (assert))
                      ("2"
                       (lemma "archimedean")
                       (inst - "newep")
                       (("1"
                         (skosimp*)
                         (inst "polycont" "a" "n" "xy" "newep")
                         (("1"
                           (skeep "polycont")
                           (replace "fname")
                           (lemma "archimedean")
                           (inst - "delta")
                           (skosimp*)
                           (inst "thislem" "delta" "2*n!1")
                           (skeep "thislem")
                           (assert)
                           (inst "polycont" "ss(jj)")
                           (assert)
                           (typepred "ss(jj)")
                           (expand "thisset" -1)
                           (flatten)
                           (case "1/(1+2*jj) + newep < ismax - f(xy)")
                           (("1" (expand "abs") (lift-if) (ground))
                            ("2"
                             (hide (2 3))
                             (case "1/(1+2*jj) < 1/(2*n!1)")
                             (("1" (assert)) ("2" (cross-mult 1))))))
                          ("2" (assert))))
                        ("2" (assert))))))
                    ("2"
                     (assert)
                     (typepred "ismax")
                     (expand "least_upper_bound?")
                     (flatten)
                     (expand "upper_bound?")
                     (inst - "f(xy)")
                     (assert)
                     (expand "Fset" 1)
                     (inst + "xy")
                     (assert))))
                  ("2"
                   (inst + "xy")
                   (assert)
                   (skeep)
                   (replace "fname")
                   (replace -1)
                   (typepred "ismax")
                   (expand "least_upper_bound?")
                   (flatten)
                   (expand "upper_bound?")
                   (inst - "f(cc)")
                   (assert)
                   (expand "Fset" 1)
                   (inst + "cc")
                   (assert))))
                ("2"
                 (hide-all-but 1)
                 (skeep)
                 (typepred "ss(ii)")
                 (expand "thisset")
                 (ground))))
              ("2" (propax))))
            ("2"
             (hide 2)
             (skeep)
             (expand "nonempty?" +)
             (expand "empty?")
             (inst -3 "ii")
             (skeep -3)
             (inst - "vv")
             (expand "member")
             (expand "thisset")
             (assert))))
          ("2"
           (hide 2)
           (skeep)
           (typepred "ismax")
           (expand "least_upper_bound?")
           (flatten)
           (inst - "ismax - 1/(2*N+1)")
           (assert)
           (assert)
           (expand "upper_bound?" +)
           (skeep)
           (typepred "s")
           (expand "Fset" -1)
           (skeep -1)
           (inst + "cc")
           (assert))))
        ("2"
         (assert)
         (hide-all-but 1)
         (expand "Fset")
         (name "KK"
               "polynomial(LAMBDA (ii:nat): abs(a(ii)),n)(max(abs(x),abs(y)))")
         (expand "bounded_above?")
         (inst + "KK")
         (expand "upper_bound?")
         (skeep)
         (typepred "s")
         (skeep -1)
         (replace -3 :dir rl)
         (expand "KK" +)
         (expand "polynomial" +)
         (lemma "sigma_le")
         (rewrite -1)
         (hide 2)
         (skosimp*)
         (case "FORALL (ar1,br1:real,anr1,bnr1:nnreal): abs(ar1)<=anr1 AND abs(br1)<=bnr1 IMPLIES ar1*br1<=anr1*bnr1")
         (("1"
           (rewrite -1)
           (hide 2)
           (lift-if)
           (ground)
           (("1" (expand "abs") (assert))
            ("2"
             (lemma "both_sides_expt_pos_le")
             (rewrite "abs_expt" :dir rl)
             (("1"
               (rewrite -1)
               (("1" (hide-all-but (-4 -5 2)) (grind)) ("2" (assert))
                ("3"
                 (assert)
                 (case "abs(cc) = 0")
                 (("1"
                   (replaces -1)
                   (assert)
                   (hide -)
                   (lemma "nnreal_expt")
                   (inst - "n!1" "max(abs(x),abs(y))")
                   (expand "^")
                   (assert)
                   (expand "expt" + 1)
                   (assert))
                  ("2" (assert))))))
              ("2"
               (flatten)
               (replaces -1)
               (assert)
               (hide -)
               (lemma "nnreal_expt")
               (inst - "n!1" "max(abs(x),abs(y))")
               (expand "^")
               (expand "expt" + 1)
               (assert)
               (expand "abs" + 1)
               (assert))))))
          ("2"
           (hide-all-but 1)
           (skeep)
           (mult-ineq -1 -2)
           (("1" (rewrite "abs_mult" :dir rl) (grind))
            ("2" (hide-all-but 1) (grind))))))))
      ("2"
       (hide 2)
       (expand "nonempty?")
       (expand "empty?")
       (inst - "f(x)")
       (expand "member")
       (expand "Fset")
       (inst + "x")
       (assert))))
    ("2"
     (hide 2)
     (skeep)
     (name "Dset"
           "LAMBDA (xx:real): x<=xx AND xx<=y AND EXISTS (N:nat): FORALL (ii:nat): ii>=N IMPLIES ss(ii) < xx")
     (case "nonempty?[real](Dset)")
     (("1"
       (name "xb" "glb(Dset)")
       (("1"
         (case "xb = x")
         (("1"
           (inst + "x")
           (replace -1 :dir rl)
           (assert)
           (skeep)
           (typepred "xb")
           (expand "greatest_lower_bound?")
           (flatten)
           (inst - "xb + epsil/2")
           (assert)
           (expand "lower_bound?")
           (skeep)
           (typepred "s")
           (expand "Dset" -1)
           (flatten)
           (skosimp*)
           (inst + "max(N,N!1)+10")
           (assert)
           (split +)
           (("1" (hide-all-but 1) (grind))
            ("2"
             (inst - "max(N,N!1)+10")
             (assert)
             (expand "abs")
             (lift-if)
             (ground)
             (inst -9 "10 + max(N,N!1)")
             (ground))))
          ("2"
           (inst + "xb")
           (assert)
           (case "x<=xb AND xb <= y")
           (("1"
             (flatten)
             (assert)
             (skeep)
             (typepred "xb")
             (expand "greatest_lower_bound?")
             (flatten)
             (expand "lower_bound?" -1)
             (name "newx" "max(x,xb-epsil/2)")
             (inst - "newx")
             (("1"
               (case "xb > newx")
               (("1" (assert))
                ("2"
                 (expand "newx" +)
                 (expand "max" 1)
                 (lift-if)
                 (ground))))
              ("2"
               (expand "Dset" 1)
               (case "NOT ( x<=newx AND newx <=y )")
               (("1"
                 (hide 2)
                 (expand "newx" 1)
                 (expand "max" 1)
                 (lift-if)
                 (ground))
                ("2"
                 (flatten)
                 (assert)
                 (inst - "xb + epsil/2")
                 (assert)
                 (expand "lower_bound?")
                 (skeep 2)
                 (typepred "s")
                 (expand "Dset" -1)
                 (flatten)
                 (skosimp*)
                 (inst + "max(N,N!1)+10")
                 (skeep)
                 (inst + "ii")
                 (assert)
                 (inst - "ii")
                 (assert)
                 (expand "max")
                 (expand "abs")
                 (lift-if)
                 (ground))))))
            ("2"
             (hide 3)
             (split +)
             (("1"
               (typepred "xb")
               (expand "greatest_lower_bound?")
               (flatten)
               (inst - "x + (xb-x)/2")
               (assert)
               (expand "lower_bound?")
               (skeep)
               (typepred "s")
               (expand "Dset" -1)
               (flatten)
               (assert))
              ("2"
               (typepred "xb")
               (expand "greatest_lower_bound?")
               (flatten)
               (expand "lower_bound?")
               (expand "nonempty?")
               (expand "empty?")
               (skosimp*)
               (inst - "x!1")
               (("1" (assert) (expand "member") (expand "Dset") (propax))
                ("2" (expand "member") (propax))))))))))
        ("2"
         (assert)
         (expand "bounded_below?")
         (inst + "x-1")
         (expand "lower_bound?")
         (skosimp*)
         (typepred "s!1")
         (expand "Dset" -1)
         (ground))))
      ("2"
       (expand "nonempty?")
       (expand "empty?")
       (inst - "y")
       (expand "member")
       (expand "Dset")
       (assert)
       (inst 2 "y")
       (assert)
       (skosimp*)
       (inst + "N!1")
       (skosimp*)
       (inst + "ii!1")
       (assert)
       (inst - "ii!1")
       (flatten)
       (expand "abs")
       (lift-if)
       (ground))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: polynomials
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "poly_attains_maximum")
   (inst - "-a" "n" "x" "y")
   (assert)
   (skeep -1)
   (inst + "c")
   (assert)
   (skeep)
   (inst - "cc")
   (assert)
   (rewrite "neg_polynomial" :dir rl)
   (expand "-")
   (assert))


proof_type: f_proof
decl_type: formula
library: reals
theory: polynomials
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (case "FORALL (a: sequence[real], n: nat, x, y: real):
                        (n > 0 AND
                          x < y AND
                           (EXISTS (ddp: posreal):
                              FORALL (c):
                                x <= c AND c <= y IMPLIES
                                 polynomial(poly_deriv(a), n - 1)(c) >= ddp))
                         IMPLIES polynomial(a, n)(x) < polynomial(a, n)(y)")
   (("1"
     (skeep)
     (lemma "poly_attains_minimum")
     (inst - "poly_deriv(a)" "n-1" "x" "y")
     (("1"
       (assert)
       (skosimp*)
       (inst -7 "c!1")
       (assert)
       (inst -4 "a" "n" "x" "y")
       (assert)
       (inst + "polynomial(poly_deriv(a),n-1)(c!1)"))
      ("2" (assert))))
    ("2"
     (hide 2)
     (skeep)
     (lemma "poly_eq_deriv_plus")
     (inst - "a" "n")
     (assert)
     (skeep -1)
     (case "EXISTS (delta:posreal): FORALL (c,r:real): x<=r AND r<c AND c<=y AND c-r <= delta IMPLIES polynomial(a,n)(r) < polynomial(a,n)(c)")
     (("1"
       (skeep -1)
       (case "EXISTS (N:posnat): (y-x)/N < delta")
       (("1"
         (skeep -1)
         (name "deer" "LAMBDA (ii:nat): x + ii*((y-x)/N)")
         (case "FORALL (ii:nat): ii+1<=N IMPLIES polynomial(a,n)(deer(ii)) < polynomial(a,n)(deer(ii+1))")
         (("1"
           (case "FORALL (ii:nat): ii+1<=N IMPLIES polynomial(a,n)(deer(0)) < polynomial(a,n)(deer(ii+1))")
           (("1" (inst - "N-1") (assert) (expand "deer" -1) (assert))
            ("2"
             (hide-all-but (-1 1))
             (induct "ii")
             (("1" (assert) (inst - "0") (assert))
              ("2" (skeep) (assert) (inst - "1+j") (assert))))))
          ("2"
           (skeep)
           (inst -4 "deer(ii+1)" "deer(ii)")
           (assert)
           (replace 1)
           (hide (1 3))
           (split +)
           (("1"
             (case "(y-x)/N >= 0")
             (("1" (mult-by -1 "ii") (assert) (expand "deer" +) (assert))
              ("2" (cross-mult 1))))
            ("2"
             (case "(y-x)/N >= 0")
             (("1" (expand "deer" +) (assert)) ("2" (cross-mult 1))))
            ("3"
             (case "(y-x)/N > 0")
             (("1"
               (mult-by -2 "(y-x)/N")
               (assert)
               (expand "deer" +)
               (assert))
              ("2" (cross-mult 1))))
            ("4" (assert) (expand "deer" +) (assert))))))
        ("2"
         (lemma "archimedean")
         (inst - "delta/(y-x)")
         (("1"
           (skolem -1 "kkz")
           (inst + "kkz")
           (cross-mult -1)
           (cross-mult 1))
          ("2"
           (assert)
           (split)
           (("1" (cross-mult 1)) ("2" (cross-mult 1))))))))
      ("2"
       (hide 2)
       (case "EXISTS (delta:posreal): FORALL (h:posreal,r:real): h <= delta AND (x<=r AND r+h<=y) IMPLIES polynomial(poly_deriv(a), n - 1)(r) + h*polynomial(LAMBDA (ii: nat): polynomial(pseq(ii), nseq(ii))(h),
                                                                                                             n - 1)
                                                                                                            (r) > 0")
       (("1"
         (skeep -1)
         (inst + "delta")
         (skeep)
         (inst - "c-r" "r")
         (("1"
           (name "h" "c-r")
           (replace -1)
           (assert)
           (inst - "h" "r")
           (mult-by -2 "h")
           (expand "^")
           (expand "expt")
           (expand "expt")
           (expand "expt")
           (assert))
          ("2" (assert))))
        ("2"
         (hide 2)
         (hide -1)
         (case "EXISTS (M:posreal): FORALL (r:real,h:posreal): x<=r AND r<=y AND h<=1 IMPLIES abs(polynomial(LAMBDA (ii: nat):
                                                                                                                        polynomial(pseq(ii), nseq(ii))(h),
                                                                                                                      n - 1)
                                                                                                                     (r)) < M")
         (("1"
           (skeep -1)
           (skeep -4)
           (inst + "min(ddp/(2*M),1/2)")
           (skeep)
           (inst - "r" "h")
           (assert)
           (invoke (case "-%1 < M") (! -1 1 1))
           (("1"
             (mult-by -1 "h")
             (case "M*h < ddp")
             (("1" (inst - "r") (assert))
              ("2"
               (assert)
               (case "h < ddp/M")
               (("1" (cross-mult -1)) ("2" (assert))))))
            ("2"
             (hide-all-but (-1 1))
             (grind :exclude ("polynomial" "poly_deriv")))))
          ("2"
           (hide 2)
           (case "EXISTS (Mp:posreal): FORALL (ii:nat): ii<=n-1 IMPLIES FORALL (h:nnreal): h<=1 IMPLIES abs(polynomial(pseq(ii), nseq(ii))(h)) < Mp")
           (("1"
             (skeep -1)
             (case "EXISTS (Mx:posreal): FORALL (r:real): FORALL (ii:nat): ii<=n-1 AND x<=r AND r<=y IMPLIES abs(r^ii) < Mx")
             (("1"
               (skeep -1)
               (inst + "n*Mx*Mp")
               (("1"
                 (skeep)
                 (expand "polynomial" + 1)
                 (case "FORALL (ss:{rr:real|rr=1 OR rr=-1}): FORALL (kp:nat): kp<=n-1 IMPLIES ss*sigma(0, kp,
                                                                                                                                                           LAMBDA (i: nat):
                                                                                                                                                             polynomial(pseq(i), nseq(i))(h) *
                                                                                                                                                              (IF i = 0 THEN 1 ELSE r ^ i ENDIF))
                                                                                                                                                                     < (kp+1)*Mp * Mx")
                 (("1"
                   (inst-cp - "-1")
                   (inst - "1")
                   (inst - "n-1")
                   (inst - "n-1")
                   (assert)
                   (expand "abs")
                   (lift-if)
                   (ground))
                  ("2"
                   (hide 2)
                   (skeep)
                   (typepred "ss")
                   (induct "kp")
                   (("1"
                     (expand "sigma" +)
                     (expand "sigma" +)
                     (assert)
                     (inst -3 "0")
                     (assert)
                     (inst -3 "h")
                     (assert)
                     (inst - "x")
                     (inst - "0")
                     (case "x^0 = 1")
                     (("1"
                       (replace -1)
                       (assert)
                       (expand "abs" -3)
                       (assert)
                       (case "Mp < Mp*Mx")
                       (("1" (expand "abs") (lift-if) (ground))
                        ("2" (mult-by -3 "Mp") (assert))))
                      ("2" (hide-all-but 1) (grind))))
                    ("2"
                     (skeep)
                     (expand "sigma" +)
                     (assert)
                     (invoke (case "%1 < Mp*Mx") (! 1 1 2))
                     (("1" (assert))
                      ("2"
                       (hide 2)
                       (hide -1)
                       (inst - "r")
                       (inst - "1+j")
                       (assert)
                       (inst - "1+j")
                       (assert)
                       (inst - "h")
                       (assert)
                       (mult-ineq -3 -4)
                       (("1"
                         (rewrite "abs_mult" :dir rl)
                         (grind :exclude
                          ("polynomial" "poly_deriv" "^")))
                        ("2"
                         (hide (2 3))
                         (grind :exclude
                          ("polynomial" "poly_deriv" "^")))))))))))
                ("2"
                 (assert)
                 (lemma "posreal_times_posreal_is_posreal")
                 (inst?))))
              ("2"
               (hide 2)
               (case "FORALL (kp:nat): kp<n IMPLIES EXISTS (Mx: posreal):
                                                                                                   FORALL (r: real):
                                                                                                     FORALL (ii: nat):
                                                                                                       ii <= kp AND x <= r AND r <= y IMPLIES ( abs(x ^ ii) < Mx AND abs(y ^ ii) < Mx)")
               (("1"
                 (inst - "n-1")
                 (assert)
                 (skeep -1)
                 (inst + "Mx")
                 (skeep)
                 (inst - "r")
                 (assert)
                 (skeep)
                 (inst - "ii")
                 (assert)
                 (flatten)
                 (case "NOT abs(r) <= max(abs(x),abs(y))")
                 (("1" (hide-all-but (-4 -5 1)) (grind))
                  ("2"
                   (case "abs(r) = 0")
                   (("1"
                     (case "NOT r = 0")
                     (("1" (hide-all-but (-1 1)) (grind))
                      ("2"
                       (replace -1)
                       (assert)
                       (case "NOT 0^ii = 0")
                       (("1"
                         (case "ii = 0")
                         (("1"
                           (replace -1)
                           (assert)
                           (case "x^0 = 1")
                           (("1"
                             (expand "^" +)
                             (expand "expt" +)
                             (assert))
                            ("2" (hide-all-but 1) (grind))))
                          ("2"
                           (expand "^" +)
                           (expand "expt" +)
                           (assert))))
                        ("2" (replace -1) (assert))))))
                    ("2"
                     (lemma "abs_expt")
                     (case "NOT FORALL (ip: nat, n0x: real): abs(n0x) ^ ip = abs(n0x ^ ip)")
                     (("1"
                       (hide-all-but (-1 1))
                       (skeep)
                       (case "n0x = 0")
                       (("1"
                         (assert)
                         (replace -1)
                         (assert)
                         (case "ip = 0")
                         (("1" (replace -1) (hide -) (grind))
                          ("2"
                           (assert)
                           (expand "^" +)
                           (expand "expt" +)
                           (assert)
                           (case "abs(0) = 0")
                           (("1" (replace -1) (assert))
                            ("2" (hide-all-but 1) (grind))))))
                        ("2" (inst - "ip" "n0x") (assert))))
                      ("2"
                       (hide -2)
                       (rewrite -1 :dir rl)
                       (rewrite -1 :dir rl)
                       (rewrite -1 :dir rl)
                       (hide -1)
                       (invoke (case "%1 = %2") (! -1 1) (! -1 2))
                       (("1" (expand "max") (lift-if) (ground))
                        ("2"
                         (lemma "both_sides_expt_pos_lt_aux")
                         (case "ii = 0")
                         (("1"
                           (replace -1)
                           (expand "^")
                           (expand "expt")
                           (propax))
                          ("2"
                           (inst - "ii-1" "abs(r)" "max(abs(x),abs(y))")
                           (("1"
                             (assert)
                             (expand "^")
                             (expand "max")
                             (lift-if)
                             (ground))
                            ("2" (assert)) ("3" (assert))
                            ("4" (assert))))))))))))))
                ("2"
                 (assert)
                 (hide-all-but (-2 -3 1))
                 (induct "kp")
                 (("1"
                   (assert)
                   (inst + "2")
                   (skeep)
                   (skeep)
                   (case "ii = 0")
                   (("1" (replace -1) (grind)) ("2" (assert))))
                  ("2"
                   (skeep)
                   (assert)
                   (skeep -1)
                   (inst + "max(Mx+1,max(abs(x^(j+1)),abs(y^(j+1)))+1)")
                   (skeep)
                   (inst - "r")
                   (skeep)
                   (case "ii = 1+j")
                   (("1"
                     (replace -1)
                     (assert)
                     (hide -)
                     (grind :exclude "^"))
                    ("2"
                     (inst - "ii")
                     (assert)
                     (grind :exclude ("abs" "^")))))))))))
            ("2"
             (hide 2)
             (case "FORALL (ii:nat): ii<=n-1 IMPLIES EXISTS (Mp:posreal): (FORALL (h: nnreal):
                                                                                h <= 1 IMPLIES abs(polynomial(pseq(ii), nseq(ii))(h)) < Mp)")
             (("1"
               (case "FORALL (kp:nat): kp<=n-1 IMPLIES EXISTS (Mp: posreal):
                                                                                  FORALL (ii: nat):
                                                                                    ii <= kp IMPLIES
                                                                                     (FORALL (h: nnreal):
                                                                                        h <= 1 IMPLIES abs(polynomial(pseq(ii), nseq(ii))(h)) < Mp)")
               (("1" (inst - "n-1") (assert))
                ("2"
                 (hide 2)
                 (induct "kp")
                 (("1"
                   (assert)
                   (inst - "0")
                   (assert)
                   (skeep -1)
                   (inst + "Mp")
                   (skeep)
                   (assert)
                   (case "ii = 0")
                   (("1" (replace -1) (propax)) ("2" (assert))))
                  ("2"
                   (skeep)
                   (assert)
                   (inst -3 "1+j")
                   (assert)
                   (skolem -3 "Mp1j")
                   (skeep -1)
                   (inst + "max(Mp,Mp1j)")
                   (skeep)
                   (case "ii = 1+j")
                   (("1"
                     (replace -1)
                     (assert)
                     (skeep)
                     (inst -6 "h")
                     (assert))
                    ("2"
                     (skeep 2)
                     (inst - "ii")
                     (assert)
                     (inst - "h")
                     (assert))))))))
              ("2"
               (hide (-3 2))
               (skeep)
               (name "Mp"
                     "sigma(0,nseq(ii),LAMBDA (jv:nat): abs(pseq(ii)(jv)) + 1)")
               (("1"
                 (case "FORALL (h: nnreal):
                                                                                            h <= 1 IMPLIES abs(polynomial(pseq(ii), nseq(ii))(h)) < Mp")
                 (("1" (inst + "Mp") (inst - "1") (assert) (assert))
                  ("2"
                   (hide 2)
                   (skeep)
                   (lemma "sigma_abs")
                   (expand "polynomial" +)
                   (inst?)
                   (invoke (case "%1 < Mp") (! -1 2))
                   (("1" (assert))
                    ("2"
                     (hide (-1 2))
                     (replace -2 :dir rl)
                     (hide -2)
                     (rewrite "sigma_lt")
                     (hide 2)
                     (skosimp*)
                     (assert)
                     (lift-if)
                     (ground)
                     (case "h = 0")
                     (("1"
                       (replace -1)
                       (expand "^" +)
                       (expand "expt" +)
                       (expand "abs" + 1)
                       (assert))
                      ("2"
                       (lemma "both_sides_expt_pos_lt_aux")
                       (inst - "n!1-1" "h" "1")
                       (("1"
                         (assert)
                         (expand "^")
                         (case "h = 1")
                         (("1"
                           (replace -1)
                           (assert)
                           (lemma "expt_1i")
                           (inst - "n!1")
                           (expand "^" -1)
                           (assert))
                          ("2"
                           (lemma "expt_1i")
                           (inst - "n!1")
                           (assert)
                           (expand "^")
                           (assert)
                           (replace -1)
                           (rewrite "abs_mult")
                           (invoke (case "NOT %1 >= 0") (! -2 1))
                           (("1" (assert))
                            ("2"
                             (invoke (case "NOT abs(%1) < 1") (! -3 1))
                             (("1" (expand "abs" 1) (propax))
                              ("2"
                               (invoke (mult-by -1 "%1") (! 4 1 1))
                               (assert))))))))
                        ("2" (assert))))))))))
                ("2" (assert) (flatten) (assert))))))))))))))
    ("3" (skosimp*) (assert))))


proof_type: f_proof
decl_type: formula
library: reals
theory: polynomials
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (case "FORALL (a: sequence[real], n: nat, x, y: real): n>0 IMPLIES FORALL (hwy:posreal): LET aa = (LAMBDA (ii:nat): IF ii = 1 THEN a(ii) + hwy ELSE a(ii) ENDIF) IN (x < y AND
                                 (FORALL (c):
                                    x <= c AND c <= y IMPLIES
                                     polynomial(poly_deriv(a), n - 1)(c) >= 0)) IMPLIES polynomial(aa, n)(x) < polynomial(aa, n)(y)")
   (("1"
     (skeep)
     (case "NOT x < y")
     (("1" (assert))
      ("2"
       (hide -3)
       (inst - "a" "n" "x" "y")
       (replace -3)
       (name "epp" "y-x")
       (case "FORALL (hwy:posreal): polynomial(a, n)(x)< polynomial(a, n)(y)+hwy*epp")
       (("1"
         (hide (-4 -6))
         (inst - "(polynomial(a, n)(x) - polynomial(a, n)(y))/epp")
         (("1" (assert))
          ("2"
           (split)
           (("1" (cross-mult 1) (assert)) ("2" (cross-mult 1) (assert))))
          ("3" (assert))))
        ("2"
         (hide 2)
         (skeep)
         (inst - "hwy")
         (skoletin -3)
         (assert)
         (replace -6)
         (name "dis" "LAMBDA (ii:nat): IF ii = 1 THEN hwy ELSE 0 ENDIF")
         (case "aa = a + dis")
         (("1"
           (replace -1)
           (lemma "sum_polynomial_eq_degree")
           (inst - "a" "dis" "n")
           (replace -1 :dir rl)
           (hide -1)
           (assert)
           (case "polynomial(dis,n) = LAMBDA (xx:real): xx*hwy")
           (("1" (replace -1) (assert) (expand "+") (assert))
            ("2"
             (hide (-1 -2 -3 -4 2))
             (decompose-equality +)
             (expand "polynomial" +)
             (lemma "sigma_eq_one_arg")
             (inst?)
             (inst - "1")
             (assert)
             (split -)
             (("1" (replace -1) (hide -) (expand "dis") (grind))
              ("2" (hide-all-but 1) (expand "dis") (propax))
              ("3" (hide-all-but 1) (expand "dis") (propax))))))
          ("2"
           (hide-all-but 1)
           (decompose-equality +)
           (expand "aa")
           (expand "dis")
           (grind))))))))
    ("2"
     (hide 2)
     (skeep)
     (skeep)
     (skoletin 1)
     (lemma "poly_strictly_increasing")
     (assert)
     (inst - "aa" "n" "x" "y")
     (assert)
     (flatten)
     (assert)
     (hide 2)
     (skeep)
     (inst - "c")
     (assert)
     (name "dis" "LAMBDA (ii:nat): IF ii = 1 THEN hwy ELSE 0 ENDIF")
     (case "aa = a + dis")
     (("1"
       (replace -1)
       (rewrite "poly_deriv_plus_eval")
       (expand "+")
       (invoke (case "%1=hwy") (! 1 1 2))
       (("1" (assert))
        ("2"
         (hide-all-but 1)
         (expand "polynomial")
         (lemma "sigma_eq_one_arg")
         (inst?)
         (inst - "0")
         (assert)
         (split -)
         (("1" (replace -1) (hide -) (expand "dis") (grind))
          ("2" (hide 2) (skosimp*))
          ("3"
           (hide 2)
           (skosimp*)
           (expand "dis")
           (grind :exclude "^"))))))
      ("2"
       (hide-all-but 1)
       (decompose-equality +)
       (expand "aa")
       (expand "dis")
       (grind))))
    ("3" (hide 2) (skosimp*) (assert))))


proof_type: f_proof
decl_type: formula
library: reals
theory: polynomials
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "poly_strictly_increasing")
   (inst - "-a" "n" "x" "y")
   (assert)
   (split -)
   (("1"
     (lemma "scal_polynomial")
     (case "-a = (const_fun(-1)*a)")
     (("1"
       (inst - "a" "n" "-1")
       (replace -1)
       (replace -2 :dir rl)
       (expand "const_fun")
       (expand "*")
       (assert))
      ("2" (hide-all-but 1) (decompose-equality +) (grind))))
    ("2"
     (skosimp*)
     (inst - "c!1")
     (assert)
     (assert)
     (case "poly_deriv(-a) = const_fun(-1)*poly_deriv(a)")
     (("1"
       (replace -1)
       (rewrite "scal_polynomial" :dir rl)
       (expand "const_fun")
       (expand "*")
       (assert))
      ("2" (hide-all-but 1) (decompose-equality +) (grind))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: polynomials
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "poly_increasing")
   (inst - "-a" "n" "x" "y")
   (assert)
   (split -)
   (("1"
     (lemma "scal_polynomial")
     (case "-a = (const_fun(-1)*a)")
     (("1"
       (inst - "a" "n" "-1")
       (replace -1)
       (replace -2 :dir rl)
       (expand "const_fun")
       (expand "*")
       (assert))
      ("2" (hide-all-but 1) (decompose-equality +) (grind))))
    ("2"
     (skosimp*)
     (inst - "c!1")
     (assert)
     (assert)
     (case "poly_deriv(-a) = const_fun(-1)*poly_deriv(a)")
     (("1"
       (replace -1)
       (rewrite "scal_polynomial" :dir rl)
       (expand "const_fun")
       (expand "*")
       (assert))
      ("2" (hide-all-but 1) (decompose-equality +) (grind))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: polynomials
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (name "f" "polynomial(a,n)")
   (label "fname" -1)
   (replace -1)
   (case "f(x) = 0")
   (("1" (inst + "x") (assert))
    ("2"
     (case "f(y) = 0")
     (("1" (inst + "y") (assert))
      ("2"
       (name "Aset" "LAMBDA (cc:real): x<=cc AND cc<=y AND f(cc)>=0")
       (case "nonempty?[real](Aset)")
       (("1"
         (name "xc" "glb(Aset)")
         (("1"
           (typepred "xc")
           (expand "greatest_lower_bound?")
           (flatten)
           (label "lb" -1)
           (label "glbdef" -2)
           (case "x<=xc AND xc<=y")
           (("1"
             (inst + "xc")
             (assert)
             (flatten)
             (assert)
             (case "f(xc) < 0")
             (("1"
               (lemma "poly_continuous")
               (inst - "a" "n" "xc" "-f(xc)")
               (("1"
                 (assert)
                 (skeep -1)
                 (name "nxc" "min(y,xc+delta/2)")
                 (inst "glbdef" "nxc")
                 (assert)
                 (case "NOT nxc > xc")
                 (("1"
                   (hide -1)
                   (expand "nxc")
                   (expand "min" +)
                   (lift-if)
                   (ground))
                  ("2"
                   (assert)
                   (expand "lower_bound?")
                   (skeep)
                   (typepred "s")
                   (expand "Aset" -1)
                   (flatten)
                   (inst "lb" "s")
                   (assert)
                   (inst - "s")
                   (replace "fname")
                   (assert)
                   (split -)
                   (("1" (expand "abs") (ground))
                    ("2"
                     (case "nxc - xc < delta")
                     (("1" (expand "abs") (assert))
                      ("2"
                       (hide 2)
                       (expand "min")
                       (lift-if)
                       (ground))))))))
                ("2" (assert))))
              ("2"
               (assert)
               (lemma "poly_continuous")
               (inst - "a" "n" "xc" "f(xc)")
               (skeep -1)
               (expand "lower_bound?" "lb")
               (name "nxc" "max(x,xc-delta/2)")
               (inst "lb" "nxc")
               (("1"
                 (assert)
                 (expand "nxc" "lb")
                 (expand "max" "lb")
                 (lift-if)
                 (ground))
                ("2"
                 (expand "Aset" +)
                 (assert)
                 (case "nxc<=xc")
                 (("1"
                   (assert)
                   (inst - "nxc")
                   (split -)
                   (("1" (replace "fname") (expand "abs") (assert))
                    ("2"
                     (expand "nxc" 1)
                     (expand "max" +)
                     (lift-if)
                     (ground)
                     (("1" (hide-all-but 1) (grind))
                      ("2" (expand "abs") (ground))))))
                  ("2"
                   (assert)
                   (expand "nxc" 1)
                   (expand "max" +)
                   (lift-if)
                   (assert))))))))
            ("2"
             (hide 4)
             (split)
             (("1"
               (inst - "x")
               (assert)
               (hide-all-but 2)
               (expand "Aset")
               (grind))
              ("2"
               (expand "lower_bound?" "lb")
               (inst - "y")
               (expand "Aset")
               (assert))))))
          ("2"
           (assert)
           (hide-all-but 1)
           (expand "bounded_below?")
           (inst + "x")
           (expand "Aset")
           (grind))))
        ("2"
         (expand "nonempty?")
         (expand "empty?")
         (inst - "y")
         (expand "member")
         (expand "Aset")
         (assert))))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: polynomials
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (lemma " poly_intermediate_value_increasing_0")
   (skeep)
   (name "aa"
         "LAMBDA (ii:nat): IF ii = 0 THEN a(ii) - c ELSE a(ii) ENDIF")
   (case "FORALL (xy:real): polynomial(aa,n)(xy) = polynomial(a,n)(xy)-c")
   (("1"
     (label "polydef" -1)
     (inst - "aa" "n" "x" "y")
     (assert)
     (split -)
     (("1"
       (skeep -1)
       (assert)
       (inst + "cc")
       (assert)
       (inst - "cc")
       (assert))
      ("2" (inst - "x") (assert)) ("3" (inst - "y") (assert))))
    ("2"
     (hide-all-but 1)
     (skeep)
     (expand "polynomial")
     (invoke (name "aasig" "%1") (! 1 1))
     (replaces -1)
     (lemma "sigma_split")
     (inst?)
     (inst - "0")
     (assert)
     (replaces -1)
     (expand "sigma" + 1)
     (expand "sigma" + 1)
     (invoke (name "asig" "%1") (! 1 2))
     (replaces -1)
     (expand "aasig")
     (lemma "sigma_split")
     (inst?)
     (inst - "0")
     (assert)
     (replaces -1)
     (expand "sigma" + 1)
     (expand "sigma" + 1)
     (expand "aa" + 1)
     (expand "asig")
     (rewrite "sigma_eq")
     (hide 2)
     (expand "aa")
     (propax))))


proof_type: f_proof
decl_type: formula
library: reals
theory: polynomials
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "poly_intermediate_value_inc")
   (inst - "-a" "-c" "n" "x" "y")
   (assert)
   (rewrite "neg_polynomial" :dir rl)
   (assert)
   (expand "-")
   (skeep -1)
   (inst + "cc")
   (assert))


proof_type: f_proof
decl_type: formula
library: reals
theory: polynomials
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (case "FORALL (aa:[nat->real],nn:nat): (FORALL (c: real):
                               x < c AND c < y IMPLIES polynomial(aa, nn)(c) > 0) IMPLIES (FORALL (c: real):
                               x <= c AND c <= y IMPLIES polynomial(aa, nn)(c) >= 0)")
   (("1"
     (case "NOT FORALL (c: real):
                                   x < c AND c < y IMPLIES polynomial(poly_deriv(a), n - 1)(c) > 0")
     (("1"
       (case "NOT FORALL (c: real):
                                         x < c AND c < y IMPLIES polynomial(poly_deriv(a), n - 1)(c) < 0")
       (("1"
         (hide -1)
         (skosimp*)
         (case "c!2 <= c!1")
         (("1"
           (lemma "poly_intermediate_value_inc")
           (inst - "poly_deriv(a)" "0" "n-1" "c!2" "c!1")
           (("1" (assert) (skosimp*) (inst + "cc!1") (assert))
            ("2" (assert))))
          ("2"
           (lemma "poly_intermediate_value_dec")
           (inst - "poly_deriv(a)" "0" "n-1" "c!1" "c!2")
           (("1" (assert) (skosimp*) (inst + "cc!1") (assert))
            ("2" (assert))))))
        ("2"
         (hide +)
         (case "NOT FORALL (c: real):
                                    x <= c AND c <= y IMPLIES polynomial(poly_deriv(a), n - 1)(c) <= 0")
         (("1"
           (skosimp*)
           (inst -4 "-poly_deriv(a)" "n-1")
           (("1"
             (split -)
             (("1"
               (inst - "c!1")
               (assert)
               (rewrite "neg_polynomial" :dir rl)
               (assert)
               (expand "-")
               (assert))
              ("2"
               (skosimp*)
               (rewrite "neg_polynomial" :dir rl)
               (expand "-")
               (inst - "c!2")
               (assert))))
            ("2" (assert))))
          ("2"
           (hide -3)
           (lemma "poly_decreasing")
           (inst - "a" "n" "x" "(x+y)/2")
           (assert)
           (split -)
           (("1"
             (lemma "poly_strictly_decreasing")
             (inst - "a" "n" "(x+y)/2" "((x+y)/2 + y)/2")
             (assert)
             (split -)
             (("1"
               (lemma "poly_decreasing")
               (inst - "a" "n" "((x+y)/2+y)/2" "y")
               (assert)
               (skosimp*)
               (inst-cp - "c!1")
               (assert))
              ("2" (skosimp*) (inst - "c!1") (inst - "c!1") (assert))))
            ("2" (skosimp*) (inst - "c!1") (assert))))
          ("3" (skosimp*) (assert))))))
      ("2"
       (inst - "poly_deriv(a)" "n-1")
       (("1"
         (assert)
         (replace -1)
         (lemma "poly_increasing")
         (inst - "a" "n" "x" "(x+y)/2")
         (assert)
         (split -)
         (("1"
           (lemma "poly_strictly_increasing")
           (inst - "a" "n" "(x+y)/2" "((x+y)/2 + y)/2")
           (assert)
           (split -)
           (("1"
             (lemma "poly_increasing")
             (inst - "a" "n" "((x+y)/2+y)/2" "y")
             (assert)
             (skosimp*)
             (inst - "c!1")
             (inst - "c!1")
             (assert))
            ("2" (skosimp*) (inst - "c!1") (inst - "c!1") (assert))))
          ("2" (skosimp*) (inst - "c!1") (inst - "c!1") (assert))))
        ("2" (assert))))
      ("3" (skosimp*) (assert))))
    ("2"
     (hide (-3 2))
     (skosimp*)
     (lemma "poly_continuous")
     (inst - "aa!1" "nn!1" "c!1" "-polynomial(aa!1,nn!1)(c!1)/2")
     (("1"
       (skosimp*)
       (assert)
       (case "EXISTS (yy:real): x<yy AND yy<y AND abs(c!1-yy)<=delta!1")
       (("1"
         (skosimp*)
         (inst - "yy!1")
         (assert)
         (inst - "yy!1")
         (assert))
        ("2"
         (hide (-1 -2 2))
         (case "c!1 = x")
         (("1" (inst + "min(x+delta!1/2,(x+y)/2)") (assert) (grind))
          ("2"
           (case "c!1=y")
           (("1" (inst + "max(y-delta!1/2,(x+y)/2)") (grind))
            ("2"
             (inst + "c!1")
             (assert)
             (assert)
             (expand "abs")
             (assert))))))))
      ("2" (assert))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: polynomials
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (case "n = 1")
   (("1"
     (replace -1)
     (assert)
     (expand "polynomial")
     (expand "sigma")
     (expand "sigma")
     (expand "sigma")
     (expand "poly_deriv")
     (expand "^")
     (expand "expt")
     (expand "expt")
     (assert)
     (inst + "x")
     (field))
    ("2"
     (name "qq" "(polynomial(a, n)(y) - polynomial(a, n)(x)) / (y - x)")
     (("1"
       (name "qsub"
             "LAMBDA (ii:nat): IF ii = 0 THEN polynomial(a,n)(x) - x*qq ELSIF ii = 1 THEN qq ELSE 0 ENDIF")
       (case "NOT (FORALL (yy:real): polynomial(qsub,n)(yy) = polynomial(a,n)(x) + qq*(yy-x))")
       (("1"
         (hide-all-but (1 2 -4))
         (skeep)
         (expand "polynomial" + 1)
         (lemma "sigma_split")
         (inst?)
         (inst - "1")
         (assert)
         (invoke (case "NOT %1 = 0") (! -1 2 2))
         (("1"
           (rewrite "sigma_restrict_eq_0")
           (skosimp*)
           (expand "qsub")
           (assert))
          ("2"
           (replaces -1)
           (assert)
           (replaces -1)
           (expand "sigma")
           (expand "sigma")
           (expand "sigma")
           (expand "qsub")
           (expand "^")
           (expand "expt")
           (expand "expt")
           (assert))))
        ("2"
         (name "asub" "a-qsub")
         (lemma "poly_Rolle")
         (inst - "asub" "n" "x" "y")
         (assert)
         (split -)
         (("1"
           (skeep -)
           (inst + "c")
           (assert)
           (replace -4 :dir rl)
           (rewrite "poly_deriv_sub")
           (rewrite "polynomial_sub")
           (case "FORALL (aa,bb:real): (aa-bb = 0) IFF (aa = bb)")
           (("1"
             (expand "-")
             (rewrite -1 -4)
             (hide -1)
             (replace -3)
             (expand "polynomial" + 1)
             (lemma "sigma_split")
             (inst?)
             (inst - "0")
             (assert)
             (invoke (case "NOT %1 = 0") (! -1 2 2))
             (("1"
               (rewrite "sigma_restrict_eq_0")
               (skosimp*)
               (hide-all-but 1)
               (typepred "i!1")
               (expand "qsub")
               (grind :exclude "^"))
              ("2"
               (replaces -1)
               (assert)
               (replaces -1)
               (expand "sigma" +)
               (expand "sigma" +)
               (expand "poly_deriv")
               (expand "qsub")
               (assert))))
            ("2" (hide-all-but 1) (grind))))
          ("2"
           (replace -1 :dir rl)
           (rewrite "polynomial_sub")
           (expand "-")
           (inst-cp -2 "x")
           (replaces -3)
           (inst - "y")
           (replaces -2)
           (assert)
           (expand "qq" 1)
           (field))))))
      ("2" (assert))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: polynomials
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "polynomial_int")
   (case "poly_integral(a+b,0) = poly_integral(a,0) + poly_integral(b,0)")
   (("1"
     (replaces -1)
     (lemma "sum_polynomial_eq_degree")
     (rewrite -1 :dir rl)
     (hide -1)
     (assert)
     (grind :exclude ("polynomial" "poly_integral")))
    ("2" (hide 2) (decompose-equality) (grind))))


proof_type: f_proof
decl_type: formula
library: reals
theory: polynomials
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "polynomial")
   (rewrite "sigma_minus")
   (expand "polynomial_int")
   (expand "polynomial")
   (rewrite "sigma_minus")
   (rewrite "sigma_eq")
   (hide 2)
   (skosimp*)
   (grind :exclude "^"))


proof_type: f_proof
decl_type: formula
library: reals
theory: polynomials
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "poly_deriv")
   (expand "power_linear")
   (decompose-equality 2)
   (("1"
     (name "kk" "1+n")
     (replace -1)
     (assert)
     (expand "*")
     (assert)
     (lift-if)
     (lift-if)
     (lift-if)
     (assert)
     (ground)
     (name "dd" "1+x!1")
     (replace -1)
     (assert)
     (case "r^dd = r*r^x!1")
     (("1"
       (replaces -1)
       (case "C(kk,dd)*(1+x!1) = kk*C(n,x!1)")
       (("1" (cross-mult 2) (cross-mult 2) (assert) (assert) (field))
        ("2"
         (hide 3)
         (replace -1)
         (expand "C")
         (expand "factorial" + 1)
         (expand "factorial" + 2)
         (assert)
         (field))))
      ("2"
       (hide 3)
       (lemma "expt_plus")
       (inst - "x!1" "1" "r")
       (assert)
       (case "r^1 = r")
       (("1" (assert)) ("2" (hide-all-but 1) (grind))))))
    ("2" (grind)) ("3" (grind)) ("4" (grind)) ("5" (grind))))


proof_type: f_proof
decl_type: formula
library: reals
theory: polynomials
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "poly_continuous")
   (case "FORALL (eggy:posreal): EXISTS (y): abs(x-y)<eggy AND polynomial(poly_deriv(a),n-1)(y)>=0")
   (("1"
     (case "FORALL (eggy:posreal): EXISTS (y): abs(x-y)<eggy AND polynomial(poly_deriv(a),n-1)(y)<=0")
     (("1"
       (inst - "poly_deriv(a)" "n-1" "x" _)
       (("1"
         (case "polynomial(poly_deriv(a),n-1)(x)>0")
         (("1"
           (inst -4 "polynomial(poly_deriv(a),n-1)(x)/2")
           (("1"
             (skeep)
             (inst - "delta")
             (skeep)
             (inst -5 "y")
             (assert)
             (expand "abs")
             (lift-if)
             (ground))
            ("2" (assert)) ("3" (assert))))
          ("2"
           (inst -3 "-polynomial(poly_deriv(a),n-1)(x)/2")
           (("1"
             (skeep)
             (inst -2 "delta")
             (assert)
             (skeep)
             (inst -4 "y")
             (assert)
             (expand "abs" -4)
             (ground))
            ("2" (assert)) ("3" (assert))))
          ("3" (assert))))
        ("2" (assert))))
      ("2"
       (hide (-1 -2 2))
       (skeep)
       (inst - "x+min(epsil,eggy)/2")
       (assert)
       (split)
       (("1"
         (lemma "poly_mean_value")
         (inst - "a" "n" "x" "x+min(epsil,eggy)/2")
         (assert)
         (skeep)
         (assert)
         (inst + "cc")
         (split)
         (("1" (grind)) ("2" (replace -3) (assert) (cross-mult 1))))
        ("2" (expand "abs") (assert))))))
    ("2"
     (hide (-1 2))
     (skeep)
     (inst - "x-min(epsil,eggy)/2")
     (assert)
     (split)
     (("1"
       (lemma "poly_mean_value")
       (inst - "a" "n" "x-min(epsil,eggy)/2" "x")
       (assert)
       (skeep)
       (assert)
       (inst + "cc")
       (split)
       (("1" (grind)) ("2" (replace -3) (assert) (cross-mult 1))))
      ("2" (expand "abs") (assert))))
    ("3" (skosimp*) (assert))))


proof_type: f_proof
decl_type: formula
library: reals
theory: polynomials
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "poly_local_max_deriv")
   (inst - "-a" "n" "x" "epsil")
   (assert)
   (split -)
   (("1"
     (lemma "poly_deriv_scal")
     (inst - "a" "-1")
     (case "(-1)*a = -a")
     (("1"
       (replaces -1)
       (replaces -1)
       (rewrite "scal_polynomial2")
       (assert))
      ("2" (decompose-equality 1) (expand "*") (expand "-") (assert))))
    ("2"
     (hide 2)
     (skeep)
     (inst - "y")
     (assert)
     (rewrite "neg_polynomial" :dir rl)
     (expand "-")
     (assert))))


proof_type: f_proof
decl_type: formula
library: reals
theory: polynomials
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (case "FORALL (aa,bb,cc:real): aa+cc = bb IMPLIES aa=bb-cc")
   (("1"
     (rewrite -1)
     (("1"
       (hide (-1 2))
       (rewrite "polynomial_int_sum")
       (expand "polynomial_int")
       (rewrite "polynomial_prod_def")
       (rewrite "polynomial_prod_def")
       (case "NOT FORALL (ap,bp:[nat->real],nn:posnat): polynomial(poly_deriv(ap),nn-1) = polynomial(poly_deriv(bp),nn-1) IMPLIES (polynomial(ap,nn)(y)-polynomial(ap,nn)(x)) = (polynomial(bp,nn)(y) - polynomial(bp,nn)(x))")
       (("1"
         (hide-all-but 1)
         (skeep)
         (rewrite "polynomial_eq_coeff" -1)
         (expand "polynomial")
         (rewrite "sigma_minus")
         (rewrite "sigma_minus")
         (rewrite "sigma_eq")
         (hide 2)
         (skosimp*)
         (case "n!1 = 0")
         (("1" (assert))
          ("2"
           (assert)
           (case "ap(n!1) = bp(n!1)")
           (("1" (assert))
            ("2"
             (hide 3)
             (inst - "n!1-1")
             (expand "poly_deriv")
             (mult-by 1 "n!1")
             (assert))))))
        ("2"
         (rewrite -1)
         (hide 2)
         (hide -1)
         (decompose-equality)
         (rewrite "poly_product_rule")
         (assert)
         (rewrite "polynomial_prod_def")
         (rewrite "polynomial_prod_def")
         (rewrite "sum_polynomial_eq_degree_eval")
         (case "NOT FORALL (aaseq:[nat->real]): poly_deriv(poly_integral(aaseq,0)) = aaseq")
         (("1"
           (hide 2)
           (skeep)
           (decompose-equality)
           (expand "poly_deriv" :assert? none)
           (expand "poly_integral" :assert? none)
           (lift-if)
           (split +)
           (("1" (assert))
            ("2"
             (flatten)
             (name "egv1" "x!2+1")
             (replace -1)
             (assert)
             (cross-mult 2))))
          ("2" (rewrite -1))))))
      ("2" (assert)) ("3" (assert)) ("4" (assert))))
    ("2" (hide-all-but 1) (grind))))


proof_type: f_proof
decl_type: formula
library: reals
theory: polynomials
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (name "fk" "polynomial(a,k)")
   (label "fkname" -1)
   (replace "fkname")
   (name "fn1" "polynomial(a,n-1)")
   (("1"
     (label "fn1name" -1)
     (replace "fn1name")
     (assert)
     (name "Ffun"
           "LAMBDA (x:real): fk(br) - sigma(0,n-1,LAMBDA (ii:nat): IF ii<=k THEN (polynomial(poly_n_deriv(a,ii),k-ii)(x)/factorial(ii))*(br-x)^ii ELSE 0 ENDIF)")
     (("1"
       (case "EXISTS (c: real):
                                                                                                                                                         0 <= c AND
                                                                                                                                                          c <= br AND Ffun(0) = polynomial(poly_n_deriv(a, n), k - n)(c) * br ^ n *
                                                                                                                                                              (1 / factorial(n))")
       (("1"
         (skeep -1)
         (inst + "c")
         (assert)
         (replace -3 :dir rl)
         (expand "Ffun" +)
         (invoke (case "%1 = %2") (! 1 2 1) (! 1 2 2))
         (("1" (assert))
          ("2"
           (hide 2)
           (expand "fn1" +)
           (expand "polynomial" +)
           (rewrite "sigma_eq")
           (("1"
             (hide 2)
             (skosimp*)
             (invoke (case "%1 = %2") (! 1 1 1) (! 1 2 1))
             (("1"
               (invoke (case "%1 = %2") (! 1 1 1) (! 1 2 1))
               (replaces -1 :dir rl)
               (lift-if)
               (ground)
               (replaces -1)
               (hide -)
               (grind))
              ("2"
               (hide 2)
               (lemma "sigma_eq_one_arg")
               (inst?)
               (inst - "0")
               (assert)
               (split -)
               (("1"
                 (replaces -1)
                 (assert)
                 (expand "poly_n_deriv" +)
                 (assert)
                 (case "C(n!1,n!1) = 1")
                 (("1" (replaces -1) (assert))
                  ("2" (expand "C" 1) (assert))))
                ("2" (hide 2) (skosimp*))
                ("3"
                 (hide 2)
                 (hide -)
                 (skosimp*)
                 (grind :exclude "poly_n_deriv"))))))
            ("2" (hide 2) (hide -) (grind))))))
        ("2"
         (hide 2)
         (name "gg" "LAMBDA (x:real): Ffun(x) - ((br-x)/br)^n*Ffun(0)")
         (case "NOT (gg(0) = 0 AND gg(br) = 0)")
         (("1"
           (hide (-2 2))
           (split +)
           (("1" (expand "gg" +) (assert) (rewrite "expt_1i") (assert))
            ("2"
             (expand "gg" +)
             (assert)
             (lemma "expt_eq_0")
             (inst - "n" "0")
             (assert)
             (replaces -1)
             (assert)
             (expand "Ffun" +)
             (lemma "sigma_eq_one_arg")
             (inst?)
             (("1"
               (assert)
               (inst - "0")
               (assert)
               (split -)
               (("1"
                 (replaces -1)
                 (expand "^" +)
                 (expand "expt" +)
                 (case "poly_n_deriv(a,0) = a")
                 (("1" (replaces -1) (assert))
                  ("2" (hide 2) (hide -) (decompose-equality) (grind))))
                ("2" (hide 2) (skosimp*))
                ("3"
                 (hide 2)
                 (skosimp*)
                 (expand "^")
                 (expand "expt")
                 (propax))))
              ("2" (hide-all-but 1) (grind))))))
          ("2"
           (flatten)
           (case "EXISTS (fpoly:[nat->real]): Ffun=polynomial(fpoly,k) AND FORALL (x:real): polynomial(poly_deriv(fpoly),k-1)(x) = -(polynomial(poly_n_deriv(a,n),k-n)(x)/factorial(n-1))*(br-x)^(n-1)")
           (("1"
             (name "g2" "(Ffun(0)/br^n)*power_linear(br,-1,n)")
             (("1"
               (label "g2name" -1)
               (skeep -2)
               (case "NOT gg = polynomial(fpoly-g2,k)")
               (("1"
                 (hide 2)
                 (decompose-equality +)
                 (rewrite "polynomial_sub")
                 (replace -2 + :dir rl)
                 (expand "-")
                 (replace -1 + :dir rl)
                 (lemma "scal_polynomial")
                 (inst - "power_linear(br,-1,n)" "k" _)
                 (inst - "(Ffun(0)/br^n)")
                 (decompose-equality -1)
                 (inst - "x!1")
                 (invoke (case "NOT %1 = %2") (! -1 2) (! 1 2 2))
                 (("1"
                   (hide (-1 2))
                   (invoke (case "%1 = %2") (! 1 1 0 1) (! 1 2 0 1))
                   (("1" (assert))
                    ("2"
                     (hide-all-but 1)
                     (decompose-equality)
                     (expand "const_fun")
                     (expand "*")
                     (propax))))
                  ("2"
                   (replaces -1)
                   (replace -1 :dir rl)
                   (expand "gg" +)
                   (expand "*" +)
                   (rewrite "power_linear_polynomial" :dir rl)
                   (expand "const_fun")
                   (rewrite "div_expt")
                   (("1" (assert))
                    ("2"
                     (flatten)
                     (replaces -1)
                     (assert)
                     (expand "^" +)
                     (expand "expt" +)
                     (assert))))))
                ("2"
                 (lemma "poly_Rolle")
                 (inst - "fpoly-g2" "k" "0" "br")
                 (assert)
                 (assert)
                 (skeep -1)
                 (inst + "c")
                 (assert)
                 (rewrite "poly_deriv_sub")
                 (rewrite "polynomial_sub")
                 (expand "-" -3)
                 (inst - "c")
                 (assert)
                 (replace -7)
                 (replace "g2name" -3 :dir rl)
                 (rewrite "poly_deriv_scal" -3)
                 (rewrite "scal_polynomial2")
                 (rewrite "deriv_power_linear")
                 (case "max(n-1,0) = n-1")
                 (("1"
                   (replaces -1)
                   (assert)
                   (rewrite "scal_polynomial2")
                   (rewrite "power_linear_polynomial" :dir rl)
                   (case "NOT polynomial(poly_n_deriv(a, n), k - n)(c) / factorial(n - 1) = n*Ffun(0) / br ^ n")
                   (("1"
                     (mult-by 1 "(br-c)^(n-1)")
                     (("1" (assert))
                      ("2"
                       (lemma "nzreal_expt")
                       (inst - "n-1" "br-c")
                       (expand "^")
                       (assert))))
                    ("2"
                     (cross-mult -1)
                     (cross-mult 1)
                     (expand "factorial" +)
                     (assert))))
                  ("2" (expand "max" 1) (propax))))))
              ("2"
               (lemma "nzreal_expt")
               (inst - "n" "br")
               (expand "^")
               (assert))))
            ("2"
             (hide 2)
             (name "Fdfun"
                   "LAMBDA (nn:nat): (LAMBDA (x: real):
                                                                                                                                  fk(br) -
                                                                                                                                   sigma(0, nn,
                                                                                                                                         LAMBDA (ii: nat):
                                                                                                                                           IF ii <= k
                                                                                                                                             THEN (polynomial(poly_n_deriv(a, ii), k - ii)(x) /
                                                                                                                                                    factorial(ii))
                                                                                                                                                   * (br - x) ^ ii
                                                                                                                                           ELSE 0
                                                                                                                                           ENDIF))")
             (case "NOT Ffun = Fdfun(n-1)")
             (("1" (assert) (expand "Fdfun" 1) (assert))
              ("2"
               (case "FORALL (nn:nat): nn+1<=k IMPLIES EXISTS (fpoly: [nat -> real]):
                                                                                                                                               Fdfun(nn) = polynomial(fpoly, k) AND
                                                                                                                                                (FORALL (x: real):
                                                                                                                                                   polynomial(poly_deriv(fpoly), k - 1)(x) =
                                                                                                                                                    -(polynomial(poly_n_deriv(a, nn+1), k - nn-1)(x) / factorial(nn))
                                                                                                                                                     * (br - x) ^ (nn))")
               (("1" (inst - "n-1") (assert) (replaces -2 :dir rl))
                ("2"
                 (hide 2)
                 (induct "nn")
                 (("1"
                   (flatten)
                   (assert)
                   (name "fbseq"
                         "LaMBDA (ii:nat): IF ii = 0 THEN fk(br) ELSE 0 ENDIF")
                   (inst + "fbseq-a")
                   (assert)
                   (case "NOT Fdfun(0) = polynomial(fbseq-a,k)")
                   (("1"
                     (hide -8)
                     (decompose-equality)
                     (rewrite "polynomial_sub")
                     (expand "-" +)
                     (expand "Fdfun" +)
                     (expand "sigma" +)
                     (expand "sigma" +)
                     (rewrite "expt_x0")
                     (assert)
                     (case "NOT FORALL (aa,bb,cc,dd:real): aa=cc AND bb=dd IMPLIES aa-bb=cc-dd")
                     (("1" (hide-all-but 1) (grind))
                      ("2"
                       (rewrite -1)
                       (("1"
                         (hide (-1 2))
                         (expand "polynomial" +)
                         (lemma "sigma_eq_one_arg")
                         (inst?)
                         (inst - "0")
                         (assert)
                         (split -)
                         (("1" (replaces -1) (expand "fbseq" +) (propax))
                          ("2" (skosimp*))
                          ("3" (skosimp*) (expand "fbseq" 1) (assert))))
                        ("2"
                         (lemma "poly_n_deriv_def")
                         (inst?)
                         (flatten)
                         (assert))))))
                    ("2"
                     (assert)
                     (skeep)
                     (rewrite "expt_x0")
                     (rewrite "poly_deriv_sub")
                     (rewrite "polynomial_sub" +)
                     (lemma "poly_n_deriv_def")
                     (inst?)
                     (flatten)
                     (replace -2)
                     (expand "-" +)
                     (assert)
                     (invoke (case "%1 = 0") (! 1 1 1))
                     (("1" (assert))
                      ("2"
                       (hide 2)
                       (hide-all-but 1)
                       (expand "polynomial")
                       (rewrite "sigma_restrict_eq_0")
                       (hide 2)
                       (skosimp*)
                       (expand "poly_deriv")
                       (expand "fbseq")
                       (propax))))))
                  ("2"
                   (skeep)
                   (hide -8)
                   (assert)
                   (skeep -1)
                   (assert)
                   (name "dpoly"
                         "-(1/factorial(1 + j))*polynomial_prod(poly_n_deriv(a, 1 + j),-1-j+k,power_linear(br,-1,j+1),j+1)")
                   (inst + "fpoly+dpoly")
                   (case "NOT Fdfun(1 + j) = polynomial(fpoly + dpoly, k)")
                   (("1"
                     (hide 2)
                     (decompose-equality)
                     (rewrite "sum_polynomial_eq_degree_eval" :dir rl)
                     (case "NOT Fdfun(1+j)(x!1) = Fdfun(j)(x!1) - (IF 1+j <= k
                                                                                                                                                            THEN (polynomial(poly_n_deriv(a, 1+j), k - j - 1)(x!1) /
                                                                                                                                                                   factorial(1+j))
                                                                                                                                                                  * (br - x!1) ^ (1+j)
                                                                                                                                                          ELSE 0
                                                                                                                                                          ENDIF)")
                     (("1"
                       (hide (-3 2))
                       (expand "Fdfun" +)
                       (assert)
                       (expand "sigma" + 1)
                       (assert))
                      ("2"
                       (replaces -1)
                       (replaces -2 :dir rl)
                       (assert)
                       (hide (-5))
                       (hide -1)
                       (expand "dpoly" +)
                       (rewrite "scal_polynomial2")
                       (rewrite "polynomial_prod_def" :dir rl)
                       (rewrite "power_linear_polynomial" :dir rl)
                       (assert))))
                    ("2"
                     (assert)
                     (skeep)
                     (inst - "x")
                     (case "NOT poly_deriv(fpoly+dpoly) = poly_deriv(fpoly) + poly_deriv(dpoly)")
                     (("1" (hide-all-but 1) (decompose-equality) (grind))
                      ("2"
                       (replaces -1)
                       (rewrite "sum_polynomial_eq_degree_eval" :dir rl)
                       (replaces -4)
                       (hide -2)
                       (expand "dpoly" +)
                       (rewrite "poly_deriv_scal")
                       (rewrite "scal_polynomial2")
                       (rewrite "poly_product_rule")
                       (rewrite "power_linear_polynomial" :dir rl)
                       (rewrite "deriv_power_linear")
                       (rewrite "scal_polynomial2")
                       (expand "max")
                       (rewrite "power_linear_polynomial" :dir rl)
                       (assert)
                       (case "(1+j)/factorial(1+j) = 1/factorial(j)")
                       (("1"
                         (mult-by -1
                          "polynomial(poly_n_deriv(a, 1 + j), -1 - j + k)(x) * (br - x) ^ j")
                         (replace -1)
                         (case "NOT 1 / factorial(j) *
                                                                                                (polynomial(poly_n_deriv(a, 1 + j), -1 - j + k)(x) * (br - x) ^ j) = -(-(polynomial(poly_n_deriv(a, 1 + j), -1 - j + k)(x) / factorial(j))
                                                                                                 * (br - x) ^ j)")
                         (("1" (assert))
                          ("2"
                           (replace -1)
                           (assert)
                           (invoke (name "aad4" "%1") (! 1 1 1 1))
                           (replaces -1)
                           (lemma "poly_n_deriv_def")
                           (inst - "a")
                           (flatten)
                           (inst - "1+j")
                           (assert))))
                        ("2"
                         (hide 2)
                         (cross-mult 1)
                         (expand "factorial" + 3)
                         (propax))))))))
                  ("3" (hide 2) (hide -) (skosimp*) (assert))
                  ("4" (assert) (hide -) (skosimp*) (assert))))
                ("3" (hide-all-but 1) (skosimp*) (assert))))))))))))
      ("2" (hide-all-but 1) (skosimp*) (assert))))
    ("2" (assert))))


