# Proofs

proof_type: f_proof
decl_type: formula
library: lnexp_fnd
theory: ln_series
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "lnp1_seq")
   (lemma "conv_integseq[abslt1]")
   (("1"
     (expand "integseq")
     (inst - "(LAMBDA (n: nat): (-1)^n)")
     (split -1)
     (("1"
       (case-replace
        "(LAMBDA (k: nat): IF k = 0 THEN 0 ELSE ((-1) ^ (k - 1)) / k ENDIF) = (LAMBDA (n): IF n = 0 THEN 0 ELSE ((-1) ^ (1 + n)) / n ENDIF)")
       (("1"
         (hide -1 2)
         (apply-extensionality 1 :hide? t)
         (("1"
           (lift-if)
           (ground)
           (mult-by 2 "x!1")
           (expand "^")
           (expand "expt" 2 2)
           (expand "expt" 2 2)
           (assert))
          ("2" (skosimp*))))
        ("2" (assert) (skosimp*))))
      ("2"
       (hide 2)
       (lemma "m1_conv")
       (expand "conv_powerseries?")
       (skosimp*)
       (inst?)
       (assert))))
    ("2" (skosimp*) (hide 2) (typepred "x!1") (rewrite "abs_neg"))
    ("3"
     (hide 2)
     (skosimp*)
     (inst + "IF x!1 >= 0 THEN (1-x!1)/2 ELSE abs(x!1+1)/2 ENDIF")
     (("1" (skosimp*) (typepred "x!1") (grind))
      ("2" (flatten) (cross-mult 2) (assert) (typepred "x!1") (grind))
      ("3"
       (flatten)
       (case-replace "(1 - x!1) / 2 > 0")
       (("1" (assert))
        ("2"
         (hide 2)
         (cross-mult 1)
         (assert)
         (typepred "x!1")
         (assert))))))
    ("4"
     (skosimp*)
     (hide 2)
     (inst-cp + "0")
     (("1" (inst + "1/2") (("1" (assert)) ("2" (grind)))) ("2" (grind))))
    ("5"
     (skosimp*)
     (assert)
     (hide 2)
     (typepred "x!1")
     (typepred "y!1")
     (expand "abs")
     (lift-if)
     (ground))))


proof_type: f_proof
decl_type: formula
library: lnexp_fnd
theory: ln_series
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (lemma "inv_fun_continuous[abslt1]")
   (inst - "(LAMBDA (x: abslt1): x+1)")
   (("1"
     (expand "/")
     (lemma "continuous_Integrable?[abslt1]")
     (("1"
       (inst?)
       (("1"
         (assert)
         (hide 2)
         (skosimp*)
         (expand "continuous?" -1)
         (inst - "x!1"))
        ("2" (skosimp*) (typepred "u!1") (hide -3 1) (grind))))
      ("2"
       (hide -1 2)
       (assert)
       (expand "not_one_element?")
       (skosimp*)
       (inst-cp + "1/2")
       (("1" (inst + "1/4") (("1" (flatten) (assert)) ("2" (grind))))
        ("2" (ground) (grind))))
      ("3"
       (assert)
       (hide -3 2)
       (expand "connected?")
       (skosimp*)
       (hide -3)
       (typepred "x!1")
       (typepred "y!1")
       (grind))))
    ("2"
     (hide 2)
     (lemma "linear_fun_cont[abslt1]")
     (inst - "1" "1")
     (assert))
    ("3" (skosimp*) (assert) (hide 1) (typepred "x!1") (grind))))


proof_type: f_proof
decl_type: formula
library: lnexp_fnd
theory: ln_series
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (case-replace
    "Integral(0, x1!1, (LAMBDA (u: {x: real | x > -1}): 1 / (u + 1))) =
           Integral(0, x1!1, (LAMBDA (u: abslt1): 1 / (u + 1)))")
   (("1"
     (hide -1)
     (lemma "geom_neg")
     (case-replace
      "(LAMBDA (u: abslt1): 1 / (1 + u)) = (LAMBDA (x: abslt1): inf_sum(LAMBDA n: (-x) ^ n))")
     (("1"
       (hide -1 -2)
       (rewrite "lnp1_conv")
       (lemma "integral_powerseries[abslt1]")
       (("1"
         (expand "inf_sum")
         (expand "Inf_sum")
         (expand "powerseries")
         (rewrite "apow_rew")
         (expand "apowerseq")
         (expand "powerseq")
         (inst - "(LAMBDA (n: nat): (-1)^n)" "x1!1")
         (assert)
         (split -1)
         (("1"
           (flatten)
           (case "FORALL (x: abslt1):
                                                                      convergent?(series(LAMBDA (k: nat):
                                                                                           (-1) ^ k * x ^ k ))")
           (("1"
             (case-replace
              "(LAMBDA (x: abslt1):
                                             limit(series(LAMBDA (k: nat): (-1) ^ k * x ^ k))) = (LAMBDA (x: abslt1): limit(series(LAMBDA n: (-x) ^ n)))")
             (("1"
               (replace -4)
               (expand "integ_powerseq")
               (expand "lnp1_seq")
               (hide -1 -3 -4)
               (lemma "limit_series_shift")
               (inst -
                "(LAMBDA (k: nat):
                                                                                            IF k = 0 THEN 0
                                                                                            ELSE ((-1) ^ (1 + k)) / k * x1!1 ^ k
                                                                                            ENDIF)"
                "1")
               (("1"
                 (assert)
                 (split -1)
                 (("1"
                   (replace -1)
                   (hide -1)
                   (expand "sigma")
                   (expand "sigma")
                   (case-replace
                    "(LAMBDA (k: nat): ((-1) ^ k * x1!1 ^ (1 + k)) / (1 + k)) = (LAMBDA n:
                                                                                                                                  (((-1) ^ (2 + n)) / (1 + n)) * x1!1 ^ (1 + n))")
                   (hide 2)
                   (apply-extensionality 1 :hide? t)
                   (name-replace "XP" "x1!1 ^ (1 + x!1)")
                   (field 1)
                   (cancel-terms 1)
                   (expand "^")
                   (expand "expt" 1 2)
                   (expand "expt" 1 2)
                   (assert))
                  ("2"
                   (hide 2)
                   (lemma "lnp1_conv")
                   (expand "lnp1_seq")
                   (expand "conv_powerseries?")
                   (expand "powerseries")
                   (assert)
                   (expand "powerseq")
                   (inst - "x1!1")
                   (case-replace
                    "(LAMBDA (k: nat):
                                                                IF k = 0 THEN 0 ELSE ((-1) ^ (1 + k)) / k ENDIF *
                                                                 x1!1 ^ k) = (LAMBDA (k: nat):
                                                                IF k = 0 THEN 0 ELSE ((-1) ^ (1 + k)) / k * x1!1 ^ k ENDIF) ")
                   (("1"
                     (hide -1 -2 2)
                     (apply-extensionality 1 :hide? t)
                     (("1" (lift-if) (ground)) ("2" (skosimp*))))
                    ("2" (skosimp*))))))
                ("2" (hide 2) (skosimp*))))
              ("2"
               (hide 2)
               (apply-extensionality 1 :hide? t)
               (("1"
                 (hide -1 -2)
                 (case-replace
                  "(LAMBDA (k: nat):  (-1) ^ k * x!1 ^ k) = (LAMBDA n: (-x!1) ^ n)")
                 (hide 2)
                 (apply-extensionality 1 :hide? t)
                 (rewrite "mult_expt" :dir rl)
                 (("1" (assert))
                  ("2"
                   (ground)
                   (replace -1)
                   (assert)
                   (hide -2)
                   (case-replace "0 ^ x!2 = 0")
                   (("1" (assert))
                    ("2"
                     (case-replace "x!2 = 0")
                     (("1" (assert)) ("2" (rewrite "hat_02n"))))))))
                ("2"
                 (hide -1 -2)
                 (skosimp*)
                 (lemma "geom_neg")
                 (inst?)
                 (assert))
                ("3" (skeep) (inst? -) (assert))))
              ("3"
               (hide -)
               (skosimp*)
               (lemma "geom_neg")
               (inst - "x!1")
               (assert))
              ("4" (hide 2) (skeep) (inst? -) (assert))))
            ("2"
             (hide -2)
             (hide 2)
             (skosimp*)
             (hide -1)
             (lemma "geom_neg")
             (inst -1 "x!1")
             (assert)
             (flatten)
             (case-replace
              "(LAMBDA (k: nat):
                                                                                          IF k = 0 THEN 1 ELSE (-1) ^ k * x!1 ^ k ENDIF) = (LAMBDA n: (-x!1) ^ n)")
             (("1"
               (hide -1 2)
               (case-replace
                "(LAMBDA (k: nat): (-1) ^ k * x!1 ^ k) = (LAMBDA n: (-x!1) ^ n)")
               (apply-extensionality 1 :hide? t)
               (hide-all-but 1)
               (rewrite "mult_expt" :dir rl)
               (("1" (assert))
                ("2"
                 (flatten)
                 (replace -1)
                 (assert)
                 (rewrite "hat_02n")
                 (("1" (assert))
                  ("2"
                   (case-replace "x!2 = 0")
                   (("1" (assert)) ("2" (assert))))))))
              ("2"
               (apply-extensionality :hide? t)
               (lift-if)
               (ground)
               (("1" (replace -1) (assert))
                ("2"
                 (hide 3)
                 (hide -1 -2)
                 (rewrite "mult_expt" :dir rl)
                 (("1" (assert))
                  ("2"
                   (flatten)
                   (replace -1)
                   (rewrite "hat_02n")
                   (assert))))))))))
          ("2" (rewrite "abs_0") (assert))
          ("3"
           (hide 2)
           (expand "conv_powerseries?")
           (skosimp*)
           (typepred "x!1")
           (rewrite "m1_conv"))))
        ("2" (hide 2) (skosimp*) (typepred "x!1") (rewrite "abs_neg"))
        ("3"
         (hide 2)
         (skosimp*)
         (typepred "x!1")
         (inst + "IF x!1 >= 0 THEN (1-x!1)/2 ELSE abs(x!1+1)/2 ENDIF")
         (("1" (skosimp*) (grind)) ("2" (flatten) (grind))
          ("3" (flatten) (grind))))))
      ("2"
       (hide 2)
       (apply-extensionality 1 :hide? t)
       (("1" (inst?) (assert))
        ("2"
         (skosimp*)
         (inst?)
         (assert)
         (flatten)
         (expand "conv_series?")
         (propax))
        ("3" (skosimp*) (typepred "u!1") (grind))))
      ("3"
       (skosimp*)
       (hide 2)
       (inst?)
       (assert)
       (expand "conv_series?")
       (flatten))
      ("4" (skosimp*) (hide 1) (hide -2) (typepred "u!1") (grind))))
    ("2"
     (hide 2)
     (lemma "Int_diff_dom[abslt1,Gt_m1]")
     (("1"
       (inst?)
       (("1"
         (inst?)
         (assert)
         (hide 2)
         (rewrite "abs_0")
         (assert)
         (lemma "lnp1_prep")
         (inst?)
         (assert)
         (flatten)
         (assert)
         (lemma "int_geo_prep")
         (inst?))
        ("2" (hide 2) (skosimp*) (typepred "u!1") (grind))))
      ("2" (hide 2) (inst + "0"))))
    ("3" (hide 2) (rewrite "int_geo_prep"))
    ("4" (hide 2) (skosimp*) (typepred "u!1") (grind))
    ("5"
     (hide 2)
     (lemma "inv_fun_continuous[{x: real | x > -1}]")
     (inst - "(LAMBDA (x: {x: real | x > -1}): x+1)")
     (("1"
       (expand "/")
       (lemma "continuous_Integrable?[abslt1]")
       (inst?)
       (("1"
         (assert)
         (expand "continuous?" -1)
         (rewrite "abs_0")
         (assert))
        ("2" (assert) (rewrite "abs_0") (assert))))
      ("2"
       (hide 2)
       (lemma "linear_fun_cont[{x: real | x > -1}]")
       (inst?)
       (inst - "1")
       (assert))))
    ("6" (hide 2) (lemma "lnp1_prep") (inst?) (flatten) (assert))
    ("7" (assert) (hide 2) (typepred "x1!1") (grind))))


proof_type: t_proof
decl_type: tcc
library: lnexp_fnd
theory: ln_series
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (inst 1 "1-abs(x)")
   (skeep)
   (rewrite "abs_diff_commute")
   (lemma "abs_diff")
   (inst?)
   (assert))


proof_type: t_proof
decl_type: tcc
library: lnexp_fnd
theory: ln_series
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (lemma "one_over_x_cont[posreal]")
   (assert)
   (lemma "cont_Integrable?[posreal]")
   (("1"
     (inst?)
     (("1" (assert)) ("2" (typepred "x1!1") (expand "abs") (ground))))
    ("2"
     (expand "not_one_element?")
     (skosimp*)
     (inst + "x!1+1")
     (assert))
    ("3" (assert) (expand "connected?") (skosimp*) (assert))))


proof_type: t_proof
decl_type: tcc
library: lnexp_fnd
theory: ln_series
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "geometric_series")
   (expand "conv_series?")
   (expand "convergent?")
   (inst - "-x!1")
   (rewrite "abs_lt")
   (assert)
   (rewrite "abs_lt")
   (assert)
   (expand "geometric")
   (inst + "1 / (1 + x!1)")
   (assert))


proof_type: f_proof
decl_type: formula
library: lnexp_fnd
theory: ln_approx
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skeep)
   (expand "ln_gt1_ub")
   (case "log_nat(xgt1,2)`1 <= log_nat(ygt1,2)`1")
   (("1"
     (case "log_nat(xgt1,2)`1 < log_nat(ygt1,2)`1")
     (("1"
       (hide -2)
       (copy -1)
       (case "NOT ln_le2_ub(n, 1)>0")
       (("1"
         (hide 2)
         (expand "ln_le2_ub")
         (lemma "ln_le2_bounds")
         (inst - "n" "1")
         (assert)
         (flatten)
         (expand "ln_le2_ub")
         (case "ln(2) > 0")
         (("1" (assert))
          ("2"
           (hide-all-but 1)
           (lemma "ln_le2_bounds")
           (inst - "6" "1")
           (assert)
           (flatten)
           (hide -2)
           (expand "ln_le2_lb")
           (expand "ln_estimate")
           (grind :exclude "ln"))))
        ("2"
         (mult-by -2 "ln_le2_ub(n, 1)")
         (assert)
         (name "nx" "log_nat(xgt1,2)`1")
         (name "sx" "log_nat(xgt1,2)`2")
         (replace -1)
         (replace -2)
         (name "ny" "log_nat(ygt1,2)`1")
         (replace -1)
         (name "sy" "log_nat(ygt1,2)`2")
         (replace -1)
         (typepred "sx")
         (typepred "sy")
         (replace -8)
         (replace -10)
         (case "ln_le2_ub(n,sx-1)<=ln_le2_ub(n,1) AND ln_le2_ub(n,0) <= ln_le2_ub(n,sy-1)")
         (("1"
           (flatten)
           (case "nx+1<=ny")
           (("1"
             (mult-by -1 "ln_le2_ub(n,1)")
             (assert)
             (case "ln_le2_ub(n,0) = 0")
             (("1" (assert))
              ("2" (hide-all-but 1) (expand "ln_le2_ub") (propax))))
            ("2" (assert))))
          ("2"
           (hide 2)
           (expand "ln_le2_ub")
           (split)
           (("1"
             (assert)
             (lift-if)
             (assert)
             (split +)
             (("1" (propax))
              ("2"
               (flatten)
               (lemma "ln_estimate_increasing_odd")
               (inst - "n" "sx-1" "1")
               (assert))))
            ("2"
             (lift-if)
             (ground)
             (lemma "ln_estimate_increasing_odd")
             (inst - "n" "0" "sy-1")
             (assert)
             (case "ln_estimate(0,1+2*n) = 0")
             (("1" (assert))
              ("2"
               (hide-all-but 1)
               (expand "ln_estimate")
               (rewrite "sigma_restrict_eq_0")
               (("1" (hide 2) (skosimp*) (lift-if) (ground))
                ("2" (hide 2) (grind))))))))))))
      ("2"
       (case "log_nat(xgt1,2)`1 = log_nat(ygt1,2)`1")
       (("1"
         (replace -1 :dir rl)
         (case "log_nat(xgt1,2)`2 <= log_nat(ygt1,2)`2")
         (("1"
           (expand "ln_le2_ub")
           (assert)
           (lemma "ln_estimate_increasing_odd")
           (inst - "n" "log_nat(xgt1, 2)`2 - 1" "log_nat(ygt1, 2)`2 - 1")
           (assert)
           (case "ln_estimate(0,1+2*n) = 0")
           (("1" (assert) (lift-if) (assert) (lift-if) (assert))
            ("2"
             (hide 2)
             (hide-all-but 1)
             (expand "ln_estimate")
             (rewrite "sigma_restrict_eq_0")
             (("1" (hide 2) (skosimp*) (lift-if) (ground))
              ("2" (hide 2) (grind))))))
          ("2"
           (assert)
           (hide (2 3))
           (hide -2)
           (typepred "log_nat(xgt1,2)`2")
           (typepred "log_nat(ygt1,2)`2")
           (replace -7 :dir rl)
           (mult-by 1 "2^log_nat(xgt1,2)`1")
           (assert))))
        ("2" (assert))))))
    ("2"
     (hide 2)
     (typepred "log_nat(xgt1,2)`2")
     (typepred "log_nat(ygt1,2)`2")
     (assert)
     (copy -7)
     (replace -7 -1)
     (replace -4 -1)
     (mult-by -1 "2^(-log_nat(ygt1,2)`1)")
     (assert)
     (lemma "expt_plus")
     (rewrite -1 :dir rl)
     (rewrite -1 :dir rl)
     (hide -1)
     (mult-by -1 "1/log_nat(xgt1,2)`2")
     (("1"
       (case "log_nat(ygt1,2)`2/log_nat(xgt1,2)`2 < 2")
       (("1"
         (case "FORALL (nn:nat): 2^(nn+1) >= 2")
         (("1"
           (inst - "(-log_nat(ygt1, 2)`1) + log_nat(xgt1, 2)`1-1")
           (assert))
          ("2"
           (hide-all-but 1)
           (induct "nn")
           (("1" (grind))
            ("2"
             (skeep)
             (assert)
             (expand "^")
             (expand "expt" +)
             (assert))))))
        ("2" (cross-mult 1))))
      ("2" (cross-mult 1))))))


proof_type: f_proof
decl_type: formula
library: lnexp_fnd
theory: ln_approx
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skeep)
   (case "n = 0")
   (("1" (replace -1) (grind))
    ("2"
     (label "npos" 1)
     (hide "npos")
     (expand "ln_gt1_lb")
     (case "log_nat(xgt1,2)`1 <= log_nat(ygt1,2)`1")
     (("1"
       (case "log_nat(xgt1,2)`1 < log_nat(ygt1,2)`1")
       (("1"
         (hide -2)
         (copy -1)
         (case "NOT ln_le2_lb(n, 1)>0")
         (("1"
           (hide 2)
           (lemma "ln_estimate_error_bound")
           (expand "ln_le2_lb")
           (inst - "2*n" "1")
           (assert)
           (case "n > 0")
           (("1"
             (case "ln(2) >1/(1+2*n)")
             (("1" (hide (-4 -5)) (grind :exclude ("ln" "ln_estimate")))
              ("2"
               (hide-all-but (-1 1))
               (case "ln(2) > 1/3 AND FORALL (k:nat): 1/(1+2*(k+1)) <= 1/3")
               (("1"
                 (flatten)
                 (inst - "n-1")
                 (("1" (assert)) ("2" (assert))))
                ("2"
                 (split)
                 (("1"
                   (hide 2)
                   (hide-all-but 1)
                   (lemma "ln_le2_bounds")
                   (inst - "6" "1")
                   (assert)
                   (flatten)
                   (hide -2)
                   (expand "ln_le2_lb")
                   (expand "ln_estimate")
                   (grind :exclude "ln"))
                  ("2" (hide-all-but 1) (skeep) (cross-mult 1))))))))
            ("2" (reveal "npos") (assert))))
          ("2"
           (mult-by -2 "ln_le2_lb(n, 1)")
           (assert)
           (name "nx" "log_nat(xgt1,2)`1")
           (name "sx" "log_nat(xgt1,2)`2")
           (replace -1)
           (replace -2)
           (name "ny" "log_nat(ygt1,2)`1")
           (replace -1)
           (name "sy" "log_nat(ygt1,2)`2")
           (replace -1)
           (typepred "sx")
           (typepred "sy")
           (replace -8)
           (replace -10)
           (case "ln_le2_lb(n,sx-1)<=ln_le2_lb(n,1) AND ln_le2_lb(n,0) <= ln_le2_lb(n,sy-1)")
           (("1"
             (flatten)
             (case "nx+1<=ny")
             (("1"
               (mult-by -1 "ln_le2_lb(n,1)")
               (assert)
               (case "ln_le2_lb(n,0) = 0")
               (("1" (assert))
                ("2" (hide-all-but 1) (expand "ln_le2_lb") (propax))))
              ("2" (assert))))
            ("2"
             (hide 2)
             (expand "ln_le2_lb")
             (split)
             (("1"
               (assert)
               (lift-if)
               (assert)
               (split +)
               (("1" (propax))
                ("2"
                 (flatten)
                 (lemma "ln_estimate_increasing_even")
                 (inst - "n" "sx-1" "1")
                 (("1" (assert)) ("2" (hide-all-but 1) (grind))
                  ("3" (expand "abs") (assert))))))
              ("2"
               (lift-if)
               (ground)
               (lemma "ln_estimate_increasing_even")
               (inst - "n" "0" "sy-1")
               (("1"
                 (assert)
                 (case "ln_estimate(0,2*n) = 0")
                 (("1" (assert))
                  ("2"
                   (hide-all-but 1)
                   (expand "ln_estimate")
                   (rewrite "sigma_restrict_eq_0")
                   (("1" (hide 2) (skosimp*) (lift-if) (ground))
                    ("2" (hide 2) (grind))))))
                ("2" (expand "abs") (assert))
                ("3" (assert) (hide-all-but 1) (grind))))))))))
        ("2"
         (case "log_nat(xgt1,2)`1 = log_nat(ygt1,2)`1")
         (("1"
           (replace -1 :dir rl)
           (case "log_nat(xgt1,2)`2 <= log_nat(ygt1,2)`2")
           (("1"
             (expand "ln_le2_lb")
             (assert)
             (lemma "ln_estimate_increasing_even")
             (inst - "n" "log_nat(xgt1, 2)`2 - 1"
              "log_nat(ygt1, 2)`2 - 1")
             (("1"
               (assert)
               (case "ln_estimate(0,2*n) = 0")
               (("1" (assert) (lift-if) (assert) (lift-if) (assert))
                ("2"
                 (hide 2)
                 (hide-all-but 1)
                 (expand "ln_estimate")
                 (rewrite "sigma_restrict_eq_0")
                 (("1" (hide 2) (skosimp*) (lift-if) (ground))
                  ("2" (hide 2) (grind))))))
              ("2" (assert) (hide (2 3)) (expand "abs") (assert))
              ("3" (expand "abs") (assert))))
            ("2"
             (assert)
             (hide (2 3))
             (hide -2)
             (typepred "log_nat(xgt1,2)`2")
             (typepred "log_nat(ygt1,2)`2")
             (replace -7 :dir rl)
             (mult-by 1 "2^log_nat(xgt1,2)`1")
             (assert))))
          ("2" (assert))))))
      ("2"
       (hide 2)
       (typepred "log_nat(xgt1,2)`2")
       (typepred "log_nat(ygt1,2)`2")
       (assert)
       (copy -7)
       (replace -7 -1)
       (replace -4 -1)
       (mult-by -1 "2^(-log_nat(ygt1,2)`1)")
       (assert)
       (lemma "expt_plus")
       (rewrite -1 :dir rl)
       (rewrite -1 :dir rl)
       (hide -1)
       (mult-by -1 "1/log_nat(xgt1,2)`2")
       (("1"
         (case "log_nat(ygt1,2)`2/log_nat(xgt1,2)`2 < 2")
         (("1"
           (case "FORALL (nn:nat): 2^(nn+1) >= 2")
           (("1"
             (inst - "(-log_nat(ygt1, 2)`1) + log_nat(xgt1, 2)`1-1")
             (assert))
            ("2"
             (hide-all-but 1)
             (induct "nn")
             (("1" (grind))
              ("2"
               (skeep)
               (assert)
               (expand "^")
               (expand "expt" +)
               (assert))))))
          ("2" (cross-mult 1))))
        ("2" (cross-mult 1))))))))


proof_type: f_proof
decl_type: formula
library: lnexp_fnd
theory: ln_approx
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skeep)
   (expand "ln_lb")
   (case "FORALL (xx:posreal): (xx>1 IMPLIES ln_gt1_ub(n, xx) >= 0)")
   (("1"
     (case "px<1 IFF 1/px >1")
     (("1"
       (case "py<1 IFF 1/py >1")
       (("1"
         (case "1/py <= 1/px")
         (("1"
           (inst-cp - "px")
           (inst-cp - "py")
           (inst-cp - "1/px")
           (inst - "1/py")
           (case "FORALL (xx:posreal): (xx>1 IMPLIES ln_gt1_lb(n, xx) >= 0)")
           (("1"
             (inst-cp - "px")
             (inst-cp - "py")
             (inst-cp - "1/px")
             (inst - "1/py")
             (flatten)
             (lift-if)
             (lift-if)
             (lift-if)
             (lift-if)
             (assert)
             (split +)
             (("1"
               (flatten)
               (split +)
               (("1"
                 (flatten)
                 (assert)
                 (lemma "ln_gt1_ub_increasing")
                 (inst - "n" "1/py" "1/px")
                 (assert))
                ("2"
                 (flatten)
                 (assert)
                 (split +)
                 (("1" (flatten) (assert)) ("2" (flatten) (assert))))))
              ("2"
               (flatten)
               (assert)
               (split +)
               (("1"
                 (flatten)
                 (assert)
                 (split +)
                 (("1" (propax)) ("2" (flatten) (assert))))
                ("2"
                 (flatten)
                 (assert)
                 (lemma "ln_gt1_lb_increasing")
                 (inst - "n" "px" "py")
                 (assert))))))
            ("2"
             (hide-all-but 1)
             (skeep)
             (expand "ln_gt1_lb")
             (case "ln_le2_lb(n,1)>=0 AND ln_le2_lb(n,0) = 0")
             (("1"
               (flatten)
               (mult-by -1 "log_nat(xx,2)`1")
               (expand "ln_le2_lb")
               (lift-if)
               (ground)
               (lemma "ln_estimate_increasing_even")
               (inst - "n" "0" "log_nat(xx, 2)`2 - 1")
               (("1"
                 (assert)
                 (case "ln_estimate(0, 2*n) = 0")
                 (("1" (assert))
                  ("2"
                   (hide-all-but 1)
                   (expand "ln_estimate")
                   (rewrite "sigma_restrict_eq_0")
                   (("1" (hide 2) (grind)) ("2" (hide 2) (grind))))))
                ("2"
                 (hide-all-but 1)
                 (typepred "log_nat(xx,2)`2")
                 (grind :exclude "log_nat"))
                ("3" (assert) (expand "abs") (assert))))
              ("2"
               (hide-all-but 1)
               (expand "ln_le2_lb")
               (lemma "ln_estimate_increasing_even")
               (inst - "n" "0" "1")
               (("1"
                 (assert)
                 (case "ln_estimate(0, 2*n) = 0")
                 (("1" (assert))
                  ("2"
                   (hide-all-but 1)
                   (expand "ln_estimate")
                   (rewrite "sigma_restrict_eq_0")
                   (("1" (hide 2) (grind)) ("2" (hide 2) (grind))))))
                ("2" (hide 2) (grind)) ("3" (hide 2) (grind))))))))
          ("2" (cross-mult 1) (assert))))
        ("2"
         (hide-all-but 1)
         (ground)
         (("1" (cross-mult 1)) ("2" (cross-mult -1))))))
      ("2"
       (hide-all-but 1)
       (ground)
       (("1" (cross-mult 1)) ("2" (cross-mult -1))))))
    ("2"
     (hide 2)
     (hide-all-but 1)
     (skeep)
     (expand "ln_gt1_ub")
     (case "ln_le2_ub(n,1)>=0 AND ln_le2_ub(n,0) = 0")
     (("1"
       (flatten)
       (mult-by -1 "log_nat(xx,2)`1")
       (expand "ln_le2_ub")
       (lift-if)
       (ground)
       (lemma "ln_estimate_increasing_odd")
       (inst - "n" "0" "log_nat(xx, 2)`2 - 1")
       (assert)
       (case "ln_estimate(0, 1+2*n) = 0")
       (("1" (assert))
        ("2"
         (hide-all-but 1)
         (expand "ln_estimate")
         (rewrite "sigma_restrict_eq_0")
         (("1" (hide 2) (grind)) ("2" (hide 2) (grind))))))
      ("2"
       (hide-all-but 1)
       (expand "ln_le2_ub")
       (lemma "ln_estimate_increasing_odd")
       (inst - "n" "0" "1")
       (assert)
       (case "ln_estimate(0, 1+2*n) = 0")
       (("1" (assert))
        ("2"
         (hide-all-but 1)
         (expand "ln_estimate")
         (rewrite "sigma_restrict_eq_0")
         (("1" (hide 2) (grind)) ("2" (hide 2) (grind))))))))))


proof_type: f_proof
decl_type: formula
library: lnexp_fnd
theory: ln_approx
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skeep)
   (expand "ln_ub")
   (case "FORALL (xx:posreal): (xx>1 IMPLIES ln_gt1_ub(n, xx) >= 0)")
   (("1"
     (case "px<1 IFF 1/px >1")
     (("1"
       (case "py<1 IFF 1/py >1")
       (("1"
         (case "1/py <= 1/px")
         (("1"
           (inst-cp - "px")
           (inst-cp - "py")
           (inst-cp - "1/px")
           (inst - "1/py")
           (case "FORALL (xx:posreal): (xx>1 IMPLIES ln_gt1_lb(n, xx) >= 0)")
           (("1"
             (inst-cp - "px")
             (inst-cp - "py")
             (inst-cp - "1/px")
             (inst - "1/py")
             (flatten)
             (lift-if)
             (lift-if)
             (lift-if)
             (lift-if)
             (assert)
             (split +)
             (("1"
               (flatten)
               (split +)
               (("1"
                 (flatten)
                 (assert)
                 (lemma "ln_gt1_lb_increasing")
                 (inst - "n" "1/py" "1/px")
                 (assert))
                ("2"
                 (flatten)
                 (assert)
                 (split +)
                 (("1" (flatten) (assert)) ("2" (flatten) (assert))))))
              ("2"
               (flatten)
               (assert)
               (split +)
               (("1"
                 (flatten)
                 (assert)
                 (split +)
                 (("1" (propax)) ("2" (flatten) (assert))))
                ("2"
                 (flatten)
                 (assert)
                 (lemma "ln_gt1_ub_increasing")
                 (inst - "n" "px" "py")
                 (assert))))))
            ("2"
             (hide-all-but 1)
             (skeep)
             (expand "ln_gt1_lb")
             (case "ln_le2_lb(n,1)>=0 AND ln_le2_lb(n,0) = 0")
             (("1"
               (flatten)
               (mult-by -1 "log_nat(xx,2)`1")
               (expand "ln_le2_lb")
               (lift-if)
               (ground)
               (lemma "ln_estimate_increasing_even")
               (inst - "n" "0" "log_nat(xx, 2)`2 - 1")
               (("1"
                 (assert)
                 (case "ln_estimate(0, 2*n) = 0")
                 (("1" (assert))
                  ("2"
                   (hide-all-but 1)
                   (expand "ln_estimate")
                   (rewrite "sigma_restrict_eq_0")
                   (("1" (hide 2) (grind)) ("2" (hide 2) (grind))))))
                ("2"
                 (hide-all-but 1)
                 (typepred "log_nat(xx,2)`2")
                 (grind :exclude "log_nat"))
                ("3" (assert) (expand "abs") (assert))))
              ("2"
               (hide-all-but 1)
               (expand "ln_le2_lb")
               (lemma "ln_estimate_increasing_even")
               (inst - "n" "0" "1")
               (("1"
                 (assert)
                 (case "ln_estimate(0, 2*n) = 0")
                 (("1" (assert))
                  ("2"
                   (hide-all-but 1)
                   (expand "ln_estimate")
                   (rewrite "sigma_restrict_eq_0")
                   (("1" (hide 2) (grind)) ("2" (hide 2) (grind))))))
                ("2" (hide 2) (grind)) ("3" (hide 2) (grind))))))))
          ("2" (cross-mult 1) (assert))))
        ("2"
         (hide-all-but 1)
         (ground)
         (("1" (cross-mult 1)) ("2" (cross-mult -1))))))
      ("2"
       (hide-all-but 1)
       (ground)
       (("1" (cross-mult 1)) ("2" (cross-mult -1))))))
    ("2"
     (hide 2)
     (hide-all-but 1)
     (skeep)
     (expand "ln_gt1_ub")
     (case "ln_le2_ub(n,1)>=0 AND ln_le2_ub(n,0) = 0")
     (("1"
       (flatten)
       (mult-by -1 "log_nat(xx,2)`1")
       (expand "ln_le2_ub")
       (lift-if)
       (ground)
       (lemma "ln_estimate_increasing_odd")
       (inst - "n" "0" "log_nat(xx, 2)`2 - 1")
       (assert)
       (case "ln_estimate(0, 1+2*n) = 0")
       (("1" (assert))
        ("2"
         (hide-all-but 1)
         (expand "ln_estimate")
         (rewrite "sigma_restrict_eq_0")
         (("1" (hide 2) (grind)) ("2" (hide 2) (grind))))))
      ("2"
       (hide-all-but 1)
       (expand "ln_le2_ub")
       (lemma "ln_estimate_increasing_odd")
       (inst - "n" "0" "1")
       (assert)
       (case "ln_estimate(0, 1+2*n) = 0")
       (("1" (assert))
        ("2"
         (hide-all-but 1)
         (expand "ln_estimate")
         (rewrite "sigma_restrict_eq_0")
         (("1" (hide 2) (grind)) ("2" (hide 2) (grind))))))))))


proof_type: f_proof
decl_type: formula
library: lnexp_fnd
theory: ln_approx
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skeep)
   (typepred "xp")
   (typepred "np")
   (hide -1)
   (invoke (name "lp" "%1") (! 1 1 1))
   (replace -1)
   (label "lpname" -1)
   (case "lp >= 0")
   (("1"
     (invoke (name "mm" "%1") (! 1 1))
     (replace -1)
     (case "mm >= 0")
     (("1"
       (label "mmname" -2)
       (invoke (name "nn" "%1") (! 1 2))
       (replace -1)
       (label "nnname" -1)
       (lemma "log_nat_bounds")
       (case "np ^ mm <= xp AND xp < np ^ (mm + 1)")
       (("1"
         (inst?)
         (assert)
         (replace "nnname")
         (flatten)
         (case "mm > nn")
         (("1"
           (lemma "both_sides_expt_gt1_lt_aux")
           (inst - "np" "nn" "mm-1")
           (("1" (expand "^") (assert))
            ("2"
             (case "nn=mm-1")
             (("1" (replace -1) (assert)) ("2" (assert))))))
          ("2"
           (assert)
           (case "nn > mm")
           (("1"
             (lemma "both_sides_expt_gt1_lt_aux")
             (inst - "np" "mm" "nn-1")
             (expand "^")
             (assert))
            ("2" (assert))))))
        ("2"
         (hide -1)
         (hide -1)
         (hide 2)
         (lemma "floor_def")
         (inst?)
         (replace "mmname")
         (flatten)
         (lemma "ln_strict_increasing")
         (split +)
         (("1"
           (expand "strict_increasing?")
           (inst - "xp" "np^mm")
           (assert)
           (lemma "ln_expt")
           (inst?)
           (replace -1)
           (case "ln(np) > 0")
           (("1"
             (case "mm > lp")
             (("1" (assert))
              ("2" (expand "lp" +) (cross-mult 1) (assert))))
            ("2" (lemma "ln_gt_0") (inst?) (assert))))
          ("2"
           (lemma "ln_increasing")
           (expand "increasing?")
           (inst - "np^(mm+1)" "xp")
           (assert)
           (lemma "ln_expt")
           (inst?)
           (replace -1)
           (hide -1)
           (case "1+mm <= lp")
           (("1" (assert))
            ("2"
             (expand "lp" +)
             (case "ln(np) > 0")
             (("1" (cross-mult 1))
              ("2" (lemma "ln_gt_0") (inst?) (assert))))))))))
      ("2" (assert))))
    ("2"
     (case "ln(np) > 0")
     (("1"
       (expand "lp" +)
       (cross-mult 1)
       (lemma "ln_ge_0")
       (inst?)
       (assert))
      ("2" (lemma "ln_gt_0") (inst?) (assert))))))


proof_type: t_proof
decl_type: tcc
library: lnexp_fnd
theory: ln_approx
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skeep)
   (typepred "np")
   (lemma "exp_ln")
   (inst?)
   (replace -4)
   (rewrite "exp_0")
   (assert))


proof_type: f_proof
decl_type: formula
library: lnexp_fnd
theory: exp_series
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (expand "inf_deriv_fun?")
   (induct "n")
   (("1" (lemma "nderiv_exp") (inst?) (flatten))
    ("2"
     (skosimp*)
     (expand "derivable_n_times?" 1)
     (lemma "exp_deriv")
     (flatten)
     (assert))))


proof_type: f_proof
decl_type: formula
library: lnexp_fnd
theory: exp_series
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (lemma "squeezing_abs_0")
   (inst?)
   (("1"
     (assert)
     (case "EXISTS (M: posreal): (FORALL (t: between[real](0,x!1)): exp(t) <= M)")
     (("1"
       (skosimp*)
       (inst -2 "(LAMBDA n: M!1*abs(x!1)^(n+1)/factorial(n+1))")
       (assert)
       (hide 2)
       (prop)
       (("1"
         (lemma "conv_x_to_n_div_fact")
         (inst - "abs(x!1)")
         (lemma "convergence_shift")
         (inst?)
         (inst - "1")
         (assert)
         (lemma "cnv_seq_scal")
         (inst?)
         (inst - "M!1")
         (assert)
         (expand "*")
         (assert))
        ("2"
         (skosimp*)
         (expand "Taylor_rem")
         (rewrite "abs_div")
         (expand "abs" 1 2)
         (cross-mult 1)
         (assert)
         (name-replace "C" "GET_C(exp, x!1, n!1)")
         (field 1)
         (cancel-terms 1)
         (inst - "C")
         (rewrite "abs_hat")
         (("1"
           (expand "abs" 1 1)
           (assert)
           (lemma "nderiv_exp")
           (inst - "n!1+1")
           (flatten)
           (replace -2)
           (assert)
           (hide -1 -2)
           (expand "abs" 1 1)
           (mult-by -1 "abs(x!1) ^ (1 + n!1)")
           (assert))
          ("2"
           (case-replace "x!1 = 0")
           (("1" (expand "^") (expand "expt") (expand "abs") (assert))
            ("2" (assert))))))))
      ("2"
       (hide 2)
       (hide -1)
       (inst + "exp(abs(x!1))")
       (skosimp*)
       (lemma "exp_increasing")
       (expand "increasing?")
       (inst?)
       (assert)
       (hide 2)
       (typepred "x!1")
       (typepred "t!1")
       (expand "abs")
       (lift-if)
       (ground))))
    ("2" (rewrite "exp_inf_deriv"))
    ("3"
     (skosimp*)
     (lemma "exp_inf_deriv")
     (expand "inf_deriv_fun?")
     (inst?))))


proof_type: f_proof
decl_type: formula
library: lnexp_fnd
theory: exp_series
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (lemma "is_taylor_prep")
   (inst - "exp")
   (assert)
   (case-replace "Taylor_seq[real](exp) = exp_seq")
   (("1"
     (assert)
     (rewrite "exp_inf_deriv")
     (skosimp*)
     (lemma "exp_series_prep")
     (inst?)
     (expand "convergent?")
     (inst + "0"))
    ("2"
     (hide -1 2)
     (expand "Taylor_seq")
     (expand "exp_seq")
     (apply-extensionality 1 :hide? t)
     (("1"
       (lemma "nderiv_exp")
       (inst?)
       (flatten)
       (replace -2)
       (rewrite "exp_0"))
      ("2" (skosimp*) (lemma "nderiv_exp") (inst?) (flatten))))
    ("3" (rewrite "exp_inf_deriv"))))


proof_type: f_proof
decl_type: formula
library: lnexp_fnd
theory: exp_series
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (lemma "is_taylor[real]")
   (inst?)
   (assert)
   (split -1)
   (("1"
     (replace -1)
     (case-replace "Taylor_seq[real](exp) = exp_seq")
     (hide 2)
     (expand "Taylor_seq")
     (expand "exp_seq")
     (apply-extensionality 1 :hide? t)
     (("1"
       (lemma "nderiv_exp")
       (inst - "x!1")
       (flatten)
       (assert)
       (replace -2)
       (rewrite "exp_0"))
      ("2" (skosimp*) (lemma "nderiv_exp") (inst?) (flatten))))
    ("2" (rewrite "exp_inf_deriv"))
    ("3" (skosimp*) (rewrite "exp_series_prep"))))


proof_type: f_proof
decl_type: formula
library: lnexp_fnd
theory: exp_series
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (lemma "Taylors[real]" ("f" "exp" "n" "n!1" "aa" "0" "bb" "x!1"))
   (lemma "sigma_eq[nat]"
    ("low"
     "1"
     "high"
     "n!1"
     "F"
     "LAMBDA (nn:nat):
                                IF nn > n!1 THEN 0
                                ELSIF nn = 0 THEN exp(0)
                                ELSE nderiv(nn, exp)(0) * (x!1 - 0) ^ nn / factorial(nn)
                                ENDIF"
     "G"
     "LAMBDA (nn: nat): x!1 ^ nn / factorial(nn)"))
   (("1"
     (assert)
     (expand "exp_estimate")
     (split -1)
     (("1"
       (rewrite "sigma_first" -2)
       (("1"
         (replace -1)
         (hide -1)
         (lemma "nderiv_exp" ("n" "n!1+1"))
         (flatten)
         (assert))
        ("2"
         (case-replace "n!1 = 0")
         (("1"
           (assert)
           (expand "sigma")
           (split -3)
           (("1"
             (lemma "nderiv_exp")
             (inst?)
             (flatten)
             (replace -2)
             (propax))
            ("2" (lemma "nderiv_exp") (inst?) (flatten))))
          ("2" (assert))))))
      ("2"
       (skosimp*)
       (hide 2)
       (hide -1)
       (lemma "nderiv_exp")
       (inst?)
       (flatten)
       (replace -2)
       (assert))))
    ("2"
     (skosimp*)
     (assert)
     (hide - 4)
     (lemma "nderiv_exp")
     (inst?)
     (flatten))))


proof_type: f_proof
decl_type: formula
library: lnexp_fnd
theory: exp_series
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (name "TT" "LAMBDA (x:real): -1<=x")
   (case "FORALL (n:nat): FORALL (m:nat): m<=n IMPLIES increasing?(LAMBDA (x:(TT)): exp_estimate(x,m)) AND exp_estimate(-1,m)>=0")
   (("1"
     (skeep)
     (inst - "n")
     (inst - "n")
     (assert)
     (flatten)
     (expand "increasing?")
     (inst - "x" "y")
     (("1" (assert)) ("2" (expand "TT") (assert))
      ("3" (expand "TT") (propax))))
    ("2"
     (hide 2)
     (induct "n")
     (("1"
       (skeep)
       (case "m = 0")
       (("1" (replace -1) (assert) (grind)) ("2" (assert))))
      ("2"
       (skeep)
       (skeep)
       (case "NOT j = m-1")
       (("1" (inst - "m") (assert))
        ("2"
         (replace -1)
         (assert)
         (hide -3)
         (hide -1)
         (case "NOT exp_estimate(-1,m)>=0")
         (("1"
           (hide 2)
           (lemma "even_or_odd")
           (inst - "m")
           (ground)
           (("1"
             (expand "even?")
             (skeep -1)
             (replaces -1)
             (inst - "2*j!1-1")
             (("1"
               (assert)
               (flatten)
               (hide -1)
               (expand "exp_estimate")
               (expand "sigma" +)
               (assert)
               (case "j!1 = 0")
               (("1" (replaces -1) (assert))
                ("2"
                 (assert)
                 (case "1 > 2*j!1")
                 (("1" (assert))
                  ("2"
                   (assert)
                   (case "(-1) ^ (2 * j!1) / factorial(2 * j!1) >= 0")
                   (("1" (assert))
                    ("2"
                     (hide 5)
                     (cross-mult 1)
                     (lemma "even_m1_pow")
                     (inst?)
                     (assert))))))))
              ("2"
               (assert)
               (case "NOT j!1 = 0")
               (("1"
                 (case "j!1 >= 1")
                 (("1" (assert))
                  ("2"
                   (assert)
                   (expand "exp_estimate")
                   (expand "sigma")
                   (assert))))
                ("2"
                 (assert)
                 (replace -1)
                 (assert)
                 (expand "exp_estimate")
                 (expand "sigma")
                 (assert))))))
            ("2"
             (inst - "m-2")
             (("1"
               (assert)
               (flatten)
               (hide -2)
               (expand "odd?")
               (skeep -1)
               (case "NOT j!1 >= 0")
               (("1" (assert))
                ("2"
                 (assert)
                 (replaces -2)
                 (assert)
                 (expand "exp_estimate")
                 (expand "sigma" +)
                 (expand "sigma" +)
                 (assert)
                 (case "j!1 = 0")
                 (("1" (assert) (replaces -1) (assert))
                  ("2"
                   (assert)
                   (case "-((-1) ^ (1 + 2 * j!1)) / factorial(1 + 2 * j!1)
                                <= (-1) ^ (2 * j!1) / factorial(2 * j!1)")
                   (("1" (assert))
                    ("2"
                     (hide 4)
                     (hide -2)
                     (lemma "even_m1_pow")
                     (inst - "2*j!1")
                     (assert)
                     (replaces -1)
                     (lemma "not_even_m1_pow")
                     (inst - "1+2*j!1")
                     (assert)
                     (replaces -1)
                     (assert)
                     (cross-mult 1)
                     (typepred "factorial(2*j!1)")
                     (mult-by -1 "2*j!1")
                     (expand "factorial" + 2)
                     (assert))))))))
              ("2"
               (assert)
               (case "m = 0")
               (("1" (replaces -1) (hide -) (grind))
                ("2"
                 (case "m = 1")
                 (("1" (replaces -1) (hide -) (grind))
                  ("2" (assert))))))))))
          ("2"
           (assert)
           (lemma "poly_increasing")
           (expand "increasing?")
           (skosimp*)
           (inst - "exp_seq" "m" "x!1" "y!1")
           (assert)
           (case "polynomial(exp_seq,m) = LAMBDA (gg:real): exp_estimate(gg,m)")
           (("1"
             (replace -1)
             (assert)
             (hide 2)
             (skosimp*)
             (inst - "m-1")
             (assert)
             (flatten)
             (inst - "-1" "c!1")
             (("1"
               (assert)
               (typepred "x!1")
               (expand "TT")
               (assert)
               (case "polynomial(poly_deriv(exp_seq),m-1) = LAMBDA (gg:real): exp_estimate(gg,m-1)")
               (("1" (replace -1) (assert))
                ("2"
                 (hide-all-but 1)
                 (decompose-equality)
                 (expand "exp_estimate")
                 (expand "polynomial")
                 (lemma "sigma_split")
                 (inst?)
                 (inst - "0")
                 (assert)
                 (replace -1)
                 (hide -1)
                 (case "FORALL (a1,a2,b1,b2:real): a1=b1 AND a2=b2 IMPLIEs a1+a2 = b1+b2")
                 (("1"
                   (rewrite -1)
                   (("1" (hide-all-but 1) (grind))
                    ("2"
                     (hide-all-but 1)
                     (rewrite "sigma_eq")
                     (hide 2)
                     (skosimp*)
                     (expand "exp_seq")
                     (expand "poly_deriv")
                     (case "(1+n!1)/factorial(1+n!1) = 1/factorial(n!1)")
                     (("1" (assert))
                      ("2"
                       (hide 2)
                       (expand "factorial" + 1)
                       (assert))))))
                  ("2" (skosimp*) (assert))))))
              ("2"
               (expand "TT")
               (assert)
               (typepred "x!1")
               (expand "TT")
               (assert))
              ("3" (expand "TT") (assert))))
            ("2"
             (hide-all-but 1)
             (decompose-equality)
             (expand "polynomial")
             (lemma "sigma_split")
             (inst?)
             (inst - "0")
             (assert)
             (replaces -1)
             (expand "exp_estimate")
             (case "FORALL (a1,a2,b1,b2:real): a1=b1 AND a2=b2 IMPLIEs a1+a2 = b1+b2")
             (("1"
               (rewrite -1)
               (("1" (hide-all-but 1) (grind))
                ("2"
                 (hide-all-but 1)
                 (rewrite "sigma_eq")
                 (hide 2)
                 (skosimp*)
                 (expand "exp_seq")
                 (assert))))
              ("2" (hide 2) (skosimp*) (assert))))))))))))))


proof_type: f_proof
decl_type: formula
library: lnexp_fnd
theory: exp_series
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (case "FORALL (m:posnat): exp_estimate(-1,m)>=0")
   (("1"
     (case "FORALL (m:posnat): m>1 IMPLIES exp_estimate(-1,m) > 0")
     (("1"
       (skeep)
       (inst - "n")
       (("1"
         (assert)
         (lemma "exp_estimate_increasing")
         (inst - "n" "-1" "x")
         (assert))
        ("2" (assert))))
      ("2"
       (hide 2)
       (copy -1)
       (skeep)
       (inst - "m")
       (case "NOT exp_estimate(-1,m) = 0")
       (("1" (assert))
        ("2"
         (hide (-2 1))
         (lemma "even_or_odd")
         (inst - "m")
         (ground)
         (("1"
           (expand "even?")
           (skeep -1)
           (replaces -1)
           (assert)
           (inst - "2*j-1")
           (assert)
           (expand "exp_estimate")
           (expand "sigma" - 1)
           (case "(-1) ^ (2 * j) / factorial(2 * j) > 0")
           (("1"
             (assert)
             (name "rd"
                   "1 + sigma(1, 2 * j - 1, LAMBDA (nn: nat): (-1) ^ nn / factorial(nn))")
             (replaces -1)
             (assert))
            ("2"
             (cross-mult 1)
             (lemma "even_m1_pow")
             (inst - "2*j")
             (assert))))
          ("2"
           (expand "odd?")
           (skeep -1)
           (case "NOT j >= 1")
           (("1"
             (case "j = 1")
             (("1" (replaces -1) (replaces -1) (assert)) ("2" (assert))))
            ("2"
             (inst - "m-2")
             (("1"
               (expand "exp_estimate")
               (expand "sigma" - 1)
               (expand "sigma" - 1)
               (name "aa"
                     "1 + sigma(1, m - 2, LAMBDA (nn: nat): (-1) ^ nn / factorial(nn))")
               (replaces -1)
               (case "((-1) ^ (m - 1)) / factorial(m - 1) > (-(-1) ^ m) / factorial(m)")
               (("1" (assert))
                ("2"
                 (lemma "even_m1_pow")
                 (replaces -3)
                 (assert)
                 (inst - "2*j")
                 (assert)
                 (replaces -1)
                 (assert)
                 (lemma "not_even_m1_pow")
                 (inst - "1+2*j")
                 (assert)
                 (replaces -1)
                 (assert)
                 (cross-mult 1)
                 (mult-by -3 "factorial(2*j)")
                 (expand "factorial" + 1)
                 (assert))))
              ("2" (assert))))))))))))
    ("2"
     (hide 2)
     (case "FORALL (mm: nat): FORALL (kk:nat): kk<=mm IMPLIES exp_estimate(-1, kk) >= 0")
     (("1" (skeep) (inst - "m") (inst - "m") (assert))
      ("2"
       (hide 2)
       (induct "mm")
       (("1" (grind))
        ("2"
         (skeep)
         (skeep)
         (case "NOT kk = j+1")
         (("1" (inst - "kk") (assert))
          ("2"
           (hide -3)
           (assert)
           (assert)
           (replaces -1)
           (case "j = 0")
           (("1" (replaces -1) (hide -) (grind))
            ("2"
             (lemma "even_or_odd")
             (inst - "1+j")
             (ground)
             (("1"
               (expand "even?")
               (skosimp*)
               (inst - "2*j!1-1")
               (("1"
                 (assert)
                 (replaces -1)
                 (expand "exp_estimate")
                 (expand "sigma" +)
                 (assert)
                 (case "(-1) ^ (2 * j!1) / factorial(2 * j!1) >= 0")
                 (("1" (assert))
                  ("2"
                   (cross-mult 1)
                   (lemma "even_m1_pow")
                   (inst?)
                   (assert))))
                ("2" (assert))))
              ("2"
               (expand "odd?")
               (skosimp*)
               (inst - "j-1")
               (replaces -1)
               (assert)
               (expand "exp_estimate")
               (expand "sigma" +)
               (case "1> 1+2*j!1")
               (("1" (assert))
                ("2"
                 (assert)
                 (expand "sigma" +)
                 (assert)
                 (case "-((-1) ^ (1 + 2 * j!1)) / factorial(1 + 2 * j!1)
                              < (-1) ^ (2 * j!1) / factorial(2 * j!1)")
                 (("1" (assert))
                  ("2"
                   (hide (-1 5))
                   (lemma "even_m1_pow")
                   (inst - "2*j!1")
                   (assert)
                   (replaces -1)
                   (lemma "not_even_m1_pow")
                   (inst?)
                   (assert)
                   (replaces -1)
                   (cross-mult 1)
                   (case "1+2*j!1 > 1")
                   (("1"
                     (mult-by -1 "factorial(2*j!1)")
                     (expand "factorial" + 2)
                     (assert))
                    ("2" (assert))))))))))))))))))))


proof_type: f_proof
decl_type: formula
library: lnexp_fnd
theory: exp_series
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "n")
   (("1" (grind))
    ("2" (skeep) (expand "exp_estimate") (expand "sigma" +) (assert))))


proof_type: f_proof
decl_type: formula
library: lnexp_fnd
theory: exp_approx
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (case "exp(x!1) < exp_neg_le1_ub(n!1, x!1)")
   (("1"
     (assert)
     (expand "exp_neg_le1_ub")
     (expand "exp_neg_le1_lb")
     (lemma "exp_taylors_err")
     (inst - "2*n!1" "x!1")
     (expand "abs")
     (assert)
     (case "(max(exp(x!1), 1) * (-x!1) ^ (1 + 2 * n!1)) <= 1")
     (("1" (mult-by -1 "1/factorial(1+2*n!1)") (assert))
      ("2"
       (assert)
       (case "FORALL (aa,bb:nnreal): aa<=1 AND bb<=1 IMPLIES aa*bb <= 1")
       (("1"
         (rewrite -1)
         (("1"
           (expand "max" 1)
           (lift-if)
           (ground)
           (lemma "exp_increasing")
           (expand "increasing?")
           (inst - "x!1" "0")
           (assert))
          ("2"
           (lemma "both_sides_expt_pos_le")
           (inst - "1+2*n!1" "-x!1" "1")
           (assert))
          ("3" (assert) (lemma "nnreal_expt") (expand "^") (inst?))))
        ("2" (hide-all-but 1) (skeep) (mult-ineq -1 -2) (assert))))))
    ("2"
     (hide 2)
     (expand "exp_neg_le1_ub")
     (name "FF" "LAMBDA (nn:nat): exp_estimate(x!1, 2 * nn)")
     (comment "this part of the proof changed 1/30/2013 by Anthony")
     ";;; this part of the proof changed 1/30/2013 by Anthony"
     (case "FORALL (nn:nat): FF(nn+1) < FF(nn)")
     (("1"
       (case "FORALL (epsil:posreal): EXISTS (M:nat): FORALL (nn:nat): nn>=M IMPLIES abs(exp(x!1)-exp_estimate(x!1,nn)) < epsil")
       (("1"
         (case "FORALL (nn,mm:nat): mm>nn IMPLIES FF(mm) < FF(nn)")
         (("1"
           (hide -3)
           (inst-cp - "n!1" "n!1+1")
           (assert)
           (case "NOT exp(x!1)>=FF(n!1)")
           (("1" (expand "FF" 1) (assert))
            ("2"
             (inst -4 "(exp(x!1) - FF(1+n!1))/2")
             (("1"
               (skeep -4)
               (case "EXISTS (KK:posnat): 2*KK > M AND KK > 1+n!1")
               (("1"
                 (skeep -1)
                 (inst -6 "2*KK")
                 (assert)
                 (inst - "1+n!1" "KK")
                 (assert)
                 (expand "FF")
                 (assert))
                ("2"
                 (hide-all-but 1)
                 (inst + "max(M+1,2+n!1)")
                 (grind))))
              ("2" (assert))))))
          ("2"
           (hide 2)
           (hide -1)
           (case "FORALL (nn,mm:nat): FF(nn+1+mm) <= FF(nn+1)")
           (("1"
             (skeep)
             (case "mm = nn+1")
             (("1" (inst -4 "nn") (assert))
              ("2"
               (assert)
               (inst - "nn" "mm-1-nn")
               (assert)
               (inst - "nn")
               (assert))))
            ("2"
             (hide 2)
             (induct "mm")
             (("1" (assert))
              ("2"
               (skeep)
               (skeep)
               (assert)
               (inst - "nn")
               (assert)
               (inst - "(1+j+nn)")
               (assert))))))))
        ("2"
         (hide (-1 -2 2))
         (lemma "exp_taylors_err")
         (lemma "archimedean")
         (skeep)
         (inst - "epsil")
         (skosimp*)
         (inst + "n!2 + 2")
         (skeep)
         (inst - "nn" "x!1")
         (case "(max(exp(x!1), 1) * abs(x!1) ^ (1 + nn)) <= 1")
         (("1"
           (mult-by -1 "1/factorial(1+nn)")
           (assert)
           (case "1/factorial(1+nn) < 1/n!2")
           (("1" (assert))
            ("2"
             (cross-mult 1)
             (case "FORALL (kkr:nat): factorial(1+kkr)>=kkr")
             (("1" (assert) (inst - "nn") (assert))
              ("2"
               (hide-all-but 1)
               (induct "kkr")
               (("1" (assert))
                ("2"
                 (skeep)
                 (assert)
                 (expand "factorial" +)
                 (assert))))))))
          ("2"
           (case "FORALL (aa,bb:nnreal): aa<=1 AND bb<=1 IMPLIES aa*bb <= 1")
           (("1"
             (rewrite -1)
             (("1"
               (expand "max" 1)
               (lift-if)
               (ground)
               (lemma "exp_increasing")
               (expand "increasing?")
               (inst - "x!1" "0")
               (assert))
              ("2"
               (lemma "both_sides_expt_pos_le")
               (inst - "1+nn" "abs(x!1)" "1")
               (assert)
               (expand "abs" 1)
               (assert))))
            ("2"
             (hide-all-but 1)
             (skeep)
             (mult-ineq -1 -2)
             (assert))))))))
      ("2"
       (hide (-1 2))
       (skeep)
       (expand "FF")
       (expand "exp_estimate")
       (expand "sigma" + 1)
       (expand "sigma" + 1)
       (case "-(x!1 ^ (1 + 2 * nn)) / factorial(1 + 2 * nn)
                    > (x!1 ^ (2 + 2 * nn)) / factorial(2 + 2 * nn)")
       (("1" (assert))
        ("2"
         (hide 2)
         (case "-(x!1 ^ (1 + 2 * nn)) >=
                      (x!1 ^ (2 + 2 * nn))")
         (("1"
           (cross-mult 1)
           (mult-by -1 "factorial(1+2*nn)")
           (case "2+2*nn > 1")
           (("1"
             (mult-by -1 "-(x!1 ^ (1 + 2 * nn)) * factorial(1 + 2 * nn)")
             (("1" (assert) (expand "factorial" + 1) (assert))
              ("2"
               (hide 2)
               (case "FORALL (aa:real): aa > 0 IMPLIES (aa>=0 AND aa>0)")
               (("1"
                 (rewrite -1)
                 (hide 2)
                 (lemma "posreal_exp")
                 (inst - "(1+2*nn)" "-x!1")
                 (assert)
                 (lemma "mult_expt")
                 (inst - "1+2*nn" "-1" "x!1")
                 (replaces -1)
                 (lemma "not_even_m1_pow")
                 (inst?)
                 (split -)
                 (("1"
                   (replaces -1)
                   (mult-by -1 "factorial(1+2*nn)")
                   (assert))
                  ("2" (lemma "even_or_odd") (inst?) (assert))))
                ("2" (hide-all-but 1) (grind))))))
            ("2" (assert))))
          ("2"
           (hide 2)
           (mult-by -1 "-(x!1 ^ (1 + 2 * nn))")
           (("1" (assert) (expand "^") (expand "expt" + 2) (assert))
            ("2"
             (hide 2)
             (lemma "mult_expt")
             (inst - "1+2*nn" "-1" "x!1")
             (lemma "posreal_exp")
             (inst - "1+2*nn" "-x!1")
             (replaces -2)
             (lemma "not_even_m1_pow")
             (inst?)
             (split -)
             (("1" (assert))
              ("2" (lemma "even_or_odd") (inst?) (assert))))))))))))))


proof_type: f_proof
decl_type: formula
library: lnexp_fnd
theory: exp_approx
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skeep)
   (lemma "exp_neg_le1_bounds")
   (inst?)
   (assert)
   (flatten)
   (expand "exp_neg_le1_lb")
   (expand "exp_neg_le1_ub")
   (assert)
   (case "1000001/1000000 / factorial(1 + 2 * pn) < exp(x)")
   (("1" (assert))
    ("2"
     (lemma "exp_increasing")
     (expand "increasing?")
     (inst - "-1" "x")
     (assert)
     (case "1000001/1000000 / factorial(1 + 2 * pn) < exp(-1)")
     (("1" (assert))
      ("2"
       (hide-all-but 1)
       (lemma "e_bnds")
       (rewrite "exp_int")
       (expand "^")
       (expand "expt")
       (expand "expt")
       (cross-mult 1)
       (case "FORALL (kk:posnat): factorial(1+2*kk) > 4*1000001/1000000")
       (("1" (inst?) (ground))
        ("2"
         (hide-all-but 1)
         (induct "kk")
         (("1" (assert)) ("2" (assert))
          ("3"
           (skeep)
           (assert)
           (case "j = 0")
           (("1" (assert) (replaces -1) (hide -) (grind))
            ("2"
             (assert)
             (expand "factorial" +)
             (expand "factorial" +)
             (assert))))))))))))


proof_type: f_proof
decl_type: formula
library: lnexp_fnd
theory: exp_approx
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (case "FORALL (n: nat, x: real): n<=exp_approx_term_cutoff IMPLIES
                 exp_lb(x, n) <= exp(x) AND exp(x) <= exp_ub(x, n)")
   (("1"
     (skeep)
     (inst - "min(n,exp_approx_term_cutoff)" "x")
     (("1"
       (assert)
       (split -)
       (("1"
         (expand "exp_lb")
         (expand "exp_ub")
         (expand "min")
         (lift-if)
         (ground))
        ("2" (assert))))
      ("2" (assert) (hide 2) (grind))))
    ("2"
     (hide 2)
     (skosimp)
     (lemma "trichotomy" ("x" "x!1"))
     (split -1)
     (("1"
       (expand "exp_lb")
       (expand "exp_ub")
       (expand "exp_ub_n")
       (expand "exp_lb_n")
       (assert)
       (lift-if)
       (ground)
       (("1"
         (lemma "exp_neg_bounds" ("n" "n!1" "nx" "-x!1"))
         (flatten)
         (lemma "exp_diff" ("x" "0" "y" "x!1"))
         (rewrite "exp_0")
         (replace -1)
         (assert)
         (cross-mult 1)
         (cross-mult -3))
        ("2"
         (lemma "exp_neg_bounds" ("n" "n!1" "nx" "-x!1"))
         (flatten)
         (lemma "exp_diff" ("x" "0" "y" "x!1"))
         (rewrite "exp_0")
         (replace -1)
         (assert)
         (cross-mult -2)
         (cross-mult 1))
        ("3"
         (case "FORALL (aa,bb:real): aa<=exp(x!1) AND bb<=exp(x!1) IMPLIES max(aa,bb)<=exp(x!1)")
         (("1"
           (rewrite -1)
           (("1"
             (hide (-1 2))
             (lemma "exp_increasing")
             (expand "increasing?")
             (inst - "exp_approx_int_cutoff" "x!1")
             (assert)
             (case "1/exp_neg_ub(n!1,-exp_approx_int_cutoff)<=exp(exp_approx_int_cutoff)")
             (("1" (assert))
              ("2"
               (hide 2)
               (lemma "exp_neg_bounds"
                ("n" "n!1" "nx" "-exp_approx_int_cutoff"))
               (flatten)
               (lemma "exp_diff")
               (inst - "0" "exp_approx_int_cutoff")
               (assert)
               (replace -1)
               (cross-mult -3)
               (cross-mult 1))))
            ("2"
             (lemma "exp_increasing")
             (expand "increasing?")
             (inst - "floor(x!1)" "x!1")
             (assert)
             (rewrite "exp_int" -1)
             (lemma "both_sides_expt_pos_le_aux")
             (inst - "floor(x!1)-1" "2" "e")
             (assert)
             (expand "^")
             (assert)
             (lemma "e_bnds")
             (ground))))
          ("2" (hide-all-but 1) (grind :exclude "exp"))))
        ("4"
         (case "FORALL (aa,bb:real): exp(x!1)<=bb IMPLIES exp(x!1)<=max(aa,bb)")
         (("1"
           (inst?)
           (ground)
           (hide 2)
           (lemma "exp_increasing")
           (expand "increasing?")
           (inst - "x!1" "1+floor(x!1)")
           (assert)
           (lemma "exp_int")
           (inst - "1+floor(x!1)")
           (replaces -1)
           (lemma "both_sides_expt_pos_le_aux")
           (inst - "floor(x!1)" "e" "4")
           (expand "^")
           (lemma "e_bnds")
           (ground))
          ("2" (hide-all-but 1) (grind :exclude "exp"))))))
      ("2"
       (replaces -1)
       (assert)
       (expand "exp_lb")
       (expand "exp_ub")
       (assert)
       (expand "exp_lb_n")
       (expand "exp_ub_n")
       (assert))
      ("3"
       (expand "exp_lb")
       (expand "exp_lb_n")
       (assert)
       (expand "exp_ub")
       (expand "exp_ub_n")
       (assert)
       (lift-if)
       (ground)
       (("1"
         (expand "exp_neg_lb")
         (lemma "exp_neg_bounds")
         (expand "exp_neg_lb")
         (inst?)
         (assert))
        ("2" (lemma "exp_neg_bounds") (inst?) (assert))
        ("3"
         (case "FORALL (aa,bb:real): bb<=exp(x!1) IMPLIES min(aa,bb)<=exp(x!1)")
         (("1"
           (rewrite -1)
           (hide 2)
           (lemma "exp_increasing")
           (expand "increasing?")
           (inst - "floor(x!1)" "x!1")
           (assert)
           (lemma "exp_int")
           (inst - "floor(x!1)")
           (replaces -1)
           (expand "^")
           (invoke (case "%1 <= %2") (! 1 1) (! -1 1))
           (("1" (assert))
            ("2"
             (hide (-1 2))
             (assert)
             (cross-mult 1)
             (lemma "both_sides_expt_pos_le_aux")
             (inst - "-floor(x!1)-1" "e" "4")
             (assert)
             (lemma "e_bnds")
             (assert))))
          ("2" (hide-all-but 1) (grind :exclude "exp"))))
        ("4"
         (lemma "exp_increasing")
         (expand "increasing?")
         (inst - "x!1" "-exp_approx_int_cutoff")
         (assert)
         (lemma "exp_neg_bounds")
         (inst - "n!1" "-exp_approx_int_cutoff")
         (assert))))))))


proof_type: f_proof
decl_type: formula
library: lnexp_fnd
theory: exp_approx
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skeep)
   (skoletin 1)
   (expand "increasing?")
   (skosimp*)
   (expand "exp_neg_ub")
   (expand "exp_neg_le1_ub")
   (name "FF"
         "LAMBDA (xn:negreal,nn:posnat): exp_estimate(xn / nn,2+2*n) ^ nn")
   (label "FFname" -1)
   (case "FF(x!1,-floor(x!1)) <= FF(y!1,-floor(y!1))")
   (("1" (expand "FF") (propax))
    ("2"
     (hide 2)
     (case "FORALL (NN:nat,MM:nat,xx,yy:(TT)): xx<=yy AND MM<=NN AND MM = floor(yy)-floor(xx) IMPLIES FF(xx,-floor(xx)) <= FF(yy,-floor(yy))")
     (("1"
       (assert)
       (inst - "floor(y!1)-floor(x!1)" "floor(y!1)-floor(x!1)" "x!1"
        "y!1")
       (assert))
      ("2"
       (assert)
       (hide (-2 2))
       (induct "NN")
       (("1"
         (skeep)
         (case "MM = 0")
         (("1"
           (assert)
           (hide -3)
           (case "floor(yy) = floor(xx)")
           (("1"
             (hide -4)
             (hide -2)
             (label "flooreq" -1)
             (replace -1)
             (assert)
             (lemma "exp_estimate_increasing")
             (inst - "2+2*n" "xx/-floor(yy)" "yy/-floor(yy)")
             (assert)
             (split -)
             (("1"
               (lemma "both_sides_expt_pos_le")
               (expand "FF" +)
               (inst?)
               (("1" (assert))
                ("2"
                 (hide 2)
                 (assert)
                 (lemma "exp_estimate_positive")
                 (inst?)
                 (split -)
                 (("1" (assert)) ("2" (assert)) ("3" (cross-mult 1))))
                ("3"
                 (lemma "exp_estimate_positive")
                 (inst?)
                 (assert)
                 (split -)
                 (("1" (assert)) ("2" (cross-mult 1))))))
              ("2" (assert) (cross-mult 1))
              ("3"
               (assert)
               (mult-by -2 "1/-floor(yy)")
               (("1" (assert)) ("2" (cross-mult 1))))))
            ("2" (assert))))
          ("2" (assert))))
        ("2"
         (skeep)
         (case "NOT j = 0")
         (("1"
           (skeep)
           (case "NOT MM = j+1")
           (("1" (inst - "MM" "xx" "yy") (assert))
            ("2"
             (replaces -1)
             (assert)
             (inst-cp - "1" "xx" "xx+1")
             (("1"
               (assert)
               (split -)
               (("1"
                 (inst - "j" "xx+1" "yy")
                 (("1" (assert))
                  ("2"
                   (assert)
                   (expand "TT")
                   (typepred "xx")
                   (expand "TT")
                   (assert))))
                ("2" (assert))))
              ("2" (typepred "xx") (expand "TT") (assert))))))
          ("2"
           (replaces -1)
           (assert)
           (skeep)
           (case "NOT MM = 1")
           (("1" (inst - "0" "xx" "yy") (assert))
            ("2"
             (replaces -1)
             (hide -3)
             (assert)
             (inst - "0" "floor(yy)" "yy")
             (("1"
               (assert)
               (assert)
               (lemma "floor_int")
               (inst - "floor(yy)")
               (replaces -1)
               (case "FF(xx,-floor(xx)) <= FF(floor(yy),-floor(yy))")
               (("1" (assert))
                ("2"
                 (case "NOT floor(yy) = floor(xx)+1")
                 (("1" (assert))
                  ("2"
                   (hide -4)
                   (replaces -1)
                   (case "FF(floor(xx)+1,-floor(xx)) <= FF(floor(xx) + 1, -(floor(xx) + 1)) AND FF(xx,-floor(xx)) <= FF(floor(xx)+1,-floor(xx))")
                   (("1" (flatten) (assert))
                    ("2"
                     (hide (2 3 -1))
                     (split +)
                     (("1"
                       (hide -1)
                       (case "FORALL (N:posnat): N<=exp_approx_int_cutoff AND N>=2 IMPLIES FF(-N+1,N) <= FF(-N+1,N-1)")
                       (("1"
                         (inst - "-floor(xx)")
                         (assert)
                         (typepred "xx")
                         (expand "TT")
                         (assert))
                        ("2"
                         (hide 2)
                         (skeep)
                         (expand "FF")
                         (lemma "exp_range_test")
                         (inst - "N-1" "1+n")
                         (("1"
                           (assert)
                           (case "(1+-N)/(N-1) = -1")
                           (("1" (assert) (replaces -1) (assert))
                            ("2" (cross-mult 1))))
                          ("2" (assert))))
                        ("3" (skosimp*) (assert))
                        ("4" (skosimp*) (assert))))
                      ("2"
                       (expand "FF" +)
                       (lemma "both_sides_expt_pos_le")
                       (inst?)
                       (("1"
                         (assert)
                         (hide 2)
                         (lemma "exp_estimate_increasing")
                         (inst?)
                         (assert)
                         (split)
                         (("1" (cross-mult 1))
                          ("2"
                           (typepred "floor(xx)")
                           (mult-by -2 "1/-floor(xx)")
                           (("1" (assert))
                            ("2"
                             (split)
                             (("1" (cross-mult 1))
                              ("2" (cross-mult 1))))))))
                        ("2"
                         (hide 2)
                         (case "FORALL (rr:real): rr>0 IMPLIES (rr>=0 AND rr>0)")
                         (("1"
                           (rewrite -1)
                           (hide 2)
                           (lemma "exp_estimate_positive")
                           (inst?)
                           (assert)
                           (cross-mult 1))
                          ("2" (assert) (skeep) (assert))))
                        ("3"
                         (hide 2)
                         (case "FORALL (rr:real): rr>0 IMPLIES (rr>=0 AND rr>0)")
                         (("1"
                           (rewrite -1)
                           (hide 2)
                           (lemma "exp_estimate_positive")
                           (inst?)
                           (assert)
                           (cross-mult 1))
                          ("2" (skosimp*) (assert))))))))))))))
              ("2" (typepred "yy") (expand "TT") (assert))))))))
        ("3" (hide 2) (skosimp*) (assert)) ("4" (skosimp*) (assert))))
      ("3" (skosimp*) (assert)) ("4" (skosimp*) (assert))))
    ("3" (assert)) ("4" (assert))))


proof_type: f_proof
decl_type: formula
library: lnexp_fnd
theory: exp_approx
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skeep)
   (skoletin 1)
   (expand "increasing?")
   (skosimp*)
   (expand "exp_neg_lb")
   (expand "exp_neg_le1_lb")
   (name "FF"
         "LAMBDA (xn:negreal,nn:posnat): (exp_estimate(xn / nn,2+2*n)- 1.000001/factorial(2*n+3)) ^ nn")
   (label "FFname" -1)
   (case "FF(x!1,-floor(x!1)) <= FF(y!1,-floor(y!1))")
   (("1" (expand "FF") (propax))
    ("2"
     (hide 2)
     (case "FORALL (NN:nat,MM:nat,xx,yy:(TT)): xx<=yy AND MM<=NN AND MM = floor(yy)-floor(xx) IMPLIES FF(xx,-floor(xx)) <= FF(yy,-floor(yy))")
     (("1"
       (assert)
       (inst - "floor(y!1)-floor(x!1)" "floor(y!1)-floor(x!1)" "x!1"
        "y!1")
       (assert))
      ("2"
       (assert)
       (hide (-2 2))
       (induct "NN")
       (("1"
         (skeep)
         (case "MM = 0")
         (("1"
           (assert)
           (hide -3)
           (case "floor(yy) = floor(xx)")
           (("1"
             (hide -4)
             (hide -2)
             (label "flooreq" -1)
             (replace -1)
             (assert)
             (lemma "exp_estimate_increasing")
             (inst - "2+2*n" "xx/-floor(yy)" "yy/-floor(yy)")
             (assert)
             (split -)
             (("1"
               (lemma "both_sides_expt_pos_le")
               (expand "FF" +)
               (inst?)
               (("1" (assert))
                ("2"
                 (hide 2)
                 (lemma "exp_neg_le1_lb_pos")
                 (expand "exp_neg_le1_lb")
                 (inst - "n+1" "yy/-floor(xx)")
                 (assert)
                 (split -)
                 (("1" (assert)) ("2" (assert) (cross-mult 1))
                  ("3" (assert) (cross-mult 1))))
                ("3"
                 (lemma "exp_neg_le1_lb_pos")
                 (expand "exp_neg_le1_lb")
                 (inst - "n+1" "xx/-floor(xx)")
                 (assert)
                 (split -)
                 (("1" (assert)) ("2" (cross-mult 1))
                  ("3" (assert) (cross-mult 1))))))
              ("2" (assert) (cross-mult 1))
              ("3"
               (assert)
               (mult-by -2 "1/-floor(yy)")
               (("1" (assert)) ("2" (cross-mult 1))))))
            ("2" (assert))))
          ("2" (assert))))
        ("2"
         (skeep)
         (case "NOT j = 0")
         (("1"
           (skeep)
           (case "NOT MM = j+1")
           (("1" (inst - "MM" "xx" "yy") (assert))
            ("2"
             (replaces -1)
             (assert)
             (inst-cp - "1" "xx" "xx+1")
             (("1"
               (assert)
               (split -)
               (("1"
                 (inst - "j" "xx+1" "yy")
                 (("1" (assert))
                  ("2"
                   (assert)
                   (expand "TT")
                   (typepred "xx")
                   (expand "TT")
                   (assert))))
                ("2" (assert))))
              ("2" (typepred "xx") (expand "TT") (assert))))))
          ("2"
           (replaces -1)
           (assert)
           (skeep)
           (case "NOT MM = 1")
           (("1" (inst - "0" "xx" "yy") (assert))
            ("2"
             (replaces -1)
             (hide -3)
             (assert)
             (inst - "0" "floor(yy)" "yy")
             (("1"
               (assert)
               (assert)
               (lemma "floor_int")
               (inst - "floor(yy)")
               (replaces -1)
               (case "FF(xx,-floor(xx)) <= FF(floor(yy),-floor(yy))")
               (("1" (assert))
                ("2"
                 (case "NOT floor(yy) = floor(xx)+1")
                 (("1" (assert))
                  ("2"
                   (hide -4)
                   (replaces -1)
                   (case "FF(floor(xx)+1,-floor(xx)) <= FF(floor(xx) + 1, -(floor(xx) + 1)) AND FF(xx,-floor(xx)) <= FF(floor(xx)+1,-floor(xx))")
                   (("1" (flatten) (assert))
                    ("2"
                     (hide (2 3 -1))
                     (split +)
                     (("1"
                       (hide -1)
                       (case "FORALL (N:posnat): N<=exp_approx_int_cutoff AND N>=2 IMPLIES FF(-N+1,N) <= FF(-N+1,N-1)")
                       (("1"
                         (inst - "-floor(xx)")
                         (assert)
                         (typepred "xx")
                         (expand "TT")
                         (assert))
                        ("2"
                         (hide 2)
                         (skeep)
                         (expand "FF")
                         (lemma "exp_range_test_lb")
                         (inst - "N-1" "n+1")
                         (("1"
                           (assert)
                           (case "(1-N)/(N-1) = -1")
                           (("1" (replaces -1) (assert)) ("2" (assert))))
                          ("2" (assert))))
                        ("3" (skosimp*) (assert))
                        ("4" (skosimp*) (assert))))
                      ("2"
                       (expand "FF" +)
                       (lemma "both_sides_expt_pos_le")
                       (inst?)
                       (("1"
                         (assert)
                         (hide 2)
                         (lemma "exp_estimate_increasing")
                         (inst - "2+2*n" "xx/-floor(xx)"
                          "(1+floor(xx))/-floor(xx)")
                         (assert)
                         (split)
                         (("1" (cross-mult 1))
                          ("2"
                           (typepred "floor(xx)")
                           (mult-by -2 "1/-floor(xx)")
                           (("1" (assert))
                            ("2"
                             (split)
                             (("1" (cross-mult 1))
                              ("2" (cross-mult 1))))))))
                        ("2"
                         (hide 2)
                         (case "FORALL (rr:real): rr>0 IMPLIES (rr>=0 AND rr>0)")
                         (("1"
                           (rewrite -1)
                           (hide 2)
                           (lemma "exp_neg_le1_lb_pos")
                           (expand "exp_neg_le1_lb")
                           (inst - "n+1" "(1+floor(xx))/-floor(xx)")
                           (assert)
                           (split)
                           (("1" (cross-mult 1)) ("2" (cross-mult 1))))
                          ("2" (assert) (skeep) (assert))))
                        ("3"
                         (hide 2)
                         (case "FORALL (rr:real): rr>0 IMPLIES (rr>=0 AND rr>0)")
                         (("1"
                           (rewrite -1)
                           (hide 2)
                           (lemma "exp_neg_le1_lb_pos")
                           (expand "exp_neg_le1_lb")
                           (inst - "n+1" _)
                           (inst?)
                           (assert)
                           (split)
                           (("1" (cross-mult 1)) ("2" (cross-mult 1))))
                          ("2" (skosimp*) (assert))))))))))))))
              ("2" (typepred "yy") (expand "TT") (assert))))))))
        ("3" (hide 2) (skosimp*) (assert)) ("4" (skosimp*) (assert))))
      ("3" (skosimp*) (assert)) ("4" (skosimp*) (assert))))
    ("3" (assert)) ("4" (assert))))


proof_type: f_proof
decl_type: formula
library: lnexp_fnd
theory: exp_approx
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (case "(FORALL (n: nat): increasing?(LAMBDA (xn: negreal): exp_ub(xn, n))) AND (FORALL (n: nat): increasing?(LAMBDA (xp: posreal): exp_ub(xp, n))) AND (FORALL (n: nat): FORALL (xn:negreal): exp_ub(xn, n)<=1) AND (FORALL (n: nat): FORALL (xp:posreal): exp_ub(xp, n)>=1)")
   (("1"
     (flatten)
     (skeep)
     (inst - "n")
     (inst - "n")
     (inst - "n")
     (inst -4 "n")
     (assert)
     (expand "increasing?")
     (skosimp*)
     (case "y!1 < 0")
     (("1"
       (inst - "x!1" "y!1")
       (("1" (assert)) ("2" (assert)) ("3" (assert))))
      ("2"
       (case "x!1 > 0")
       (("1"
         (inst -3 "x!1" "y!1")
         (("1" (assert)) ("2" (assert)) ("3" (assert))))
        ("2"
         (assert)
         (case "exp_ub(0,n) = 1")
         (("1"
           (assert)
           (case "exp_ub(x!1,n)<=1")
           (("1"
             (case "exp_ub(y!1,n)>=1")
             (("1" (assert)) ("2" (inst -6 "y!1") (assert))))
            ("2" (inst -4 "x!1") (assert))))
          ("2" (expand "exp_ub" 1) (expand "exp_ub_n") (propax))))))))
    ("2"
     (hide 2)
     (split)
     (("1"
       (lemma "exp_neg_ub_increasing")
       (skeep)
       (inst - "min(n,exp_approx_term_cutoff)")
       (("1"
         (expand "increasing?")
         (skosimp*)
         (assert)
         (case "min(n,30)<=30")
         (("1"
           (assert)
           (hide -1)
           (expand "exp_ub")
           (name "kk" "min(n,30)")
           (case "exp_ub_n(x!1,kk) <= exp_ub_n(y!1,kk)")
           (("1"
             (hide-all-but (-1 1))
             (expand "kk")
             (grind :exclude "exp_ub_n"))
            ("2"
             (hide 2)
             (expand "exp_ub_n")
             (lift-if)
             (lift-if)
             (assert)
             (lift-if)
             (assert)
             (ground)
             (("1" (inst - "x!1" "y!1") (assert))
              ("2" (inst - "-60" "y!1") (assert))))
            ("3" (assert) (hide-all-but 1) (expand "kk") (grind))))
          ("2" (expand "min") (lift-if) (ground))))
        ("2" (hide-all-but 1) (grind))))
      ("2"
       (lemma "exp_neg_ub_increasing")
       (skeep)
       (inst - "min(n,exp_approx_term_cutoff)")
       (("1"
         (expand "increasing?")
         (skosimp*)
         (assert)
         (case "min(n,30)<=30")
         (("1"
           (assert)
           (hide -1)
           (expand "exp_ub")
           (name "kk" "min(n,30)")
           (case "exp_ub_n(x!1,kk) <= exp_ub_n(y!1,kk)")
           (("1"
             (hide-all-but (-1 1))
             (expand "kk")
             (grind :exclude "exp_ub_n"))
            ("2"
             (hide 2)
             (expand "exp_ub_n")
             (lift-if)
             (lift-if)
             (assert)
             (ground)
             (("1"
               (cross-mult 1)
               (lemma "exp_neg_lb_increasing")
               (inst - "kk")
               (("1"
                 (assert)
                 (expand "increasing?")
                 (inst - "-y!1" "-x!1")
                 (assert))
                ("2" (assert) (expand "min") (lift-if) (ground))))
              ("2"
               (hide 1)
               (case "FORALL (aa,bb,cc:real): aa<=bb IMPLIES aa<=max(bb,cc)")
               (("1"
                 (rewrite -1)
                 (("1"
                   (hide 2)
                   (cross-mult 1)
                   (lemma "exp_neg_lb_increasing")
                   (inst - "kk")
                   (("1"
                     (assert)
                     (expand "increasing?")
                     (inst - "-60" "-x!1")
                     (assert))
                    ("2" (expand "min") (lift-if) (ground))))
                  ("2" (expand "min") (lift-if) (ground))))
                ("2" (hide-all-but 1) (grind))))
              ("3"
               (lemma "both_sides_expt_gt1_lt")
               (inst - "4" "1+floor(x!1)" "1+floor(y!1)")
               (expand "max")
               (lift-if)
               (lift-if)
               (lift-if)
               (assert))))
            ("3" (expand "min") (lift-if) (ground))))
          ("2" (expand "min") (lift-if) (ground))))
        ("2" (expand "min") (lift-if) (ground))))
      ("3"
       (skeep)
       (skeep)
       (expand "exp_ub")
       (name "KK" "min(n,30)")
       (case "exp_ub_n(xn,KK) <=1")
       (("1" (lift-if) (expand "min") (lift-if) (ground))
        ("2"
         (hide 2)
         (expand "exp_ub_n")
         (name "XK" "max(-60,xn)")
         (case "exp_neg_ub(KK,XK) <= 1")
         (("1" (expand "max") (lift-if) (ground))
          ("2"
           (hide 2)
           (expand "exp_neg_ub")
           (lemma "both_sides_expt_pos_ge")
           (inst - "-floor(XK)" "1"
            "exp_neg_le1_ub(1 + KK, XK / -floor(XK))")
           (("1"
             (assert)
             (hide 2)
             (expand "exp_neg_le1_ub")
             (lemma "exp_estimate_increasing")
             (inst - "2+2*KK" "XK/-floor(XK)" "0")
             (("1"
               (assert)
               (split -)
               (("1"
                 (rewrite "exp_estimate_0")
                 (("1" (assert))
                  ("2" (expand "min") (lift-if) (ground))))
                ("2"
                 (cross-mult 1)
                 (ground)
                 (expand "max")
                 (lift-if)
                 (ground))
                ("3" (cross-mult 1))))
              ("2" (expand "min") (lift-if) (ground))))
            ("2"
             (case "FORALL (rr:real): rr>0 IMPLIES (rr>=0 AND rr > 0)")
             (("1"
               (rewrite -1)
               (("1"
                 (hide 2)
                 (hide 2)
                 (lemma "exp_neg_le1_lb_pos")
                 (inst - "1+KK" _)
                 (("1"
                   (inst - "XK/-floor(XK)")
                   (assert)
                   (expand "exp_neg_le1_lb")
                   (expand "exp_neg_le1_ub")
                   (assert)
                   (ground)
                   (("1"
                     (cross-mult 1)
                     (ground)
                     (expand "max")
                     (lift-if)
                     (ground))
                    ("2"
                     (cross-mult 1)
                     (ground)
                     (expand "max")
                     (lift-if)
                     (ground))))
                  ("2" (expand "min") (lift-if) (ground))))
                ("2" (expand "min") (lift-if) (ground))))
              ("2" (hide-all-but 1) (grind))))
            ("3" (expand "min") (lift-if) (ground))
            ("4" (expand "max") (lift-if) (ground))))
          ("3" (expand "max") (lift-if) (ground))))
        ("3" (expand "min") (lift-if) (ground))))
      ("4"
       (skeep)
       (skeep)
       (expand "exp_ub")
       (name "KK" "min(n,30)")
       (case "exp_ub_n(xp,KK) >=1")
       (("1" (expand "min") (lift-if) (ground))
        ("2"
         (hide 2)
         (expand "exp_ub_n")
         (lift-if)
         (ground)
         (("1"
           (cross-mult 1)
           (lemma "exp_neg_lb_increasing")
           (inst - "KK")
           (("1"
             (assert)
             (expand "increasing?")
             (expand "exp_neg_lb")
             (assert)
             (lemma "both_sides_expt_pos_ge")
             (inst - "-floor(-xp)" "1"
              "exp_neg_le1_lb(1 + KK, -xp / -floor(-xp))")
             (("1"
               (assert)
               (hide 2)
               (expand "exp_neg_le1_lb")
               (lemma "exp_estimate_increasing")
               (inst - "2+2*KK" "-xp / -floor(-xp)" "0")
               (("1"
                 (assert)
                 (split -)
                 (("1"
                   (rewrite "exp_estimate_0")
                   (("1" (assert))
                    ("2" (expand "min") (lift-if) (ground))))
                  ("2" (hide -1) (cross-mult 1)) ("3" (cross-mult 1))))
                ("2" (expand "min") (lift-if) (ground))))
              ("2"
               (case "FORALL (rr:real): rr>0 IMPLIES (rr>=0 AND rr > 0)")
               (("1"
                 (rewrite -1)
                 (("1"
                   (hide (-1 -2))
                   (hide 2)
                   (lemma "exp_neg_le1_lb_pos")
                   (inst?)
                   (("1"
                     (assert)
                     (split)
                     (("1" (cross-mult 1)) ("2" (cross-mult 1))))
                    ("2" (expand "min") (lift-if) (ground))))
                  ("2" (expand "min") (lift-if) (ground))))
                ("2" (hide-all-but 1) (grind))))
              ("3" (expand "min") (lift-if) (ground))))
            ("2" (expand "min") (lift-if) (ground))))
          ("2"
           (case "floor(xp) >= 1")
           (("1"
             (lemma "both_sides_expt_pos_ge")
             (inst - "1+floor(xp)" "4" "1")
             (assert))
            ("2" (assert))))))
        ("3" (expand "min") (lift-if) (ground))))))))


proof_type: f_proof
decl_type: formula
library: lnexp_fnd
theory: exp_approx
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (case "(FORALL (n: nat): increasing?(LAMBDA (xn: negreal): exp_lb(xn, n))) AND (FORALL (n: nat): increasing?(LAMBDA (xp: posreal): exp_lb(xp, n))) AND (FORALL (n: nat): FORALL (xn:negreal): exp_lb(xn, n)<=1) AND (FORALL (n: nat): FORALL (xp:posreal): exp_lb(xp, n)>=1)")
   (("1"
     (flatten)
     (skeep)
     (inst - "n")
     (inst - "n")
     (inst - "n")
     (inst -4 "n")
     (assert)
     (expand "increasing?")
     (skosimp*)
     (case "y!1 < 0")
     (("1"
       (inst - "x!1" "y!1")
       (("1" (assert)) ("2" (assert)) ("3" (assert))))
      ("2"
       (case "x!1 > 0")
       (("1"
         (inst -3 "x!1" "y!1")
         (("1" (assert)) ("2" (assert)) ("3" (assert))))
        ("2"
         (assert)
         (case "exp_lb(0,n) = 1")
         (("1"
           (assert)
           (case "exp_lb(x!1,n)<=1")
           (("1"
             (case "exp_lb(y!1,n)>=1")
             (("1" (assert)) ("2" (inst -6 "y!1") (assert))))
            ("2" (inst -4 "x!1") (assert))))
          ("2" (expand "exp_lb" 1) (expand "exp_lb_n") (propax))))))))
    ("2"
     (hide 2)
     (split)
     (("1"
       (lemma "exp_neg_lb_increasing")
       (skeep)
       (inst - "min(n,exp_approx_term_cutoff)")
       (("1"
         (expand "increasing?")
         (skosimp*)
         (assert)
         (case "min(n,30)<=30")
         (("1"
           (assert)
           (expand "exp_lb")
           (name "kk" "min(n,30)")
           (case "exp_lb_n(x!1,kk) <= exp_lb_n(y!1,kk)")
           (("1"
             (hide-all-but (-1 1))
             (expand "kk")
             (grind :exclude "exp_lb_n"))
            ("2"
             (hide 2)
             (expand "exp_lb_n")
             (lift-if)
             (lift-if)
             (assert)
             (lift-if)
             (ground)
             (("1" (inst - "x!1" "y!1") (assert))
              ("2" (inst - "-60" "y!1") (assert))
              ("3"
               (lemma "both_sides_expt_gt1_lt")
               (inst - "4" "floor(x!1)" "floor(y!1)")
               (assert)
               (expand "min")
               (lift-if)
               (lift-if)
               (lift-if)
               (ground))))
            ("3" (expand "min") (lift-if) (ground))))
          ("2" (hide-all-but 1) (grind))))
        ("2" (hide-all-but 1) (grind))))
      ("2"
       (lemma "exp_neg_lb_increasing")
       (skeep)
       (inst - "min(n,exp_approx_term_cutoff)")
       (("1"
         (expand "increasing?")
         (skosimp*)
         (assert)
         (case "min(n,30)<=30")
         (("1"
           (assert)
           (hide -1)
           (expand "exp_lb")
           (name "kk" "min(n,30)")
           (case "exp_lb_n(x!1,kk) <= exp_lb_n(y!1,kk)")
           (("1"
             (hide-all-but (-1 1))
             (expand "kk")
             (grind :exclude "exp_lb_n"))
            ("2"
             (hide 2)
             (expand "exp_lb_n")
             (lift-if)
             (lift-if)
             (assert)
             (ground)
             (("1"
               (cross-mult 1)
               (lemma "exp_neg_ub_increasing")
               (inst - "kk")
               (("1"
                 (assert)
                 (expand "increasing?")
                 (inst - "-y!1" "-x!1")
                 (assert))
                ("2" (assert) (expand "min") (lift-if) (ground))))
              ("2"
               (hide 1)
               (case "FORALL (aa,bb,cc:real): aa<=bb IMPLIES aa<=max(bb,cc)")
               (("1"
                 (rewrite -1)
                 (("1"
                   (hide 2)
                   (cross-mult 1)
                   (lemma "exp_neg_ub_increasing")
                   (inst - "kk")
                   (("1"
                     (assert)
                     (expand "increasing?")
                     (inst - "-60" "-x!1")
                     (assert))
                    ("2" (expand "min") (lift-if) (ground))))
                  ("2" (expand "min") (lift-if) (ground))))
                ("2" (hide-all-but 1) (grind))))
              ("3"
               (lemma "both_sides_expt_gt1_lt")
               (inst - "2" "floor(x!1)" "floor(y!1)")
               (expand "max")
               (lift-if)
               (lift-if)
               (lift-if)
               (assert))))
            ("3" (expand "min") (lift-if) (ground))))
          ("2" (expand "min") (lift-if) (ground))))
        ("2" (expand "min") (lift-if) (ground))))
      ("3"
       (skeep)
       (skeep)
       (expand "exp_lb")
       (name "KK" "min(n,30)")
       (case "exp_lb_n(xn,KK) <=1")
       (("1" (lift-if) (expand "min") (lift-if) (ground))
        ("2"
         (hide 2)
         (expand "exp_lb_n")
         (name "XK" "max(-60,xn)")
         (case "exp_neg_lb(KK,XK) <= 1")
         (("1" (expand "max") (lift-if) (ground))
          ("2"
           (hide 2)
           (expand "exp_neg_lb")
           (lemma "both_sides_expt_pos_ge")
           (inst - "-floor(XK)" "1"
            "exp_neg_le1_lb(1 + KK, XK / -floor(XK))")
           (("1"
             (assert)
             (hide 2)
             (expand "exp_neg_le1_lb")
             (lemma "exp_estimate_increasing")
             (inst - "2+2*KK" "XK/-floor(XK)" "0")
             (("1"
               (assert)
               (split -)
               (("1"
                 (rewrite "exp_estimate_0")
                 (("1" (assert))
                  ("2" (expand "min") (lift-if) (ground))))
                ("2"
                 (cross-mult 1)
                 (ground)
                 (expand "max")
                 (lift-if)
                 (ground))
                ("3" (cross-mult 1))))
              ("2" (expand "min") (lift-if) (ground))))
            ("2"
             (case "FORALL (rr:real): rr>0 IMPLIES (rr>=0 AND rr > 0)")
             (("1"
               (rewrite -1)
               (("1"
                 (hide 2)
                 (hide 2)
                 (lemma "exp_neg_le1_lb_pos")
                 (inst?)
                 (("1"
                   (assert)
                   (split)
                   (("1"
                     (cross-mult 1)
                     (ground)
                     (expand "max")
                     (lift-if)
                     (ground))
                    ("2"
                     (cross-mult 1)
                     (ground)
                     (expand "max")
                     (lift-if)
                     (ground))))
                  ("2" (expand "min") (lift-if) (ground))))
                ("2" (expand "min") (lift-if) (ground))))
              ("2" (hide-all-but 1) (grind))))
            ("3" (expand "min") (lift-if) (ground))
            ("4" (expand "max") (lift-if) (ground))))
          ("3" (expand "max") (lift-if) (ground))))
        ("3" (expand "min") (lift-if) (ground))))
      ("4"
       (skeep)
       (skeep)
       (expand "exp_lb")
       (name "KK" "min(n,30)")
       (case "exp_lb_n(xp,KK) >=1")
       (("1" (expand "min") (lift-if) (ground))
        ("2"
         (hide 2)
         (expand "exp_lb_n")
         (lift-if)
         (ground)
         (("1"
           (cross-mult 1)
           (expand "exp_neg_ub")
           (lemma "both_sides_expt_pos_ge")
           (inst - "-floor(-xp)" "1"
            "exp_neg_le1_ub(1 + KK, -xp / -floor(-xp))")
           (("1"
             (assert)
             (hide 2)
             (expand "exp_neg_le1_ub")
             (lemma "exp_estimate_increasing")
             (inst - "2+2*KK" "-xp / -floor(-xp)" "0")
             (("1"
               (assert)
               (rewrite "exp_estimate_0")
               (("1"
                 (assert)
                 (split)
                 (("1" (cross-mult 1)) ("2" (cross-mult 1))))
                ("2" (expand "min") (lift-if) (ground))))
              ("2" (expand "min") (lift-if) (ground))))
            ("2"
             (case "FORALL (rr:real): rr>0 IMPLIES (rr>=0 AND rr > 0)")
             (("1"
               (rewrite -1)
               (("1"
                 (hide (-1 -2))
                 (hide 2)
                 (lemma "exp_neg_le1_lb_pos")
                 (inst - "1+KK" "-xp/-floor(-xp)")
                 (("1"
                   (expand "exp_neg_le1_lb")
                   (expand "exp_neg_le1_ub")
                   (assert)
                   (case "1000001/1000000 / factorial(3 + 2 * KK) > 0")
                   (("1"
                     (assert)
                     (split)
                     (("1" (cross-mult 1)) ("2" (cross-mult 1))))
                    ("2" (assert))
                    ("3" (expand "min") (lift-if) (ground))))
                  ("2" (expand "min") (lift-if) (ground))))
                ("2" (expand "min") (lift-if) (ground))))
              ("2" (hide-all-but 1) (grind))))
            ("3" (expand "min") (lift-if) (ground)) ("4" (assert))))
          ("2"
           (case "floor(xp) >= 1")
           (("1"
             (lemma "both_sides_expt_pos_ge")
             (inst - "floor(xp)" "2" "1")
             (assert))
            ("2" (assert))))))
        ("3" (expand "min") (lift-if) (ground))))))))


proof_type: f_proof
decl_type: formula
library: lnexp_fnd
theory: hyperbolic
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (expand "sinh")
   (lemma "identity_derivable_fun[real]")
   (expand "I")
   (lemma "neg_derivable_fun[real]" ("f" "LAMBDA (x: real): x"))
   (assert)
   (expand "-")
   (lemma "exp_deriv")
   (flatten -1)
   (hide -2)
   (lemma "composition_derivable_fun[real,real]"
    ("f" "LAMBDA (x_1: real): -x_1" "g" "exp"))
   (("1"
     (assert)
     (expand "o")
     (lemma "diff_derivable_fun[real]"
      ("f1" "exp" "f2" "LAMBDA (x: real): exp(-x)"))
     (assert)
     (expand "-")
     (lemma "scal_derivable_fun[real]"
      ("f" "LAMBDA (x: real): exp(x) - exp(-x)" "b" "1/2"))
     (assert)
     (expand "*")
     (assert))
    ("2" (skosimp*) (inst + "x!1+1") (assert))
    ("3" (lemma "deriv_domain_real") (propax))))


proof_type: f_proof
decl_type: formula
library: lnexp_fnd
theory: hyperbolic
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (expand "cosh")
   (lemma "identity_derivable_fun[real]")
   (expand "I")
   (lemma "neg_derivable_fun[real]" ("f" "LAMBDA (x: real): x"))
   (assert)
   (expand "-")
   (lemma "exp_deriv")
   (flatten -1)
   (hide -2)
   (lemma "composition_derivable_fun[real,real]"
    ("f" "LAMBDA (x_1: real): -x_1" "g" "exp"))
   (("1"
     (assert)
     (expand "o")
     (lemma "sum_derivable_fun[real]"
      ("f1" "exp" "f2" "LAMBDA (x: real): exp(-x)"))
     (assert)
     (expand "+")
     (lemma "scal_derivable_fun[real]"
      ("f" "LAMBDA (x_1: real): exp(x_1) + exp(-x_1)" "b" "1/2"))
     (assert)
     (expand "*")
     (assert))
    ("2" (skosimp*) (inst + "x!1+1") (assert))
    ("3" (lemma "deriv_domain_real") (propax))))


proof_type: f_proof
decl_type: formula
library: lnexp_fnd
theory: hyperbolic
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (expand "tanh")
   (lemma "sinh_derivable2")
   (lemma "cosh_derivable2")
   (lemma "div_derivable_fun[real]" ("f" "sinh" "g" "cosh"))
   (("1" (assert) (expand "/") (propax))
    ("2" (hide-all-but 1) (skosimp*) (typepred "cosh(x1!1)") (assert))))


proof_type: f_proof
decl_type: formula
library: lnexp_fnd
theory: hyperbolic
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (lemma "exp_deriv")
   (flatten -1)
   (expand "sinh")
   (expand "cosh")
   (lemma "identity_derivable_fun[real]")
   (lemma "deriv_id_fun[real]")
   (expand "I")
   (lemma "neg_derivable_fun[real]" ("f" "LAMBDA (x: real): x"))
   (assert)
   (expand "-")
   (lemma "deriv_neg_fun[real]" ("ff" "LAMBDA (x: real): x"))
   (replace -3)
   (expand "-")
   (lemma "composition_derivable_fun[real,real]"
    ("f" "LAMBDA (x: real): -x" "g" "exp"))
   (assert)
   (expand "o")
   (lemma "deriv_comp_fun[real,real]"
    ("ff" "LAMBDA (x: real): -x" "gg" "exp"))
   (replace -8)
   (replace -3)
   (expand "o")
   (expand "*")
   (lemma "diff_derivable_fun[real]"
    ("f1" "exp" "f2" "LAMBDA (x: real): exp(-x)"))
   (assert)
   (expand "-")
   (lemma "deriv_diff_fun[real]"
    ("ff1" "exp" "ff2" "LAMBDA (x: real): exp(-x)"))
   (replace -10)
   (replace -3)
   (expand "-")
   (lemma "scal_derivable_fun[real]"
    ("f" "LAMBDA (x_1: real): exp(x_1) - exp(-x_1)" "b" "1/2"))
   (assert)
   (expand "*")
   (lemma "deriv_scal_fun[real]"
    ("ff" "LAMBDA (x_1: real): exp(x_1) - exp(-x_1)" "b" "1/2"))
   (replace -3)
   (expand "*")
   (assert))


proof_type: f_proof
decl_type: formula
library: lnexp_fnd
theory: hyperbolic
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (expand "cosh")
   (expand "sinh")
   (lemma "exp_deriv")
   (flatten -1)
   (lemma "identity_derivable_fun[real]")
   (lemma "deriv_id_fun[real]")
   (expand "I")
   (expand "const_fun")
   (lemma "neg_derivable_fun[real]" ("f" "LAMBDA (x: real): x"))
   (assert)
   (expand "-")
   (lemma "deriv_neg_fun[real]" ("ff" "LAMBDA (x: real): x"))
   (replace -3)
   (expand "-")
   (lemma "composition_derivable_fun[real,real]"
    ("f" "LAMBDA (x_1: real): -x_1" "g" "exp"))
   (("1"
     (assert)
     (expand "o")
     (lemma "deriv_comp_fun[real,real]"
      ("ff" "LAMBDA (x_1: real): -x_1" "gg" "exp"))
     (replace -8)
     (replace -3)
     (expand "o")
     (expand "*")
     (lemma "sum_derivable_fun[real]"
      ("f1" "exp" "f2" "LAMBDA (x: real): exp(-x)"))
     (assert)
     (expand "+")
     (lemma "deriv_sum_fun[real]"
      ("ff1" "exp" "ff2" "LAMBDA (x: real): exp(-x)"))
     (replace -10)
     (replace -3)
     (expand "+")
     (lemma "scal_derivable_fun[real]"
      ("f" "LAMBDA (x_1: real): exp(x_1) + exp(-x_1)" "b" "1/2"))
     (assert)
     (expand "*")
     (lemma "deriv_scal_fun[real]"
      ("ff" "LAMBDA (x_1: real): exp(x_1) + exp(-x_1)" "b" "1/2"))
     (replace -3)
     (expand "*")
     (assert))
    ("2" (skosimp*) (inst + "x!1+1") (assert))
    ("3" (lemma "deriv_domain_real") (propax))))


proof_type: f_proof
decl_type: formula
library: lnexp_fnd
theory: hyperbolic
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (lemma "sinh_derivable2")
   (lemma "cosh_derivable2")
   (lemma "deriv_sinh")
   (lemma "deriv_cosh")
   (expand "tanh")
   (expand "sech")
   (expand "*")
   (lemma "div_derivable_fun[real]" ("f" "sinh" "g" "cosh"))
   (("1"
     (assert)
     (lemma "deriv_div_fun[real]" ("ff" "sinh" "gg" "cosh"))
     (expand "/")
     (replace -3)
     (replace -4)
     (expand "*")
     (expand "-")
     (replace -1)
     (hide-all-but 1)
     (lemma "extensionality"
      ("f"
       "LAMBDA (x: real):
                       (cosh(x) * cosh(x) - sinh(x) * sinh(x)) / (cosh(x) * cosh(x))"
       "g"
       "LAMBDA (x_1: real): 1 / cosh(x_1) * (1 / cosh(x_1))"))
     (("1"
       (split -1)
       (("1" (propax))
        ("2"
         (hide 2)
         (skosimp*)
         (rewrite "sq_rew")
         (rewrite "sq_rew")
         (rewrite "sq_rew")
         (rewrite "sq_div")
         (rewrite "cosh_sinh_one"))))
      ("2"
       (hide 2)
       (skosimp*)
       (typepred "cosh(x!1)")
       (rewrite "sq_rew")
       (lemma "sq_nz_pos" ("nz" "cosh(x!1)"))
       (assert))))
    ("2" (skosimp*) (typepred "cosh(x1!1)") (assert))))


proof_type: f_proof
decl_type: formula
library: lnexp_fnd
theory: hyperbolic
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (lemma "Taylors[real]" ("aa" "0" "bb" "x!1" "f" "sinh" "n" "2*n!1+2"))
   (case "FORALL (n:nat): derivable_n_times?(sinh,n)")
   (("1"
     (lemma "deriv_sinh")
     (lemma "deriv_cosh")
     (lemma "sinh_derivable2")
     (lemma "cosh_derivable2")
     (case "FORALL (n:nat): nderiv(2*n,sinh) = sinh")
     (("1"
       (case "FORALL (n:nat): nderiv(2*n+1,sinh) = cosh")
       (("1"
         (inst-cp -7 "2*n!1+3")
         (replace -8)
         (skolem! -9)
         (inst + "c!1")
         (replace -9 1)
         (inst-cp -1 "n!1+1")
         (replace -2)
         (simplify 1)
         (hide -10)
         (expand "sinh_series_n")
         (rewrite "sinh_0")
         (case "FORALL (i:nat): i <= n!1 => sigma(0, 2 + 2 * i,
                                                     LAMBDA (nn:nat):
                                                       IF nn > 2 + 2 * n!1 THEN 0
                                                       ELSIF nn = 0 THEN 0
                                                       ELSE nderiv(nn, sinh)(0) * x!1 ^ nn / factorial(nn)
                                                       ENDIF)
                                                =
                                                sigma(0, i,
                                                      LAMBDA (i: nat): (x!1 ^ (1 + 2 * i)) / factorial(1 + 2 * i))")
         (("1" (inst - "n!1") (assert))
          ("2"
           (hide 2)
           (induct "i")
           (("1"
             (expand "sigma" 1)
             (expand "sigma" 1)
             (expand "sigma" 1)
             (expand "nderiv" 1)
             (expand "nderiv" 1)
             (expand "nderiv" 1)
             (replace -7)
             (replace -6)
             (rewrite "sinh_0")
             (rewrite "cosh_0")
             (assert))
            ("2"
             (skosimp*)
             (expand "sigma" 1)
             (expand "sigma" 1 1)
             (assert)
             (replace -1 1)
             (simplify 1)
             (hide -1)
             (inst -2 "1+j!1")
             (replace -2)
             (inst -4 "2+j!1")
             (replace -4)
             (rewrite "sinh_0")
             (rewrite "cosh_0")
             (assert))
            ("3" (hide 2) (skosimp*) (inst -10 "nn!1"))))
          ("3" (hide 2) (skosimp*) (inst -9 "nn!1"))))
        ("2"
         (hide -7 2)
         (induct "n")
         (("1" (expand "nderiv" 1) (expand "nderiv" 1) (propax))
          ("2"
           (skosimp*)
           (expand "nderiv" 1)
           (expand "nderiv" 1)
           (replace -6)
           (replace -5)
           (assert))
          ("3" (skosimp*) (inst - "1+2*n!3"))))
        ("3" (skosimp*) (inst -6 "1+2*n!2"))))
      ("2"
       (hide -6 2)
       (copy -5)
       (induct "n" 1)
       (("1" (expand "nderiv" 1) (propax))
        ("2"
         (skolem! 1)
         (flatten 1)
         (expand "nderiv" 1)
         (expand "nderiv" 1)
         (replace -6)
         (replace -5)
         (propax))
        ("3" (skosimp*) (inst - "2*n!3"))))
      ("3" (skosimp*) (inst -5 "2*n!2"))))
    ("2"
     (hide-all-but 1)
     (skosimp*)
     (case "FORALL (n:nat): derivable_n_times?(sinh, n*2)")
     (("1"
       (case "even?(n!2)")
       (("1"
         (expand "even?")
         (skosimp*)
         (replace -1)
         (inst - "j!1")
         (("1" (assert)) ("2" (assert))))
        ("2"
         (rewrite "even_or_odd")
         (expand "odd?")
         (skosimp*)
         (replace -1)
         (inst - "2+2*j!1")
         (("1"
           (lemma "derivable_n_times_lem[real]"
            ("f" "sinh" "n" "(2 + 2 * j!1) * 2" "m" "1 + 2 * j!1"))
           (("1" (assert)) ("2" (assert)) ("3" (assert))))
          ("2" (assert))))))
      ("2"
       (hide 2)
       (induct "n")
       (("1" (expand "derivable_n_times?") (propax))
        ("2"
         (skosimp*)
         (expand "derivable_n_times?" 1)
         (expand "derivable_n_times?" 1)
         (lemma "sinh_derivable2")
         (lemma "cosh_derivable2")
         (lemma "deriv_cosh")
         (lemma "deriv_sinh")
         (replace -1)
         (replace -2)
         (assert))))))))


proof_type: f_proof
decl_type: formula
library: lnexp_fnd
theory: hyperbolic
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (expand "asinh")
   (expand "sq")
   (lemma "identity_derivable_fun[real]")
   (expand "I")
   (lemma "prod_derivable_fun[real]"
    ("f1" "LAMBDA (x: real): x" "f2" "LAMBDA (x: real): x"))
   (assert)
   (expand "*")
   (lemma "const_derivable_fun[real]" ("b" "1"))
   (expand "const_fun")
   (lemma "sum_derivable_fun[real]"
    ("f1" "LAMBDA (x: real): 1" "f2" "LAMBDA (x_1: real): x_1 * x_1"))
   (assert)
   (expand "+")
   (lemma "sqrt_derivable_fun")
   (lemma "composition_derivable_fun[real,posreal]"
    ("f" "LAMBDA (x: real): 1+x*x" "g" "LAMBDA (x:posreal): sqrt(x)"))
   (("1"
     (assert)
     (expand "restrict" -2)
     (replace -2 -1)
     (expand "o")
     (lemma "sum_derivable_fun[real]"
      ("f1"
       "LAMBDA (x: real): x"
       "f2"
       "LAMBDA (x_1: real): sqrt(1 + x_1 * x_1)"))
     (assert)
     (expand "+")
     (lemma "composition_derivable_fun[real,posreal]"
      ("f" "LAMBDA (x_1: real): x_1 + sqrt(1 + x_1 * x_1)" "g" "ln"))
     (("1"
       (lemma "ln_derivable")
       (flatten -1)
       (replace -1)
       (assert)
       (expand "o")
       (propax))
      ("2"
       (hide-all-but 1)
       (skosimp*)
       (rewrite "sq_rew")
       (lemma "sqrt_pos" ("px" "1+sq(x!1)"))
       (lemma "trichotomy" ("x" "x!1"))
       (split -1)
       (("1" (assert)) ("2" (assert))
        ("3"
         (lemma "sq_gt" ("nna" "sqrt(1 + sq(x!1))" "nnb" "-x!1"))
         (("1" (rewrite "sq_neg") (rewrite "sq_sqrt") (assert))
          ("2" (assert))))))))
    ("2" (hide-all-but 1) (skosimp*) (inst + "x!1+1") (assert))
    ("3" (hide-all-but 1) (lemma "deriv_domain_posreal") (propax))
    ("4" (hide-all-but 1) (skosimp*) (inst + "x!1+1") (assert))
    ("5" (lemma "deriv_domain_real") (propax))))


proof_type: f_proof
decl_type: formula
library: lnexp_fnd
theory: hyperbolic
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (expand "acosh")
   (lemma "identity_derivable_fun[posreal_gt1]")
   (lemma "const_derivable_fun[posreal_gt1]" ("b" "1"))
   (expand "I")
   (expand "const_fun")
   (expand "sq")
   (lemma "prod_derivable_fun[posreal_gt1]"
    ("f1"
     "LAMBDA (x: posreal_gt1): x"
     "f2"
     "LAMBDA (x: posreal_gt1): x"))
   (assert)
   (expand "*")
   (lemma "diff_derivable_fun[posreal_gt1]"
    ("f1"
     "LAMBDA (x_1: posreal_gt1): x_1 * x_1"
     "f2"
     "LAMBDA (x_1: posreal_gt1): 1"))
   (assert)
   (expand "-")
   (lemma "sqrt_derivable_fun")
   (expand "restrict")
   (lemma "composition_derivable_fun[posreal_gt1,posreal]"
    ("f"
     "LAMBDA (x: posreal_gt1): x * x - 1"
     "g"
     "LAMBDA (x:posreal): sqrt(x)"))
   (("1"
     (assert)
     (expand "o")
     (lemma "sum_derivable_fun[posreal_gt1]"
      ("f1"
       "LAMBDA (x: posreal_gt1): x"
       "f2"
       "LAMBDA (x_1: posreal_gt1): sqrt(x_1 * x_1 - 1)"))
     (("1"
       (assert)
       (expand "+")
       (lemma "ln_derivable")
       (flatten)
       (lemma "composition_derivable_fun[posreal_gt1,posreal]"
        ("f"
         "LAMBDA (x_1: posreal_gt1): x_1 + sqrt(x_1 * x_1 - 1)"
         "g"
         "ln"))
       (("1" (assert) (expand "o") (propax))
        ("2"
         (hide-all-but 1)
         (skosimp*)
         (rewrite "sq_rew")
         (lemma "sq_gt" ("nna" "x!1" "nnb" "1"))
         (rewrite "sq_1")
         (lemma "sqrt_pos" ("px" "sq(x!1)-1"))
         (("1" (assert)) ("2" (assert) (assert))))))
      ("2"
       (hide-all-but 1)
       (skosimp*)
       (rewrite "sq_rew")
       (lemma "sq_gt" ("nna" "x!1" "nnb" "1"))
       (rewrite "sq_1")
       (assert))))
    ("2"
     (hide-all-but 1)
     (skosimp*)
     (rewrite "sq_rew")
     (lemma "sq_gt" ("nna" "x!1" "nnb" "1"))
     (rewrite "sq_1")
     (assert))
    ("3" (hide-all-but 1) (skosimp*) (inst + "x!1+1") (assert))
    ("4" (hide-all-but 1) (lemma "deriv_domain_posreal") (propax))
    ("5" (hide-all-but 1) (skosimp*) (inst + "x!1+1") (assert))
    ("6"
     (hide-all-but 1)
     (expand "deriv_domain?")
     (skosimp*)
     (inst + "e!1/2")
     (grind))))


proof_type: f_proof
decl_type: formula
library: lnexp_fnd
theory: hyperbolic
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (expand "atanh")
   (lemma "identity_derivable_fun[real_abs_lt1]")
   (expand "I")
   (lemma "const_derivable_fun[real_abs_lt1]" ("b" "1"))
   (expand "const_fun")
   (lemma "diff_derivable_fun[real_abs_lt1]"
    ("f1"
     "LAMBDA (x: real_abs_lt1): 1"
     "f2"
     "LAMBDA (x: real_abs_lt1): x"))
   (lemma "sum_derivable_fun[real_abs_lt1]"
    ("f1"
     "LAMBDA (x: real_abs_lt1): 1"
     "f2"
     "LAMBDA (x: real_abs_lt1): x"))
   (assert)
   (expand "-")
   (expand "+")
   (lemma "div_derivable_fun[real_abs_lt1]"
    ("f"
     "LAMBDA (x: real_abs_lt1): 1+x"
     "g"
     "LAMBDA (x: real_abs_lt1): 1-x"))
   (assert)
   (expand "/")
   (lemma "ln_derivable")
   (flatten)
   (lemma "composition_derivable_fun[real_abs_lt1,posreal]"
    ("f" "LAMBDA (x_1: real_abs_lt1): (1 + x_1) / (1 - x_1)" "g" "ln"))
   (("1"
     (assert)
     (expand "o")
     (lemma "scal_derivable_fun[real_abs_lt1]"
      ("f" "LAMBDA (x: real_abs_lt1): ln((1 + x) / (1 - x))" "b" "1/2"))
     (expand "*")
     (propax))
    ("2"
     (hide-all-but 1)
     (skosimp*)
     (lemma "posreal_div_posreal_is_posreal" ("px" "1+x!1" "py" "1-x!1"))
     (assert))
    ("3" (hide-all-but 1) (skosimp*) (inst + "x!1+1") (assert))
    ("4" (hide-all-but 1) (lemma "deriv_domain_posreal") (propax))
    ("5"
     (hide-all-but 1)
     (skosimp*)
     (case "x!1=0")
     (("1" (inst + "1/2") (assert)) ("2" (inst + "x!1/2") (assert))))
    ("6" (hide-all-but 1) (lemma "deriv_domain_open") (inst - "-1" "1"))))


proof_type: f_proof
decl_type: formula
library: lnexp_fnd
theory: hyperbolic
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (expand "asinh")
   (expand "sq")
   (lemma "identity_derivable_fun[real]")
   (lemma "deriv_id_fun[real]")
   (expand "I")
   (lemma "const_derivable_fun[real]" ("b" "1"))
   (lemma "deriv_const_fun[real]" ("b" "1"))
   (expand "const_fun")
   (lemma "prod_derivable_fun[real]"
    ("f1" "LAMBDA (x: real): x" "f2" "LAMBDA (x: real): x"))
   (assert)
   (expand "*")
   (lemma "deriv_prod_fun[real]"
    ("ff1" "LAMBDA (x: real): x" "ff2" "LAMBDA (x: real): x"))
   (replace -5)
   (expand "*")
   (expand "+")
   (lemma "sum_derivable_fun[real]"
    ("f1" "LAMBDA (x: real): 1" "f2" "LAMBDA (x: real): x * x"))
   (assert)
   (expand "+")
   (lemma "deriv_sum_fun[real]"
    ("ff1" "LAMBDA (x: real): 1" "ff2" "LAMBDA (x: real): x * x"))
   (replace -5)
   (replace -3)
   (expand "+")
   (lemma "ln_derivable")
   (flatten -1)
   (lemma "sqrt_derivable_fun")
   (lemma "deriv_sqrt_fun")
   (lemma "composition_derivable_fun[real,posreal]"
    ("f"
     "LAMBDA (x_1: real): 1 + x_1 * x_1"
     "g"
     "LAMBDA (x:posreal): sqrt(x)"))
   (("1"
     (assert)
     (expand "restrict")
     (replace -3)
     (expand "o")
     (lemma "deriv_comp_fun[real,posreal]"
      ("ff"
       "LAMBDA (x: real): 1+x*x"
       "gg"
       "LAMBDA (x:posreal): sqrt(x)"))
     (("1"
       (replace -3)
       (replace -7)
       (expand "o")
       (expand "*")
       (lemma "sum_derivable_fun[real]"
        ("f1"
         "LAMBDA (x: real): x"
         "f2"
         "LAMBDA (x_1: real): sqrt(1 + x_1 * x_1)"))
       (assert)
       (expand "+")
       (lemma "deriv_sum_fun[real]"
        ("ff1"
         "LAMBDA (x: real): x"
         "ff2"
         "LAMBDA (x_1: real): sqrt(1 + x_1 * x_1)"))
       (replace -3)
       (replace -15)
       (expand "+")
       (lemma "composition_derivable_fun[real,posreal]"
        ("f" "LAMBDA (x_1: real): x_1 + sqrt(1 + x_1 * x_1)" "g" "ln"))
       (("1"
         (assert)
         (expand "o")
         (lemma "deriv_comp_fun[real,posreal]"
          ("ff"
           "LAMBDA (x_1: real): x_1 + sqrt(1 + x_1 * x_1)"
           "gg"
           "ln"))
         (replace -10)
         (replace -3)
         (expand "o")
         (expand "*")
         (replace -1 1)
         (hide-all-but 1)
         (lemma "extensionality"
          ("f"
           "(LAMBDA (x_1: real):
                             1 / (x_1 + sqrt(1 + x_1 * x_1)) +
                              2 *
                               ((x_1 * (1 / (x_1 + sqrt(1 + x_1 * x_1)))) *
                                 (1 / (2 * sqrt(1 + x_1 * x_1)))))"
           "g"
           "(LAMBDA (x: real): 1 / sqrt(1 + x * x))"))
         (("1"
           (split -1)
           (("1" (propax))
            ("2"
             (hide 2)
             (skosimp*)
             (lemma "sqrt_pos" ("px" "1+x!1*x!1"))
             (name "K20" "sqrt(1 + x!1 * x!1)")
             (replace -1)
             (case "1 / (x!1 + K20) + 2 * ((x!1 * (1 / (x!1 + K20))) * (1 / (2 * K20))) = 1 / (x!1 + K20) *(1+x!1/K20)")
             (("1" (replace -1) (propax)) ("2" (hide 2) (assert))))))
          ("2"
           (hide 2)
           (skosimp*)
           (rewrite "sq_rew")
           (lemma "sq_pos")
           (inst - "x!1")
           (lemma "sqrt_pos" ("px" "1+sq(x!1)"))
           (assert))
          ("3"
           (hide 2)
           (skosimp*)
           (rewrite "sq_rew")
           (lemma "sq_pos" ("a" "x!1"))
           (lemma "sqrt_pos" ("px" "1+sq(x!1)"))
           (assert))
          ("4"
           (hide 2)
           (skosimp*)
           (rewrite "sq_rew")
           (lemma "sq_pos" ("a" "x!1"))
           (lemma "sqrt_pos" ("px" "1+sq(x!1)"))
           (lemma "trichotomy" ("x" "x!1"))
           (split -1)
           (("1" (assert)) ("2" (assert))
            ("3"
             (lemma "sq_lt" ("nna" "-x!1" "nnb" "sqrt(1 + sq(x!1))"))
             (("1" (rewrite "sq_neg") (rewrite "sq_sqrt") (assert))
              ("2" (assert))))))))
        ("2"
         (hide-all-but 1)
         (skosimp*)
         (rewrite "sq_rew")
         (lemma "sq_pos" ("a" "x!1"))
         (lemma "sqrt_pos" ("px" "1+sq(x!1)"))
         (lemma "trichotomy" ("x" "x!1"))
         (split -1)
         (("1" (assert)) ("2" (assert))
          ("3"
           (lemma "sq_lt" ("nna" "-x!1" "nnb" "sqrt(1+sq(x!1))"))
           (("1" (rewrite "sq_neg") (rewrite "sq_sqrt") (assert))
            ("2" (assert))))))))
      ("2" (propax))))
    ("2" (hide-all-but 1) (skosimp*) (inst + "x!1+1") (assert))
    ("3" (hide-all-but 1) (lemma "deriv_domain_posreal") (propax))
    ("4" (hide-all-but 1) (skosimp*) (inst + "x!1+1") (assert))
    ("5" (lemma "deriv_domain_real") (propax))))


proof_type: f_proof
decl_type: formula
library: lnexp_fnd
theory: hyperbolic
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (expand "acosh")
   (case "FORALL (x:posreal_gt1): sq(x)-1 > 0")
   (("1"
     (case "FORALL (x:posreal_gt1): sqrt(sq(x)-1) > 0")
     (("1"
       (case "FORALL (x:posreal_gt1): x+sqrt(sq(x) - 1) > 0")
       (("1"
         (lemma "ln_derivable")
         (flatten -1)
         (lemma "identity_derivable_fun[posreal_gt1]")
         (lemma "deriv_id_fun[posreal_gt1]")
         (expand "I")
         (lemma "const_derivable_fun[posreal_gt1]" ("b" "1"))
         (lemma "deriv_const_fun[posreal_gt1]" ("b" "1"))
         (expand "const_fun")
         (expand "sq" 1)
         (lemma "prod_derivable_fun[posreal_gt1]"
          ("f1"
           "LAMBDA (x: posreal_gt1): x"
           "f2"
           "LAMBDA (x: posreal_gt1): x"))
         (assert)
         (expand "*")
         (lemma "deriv_prod_fun[posreal_gt1]"
          ("ff1"
           "LAMBDA (x: posreal_gt1): x"
           "ff2"
           "LAMBDA (x: posreal_gt1): x"))
         (replace -5)
         (expand "*")
         (expand "+")
         (lemma "diff_derivable_fun[posreal_gt1]"
          ("f1"
           "LAMBDA (x_1: posreal_gt1): x_1 * x_1"
           "f2"
           "LAMBDA (x: posreal_gt1): 1"))
         (assert)
         (expand "-")
         (lemma "deriv_diff_fun[posreal_gt1]"
          ("ff1"
           "LAMBDA (x_1: posreal_gt1): x_1 * x_1"
           "ff2"
           "LAMBDA (x: posreal_gt1): 1"))
         (replace -3)
         (replace -5)
         (expand "-")
         (lemma "sqrt_derivable_fun")
         (lemma "deriv_sqrt_fun")
         (lemma "composition_derivable_fun[posreal_gt1,posreal]"
          ("f"
           "LAMBDA (x_1: posreal_gt1): x_1 * x_1 - 1"
           "g"
           "LAMBDA (x:posreal):sqrt(x)"))
         (("1"
           (expand "restrict")
           (assert)
           (expand "o")
           (lemma "deriv_comp_fun[posreal_gt1,posreal]"
            ("ff"
             "LAMBDA (x_1: posreal_gt1): x_1 * x_1 - 1"
             "gg"
             "LAMBDA (x:posreal):sqrt(x)"))
           (replace -3)
           (replace -5)
           (expand "o")
           (expand "*")
           (lemma "sum_derivable_fun[posreal_gt1]"
            ("f1"
             "LAMBDA (x: posreal_gt1): x"
             "f2"
             "LAMBDA (x_1: posreal_gt1): sqrt(x_1 * x_1 - 1)"))
           (("1"
             (assert)
             (expand "+")
             (lemma "deriv_sum_fun[posreal_gt1]"
              ("ff1"
               "LAMBDA (x: posreal_gt1): x"
               "ff2"
               "LAMBDA (x_1: posreal_gt1): sqrt(x_1 * x_1 - 1)"))
             (replace -13)
             (replace -3)
             (expand "+")
             (lemma "composition_derivable_fun[posreal_gt1,posreal]"
              ("f"
               "LAMBDA (x_1: posreal_gt1): x_1 + sqrt(x_1 * x_1 - 1)"
               "g"
               "ln"))
             (("1"
               (assert)
               (expand "o")
               (lemma "deriv_comp_fun[posreal_gt1,posreal]"
                ("ff"
                 "LAMBDA (x_1: posreal_gt1): x_1 + sqrt(x_1 * x_1 - 1)"
                 "gg"
                 "ln"))
               (replace -3)
               (replace -18)
               (expand "o")
               (expand "*")
               (replace -1 1)
               (hide-all-but (-19 -20 -21 1))
               (lemma "extensionality"
                ("f"
                 "(LAMBDA (x_1: posreal_gt1):
                                         1 / (x_1 + sqrt(x_1 * x_1 - 1)) +
                                          2 *
                                           ((x_1 * (1 / (x_1 + sqrt(x_1 * x_1 - 1)))) *
                                             (1 / (2 * sqrt(x_1 * x_1 - 1)))))"
                 "g"
                 "(LAMBDA (x: posreal_gt1): 1 / sqrt(x * x - 1))"))
               (("1"
                 (split -1)
                 (("1" (propax))
                  ("2"
                   (hide 2)
                   (skosimp*)
                   (inst - "x!1")
                   (inst - "x!1")
                   (inst - "x!1")
                   (rewrite "sq_rew")
                   (name "K1" "sqrt(sq(x!1) - 1)")
                   (("1"
                     (replace -1)
                     (case "1/(x!1+K1)*(1+x!1/K1) = 1 / (x!1 + K1) + 2 * ((x!1 * (1 / (x!1 + K1))) * (1 / (2 * K1)))")
                     (("1" (replace -1 1 rl) (propax))
                      ("2"
                       (hide 2)
                       (lemma "div_cancel1" ("x" "x!1 / K1" "n0z" "2"))
                       (assert))))
                    ("2" (hide -1 -2 2) (assert))))))
                ("2"
                 (hide-all-but (-2 1))
                 (skosimp*)
                 (rewrite "sq_rew")
                 (inst - "x!1")
                 (assert))
                ("3"
                 (hide 2 -1)
                 (skosimp*)
                 (inst - "x!1")
                 (rewrite "sq_rew")
                 (assert))
                ("4"
                 (hide 2)
                 (skosimp*)
                 (rewrite "sq_rew")
                 (inst - "x!1")
                 (assert))))
              ("2"
               (skosimp*)
               (assert)
               (hide -17 -19)
               (inst?)
               (expand "sq")
               (assert))))
            ("2"
             (skosimp*)
             (assert)
             (hide -15 -16)
             (inst?)
             (expand "sq")
             (assert))))
          ("2"
           (hide-all-but (-15 1))
           (skosimp*)
           (inst - "x!1")
           (assert)
           (expand "sq")
           (assert))
          ("3"
           (hide-all-but 1)
           (skosimp*)
           (assert)
           (inst + "x!1 + 1")
           (assert))
          ("4"
           (hide-all-but 1)
           (assert)
           (lemma "deriv_domain_posreal")
           (propax))
          ("5"
           (hide-all-but 1)
           (skosimp*)
           (assert)
           (inst + "x!1 + 1")
           (assert))
          ("6"
           (assert)
           (hide-all-but 1)
           (expand "deriv_domain?")
           (skosimp*)
           (inst + "e!1/2")
           (grind))))
        ("2"
         (hide 2)
         (skosimp*)
         (inst - "x!1")
         (inst - "x!1")
         (lemma "trichotomy" ("x" "x!1"))
         (split -1)
         (("1" (assert)) ("2" (assert))
          ("3"
           (lemma "both_sides_times_neg_gt1"
            ("y" "0" "x" "x!1" "nz" "-1"))
           (replace -2 -1)
           (flatten -1)
           (rewrite "zero_times1")
           (typepred "x!1")
           (assert))))))
      ("2"
       (hide 2)
       (skosimp*)
       (inst - "x!1")
       (lemma "sqrt_pos" ("px" "sq(x!1)-1"))
       (("1" (propax)) ("2" (assert))))
      ("3" (hide 2) (skosimp*) (inst - "x!1") (assert))))
    ("2"
     (hide 2)
     (skosimp*)
     (lemma "sq_gt" ("nna" "x!1" "nnb" "1"))
     (rewrite "sq_1")
     (assert))))


proof_type: f_proof
decl_type: formula
library: lnexp_fnd
theory: hyperbolic
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (expand "atanh")
   (lemma "ln_derivable")
   (flatten)
   (lemma "identity_derivable_fun[real_abs_lt1]")
   (lemma "const_derivable_fun[real_abs_lt1]" ("b" "1"))
   (lemma "deriv_id_fun[real_abs_lt1]")
   (lemma "deriv_const_fun[real_abs_lt1]" ("b" "1"))
   (expand "I")
   (lemma "sum_derivable_fun[real_abs_lt1]"
    ("f1"
     "LAMBDA (x: real_abs_lt1): 1"
     "f2"
     "LAMBDA (x: real_abs_lt1): x"))
   (lemma "diff_derivable_fun[real_abs_lt1]"
    ("f1"
     "LAMBDA (x: real_abs_lt1): 1"
     "f2"
     "LAMBDA (x: real_abs_lt1): x"))
   (assert)
   (expand "+")
   (expand "-")
   (lemma "deriv_sum_fun[real_abs_lt1]"
    ("ff1"
     "LAMBDA (x: real_abs_lt1): 1"
     "ff2"
     "LAMBDA (x: real_abs_lt1): x"))
   (lemma "deriv_diff_fun[real_abs_lt1]"
    ("ff1"
     "LAMBDA (x: real_abs_lt1): 1"
     "ff2"
     "LAMBDA (x: real_abs_lt1): x"))
   (replace -5)
   (replace -6)
   (expand "+")
   (expand "-")
   (lemma "div_derivable_fun[real_abs_lt1]"
    ("f"
     "LAMBDA (x_1: real_abs_lt1): 1 + x_1"
     "g"
     "LAMBDA (x_1: real_abs_lt1): 1 - x_1"))
   (assert)
   (expand "/")
   (lemma "deriv_div_fun[real_abs_lt1]"
    ("ff"
     "LAMBDA (x_1: real_abs_lt1): 1 + x_1"
     "gg"
     "LAMBDA (x_1: real_abs_lt1): 1 - x_1"))
   (replace -3)
   (replace -4)
   (expand "*")
   (expand "/")
   (expand "-")
   (lemma "composition_derivable_fun[real_abs_lt1,posreal]"
    ("f" "LAMBDA (x: real_abs_lt1): (1 + x) / (1 - x)" "g" "ln"))
   (("1"
     (assert)
     (expand "o")
     (lemma "deriv_comp_fun[real_abs_lt1,posreal]"
      ("ff" "LAMBDA (x: real_abs_lt1): (1 + x) / (1 - x)" "gg" "ln"))
     (replace -3)
     (replace -14)
     (expand "o")
     (expand "*")
     (lemma "scal_derivable_fun[real_abs_lt1]"
      ("f"
       "LAMBDA (x_1: real_abs_lt1): ln((1 + x_1) / (1 - x_1))"
       "b"
       "1/2"))
     (expand "*")
     (assert)
     (lemma "deriv_scal_fun[real_abs_lt1]"
      ("ff"
       "LAMBDA (x_1: real_abs_lt1): ln((1 + x_1) / (1 - x_1))"
       "b"
       "1/2"))
     (replace -3)
     (expand "*")
     (replace -1 1)
     (hide-all-but 1)
     (lemma "extensionality"
      ("f"
       "(LAMBDA (x_1: real_abs_lt1):
                     1 / 2 *
                      (1 / ((1 + x_1) / (1 - x_1)) * (2 / (1 + x_1 * x_1 - 2 * x_1))))"
       "g"
       "(LAMBDA (x: real_abs_lt1): 1 / (1 - sq(x)))"))
     (("1"
       (split -1)
       (("1" (assert))
        ("2"
         (hide 2)
         (skosimp*)
         (case-replace "1+x!1*x!1-2*x!1 = sq(x!1-1)")
         (("1"
           (case "1-x!1>0")
           (("1"
             (case "1+x!1>0")
             (("1"
               (lemma "sq_nz_pos" ("nz" "x!1-1"))
               (rewrite "div_div1")
               (lemma "div_times"
                ("x"
                 "1 - x!1"
                 "n0x"
                 "1 + x!1"
                 "y"
                 "2"
                 "n0y"
                 "sq(x!1 - 1)"))
               (lemma "div_cancel1"
                ("n0z" "1-x!1" "x" "2/((1+x!1)*(1-x!1))"))
               (("1"
                 (case "((1 - x!1) * 2) / ((1 + x!1) * sq(x!1 - 1)) = (1 - x!1) * (2 / ((1 + x!1) * (1 - x!1)) / (1 - x!1))")
                 (("1"
                   (replace -1 -3)
                   (replace -2 -3)
                   (simplify -3)
                   (hide -1 -2)
                   (name-replace "K1" "2 / sq(x!1 - 1)")
                   (name-replace "K2" "(1 - x!1) / (1 + x!1)")
                   (rewrite "sq_rew" -1)
                   (replace -1 1)
                   (lemma "div_cancel1"
                    ("x" "1/(1 - x!1 + (x!1 - sq(x!1)))" "n0z" "2"))
                   (replace -1 1)
                   (propax))
                  ("2"
                   (hide 2)
                   (lemma "sq_neg" ("a" "x!1-1"))
                   (replace -1 * rl)
                   (hide -2 -3 -7 -1)
                   (name-replace "K10" "1-x!1")
                   (name-replace "K11" "1+x!1")
                   (expand "sq")
                   (rewrite "div_div2")
                   (assert))))
                ("2"
                 (hide 1 -2)
                 (lemma "posreal_times_posreal_is_posreal"
                  ("px" "1+x!1" "py" "1-x!1"))
                 (assert))))
              ("2" (assert))))
            ("2" (assert))))
          ("2" (hide 2) (grind))))))
      ("2"
       (hide 2)
       (skosimp*)
       (lemma "trichotomy" ("x" "x!1"))
       (split -1)
       (("1"
         (lemma "sq_lt" ("nna" "x!1" "nnb" "1"))
         (("1" (rewrite "sq_1") (assert)) ("2" (assert))))
        ("2" (replace -1) (rewrite "sq_0") (assert))
        ("3"
         (lemma "sq_lt" ("nna" "-x!1" "nnb" "1"))
         (("1" (rewrite "sq_neg") (rewrite "sq_1") (assert))
          ("2" (assert))))))
      ("3"
       (hide 2)
       (skosimp*)
       (lemma "sq_nz_pos" ("nz" "1-x!1"))
       (expand "sq" -1)
       (assert))))
    ("2"
     (hide-all-but 1)
     (skosimp*)
     (grind)
     (("1" (cross-mult 1)) ("2" (cross-mult 1))))))


proof_type: f_proof
decl_type: formula
library: lnexp_fnd
theory: hyperbolic
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "atanhN")
   (expand "atanhD")
   (lemma "derivable_n_times_polynomial"
    ("b" "atanhF(n!1)" "m" "2*n!1" "n" "m!1"))
   (replace -1)
   (expand "sq")
   (lemma "extensionality"
    ("f"
     "LAMBDA (x: real): (1 - x * x) ^ (1 + 2 * n!1)"
     "g"
     "LAMBDA (x:real): polynomial(neg_power_fs(1+2*n!1),1+2*n!1)(x^2)"))
   (split -1)
   (("1"
     (replace -1)
     (hide -1 -2)
     (name "NF"
           "LAMBDA (i:nat): IF even?(i) THEN neg_power_fs(1 + 2 * n!1)(i/2) ELSE 0 ENDIF")
     (("1"
       (lemma "extensionality"
        ("f"
         "LAMBDA (x: real):
                                   polynomial(neg_power_fs(1 + 2 * n!1), 1 + 2 * n!1)
                                          (x ^ 2)"
         "g"
         "polynomial(NF,2+4*n!1)"))
       (split -1)
       (("1"
         (replace -1)
         (lemma "derivable_n_times_polynomial"
          ("b" "NF" "m" "2+4*n!1" "n" "m!1"))
         (propax))
        ("2"
         (hide 2)
         (skosimp*)
         (lemma "even_polynomial" ("a" "NF" "n" "1+2*n!1" "x" "x!1"))
         (split -1)
         (("1"
           (replace -1 1)
           (lemma "extensionality"
            ("f"
             "neg_power_fs(1 + 2 * n!1)"
             "g"
             "LAMBDA (i: nat): NF(2 * i)"))
           (split -1)
           (("1" (replace -1) (propax))
            ("2"
             (hide -1 2)
             (skosimp*)
             (expand "NF" 1)
             (lemma "div_cancel1" ("x" "x!2" "n0z" "2"))
             (replace -1)
             (propax))))
          ("2"
           (hide 2)
           (expand "even_fs?")
           (expand "NF" 1)
           (skosimp*)
           (rewrite "even_or_odd" 1)
           (replace -1)
           (propax))))))
      ("2"
       (hide 2)
       (expand "even?")
       (skosimp*)
       (replace -1)
       (lemma "div_cancel1" ("x" "j!1" "n0z" "2"))
       (replace -1)
       (assert))))
    ("2"
     (hide -1 2)
     (skosimp*)
     (case "x!1*x!1 = x!1^2")
     (("1"
       (lemma "neg_power_polynomial" ("pn" "1+2*n!1"))
       (replace -1 1 rl)
       (simplify 1)
       (replace -2)
       (propax))
      ("2" (hide 2) (grind))))))


proof_type: f_proof
decl_type: formula
library: lnexp_fnd
theory: hyperbolic
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "atanhN")
   (rewrite "deriv_polynomial" 1)
   (case-replace "n!1=0")
   (("1" (expand "const_fun") (propax)) ("2" (assert))))


proof_type: f_proof
decl_type: formula
library: lnexp_fnd
theory: hyperbolic
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "atanhD")
   (lemma "identity_derivable_fun[real]")
   (lemma "deriv_id_fun[real]")
   (expand "I")
   (lemma "const_derivable_fun[real]" ("b" "1"))
   (lemma "deriv_const_fun[real]" ("b" "1"))
   (lemma "prod_derivable_fun[real]"
    ("f1" "LAMBDA (x: real): x" "f2" "LAMBDA (x: real): x"))
   (assert)
   (lemma "deriv_prod_fun[real]"
    ("ff1" "LAMBDA (x: real): x" "ff2" "LAMBDA (x: real): x"))
   (expand "*")
   (expand "+")
   (replace -5)
   (simplify -1)
   (expand "sq" 1)
   (lemma "diff_derivable_fun[real]"
    ("f1" "LAMBDA (x: real): 1" "f2" "LAMBDA (x_1: real): x_1 * x_1"))
   (assert)
   (lemma "deriv_diff_fun[real]"
    ("ff1" "LAMBDA (x: real): 1" "ff2" "LAMBDA (x_1: real): x_1 * x_1"))
   (replace -3)
   (replace -5)
   (expand "-")
   (lemma "deriv_exp_fun[real]"
    ("f" "LAMBDA (x: real): (1 - x * x)" "n" "1+2*n!1"))
   (assert)
   (flatten -1)
   (expand "^" -2 1)
   (replace -2 1)
   (replace -3)
   (hide-all-but 1)
   (lemma "extensionality"
    ("f"
     "((1 + 2 * n!1) * (LAMBDA (x: real): (1 - x * x)) ^ (2 * n!1) *
                (LAMBDA (x_1: real): -2 * x_1))"
     "g"
     "(LAMBDA (z: real):
                  z * -(2 + 4 * n!1) *
                   IF n!1 = 0 THEN 1
                   ELSE (1 - z * z) ^ (2 * n!1 - 1) -
                         z * z * (1 - z * z) ^ (2 * n!1 - 1)
                   ENDIF)"))
   (("1"
     (split -1)
     (("1" (assert))
      ("2"
       (hide 2)
       (skosimp*)
       (simplify 1)
       (expand "*")
       (expand "^" 1 2)
       (expand "^" 1 1)
       (case-replace "n!1=0")
       (("1" (expand "^") (expand "expt") (propax))
        ("2"
         (expand "^")
         (assert)
         (expand "expt" 2 2)
         (expand "expt" 2 1)
         (assert))))))
    ("2" (hide 2) (skosimp*) (assert))))


proof_type: f_proof
decl_type: formula
library: lnexp_fnd
theory: hyperbolic
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (rewrite "atanh_taylors_prep2")
   (case-replace "n!1=0")
   (("1"
     (expand "const_fun")
     (lemma "deriv_const_fun[real]" ("b" "0"))
     (expand "const_fun")
     (propax))
    ("2" (assert) (rewrite "deriv_polynomial") (assert))))


proof_type: f_proof
decl_type: formula
library: lnexp_fnd
theory: hyperbolic
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "deriv_exp_fun[real_abs_lt1]" ("f" "g!1" "n" "pn!1"))
   (replace -3)
   (assert)
   (flatten -1)
   (lemma "div_derivable_fun[real_abs_lt1]" ("f" "f!1" "g" "g!1 ^ pn!1"))
   (("1"
     (assert)
     (lemma "deriv_div_fun[real_abs_lt1]" ("ff" "f!1" "gg" "g!1 ^ pn!1"))
     (("1"
       (replace -4 -1)
       (replace -1 1)
       (lemma "extensionality"
        ("f"
         "(deriv(f!1) * g!1 ^ pn!1 -
                 pn!1 * g!1 ^ (pn!1 - 1) * deriv(g!1) * f!1)
                / (g!1 ^ pn!1 * g!1 ^ pn!1)"
         "g"
         "(deriv[real_abs_lt1](f!1) * g!1 -
                  pn!1 * f!1 * deriv[real_abs_lt1](g!1))
                 / (g!1 ^ (1 + pn!1))"))
       (("1"
         (split -1)
         (("1" (propax))
          ("2"
           (hide 2)
           (skosimp*)
           (expand "/" 1)
           (expand "*" 1)
           (expand "-" 1)
           (expand "^" 1)
           (name-replace "DFX" "deriv(f!1)(x!1)")
           (name-replace "DGX" "deriv(g!1)(x!1)")
           (typepred "g!1(x!1)")
           (name-replace "GX" "g!1(x!1)")
           (name-replace "FX" "f!1(x!1)")
           (lemma "expt_plus" ("n0x" "GX" "i" "1" "j" "pn!1"))
           (rewrite "expt_x1" -1)
           (replace -1)
           (lemma "cross_mult"
            ("x"
             "(DFX * GX ^ pn!1 - DGX * FX * GX ^ (pn!1 - 1) * pn!1)"
             "n0x"
             "(GX ^ pn!1 * GX ^ pn!1)"
             "y"
             "(DFX * GX - DGX * FX * pn!1)"
             "n0y"
             "(GX * GX ^ pn!1)"))
           (replace -1)
           (hide -1)
           (lemma "expt_plus" ("n0x" "GX" "i" "pn!1-1" "j" "1"))
           (rewrite "expt_x1" -1)
           (replace -1)
           (assert))))
        ("2"
         (hide -1 2)
         (skosimp*)
         (expand "^" -1)
         (typepred "g!1(x1!1)")
         (lemma "expt_nonzero" ("n0x" "g!1(x1!1)" "i" "1+pn!1"))
         (assert))
        ("3"
         (hide 2)
         (skosimp*)
         (expand "*")
         (expand "^")
         (typepred "g!1(x1!1)")
         (lemma "expt_nonzero" ("n0x" "g!1(x1!1)" "i" "2*pn!1"))
         (lemma "expt_plus" ("n0x" "g!1(x1!1)" "i" "pn!1" "j" "pn!1"))
         (replace -1 -4 rl)
         (assert))))
      ("2"
       (hide 2)
       (skosimp*)
       (expand "^")
       (lemma "expt_nonzero" ("n0x" "g!1(x1!1)" "i" "pn!1"))
       (assert))))
    ("2"
     (skosimp*)
     (expand "^")
     (lemma "expt_nonzero" ("n0x" "g!1(x1!1)" "i" "pn!1"))
     (assert))))


proof_type: f_proof
decl_type: formula
library: lnexp_fnd
theory: hyperbolic
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "composition_derivable_fun[real_abs_lt1,real]"
    ("g" "atanhN(n!1)" "f" "LAMBDA (x:real_abs_lt1): x"))
   (lemma "composition_derivable_fun[real_abs_lt1,real]"
    ("g" "atanhD(n!1)" "f" "LAMBDA (x:real_abs_lt1): x"))
   (lemma "atanh_taylors_prep1" ("n" "n!1" "m" "1"))
   (apply (repeat (expand "derivable_n_times?")))
   (flatten -1)
   (replace -1)
   (replace -2)
   (lemma "identity_derivable_fun[real_abs_lt1]")
   (expand "I")
   (replace -1)
   (expand "o")
   (lemma "deriv_comp_fun[real_abs_lt1,real]"
    ("ff" "LAMBDA (s:real_abs_lt1): s" "gg" "atanhN(n!1)"))
   (("1"
     (lemma "deriv_comp_fun[real_abs_lt1,real]"
      ("ff" "LAMBDA (s:real_abs_lt1): s" "gg" "atanhD(n!1)"))
     (("1"
       (lemma "deriv_id_fun[real_abs_lt1]")
       (replace -1)
       (expand* "o" "*")
       (lemma "atanh_taylors_prep5"
        ("f"
         "LAMBDA (x: real_abs_lt1): atanhN(n!1)(x)"
         "g"
         "LAMBDA (x: real_abs_lt1): 1-sq(x)"
         "pn"
         "1+2*n!1"))
       (("1"
         (expand "sq")
         (replace -9)
         (lemma "prod_derivable_fun[real_abs_lt1]"
          ("f1"
           "LAMBDA (x: real_abs_lt1): x"
           "f2"
           "LAMBDA (x: real_abs_lt1): x"))
         (assert)
         (lemma "deriv_prod_fun[real_abs_lt1]"
          ("ff1"
           "LAMBDA (x: real_abs_lt1): x"
           "ff2"
           "LAMBDA (x: real_abs_lt1): x"))
         (replace -4)
         (expand "*")
         (expand "+")
         (lemma "const_derivable_fun[real_abs_lt1]" ("b" "1"))
         (lemma "deriv_const_fun[real_abs_lt1]" ("b" "1"))
         (lemma "diff_derivable_fun[real_abs_lt1]"
          ("f1"
           "LAMBDA (x: real_abs_lt1): 1"
           "f2"
           "LAMBDA (x: real_abs_lt1): x*x"))
         (lemma "deriv_diff_fun[real_abs_lt1]"
          ("ff1"
           "LAMBDA (x: real_abs_lt1): 1"
           "ff2"
           "LAMBDA (x: real_abs_lt1): x*x"))
         (("1"
           (expand "-")
           (replace -3)
           (replace -5)
           (assert)
           (replace -1)
           (flatten -7)
           (apply (repeat (expand "nderiv")))
           (expand "/")
           (expand "atanhD")
           (expand "sq" 1)
           (expand "^" -8)
           (replace -11 -8)
           (simplify -8)
           (replace -8 1)
           (hide -8 -7 -5 -6)
           (hide -6 -10 -11)
           (lemma "atanh_taylors_prep1" ("n" "n!1" "m" "2"))
           (flatten -1)
           (apply (repeat (expand "derivable_n_times?" -1)))
           (hide -2)
           (lemma "composition_derivable_fun[real_abs_lt1,real]"
            ("f" "LAMBDA (x: real_abs_lt1): x" "g" "deriv(atanhN(n!1))"))
           (assert)
           (expand "o")
           (lemma "deriv_comp_fun[real_abs_lt1,real]"
            ("ff"
             "LAMBDA (x: real_abs_lt1): x"
             "gg"
             "deriv(atanhN(n!1))"))
           (replace -8)
           (expand "o")
           (expand "*" -1)
           (lemma "prod_derivable_fun[real_abs_lt1]"
            ("f1"
             "LAMBDA (x_1: real_abs_lt1): deriv(atanhN(n!1))(x_1)"
             "f2"
             "LAMBDA (x_1: real_abs_lt1): 1 - x_1 * x_1"))
           (replace -3)
           (replace -6)
           (expand "*" -1)
           (lemma "deriv_prod_fun[real_abs_lt1]"
            ("ff1"
             "LAMBDA (x_1: real_abs_lt1): deriv(atanhN(n!1))(x_1)"
             "ff2"
             "LAMBDA (x_1: real_abs_lt1): 1 - x_1 * x_1"))
           (("1"
             (replace -3)
             (replace -6)
             (expand "*" -1)
             (lemma "prod_derivable_fun[real_abs_lt1]"
              ("f1"
               "LAMBDA (x: real_abs_lt1): x"
               "f2"
               "LAMBDA (x: real_abs_lt1): atanhN(n!1)(x)"))
             (assert)
             (lemma "deriv_prod_fun[real_abs_lt1]"
              ("ff1"
               "LAMBDA (x: real_abs_lt1): x"
               "ff2"
               "LAMBDA (x: real_abs_lt1): atanhN(n!1)(x)"))
             (expand "*")
             (replace -13)
             (replace -12)
             (expand "+" -1)
             (expand "+" -3)
             (lemma "scal_derivable_fun[real_abs_lt1]"
              ("f"
               "LAMBDA (x_1: real_abs_lt1): x_1 * atanhN(n!1)(x_1)"
               "b"
               "2+4*n!1"))
             (assert)
             (lemma "deriv_scal_fun[real_abs_lt1]"
              ("ff"
               "LAMBDA (x_1: real_abs_lt1): x_1 * atanhN(n!1)(x_1)"
               "b"
               "2+4*n!1"))
             (replace -3)
             (expand "*")
             (lemma "sum_derivable_fun[real_abs_lt1]"
              ("f1"
               "LAMBDA (x: real_abs_lt1): (1- x * x) * deriv(atanhN(n!1))(x)"
               "f2"
               "LAMBDA (x: real_abs_lt1): (2+4*n!1) * x * atanhN(n!1)(x)"))
             (assert)
             (lemma "deriv_sum_fun[real_abs_lt1]"
              ("ff1"
               "LAMBDA (x: real_abs_lt1): (1- x * x) * deriv(atanhN(n!1))(x)"
               "ff2"
               "LAMBDA (x: real_abs_lt1): (2+4*n!1) * x * atanhN(n!1)(x)"))
             (replace -3)
             (replace -7)
             (expand "+")
             (lemma "atanh_taylors_prep5"
              ("f"
               "LAMBDA (x_1: real_abs_lt1):
                                                                                                                                                                    (deriv(atanhN(n!1))(x_1) - atanhN(n!1)(x_1) * (-2 * x_1) -
                                                                                                                                                                      x_1 * x_1 * deriv(atanhN(n!1))(x_1)
                                                                                                                                                                      + 4 * (x_1 * atanhN(n!1)(x_1) * n!1))"
               "g"
               "LAMBDA (x_1: real_abs_lt1):1 - x_1 * x_1"
               "pn"
               "2 + 2 * n!1"))
             (("1"
               (replace -3)
               (replace -14)
               (flatten -1)
               (expand "/" -2)
               (expand "^" -2)
               (replace -2 1)
               (expand "-" 1)
               (replace -14 1)
               (replace -3 1)
               (expand "*" 1)
               (hide-all-but (-13 -21 1))
               (apply-extensionality 1 :hide? t)
               (("1"
                 (use "both_sides_div1")
                 (replace -1 :hide? t)
                 (invoke
                  (case-replace
                   "%1 = sq(1-sq(x!1))*deriv(deriv(atanhN(n!1)))(x!1) + (8*n!1+4)*x!1*(1-sq(x!1))*deriv(atanhN(n!1))(x!1)+(2+4*n!1+sq(x!1)*(6+20*n!1+16*sq(n!1)))*atanhN(n!1)(x!1)"
                   :hide? t)
                  (! 1 l))
                 (("1"
                   (name "K1" "sq(1 - sq(x!1))")
                   (name "K2" "(8 * n!1 + 4) * x!1 * (1 - sq(x!1))")
                   (name "K3"
                         "(2 + 4 * n!1 + sq(x!1) * (6 + 20 * n!1 + 16 * sq(n!1)))")
                   (replace -1)
                   (replace -2)
                   (replace -3)
                   (rewrite "atanh_taylors_prep4")
                   (rewrite "atanh_taylors_prep2")
                   (case-replace "n!1=0")
                   (("1"
                     (expand "const_fun" 1)
                     (expand "atanhN" 1)
                     (rewrite "sq_0")
                     (simplify (-4 -5))
                     (expand "polynomial" 1)
                     (apply (repeat (expand "sigma" 1)))
                     (expand "^" 1)
                     (apply (repeat (expand "expt" 1)))
                     (expand "atanhF" 1)
                     (rewrite "C_0")
                     (rewrite "C_0")
                     (rewrite "C_n_1")
                     (apply (repeat (expand "factorial" 1)))
                     (expand "odd?" 1)
                     (expand "sq")
                     (assert))
                    ("2"
                     (replace 1 2)
                     (expand "atanhN" 2)
                     (hide -4 -5)
                     (expand "sq" (-1 -2 -3))
                     (name-replace "FS2"
                      "LAMBDA (i: nat):
                                                                                                                                                                                                                                                            atanhF(n!1)(1 + i) + i * atanhF(n!1)(1 + i)")
                     (name-replace "FS1"
                      "LAMBDA (i: nat):2 * atanhF(n!1)(2 + i) + 2 * (i * atanhF(n!1)(2 + i)) +
                                                                                                                                                                                                                                                            i * atanhF(n!1)(2 + i)
                                                                                                                                                                                                                                                            + i * i * atanhF(n!1)(2 + i)")
                     (lemma "mul_x_to_n_polynomial"
                      ("a" "FS1" "n" "2*n!1-2" "pn" "2"))
                     (("1"
                       (lemma "mul_x_to_n_polynomial"
                        ("a" "FS1" "n" "2*n!1-2" "pn" "4"))
                       (lemma "scal_polynomial"
                        ("a"
                         "LAMBDA (i: nat): IF i < 2 THEN 0 ELSE FS1(i - 2) ENDIF"
                         "n"
                         "2*n!1"
                         "y"
                         "-2"))
                       (("1"
                         (expand* "const_fun" "*")
                         (replace -3 -1 rl)
                         (name-replace "FS10"
                          "LAMBDA (i: nat): IF i < 2 THEN 0 ELSE FS1(i - 2) ENDIF")
                         (name-replace "FS11"
                          "LAMBDA (i: nat): IF i < 4 THEN 0 ELSE FS1(i - 4) ENDIF")
                         (("1"
                           (name-replace "FS12"
                            "LAMBDA (x_1: nat): -2 * IF x_1 < 2 THEN 0 ELSE FS1(x_1 - 2) ENDIF")
                           (case "K1 * polynomial(FS1, 2 * n!1 - 2)(x!1) = polynomial(FS11+FS12+FS1, 2 + 2 * n!1)(x!1)")
                           (("1"
                             (replace -1 2)
                             (hide -1 -2 -3 -4 -7)
                             (lemma "mul_x_to_n_polynomial"
                              ("a" "FS2" "n" "2*n!1-1" "pn" "1"))
                             (("1"
                               (lemma "mul_x_to_n_polynomial"
                                ("a" "FS2" "n" "2*n!1-1" "pn" "3"))
                               (name-replace "FS21"
                                "LAMBDA (i: nat): IF i < 3 THEN 0 ELSE FS2(i - 3) ENDIF")
                               (("1"
                                 (name-replace
                                  "FS22"
                                  "LAMBDA (i: nat): IF i < 1 THEN 0 ELSE FS2(i - 1) ENDIF")
                                 (("1"
                                   (lemma
                                    "diff_polynomial"
                                    ("a"
                                     "FS22"
                                     "n"
                                     "2*n!1"
                                     "b"
                                     "FS21"
                                     "m"
                                     "2*n!1+2"))
                                   (split -1)
                                   (("1"
                                     (expand "max" -1)
                                     (replace -2 -1 rl)
                                     (replace -3 -1 rl)
                                     (hide -2 -3)
                                     (lemma
                                      "scal_polynomial"
                                      ("a"
                                       "FS22-FS21"
                                       "n"
                                       "2+2*n!1"
                                       "y"
                                       "4+8*n!1"))
                                     (expand "const_fun")
                                     (name-replace
                                      "FS23"
                                      "(LAMBDA (x: nat): 4 + 8 * n!1) * (FS22 - FS21)")
                                     (case
                                      "K2 * polynomial(FS2, 2 * n!1 - 1)(x!1) = polynomial(FS23, 2 + 2 * n!1)(x!1)")
                                     (("1"
                                       (replace -1 2)
                                       (hide -1 -2 -3 -5)
                                       (lemma
                                        "mul_x_to_n_polynomial"
                                        ("a"
                                         "atanhF(n!1)"
                                         "n"
                                         "2*n!1"
                                         "pn"
                                         "2"))
                                       (name-replace
                                        "FS31"
                                        "LAMBDA (i: nat):
                                                                                                                                                                                                                                                                                                                                                                                                                                               IF i < 2 THEN 0 ELSE atanhF(n!1)(i - 2) ENDIF")
                                       (expand "^" -1)
                                       (expand "expt" -1)
                                       (expand "expt" -1)
                                       (expand "expt" -1)
                                       (lemma
                                        "scal_polynomial"
                                        ("a"
                                         "FS31"
                                         "n"
                                         "2 + 2 * n!1"
                                         "y"
                                         "16*n!1*n!1+20*n!1+6"))
                                       (expand "const_fun" -1)
                                       (name-replace
                                        "FS32"
                                        "(LAMBDA (x: nat): 6 + 16 * (n!1 * n!1) + 20 * n!1) * FS31")
                                       (lemma
                                        "scal_polynomial"
                                        ("a"
                                         "atanhF(n!1)"
                                         "n"
                                         "2*n!1"
                                         "y"
                                         "2+4*n!1"))
                                       (expand "const_fun")
                                       (lemma
                                        "sum_polynomial"
                                        ("a"
                                         "(LAMBDA (x: nat): 2 + 4 * n!1) * atanhF(n!1)"
                                         "n"
                                         "2 * n!1"
                                         "b"
                                         "FS32"
                                         "m"
                                         "2+2*n!1"))
                                       (split -1)
                                       (("1"
                                         (expand "max" -1)
                                         (name-replace
                                          "FS33"
                                          "(LAMBDA (x: nat): 2 + 4 * n!1) * atanhF(n!1) + FS32")
                                         (case
                                          "K3 * polynomial(atanhF(n!1), 2 * n!1)(x!1) = polynomial(FS33, 2 + 2 * n!1)(x!1)")
                                         (("1"
                                           (replace -1 2)
                                           (hide-all-but (1 2))
                                           (lemma
                                            "sum_polynomial"
                                            ("a"
                                             "FS11 + FS12 + FS1"
                                             "n"
                                             "2 + 2 * n!1"
                                             "b"
                                             "FS23"
                                             "m"
                                             "2+2*n!1"))
                                           (split -1)
                                           (("1"
                                             (expand "max")
                                             (lemma
                                              "sum_polynomial"
                                              ("a"
                                               "FS11 + FS12 + FS1+FS23"
                                               "n"
                                               "2 + 2 * n!1"
                                               "b"
                                               "FS33"
                                               "m"
                                               "2+2*n!1"))
                                             (split -1)
                                             (("1"
                                               (expand "max")
                                               (lemma
                                                "extensionality"
                                                ("f"
                                                 "FS11 + FS12 + FS1 + FS23 + FS33"
                                                 "g"
                                                 "atanhF(1+n!1)"))
                                               (split -1)
                                               (("1"
                                                 (replace -1 -2)
                                                 (replace -3 -2 rl)
                                                 (replace -2 2 rl)
                                                 (expand "+" 2)
                                                 (propax))
                                                ("2"
                                                 (hide-all-but (1 2))
                                                 (skosimp*)
                                                 (expand*
                                                  "FS33"
                                                  "FS32"
                                                  "FS31"
                                                  "FS23"
                                                  "FS22"
                                                  "FS21"
                                                  "FS2"
                                                  "FS12"
                                                  "FS11"
                                                  "FS1")
                                                 (expand* "+" "*")
                                                 (expand "-" 1)
                                                 (case-replace "x!2=0")
                                                 (("1"
                                                   (assert)
                                                   (expand*
                                                    "atanhF"
                                                    "odd?")
                                                   (rewrite "C_0")
                                                   (rewrite "C_0")
                                                   (rewrite "C_2")
                                                   (field 1)
                                                   (expand
                                                    "factorial"
                                                    1
                                                    4)
                                                   (expand
                                                    "factorial"
                                                    1
                                                    5)
                                                   (expand
                                                    "factorial"
                                                    1
                                                    3)
                                                   (propax))
                                                  ("2"
                                                   (case-replace "x!2=1")
                                                   (("1"
                                                     (assert)
                                                     (expand "atanhF")
                                                     (propax))
                                                    ("2"
                                                     (case-replace
                                                      "x!2=2")
                                                     (("1"
                                                       (assert)
                                                       (expand*
                                                        "atanhF"
                                                        "odd?")
                                                       (rewrite "C_0")
                                                       (rewrite "C_2")
                                                       (rewrite "C_2")
                                                       (lemma
                                                        "div_cancel1"
                                                        ("x"
                                                         "2*(n!1*n!1)+n!1"
                                                         "n0z"
                                                         "2"))
                                                       (replace -1)
                                                       (lemma
                                                        "div_cancel1"
                                                        ("x"
                                                         "3+3*n!1+2*(n!1*n!1)+2*n!1"
                                                         "n0z"
                                                         "2"))
                                                       (replace -1)
                                                       (case
                                                        "factorial(2 + 2 * n!1) = (2+2*n!1)*(1+2*n!1)*factorial(2*n!1)")
                                                       (("1"
                                                         (replace -1 3)
                                                         (hide
                                                          -1
                                                          -2
                                                          -3
                                                          1
                                                          2)
                                                         (invoke
                                                          (lemma
                                                           "both_sides_times1"
                                                           ("x"
                                                            "%1"
                                                            "y"
                                                            "%2"
                                                            "n0z"
                                                            "factorial(2*n!1)"))
                                                          (! 1 *))
                                                         (("1"
                                                           (simplify -1)
                                                           (simplify 1)
                                                           (case
                                                            "4 > 2 * n!1")
                                                           (("1"
                                                             (assert))
                                                            ("2"
                                                             (assert)
                                                             (case
                                                              "C(1 + 2 * n!1, 4) = ((1+2*n!1)*2*n!1*(2*n!1-1)*(2*n!1-2))/24")
                                                             (("1"
                                                               (replace
                                                                -1)
                                                               (field 2))
                                                              ("2"
                                                               (hide
                                                                -1
                                                                3)
                                                               (expand
                                                                "C")
                                                               (equate
                                                                "factorial(4)"
                                                                "24"
                                                                t)
                                                               (equate
                                                                "factorial(1 + 2 * n!1)"
                                                                "(4 * n!1 - 4 * (n!1 * n!1)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       + (8 * (n!1 * n!1 * n!1) - 8 * (n!1 * n!1))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       + (8 * (n!1 * n!1) - 8 * (n!1 * n!1 * n!1))                                    + (16 * (n!1 * n!1 * n!1 * n!1)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          - 16 * (n!1 * n!1 * n!1)))*factorial(2 * n!1 - 3)"
                                                                t)
                                                               (field
                                                                1))))))
                                                          ("2"
                                                           (ground))))
                                                        ("2"
                                                         (hide-all-but 1)
                                                         (grind))))
                                                      ("2"
                                                       (case-replace
                                                        "x!2=3")
                                                       (("1"
                                                         (expand
                                                          "atanhF")
                                                         (propax))
                                                        ("2"
                                                         (case "x!2>=4")
                                                         (("1"
                                                           (assert)
                                                           (expand
                                                            "atanhF")
                                                           (case
                                                            "odd?(x!2)")
                                                           (("1"
                                                             (assert)
                                                             (case
                                                              "odd?(x!2+2)")
                                                             (("1"
                                                               (case
                                                                "odd?(x!2-2)")
                                                               (("1"
                                                                 (assert))
                                                                ("2"
                                                                 (hide-all-but
                                                                  (-2 1))
                                                                 (expand
                                                                  "odd?")
                                                                 (skosimp*)
                                                                 (inst
                                                                  +
                                                                  "j!1-1")
                                                                 (assert))))
                                                              ("2"
                                                               (hide-all-but
                                                                (-1 1))
                                                               (expand
                                                                "odd?")
                                                               (skosimp*)
                                                               (inst
                                                                +
                                                                "j!1+1")
                                                               (assert))))
                                                            ("2"
                                                             (case
                                                              "NOT odd?(x!2+2)")
                                                             (("1"
                                                               (case
                                                                "NOT odd?(x!2-2)")
                                                               (("1"
                                                                 (assert)
                                                                 (case
                                                                  "x!2 - 2 > 2 * n!1")
                                                                 (("1"
                                                                   (assert))
                                                                  ("2"
                                                                   (assert)
                                                                   (case
                                                                    "x!2 > 2 * n!1")
                                                                   (("1"
                                                                     (assert)
                                                                     (case
                                                                      "x!2<= 2*n!1+2")
                                                                     (("1"
                                                                       (expand
                                                                        "<="
                                                                        -1)
                                                                       (replace
                                                                        -1)
                                                                       (rewrite
                                                                        "C_n_1")
                                                                       (rewrite
                                                                        "C_n_1")
                                                                       (expand
                                                                        "factorial"
                                                                        9
                                                                        8)
                                                                       (expand
                                                                        "factorial"
                                                                        9
                                                                        6)
                                                                       (expand
                                                                        "factorial"
                                                                        9
                                                                        4)
                                                                       (expand
                                                                        "factorial"
                                                                        9
                                                                        3)
                                                                       (propax))
                                                                      ("2"
                                                                       (assert))))
                                                                    ("2"
                                                                     (assert)
                                                                     (case
                                                                      "2 + x!2 > 2 * n!1")
                                                                     (("1"
                                                                       (assert)
                                                                       (case
                                                                        "x!2 <= 2*n!1")
                                                                       (("1"
                                                                         (expand
                                                                          "<="
                                                                          -1)
                                                                         (replace
                                                                          -1)
                                                                         (rewrite
                                                                          "C_n_1")
                                                                         (equate
                                                                          "factorial(2 + 2 * n!1)"
                                                                          "(2+2*n!1)*(1+2*n!1)*factorial(2*n!1)"
                                                                          t)
                                                                         (name-replace
                                                                          "K80"
                                                                          "factorial(2 * n!1)")
                                                                         (name
                                                                          "K81"
                                                                          "C(1 + 2 * n!1, 2 * n!1 - 2)")
                                                                         (replace
                                                                          -1)
                                                                         (name
                                                                          "K82"
                                                                          "C(3 + 2 * n!1, 2 * n!1)")
                                                                         (replace
                                                                          -1)
                                                                         (simplify
                                                                          10)
                                                                         (expand
                                                                          "C")
                                                                         (equate
                                                                          "factorial(3)"
                                                                          "6"
                                                                          t)
                                                                         (expand
                                                                          "factorial"
                                                                          -1)
                                                                         (expand
                                                                          "factorial"
                                                                          -1)
                                                                         (equate
                                                                          "K82"
                                                                          "(6+10*n!1+4*n!1*n!1)/(4*n!1*n!1-2*n!1)*K81")
                                                                         (("1"
                                                                           (hide-all-but
                                                                            (10
                                                                             -2
                                                                             -5))
                                                                           (factor
                                                                            1)
                                                                           (cancel-terms
                                                                            1
                                                                            l
                                                                            :try-just
                                                                            (assert))
                                                                           (cancel-terms
                                                                            1
                                                                            l
                                                                            :try-just
                                                                            (assert))
                                                                           (hide
                                                                            -1)
                                                                           (case
                                                                            "K81 = (2*n!1+1)*2*n!1*(2*n!1-1)/6")
                                                                           (("1"
                                                                             (field
                                                                              1))
                                                                            ("2"
                                                                             (hide
                                                                              -1
                                                                              2)
                                                                             (expand
                                                                              "K81")
                                                                             (expand
                                                                              "C")
                                                                             (equate
                                                                              "factorial(3)"
                                                                              "6"
                                                                              t)
                                                                             (cross-mult
                                                                              1)
                                                                             (grind))))
                                                                          ("2"
                                                                           (hide-all-but
                                                                            (-1
                                                                             -2
                                                                             -5
                                                                             1))
                                                                           (replace
                                                                            -1
                                                                            1
                                                                            rl)
                                                                           (replace
                                                                            -2
                                                                            1
                                                                            rl)
                                                                           (hide
                                                                            -1
                                                                            -2)
                                                                           (name-replace
                                                                            "K100"
                                                                            "factorial(1 + 2 * n!1)")
                                                                           (name-replace
                                                                            "K101"
                                                                            "factorial(2 * n!1 - 2)")
                                                                           (factor!
                                                                            (!
                                                                             1
                                                                             l
                                                                             2))
                                                                           (factor!
                                                                            (!
                                                                             1
                                                                             r
                                                                             1
                                                                             2))
                                                                           (name-replace
                                                                            "K102"
                                                                            " (2 * n!1 - 1)")
                                                                           (field
                                                                            1))))
                                                                        ("2"
                                                                         (assert))))
                                                                      ("2"
                                                                       (assert)
                                                                       (factor
                                                                        11
                                                                        l
                                                                        :id?
                                                                        t)
                                                                       (expand
                                                                        "factorial"
                                                                        11
                                                                        2)
                                                                       (expand
                                                                        "factorial"
                                                                        11
                                                                        (2
                                                                         3))
                                                                       (name-replace
                                                                        "FF"
                                                                        "factorial(2*n!1)")
                                                                       (cancel-by
                                                                        11
                                                                        "FF")
                                                                       (factor
                                                                        12
                                                                        r
                                                                        :id?
                                                                        t)
                                                                       (equate
                                                                        "C(3 + 2 * n!1, x!2)"
                                                                        "C(1 + 2 * n!1, x!2)*id((3+2*n!1)*(2+2*n!1)/id((3+2*n!1-x!2)*(2+2*n!1-x!2)))")
                                                                       (("1"
                                                                         (lemma
                                                                          "C_k_minus_1")
                                                                         (inst-cp
                                                                          -1
                                                                          "1 + 2 * n!1"
                                                                          "1 + x!2")
                                                                         (replace
                                                                          -2
                                                                          :hide?
                                                                          t)
                                                                         (inst-cp
                                                                          -1
                                                                          "1 + 2 * n!1"
                                                                          "x!2")
                                                                         (replace
                                                                          -2
                                                                          :hide?
                                                                          t)
                                                                         (inst-cp
                                                                          -1
                                                                          "1 + 2 * n!1"
                                                                          "x!2 - 1")
                                                                         (inst
                                                                          -1
                                                                          "1 + 2 * n!1"
                                                                          "x!2 - 2")
                                                                         (case-replace
                                                                          "20 * C(1 + 2 * n!1, x!2 - 2) +
                                                                                     2 *
                                                                                      (C(1 + 2 * n!1, x!2) * ((1 + 2 * n!1 - x!2) / (x!2 + 1)) *
                                                                                        ((1 + 2 * n!1 - (1 + x!2)) / (1 + x!2 + 1)))
                                                                                     + 2 * C(1 + 2 * n!1, x!2)
                                                                                     + 36 * (C(1 + 2 * n!1, x!2 - 2) * n!1)
                                                                                     +
                                                                                     3 *
                                                                                      (C(1 + 2 * n!1, x!2) * ((1 + 2 * n!1 - x!2) / (x!2 + 1)) *
                                                                                        ((1 + 2 * n!1 - (1 + x!2)) / (1 + x!2 + 1))
                                                                                        * x!2)
                                                                                     + 4 * (C(1 + 2 * n!1, x!2) * n!1)
                                                                                     + 6 * (C(1 + 2 * n!1, x!2) * x!2)
                                                                                     - 9 * (C(1 + 2 * n!1, x!2 - 2) * x!2)
                                                                                     - 8 * (C(1 + 2 * n!1, x!2 - 2) * n!1 * x!2)
                                                                                     - 2 * (C(1 + 2 * n!1, x!2) * x!2 * x!2)
                                                                                     + 16 * (C(1 + 2 * n!1, x!2 - 2) * n!1 * n!1)
                                                                                     + C(1 + 2 * n!1, x!2 - 2) * x!2 * x!2
                                                                                     +
                                                                                     C(1 + 2 * n!1, x!2) * ((1 + 2 * n!1 - x!2) / (x!2 + 1)) *
                                                                                      ((1 + 2 * n!1 - (1 + x!2)) / (1 + x!2 + 1))
                                                                                      * x!2
                                                                                      * x!2
                                                                                     + 8 * (C(1 + 2 * n!1, x!2) * n!1 * x!2) = C(1 + 2 * n!1, x!2) * ((1 + 2 * n!1 - x!2) / (x!2 + 1)) *
                                                                                     ((1 + 2 * n!1 - (1 + x!2)) / (1 + x!2 + 1))
                                                                                     * id(2 + 3 * x!2 + x!2 * x!2)
                                                                                     +
                                                                                     C(1 + 2 * n!1, x!2 - 2) *
                                                                                      id(20 + 36 * n!1 - 8 * n!1 * x!2 - 9 * x!2 + 16 * n!1 * n!1 +
                                                                                          x!2 * x!2)
                                                                                     + 2 * C(1 + 2 * n!1, x!2)
                                                                                     + 4 * (C(1 + 2 * n!1, x!2) * n!1)
                                                                                     + 6 * (C(1 + 2 * n!1, x!2) * x!2)
                                                                                     - 2 * (C(1 + 2 * n!1, x!2) * x!2 * x!2)
                                                                                     + 8 * (C(1 + 2 * n!1, x!2) * n!1 * x!2)")
                                                                         (("1"
                                                                           (hide
                                                                            -1)
                                                                           (equate
                                                                            (!
                                                                             12
                                                                             l
                                                                             1
                                                                             1)
                                                                            "C(1 + 2 * n!1, x!2)*id(1 + 2*n!1 - x!2)*id(2*n!1 - x!2)")
                                                                           (("1"
                                                                             (factor!
                                                                              (!
                                                                               12
                                                                               l
                                                                               1)
                                                                              (^
                                                                               2)
                                                                              :id?
                                                                              t)
                                                                             (replace
                                                                              -1
                                                                              -2)
                                                                             (replace
                                                                              -2
                                                                              12)
                                                                             (hide
                                                                              -1
                                                                              -2
                                                                              1)
                                                                             (expand
                                                                              "id"
                                                                              11
                                                                              1
                                                                              :assert?
                                                                              none)
                                                                             (name-replace
                                                                              "xm2"
                                                                              "((1 + 2 * n!1 - (x!2 - 2)) / (x!2 - 2 + 1))")
                                                                             (name-replace
                                                                              "xm1"
                                                                              "((1 + 2 * n!1 - (x!2 - 1)) / x!2)")
                                                                             (factor
                                                                              11
                                                                              l)
                                                                             (permute-mult
                                                                              11
                                                                              r
                                                                              2
                                                                              r)
                                                                             (permute-mult
                                                                              11
                                                                              l
                                                                              1
                                                                              r)
                                                                             (use
                                                                              "both_sides_times1")
                                                                             (replace
                                                                              -1
                                                                              11
                                                                              :hide?
                                                                              t)
                                                                             (expand
                                                                              "id"
                                                                              11
                                                                              5
                                                                              :assert?
                                                                              none)
                                                                             (permute-mult
                                                                              11
                                                                              r
                                                                              -1)
                                                                             (invoke
                                                                              (name-replace
                                                                               "xm3"
                                                                               "%1")
                                                                              (!
                                                                               11
                                                                               l
                                                                               1
                                                                               3))
                                                                             (invoke
                                                                              (name-replace
                                                                               "xm4"
                                                                               "%1")
                                                                              (!
                                                                               11
                                                                               l
                                                                               2))
                                                                             (cross-mult
                                                                              11)
                                                                             (move-terms
                                                                              11
                                                                              l
                                                                              2)
                                                                             (expand
                                                                              "id"
                                                                              11
                                                                              5)
                                                                             (hide
                                                                              -1)
                                                                             (expand
                                                                              "id")
                                                                             (expand
                                                                              "xm4")
                                                                             (expand
                                                                              "id")
                                                                             (expand
                                                                              "xm3")
                                                                             (expand
                                                                              "id")
                                                                             (invoke
                                                                              (case-replace
                                                                               "%1 = xm1 * xm2 *
                                                                                       (20 * x!2 + 36 * n!1 * x!2 + 10 * (x!2 * x!2 * x!2) +
                                                                                         8 * (n!1 * n!1 * x!2 * x!2)
                                                                                         + 8 * (n!1 * x!2 * x!2 * x!2)
                                                                                         + 16 * (n!1 * n!1 * x!2)
                                                                                         - 24 * (n!1 * n!1 * x!2 * x!2)
                                                                                         - 29 * (x!2 * x!2)
                                                                                         - 44 * (n!1 * x!2 * x!2)
                                                                                         - x!2 * x!2 * x!2 * x!2)
                                                                                       + 120
                                                                                       - 12 * (n!1 * x!2 * x!2 * x!2)
                                                                                       - 14 * (x!2 * x!2 * x!2)
                                                                                       - 96 * (n!1 * n!1 * n!1 * x!2)
                                                                                       - 154 * x!2
                                                                                       - 340 * (n!1 * n!1 * x!2)
                                                                                       - 398 * (n!1 * x!2)
                                                                                       + 64 * (n!1 * n!1 * n!1 * n!1)
                                                                                       + 52 * (n!1 * n!1 * x!2 * x!2)
                                                                                       + x!2 * x!2 * x!2 * x!2
                                                                                       + 304 * (n!1 * n!1 * n!1)
                                                                                       + 122 * (n!1 * x!2 * x!2)
                                                                                       + 536 * (n!1 * n!1)
                                                                                       + 71 * (x!2 * x!2)
                                                                                       + 416 * n!1")
                                                                              (!
                                                                               11
                                                                               l))
                                                                             (("1"
                                                                               (hide
                                                                                -1)
                                                                               (name
                                                                                "DRL100"
                                                                                "xm1 * xm2 *
                                                                                                                                                                                                                                                   (20 * x!2 + 36 * n!1 * x!2 + 10 * (x!2 * x!2 * x!2) +
                                                                                                                                                                                                                                                     8 * (n!1 * n!1 * x!2 * x!2)
                                                                                                                                                                                                                                                     + 8 * (n!1 * x!2 * x!2 * x!2)
                                                                                                                                                                                                                                                     + 16 * (n!1 * n!1 * x!2)
                                                                                                                                                                                                                                                     - 24 * (n!1 * n!1 * x!2 * x!2)
                                                                                                                                                                                                                                                     - 29 * (x!2 * x!2)
                                                                                                                                                                                                                                                     - 44 * (n!1 * x!2 * x!2)
                                                                                                                                                                                                                                                     - x!2 * x!2 * x!2 * x!2)")
                                                                               (replace
                                                                                -1)
                                                                               (name
                                                                                "DRL101"
                                                                                "xm1 * xm2")
                                                                               (replace
                                                                                -1)
                                                                               (expand
                                                                                "xm1")
                                                                               (expand
                                                                                "xm2")
                                                                               (rewrite
                                                                                "div_times"
                                                                                -1)
                                                                               (case-replace
                                                                                "DRL101 *
                                                                                                                                                                                                                                                   (20 * x!2 + 36 * n!1 * x!2 + 10 * (x!2 * x!2 * x!2) +
                                                                                                                                                                                                                                                     8 * (n!1 * n!1 * x!2 * x!2)
                                                                                                                                                                                                                                                     + 8 * (n!1 * x!2 * x!2 * x!2)
                                                                                                                                                                                                                                                     + 16 * (n!1 * n!1 * x!2)
                                                                                                                                                                                                                                                     - 24 * (n!1 * n!1 * x!2 * x!2)
                                                                                                                                                                                                                                                     - 29 * (x!2 * x!2)
                                                                                                                                                                                                                                                     - 44 * (n!1 * x!2 * x!2)
                                                                                                                                                                                                                                                     - x!2 * x!2 * x!2 * x!2) = DRL101*x!2*(20 + 36 * n!1 + 10 * (x!2 * x!2) +
                                                                                                                                                                                                                                                     8 * (n!1 * n!1 * x!2)
                                                                                                                                                                                                                                                     + 8 * (n!1 * x!2 * x!2)
                                                                                                                                                                                                                                                     + 16 * (n!1 * n!1)
                                                                                                                                                                                                                                                     - 24 * (n!1 * n!1 * x!2)
                                                                                                                                                                                                                                                     - 29 * x!2
                                                                                                                                                                                                                                                     - 44 * (n!1 * x!2)
                                                                                                                                                                                                                                                     - x!2 * x!2 * x!2)")
                                                                               (("1"
                                                                                 (hide
                                                                                  -1)
                                                                                 (case-replace
                                                                                  "(20 + 36 * n!1 + 10 * (x!2 * x!2) + 8 * (n!1 * n!1 * x!2) +
                                                                                                                                                                                                                                                           8 * (n!1 * x!2 * x!2)
                                                                                                                                                                                                                                                           + 16 * (n!1 * n!1)
                                                                                                                                                                                                                                                           - 24 * (n!1 * n!1 * x!2)
                                                                                                                                                                                                                                                           - 29 * x!2
                                                                                                                                                                                                                                                           - 44 * (n!1 * x!2)
                                                                                                                                                                                                                                                           - x!2 * x!2 * x!2)=(20+16*n!1*n!1 + 36 * n!1 + (-16*n!1*n!1-29-44*n!1) * x!2 +
                                                                                                                                                                                                                                                           (8*n!1+10) * (x!2 * x!2)
                                                                                                                                                                                                                                                           - x!2 * x!2 * x!2)")
                                                                                 (("1"
                                                                                   (hide
                                                                                    -1)
                                                                                   (case-replace
                                                                                    "(6 - 2 * x!2 + 4 * n!1 +
                                                                                                                                                                                                                                                                (4 * (n!1 * n!1) - 2 * (n!1 * x!2) + 6 * n!1)
                                                                                                                                                                                                                                                                + (-2 * (n!1 * x!2) - 3 * x!2 + x!2 * x!2)) = ((10*n!1+6+4*n!1*n!1)-(4*n!1+5)*x!2+x!2*x!2)")
                                                                                   (("1"
                                                                                     (hide
                                                                                      -1)
                                                                                     (case-replace
                                                                                      "((10 * n!1 + 6 + 4 * n!1 * n!1) - (4 * n!1 + 5) * x!2 + x!2 * x!2) = (x!2-(2*n!1+3))*(x!2-(2*n!1+2))")
                                                                                     (("1"
                                                                                       (hide
                                                                                        -1)
                                                                                       (case-replace
                                                                                        "(20 + 16 * n!1 * n!1 + 36 * n!1 +
                                                                                                                                                                                                                                                                             (-16 * n!1 * n!1 - 29 - 44 * n!1) * x!2
                                                                                                                                                                                                                                                                             + (8 * n!1 + 10) * (x!2 * x!2)
                                                                                                                                                                                                                                                                             - x!2 * x!2 * x!2) = (x!2-1)*((8*n!1+9)*x!2-x!2*x!2-(16*n!1*n!1+36*n!1+20))")
                                                                                       (("1"
                                                                                         (hide
                                                                                          -1)
                                                                                         (case-replace
                                                                                          "DRL101 * x!2 *
                                                                                                                                                                                                                                                                                 ((x!2 - 1) *
                                                                                                                                                                                                                                                                                   ((8 * n!1 + 9) * x!2 - x!2 * x!2 -
                                                                                                                                                                                                                                                                                     (16 * n!1 * n!1 + 36 * n!1 + 20))) = (x!2 - (2 * n!1 + 3)) * (x!2 - (2 * n!1 + 2))*((8 * n!1 + 9) * x!2 - x!2 * x!2 -
                                                                                                                                                                                                                                                                                     (16 * n!1 * n!1 + 36 * n!1 + 20))")
                                                                                         (("1"
                                                                                           (hide
                                                                                            -1
                                                                                            -2)
                                                                                           (replace
                                                                                            -1
                                                                                            11
                                                                                            rl)
                                                                                           (assert))
                                                                                          ("2"
                                                                                           (hide-all-but
                                                                                            (-1
                                                                                             -2
                                                                                             -3
                                                                                             1))
                                                                                           (name-replace
                                                                                            "DRL102"
                                                                                            "(x!2 - (2 * n!1 + 3)) * (x!2 - (2 * n!1 + 2))")
                                                                                           (name-replace
                                                                                            "DRL103"
                                                                                            "((8 * n!1 + 9) * x!2 - x!2 * x!2 -
                                                                                                                                                                                                                                                                                           (16 * n!1 * n!1 + 36 * n!1 + 20))")
                                                                                           (rewrite
                                                                                            "div_cancel3"
                                                                                            -1)
                                                                                           (assert))))
                                                                                        ("2"
                                                                                         (hide-all-but
                                                                                          1)
                                                                                         (assert))))
                                                                                      ("2"
                                                                                       (hide-all-but
                                                                                        1)
                                                                                       (assert))))
                                                                                    ("2"
                                                                                     (hide-all-but
                                                                                      1)
                                                                                     (assert))))
                                                                                  ("2"
                                                                                   (hide-all-but
                                                                                    1)
                                                                                   (assert))))
                                                                                ("2"
                                                                                 (hide-all-but
                                                                                  1)
                                                                                 (assert))))
                                                                              ("2"
                                                                               (hide-all-but
                                                                                1)
                                                                               (assert))))
                                                                            ("2"
                                                                             (hide
                                                                              -1
                                                                              -2
                                                                              2
                                                                              13)
                                                                             (cancel-terms
                                                                              1)
                                                                             (equate
                                                                              "id(2 + 3 * x!2 + x!2 * x!2)"
                                                                              "(x!2+1)*(x!2+2)"
                                                                              t)
                                                                             (name-replace
                                                                              "xp2"
                                                                              "x!2 + 2")
                                                                             (field
                                                                              1)
                                                                             (expand
                                                                              "id")
                                                                             (assert))))
                                                                          ("2"
                                                                           (hide-all-but
                                                                            1)
                                                                           (expand
                                                                            "id")
                                                                           (propax))))
                                                                        ("2"
                                                                         (hide
                                                                          13)
                                                                         (expand
                                                                          "C")
                                                                         (expand
                                                                          "factorial"
                                                                          1
                                                                          (1
                                                                           3))
                                                                         (expand
                                                                          "factorial"
                                                                          1
                                                                          (1
                                                                           2
                                                                           3
                                                                           5
                                                                           7))
                                                                         (factor!
                                                                          (!
                                                                           1
                                                                           1
                                                                           1))
                                                                         (factor!
                                                                          (!
                                                                           1
                                                                           1
                                                                           2))
                                                                         (name-replace
                                                                          "CF1"
                                                                          "(6 - 4 * n!1 * x!2 - 5 * x!2 + 10 * n!1 + 4 * n!1 * n!1 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 x!2 * x!2)")
                                                                         (expand
                                                                          "id")
                                                                         (field
                                                                          1))
                                                                        ("3"
                                                                         (assert)
                                                                         (hide
                                                                          12)
                                                                         (equate
                                                                          (!
                                                                           -1
                                                                           l)
                                                                          "(2+2*n!1-x!2)*(3+2*n!1-x!2)"
                                                                          t)
                                                                         (("1"
                                                                           (rewrite
                                                                            "zero_times3"))
                                                                          ("2"
                                                                           (expand
                                                                            "id")
                                                                           (assert))))))))))))
                                                                ("2"
                                                                 (hide 7)
                                                                 (expand
                                                                  "odd?"
                                                                  (-1 2))
                                                                 (skosimp*)
                                                                 (inst
                                                                  +
                                                                  "j!1+1")
                                                                 (assert))))
                                                              ("2"
                                                               (hide 6)
                                                               (expand
                                                                "odd?")
                                                               (skosimp*)
                                                               (inst
                                                                +
                                                                "j!1-1")
                                                               (assert))))))
                                                          ("2"
                                                           (assert))))))))))))))
                                              ("2"
                                               (hide -1 3)
                                               (skosimp*)
                                               (expand*
                                                "FS11"
                                                "FS12"
                                                "FS1"
                                                "FS23")
                                               (expand* "FS22" "FS21")
                                               (expand "FS2")
                                               (expand* "+" "*" "-")
                                               (expand* "atanhF"))
                                              ("3"
                                               (hide-all-but (1 2))
                                               (skosimp*)
                                               (expand "FS33")
                                               (expand "FS32")
                                               (expand "FS31")
                                               (expand "atanhF")
                                               (expand* "*" "+"))))
                                            ("2"
                                             (hide 3)
                                             (skosimp*)
                                             (expand "FS12")
                                             (expand "FS11")
                                             (expand "FS1")
                                             (expand "+")
                                             (expand "atanhF")
                                             (propax))
                                            ("3"
                                             (hide 3)
                                             (skosimp*)
                                             (expand "FS23")
                                             (expand "FS22")
                                             (expand "FS21")
                                             (expand "-")
                                             (expand "*")
                                             (expand "FS2")
                                             (expand "atanhF")
                                             (propax))))
                                          ("2"
                                           (hide 3)
                                           (replace -1 1 rl)
                                           (replace -3 1 rl)
                                           (replace -4 1 rl)
                                           (expand "K3" 1)
                                           (replace -2 1 rl)
                                           (expand "*" 1)
                                           (expand "+" 1)
                                           (expand "sq" 1)
                                           (assert))))
                                        ("2"
                                         (hide-all-but (1 2))
                                         (skosimp*)
                                         (expand "*")
                                         (expand "atanhF")
                                         (propax))
                                        ("3"
                                         (hide-all-but (1 2))
                                         (skosimp*)
                                         (expand "FS32")
                                         (expand "FS31")
                                         (expand "*" 1)
                                         (expand "atanhF")
                                         (propax))))
                                      ("2"
                                       (hide 3)
                                       (replace -1 1 rl)
                                       (expand "K2" 1)
                                       (expand "sq" 1)
                                       (replace -2 1 rl)
                                       (expand "^" 1)
                                       (apply (repeat (expand "expt" 1)))
                                       (expand "*" 1)
                                       (expand "-" 1)
                                       (propax))))
                                    ("2"
                                     (hide-all-but (1 2))
                                     (skosimp*)
                                     (expand "FS22")
                                     (expand "FS2")
                                     (expand "atanhF")
                                     (propax))
                                    ("3"
                                     (hide-all-but (1 2))
                                     (skosimp*)
                                     (expand "FS21")
                                     (expand "FS2")
                                     (expand "atanhF")
                                     (propax))))
                                  ("2"
                                   (hide-all-but 1)
                                   (skosimp*)
                                   (assert))))
                                ("2"
                                 (hide-all-but 1)
                                 (skosimp*)
                                 (assert))))
                              ("2" (assert))))
                            ("2"
                             (hide -3 -4 -5 3)
                             (lemma "sum_polynomial"
                              ("a"
                               "FS11"
                               "n"
                               "2+2*n!1"
                               "b"
                               "FS12"
                               "m"
                               "2*n!1"))
                             (split -1)
                             (("1"
                               (expand "max")
                               (lemma "sum_polynomial"
                                ("a"
                                 "FS11+FS12"
                                 "n"
                                 "2+2*n!1"
                                 "b"
                                 "FS1"
                                 "m"
                                 "2*n!1-2"))
                               (split -1)
                               (("1"
                                 (expand "max")
                                 (replace -2 -1 rl)
                                 (replace -3 -1 rl)
                                 (replace -4 -1 rl)
                                 (simplify -1)
                                 (replace -1 1 rl)
                                 (expand "K1" 1)
                                 (expand "sq" 1)
                                 (expand "^" 1)
                                 (apply (repeat (expand "expt" 1)))
                                 (assert)
                                 (expand "+" 1)
                                 (assert))
                                ("2"
                                 (hide-all-but 1)
                                 (skosimp*)
                                 (expand "FS12" 1)
                                 (expand "FS11" 1)
                                 (expand "+")
                                 (typepred "i!1")
                                 (typepred "n!1")
                                 (expand ">=" -1)
                                 (expand "<=" -1)
                                 (split -1)
                                 (("1"
                                   (assert)
                                   (expand "FS1")
                                   (expand "atanhF")
                                   (propax))
                                  ("2"
                                   (replace -1 * rl)
                                   (assert)
                                   (hide -1)
                                   (expand "FS1")
                                   (expand "atanhF")
                                   (propax))))
                                ("3"
                                 (hide-all-but (1 3))
                                 (skosimp*)
                                 (expand "FS1")
                                 (expand "atanhF")
                                 (propax))))
                              ("2"
                               (hide-all-but (1 3))
                               (skosimp*)
                               (expand "FS11")
                               (expand "FS1")
                               (assert)
                               (expand "atanhF")
                               (propax))
                              ("3"
                               (hide-all-but (1 3))
                               (skosimp*)
                               (expand "FS12")
                               (expand "FS1")
                               (expand "atanhF")
                               (propax))))))
                          ("2"
                           (hide-all-but (1 2))
                           (skosimp*)
                           (assert))))
                        ("2" (hide-all-but (1 2)) (grind))))
                      ("2" (assert))))))
                  ("2" (hide 2) (expand "sq" 1) (assert))))
                ("2"
                 (hide-all-but 1)
                 (skosimp*)
                 (lemma "expt_nonzero" ("n0x" "1-x!1*x!1" "i" "3+2*n!1"))
                 (("1" (assert))
                  ("2"
                   (hide -1)
                   (lemma "trichotomy" ("x" "x!1"))
                   (split -1)
                   (("1"
                     (lemma "sq_lt" ("nna" "x!1" "nnb" "1"))
                     (("1" (expand "sq") (assert)) ("2" (assert))))
                    ("2" (assert))
                    ("3"
                     (lemma "sq_lt" ("nna" "-x!1" "nnb" "1"))
                     (("1" (rewrite "sq_neg") (expand "sq") (assert))
                      ("2" (assert))))))))))
              ("2"
               (hide-all-but 1)
               (skosimp*)
               (lemma "trichotomy" ("x" "x!1"))
               (split -1)
               (("1"
                 (lemma "sq_lt" ("nna" "x!1" "nnb" "1"))
                 (("1" (expand "sq") (assert)) ("2" (assert))))
                ("2" (assert))
                ("3"
                 (lemma "sq_lt" ("nna" "-x!1" "nnb" "1"))
                 (("1" (rewrite "sq_neg") (expand "sq") (assert))
                  ("2" (assert))))))))
            ("2" (propax))))
          ("2" (propax)) ("3" (propax))))
        ("2"
         (hide-all-but 1)
         (skosimp*)
         (lemma "trichotomy" ("x" "x!1"))
         (split -1)
         (("1"
           (lemma "sq_lt" ("nna" "x!1" "nnb" "1"))
           (("1"
             (expand "sq")
             (lemma "sq_lt" ("nna" "x!1" "nnb" "1"))
             (expand "sq")
             (assert))
            ("2" (assert))))
          ("2" (grind))
          ("3"
           (lemma "sq_lt" ("nna" "-x!1" "nnb" "1"))
           (("1" (rewrite "sq_neg") (expand "sq") (assert))
            ("2" (assert))))))))
      ("2" (propax))))
    ("2" (propax)) ("3" (propax))))


proof_type: f_proof
decl_type: formula
library: lnexp_fnd
theory: hyperbolic
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "m")
   (("1" (expand "derivable_n_times?") (propax))
    ("2"
     (skosimp*)
     (expand "derivable_n_times?" 1)
     (expand "derivable_n_times?" 1)
     (case "derivable?[real_abs_lt1](atanhND(n!1))")
     (("1"
       (replace -1)
       (case "derivable?[real_abs_lt1](deriv[real_abs_lt1](atanhND(n!1)))")
       (("1"
         (replace -1)
         (lemma "atanh_taylors_prep6" ("n" "n!1"))
         (case "FORALL (n:nat): (LAMBDA (x: real_abs_lt1): atanhN(n)(x) / atanhD(n)(x)) = atanhND(n)")
         (("1"
           (inst-cp - "n!1")
           (replace -2)
           (inst - "n!1+1")
           (replace -1)
           (hide -1 -2)
           (expand "nderiv" -1)
           (expand "nderiv" -1)
           (expand "nderiv" -1)
           (replace -1 1)
           (inst - "1+n!1"))
          ("2" (hide-all-but 1) (skosimp*) (expand "atanhND") (propax))
          ("3"
           (hide-all-but 1)
           (expand "atanhD")
           (skosimp*)
           (lemma "expt_nonzero" ("n0x" "1-sq(x!1)" "i" "1+2*n!2"))
           (("1" (assert))
            ("2"
             (hide -1)
             (case "x!1>=0")
             (("1"
               (lemma "sq_gt" ("nna" "1" "nnb" "x!1"))
               (("1" (rewrite "sq_1") (assert)) ("2" (propax))))
              ("2"
               (lemma "sq_gt" ("nna" "1" "nnb" "-x!1"))
               (("1" (rewrite "sq_1") (rewrite "sq_neg") (assert))
                ("2" (assert))))))))))
        ("2"
         (hide -2 2)
         (expand "atanhND")
         (lemma "atanh_taylors_prep1" ("n" "n!1" "m" "2"))
         (expand "derivable_n_times?" -1)
         (expand "derivable_n_times?" -1)
         (expand "derivable_n_times?" -1)
         (flatten -1)
         (lemma "identity_derivable_fun[real_abs_lt1]")
         (expand "I")
         (lemma "composition_derivable_fun[real_abs_lt1,real]"
          ("f" "(LAMBDA (x: real_abs_lt1): x)" "g" "atanhN(n!1)"))
         (("1"
           (lemma "composition_derivable_fun[real_abs_lt1,real]"
            ("f" "(LAMBDA (x: real_abs_lt1): x)" "g" "atanhD(n!1)"))
           (assert)
           (expand "o")
           (lemma "deriv_id_fun[real_abs_lt1]")
           (expand "I")
           (expand "const_fun")
           (lemma "deriv_comp_fun[real_abs_lt1,real]"
            ("ff" "(LAMBDA (x: real_abs_lt1): x)" "gg" "atanhN(n!1)"))
           (lemma "deriv_comp_fun[real_abs_lt1,real]"
            ("ff" "(LAMBDA (x: real_abs_lt1): x)" "gg" "atanhD(n!1)"))
           (replace -3)
           (expand "o")
           (expand "*")
           (lemma "deriv_div_fun[real_abs_lt1]"
            ("ff"
             "(LAMBDA (x_1: real_abs_lt1): atanhN(n!1)(x_1))"
             "gg"
             "(LAMBDA (x_1: real_abs_lt1): atanhD(n!1)(x_1))"))
           (("1"
             (expand "/" -1)
             (replace -3)
             (replace -2)
             (expand "*" -1)
             (expand "-" -1)
             (replace -1 1)
             (hide -1)
             (lemma "prod_derivable_fun[real_abs_lt1]"
              ("f1"
               "(LAMBDA (x: real_abs_lt1):
                                         deriv(atanhN(n!1))(x))"
               "f2"
               "(LAMBDA (x: real_abs_lt1):
                                         atanhD(n!1)(x))"))
             (lemma "prod_derivable_fun[real_abs_lt1]"
              ("f1"
               "(LAMBDA (x: real_abs_lt1):
                                         deriv(atanhD(n!1))(x))"
               "f2"
               "(LAMBDA (x: real_abs_lt1):
                                         atanhN(n!1)(x))"))
             (lemma "prod_derivable_fun[real_abs_lt1]"
              ("f1"
               "(LAMBDA (x: real_abs_lt1):
                                         atanhD(n!1)(x))"
               "f2"
               "(LAMBDA (x: real_abs_lt1):
                                         atanhD(n!1)(x))"))
             (assert)
             (lemma "composition_derivable_fun[real_abs_lt1,real]"
              ("f"
               "(LAMBDA (x: real_abs_lt1): x)"
               "g"
               "(deriv(atanhN(n!1)))"))
             (lemma "composition_derivable_fun[real_abs_lt1,real]"
              ("f"
               "(LAMBDA (x: real_abs_lt1): x)"
               "g"
               "(deriv(atanhD(n!1)))"))
             (assert)
             (expand "o")
             (assert)
             (expand "*")
             (lemma "diff_derivable_fun[real_abs_lt1]"
              ("f1"
               "LAMBDA (x_1: real_abs_lt1):
                                              deriv(atanhN(n!1))(x_1) * atanhD(n!1)(x_1)"
               "f2"
               "LAMBDA (x_1: real_abs_lt1):
                                              deriv(atanhD(n!1))(x_1) * atanhN(n!1)(x_1)"))
             (assert)
             (expand "-")
             (lemma "div_derivable_fun[real_abs_lt1]"
              ("f"
               "LAMBDA (x: real_abs_lt1):
                                              deriv(atanhN(n!1))(x) * atanhD(n!1)(x) -
                                               deriv(atanhD(n!1))(x) * atanhN(n!1)(x)"
               "g"
               "LAMBDA (x: real_abs_lt1):(atanhD(n!1)(x) * atanhD(n!1)(x))"))
             (("1" (assert) (expand "/") (propax))
              ("2"
               (hide-all-but 1)
               (expand "atanhD")
               (skosimp*)
               (lemma "expt_pos" ("px" "1-sq(x!1)" "i" "1+2*n!1"))
               (("1"
                 (lemma "sq_nz_pos"
                  ("nz" "(1 - sq(x!1)) ^ (1 + 2 * n!1)"))
                 (("1" (rewrite "sq_rew" -3) (assert)) ("2" (assert))))
                ("2"
                 (hide -1)
                 (case "x!1>=0")
                 (("1"
                   (lemma "sq_gt" ("nna" "1" "nnb" "x!1"))
                   (("1" (rewrite "sq_1") (assert)) ("2" (propax))))
                  ("2"
                   (lemma "sq_gt" ("nna" "1" "nnb" "-x!1"))
                   (("1" (rewrite "sq_1") (rewrite "sq_neg") (assert))
                    ("2" (assert))))))))))
            ("2" (propax))
            ("3"
             (hide-all-but 1)
             (expand "atanhD")
             (skosimp*)
             (lemma "expt_nonzero" ("n0x" "1-sq(x!1)" "i" "1+2*n!1"))
             (("1" (assert))
              ("2"
               (hide -1)
               (case "x!1>=0")
               (("1"
                 (lemma "sq_gt" ("nna" "1" "nnb" "x!1"))
                 (("1" (rewrite "sq_1") (assert)) ("2" (propax))))
                ("2"
                 (lemma "sq_gt" ("nna" "1" "nnb" "-x!1"))
                 (("1" (rewrite "sq_1") (rewrite "sq_neg") (assert))
                  ("2" (assert))))))))
            ("4" (propax))))
          ("2" (hide-all-but 1) (skosimp*) (inst + "x!1+1") (assert))
          ("3" (hide-all-but 1) (lemma "deriv_domain_real") (propax))
          ("4"
           (hide-all-but 1)
           (grind)
           (case "x!1 = 0")
           (("1" (inst + "1/2") (assert))
            ("2" (inst + "x!1/2") (assert))))
          ("5"
           (hide-all-but 1)
           (lemma "deriv_domain_open")
           (inst - "-1" "1"))))
        ("3" (propax))))
      ("2"
       (hide -1 2)
       (expand "atanhND")
       (lemma "atanh_taylors_prep1" ("n" "n!1" "m" "1"))
       (expand "derivable_n_times?")
       (expand "derivable_n_times?")
       (flatten -1)
       (lemma "identity_derivable_fun[real_abs_lt1]")
       (expand "I")
       (lemma "composition_derivable_fun[real_abs_lt1,real]"
        ("f" "(LAMBDA (x: real_abs_lt1): x)" "g" "(atanhN(n!1))"))
       (("1"
         (lemma "composition_derivable_fun[real_abs_lt1,real]"
          ("f" "(LAMBDA (x: real_abs_lt1): x)" "g" "(atanhD(n!1))"))
         (assert)
         (expand "o")
         (lemma "div_derivable_fun[real_abs_lt1]"
          ("f"
           "LAMBDA (x: real_abs_lt1): atanhN(n!1)(x)"
           "g"
           "LAMBDA (x: real_abs_lt1): atanhD(n!1)(x)"))
         (("1" (assert) (expand "/") (propax))
          ("2"
           (hide-all-but 1)
           (skosimp*)
           (expand "atanhD")
           (lemma "expt_nonzero" ("n0x" "1-sq(x!1)" "i" "1+2*n!1"))
           (("1" (assert))
            ("2"
             (hide -1)
             (case "x!1>=0")
             (("1"
               (lemma "sq_gt" ("nna" "1" "nnb" "x!1"))
               (("1" (rewrite "sq_1") (assert)) ("2" (propax))))
              ("2"
               (lemma "sq_gt" ("nna" "1" "nnb" "-x!1"))
               (("1" (rewrite "sq_1") (rewrite "sq_neg") (assert))
                ("2" (assert))))))))))
        ("2" (hide-all-but 1) (skosimp*) (inst + "x!1+1") (assert))
        ("3" (hide-all-but 1) (lemma "deriv_domain_real") (propax))
        ("4"
         (hide-all-but 1)
         (skosimp*)
         (case "x!1 = 0")
         (("1" (inst + "1/2") (assert)) ("2" (inst + "x!1/2") (assert))))
        ("5"
         (hide-all-but 1)
         (lemma "deriv_domain_open")
         (inst - "-1" "1"))))))))


proof_type: f_proof
decl_type: formula
library: lnexp_fnd
theory: hyperbolic
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "m")
   (("1" (expand "nderiv" 1) (propax))
    ("2"
     (skosimp*)
     (inst - "n!1+1")
     (lemma "atanh_taylors_prep6" ("n" "n!1"))
     (expand "nderiv" (-1 1))
     (expand "nderiv" (-1 1))
     (expand "nderiv" -1)
     (case "FORALL (n:nat): (LAMBDA (x: real_abs_lt1): atanhN(n)(x) / atanhD(n)(x))=atanhND(n)")
     (("1"
       (inst-cp - "n!1")
       (replace -2)
       (inst - "1+n!1")
       (replace -1)
       (replace -3 1)
       (assert))
      ("2" (hide-all-but 1) (expand "atanhND") (propax))
      ("3"
       (hide-all-but 1)
       (skosimp*)
       (expand "atanhD")
       (lemma "expt_nonzero" ("n0x" "1-sq(x!1)" "i" "1+2*n!2"))
       (("1" (assert))
        ("2"
         (hide -1)
         (case "x!1>=0")
         (("1"
           (lemma "sq_gt" ("nna" "1" "nnb" "x!1"))
           (("1" (rewrite "sq_1") (assert)) ("2" (propax))))
          ("2"
           (lemma "sq_gt" ("nna" "1" "nnb" "-x!1"))
           (("1" (rewrite "sq_1") (rewrite "sq_neg") (assert))
            ("2" (assert))))))))))
    ("3" (hide 2) (lemma "atanh_taylors_prep7") (propax))))


proof_type: f_proof
decl_type: formula
library: lnexp_fnd
theory: hyperbolic
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (case-replace "n!1=0")
   (("1" (expand "nderiv") (propax))
    ("2"
     (expand "nderiv")
     (replace 1)
     (rewrite "deriv_atanh")
     (case-replace
      "(LAMBDA (x: real_abs_lt1): 1 / (1 - sq(x))) = atanhND(0)")
     (("1"
       (hide -1)
       (case-replace "n!1=1")
       (("1" (expand "even?") (expand "nderiv") (assert))
        ("2"
         (case "2<=n!1")
         (("1"
           (hide 1 2)
           (case-replace "even?(n!1)")
           (("1"
             (copy -1)
             (expand "even?" -1)
             (skosimp*)
             (lemma "div_cancel1" ("x" "j!1" "n0z" "2"))
             (lemma "both_sides_times_pos_le1"
              ("x" "1" "y" "j!1" "pz" "2"))
             (replace -3)
             (replace -5)
             (flatten -1)
             (replace -2)
             (lemma "atanh_taylors_prep8" ("m" "j!1-1" "n" "0"))
             (("1"
               (lemma "atanh_taylors_prep7" ("n" "0" "m" "j!1"))
               (("1"
                 (lemma "nderiv_derivable_aux[real_abs_lt1]"
                  ("n" "2*j!1-2" "f" "atanhND(0)"))
                 (("1"
                   (split -1)
                   (("1" (assert))
                    ("2"
                     (hide 2)
                     (lemma "derivable_n_times_lem[real_abs_lt1]"
                      ("f" "atanhND(0)" "n" "2 * j!1" "m" "2*j!1-1"))
                     (("1" (assert)) ("2" (assert)) ("3" (assert))))))
                  ("2" (assert))))
                ("2" (assert))))
              ("2" (assert))))
            ("2"
             (replace 1)
             (rewrite "even_or_odd")
             (expand "odd?")
             (skosimp*)
             (replace -1)
             (lemma "div_cancel1" ("x" "j!1" "n0z" "2"))
             (replace -1)
             (case "j!1>=0")
             (("1"
               (lemma "atanh_taylors_prep8" ("m" "j!1" "n" "0"))
               (("1" (assert)) ("2" (propax))))
              ("2" (assert))))))
          ("2" (assert))))))
      ("2"
       (hide-all-but 1)
       (expand "atanhND")
       (expand "atanhD")
       (expand "atanhN")
       (expand "polynomial")
       (expand "sigma")
       (expand "atanhF")
       (expand "odd?")
       (expand "factorial")
       (rewrite "C_0")
       (expand "^")
       (expand "expt")
       (expand "expt")
       (expand "sigma")
       (propax))
      ("3"
       (hide-all-but 1)
       (skosimp*)
       (case "x!1>=0")
       (("1"
         (lemma "sq_gt" ("nna" "1" "nnb" "x!1"))
         (("1" (rewrite "sq_1") (assert)) ("2" (propax))))
        ("2"
         (lemma "sq_gt" ("nna" "1" "nnb" "-x!1"))
         (("1" (rewrite "sq_1") (rewrite "sq_neg") (assert))
          ("2" (assert))))))))))


proof_type: f_proof
decl_type: formula
library: lnexp_fnd
theory: hyperbolic
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (lemma "atanh_nderiv" ("n" "n!1"))
   (replace -1)
   (hide -1)
   (case-replace "n!1=0")
   (("1"
     (case "even?(0)")
     (("1" (assert) (expand "atanh") (rewrite "ln_1") (assert))
      ("2" (expand "even?") (inst + "0") (assert))))
    ("2"
     (replace 1)
     (case-replace "n!1=1")
     (("1"
       (case "even?(1)")
       (("1" (expand "even?" -1) (propax))
        ("2"
         (replace 1)
         (expand "atanhND")
         (expand "atanhN")
         (expand "atanhD")
         (expand "polynomial")
         (expand "sigma")
         (expand "atanhF")
         (expand "odd?")
         (rewrite "C_0")
         (rewrite "sq_0")
         (expand "factorial")
         (rewrite "expt_1i")
         (assert)
         (expand "sigma")
         (assert))))
      ("2"
       (case "2<=n!1")
       (("1"
         (hide 1 2)
         (case "even?(n!1)")
         (("1"
           (assert)
           (expand "even?")
           (skosimp*)
           (replace -1)
           (lemma "div_cancel1" ("x" "j!1" "n0z" "2"))
           (replace -1)
           (lemma "both_sides_times_pos_le1"
            ("x" "1" "y" "j!1" "pz" "2"))
           (replace -4 -1)
           (flatten -1)
           (hide -2 -3 -4)
           (expand "atanhND")
           (lemma "identity_derivable_fun[real_abs_lt1]")
           (lemma "deriv_id_fun[real_abs_lt1]")
           (expand "I")
           (lemma "atanh_taylors_prep1" ("n" "j!1-1" "m" "1"))
           (("1"
             (flatten -1)
             (expand "derivable_n_times?")
             (expand "derivable_n_times?")
             (lemma "composition_derivable_fun[real_abs_lt1,real]"
              ("f"
               "(LAMBDA (x: real_abs_lt1): x)"
               "g"
               "(atanhN(j!1 - 1))"))
             (lemma "composition_derivable_fun[real_abs_lt1,real]"
              ("f"
               "(LAMBDA (x: real_abs_lt1): x)"
               "g"
               "(atanhD(j!1 - 1))"))
             (assert)
             (expand "o")
             (lemma "deriv_comp_fun[real_abs_lt1,real]"
              ("ff"
               "(LAMBDA (x: real_abs_lt1): x)"
               "gg"
               "(atanhN(j!1 - 1))"))
             (lemma "deriv_comp_fun[real_abs_lt1,real]"
              ("ff"
               "(LAMBDA (x: real_abs_lt1): x)"
               "gg"
               "(atanhD(j!1 - 1))"))
             (expand "o")
             (replace -7)
             (lemma "atanh_taylors_prep3" ("n" "j!1-1"))
             (lemma "atanh_taylors_prep2" ("n" "j!1-1"))
             (replace -1 -4)
             (replace -2 -3)
             (hide -1 -2)
             (expand "*")
             (lemma "deriv_div_fun[real_abs_lt1]"
              ("ff"
               "(LAMBDA (x_1: real_abs_lt1): atanhN(j!1 - 1)(x_1))"
               "gg"
               "(LAMBDA (x_1: real_abs_lt1): atanhD(j!1 - 1)(x_1))"))
             (("1"
               (assert)
               (expand "/" -1)
               (expand "*" -1)
               (expand "-" -1)
               (replace -1 1)
               (simplify 1)
               (replace -2 1)
               (replace -3 1)
               (hide -1 -2 -3)
               (simplify 1)
               (expand "const_fun" 1)
               (rewrite "polynomial_x0")
               (expand "atanhD" 1)
               (rewrite "sq_0")
               (rewrite "expt_1i" 1)
               (expand "atanhF" 1)
               (assert))
              ("2" (propax))
              ("3"
               (hide-all-but 1)
               (skosimp*)
               (expand "atanhD")
               (lemma "expt_nonzero" ("n0x" "1-sq(x!1)" "i" "2*j!1-1"))
               (("1" (assert))
                ("2"
                 (hide -1)
                 (case "x!1>=0")
                 (("1"
                   (lemma "sq_gt" ("nna" "1" "nnb" "x!1"))
                   (("1" (rewrite "sq_1") (assert)) ("2" (propax))))
                  ("2"
                   (lemma "sq_gt" ("nna" "1" "nnb" "-x!1"))
                   (("1" (rewrite "sq_1") (rewrite "sq_neg") (assert))
                    ("2" (assert))))))))
              ("4" (propax))))
            ("2" (assert))))
          ("2"
           (assert)
           (expand "atanhND")
           (expand "atanhD")
           (rewrite "sq_0")
           (rewrite "expt_1i")
           (expand "atanhN")
           (rewrite "polynomial_x0")
           (("1"
             (expand "atanhF")
             (expand "odd?")
             (rewrite "C_0")
             (lemma "div_cancel1" ("x" "n!1-1" "n0z" "2"))
             (replace -1)
             (assert))
            ("2"
             (hide 3)
             (rewrite "even_or_odd")
             (expand "odd?")
             (propax))))))
        ("2" (assert))))))))


proof_type: f_proof
decl_type: formula
library: lnexp_fnd
theory: hyperbolic
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (case-replace "n!1=0")
   (("1" (expand "derivable_n_times?") (propax))
    ("2"
     (expand "derivable_n_times?")
     (assert)
     (rewrite "deriv_atanh")
     (case-replace
      "(LAMBDA (x: real_abs_lt1): 1 / (1 - sq(x))) = atanhND(0)")
     (("1"
       (lemma "atanh_derivable2")
       (replace -1)
       (hide -1 -2)
       (case-replace "n!1=1")
       (("1" (expand "derivable_n_times?") (propax))
        ("2"
         (case "n!1>=2")
         (("1"
           (hide 1 2)
           (lemma "atanh_taylors_prep7" ("n" "0" "m" "n!1-1"))
           (lemma "derivable_n_times_lem[real_abs_lt1]"
            ("f" "atanhND(0)" "n" "2 * (n!1 - 1)" "m" "n!1-1"))
           (assert))
          ("2" (assert))))))
      ("2"
       (hide 3)
       (expand "atanhND")
       (expand "atanhN")
       (expand "atanhD")
       (expand "^")
       (expand "expt")
       (expand "expt")
       (rewrite "polynomial_n0")
       (expand "atanhF")
       (expand "odd?")
       (rewrite "C_0")
       (expand "factorial")
       (propax))
      ("3"
       (hide 2 3)
       (skosimp*)
       (case "x!1>=0")
       (("1"
         (lemma "sq_gt" ("nna" "1" "nnb" "x!1"))
         (("1" (rewrite "sq_1") (assert)) ("2" (propax))))
        ("2"
         (lemma "sq_gt" ("nna" "1" "nnb" "-x!1"))
         (("1" (rewrite "sq_1") (rewrite "sq_neg") (assert))
          ("2" (assert))))))))))


proof_type: f_proof
decl_type: formula
library: lnexp_fnd
theory: hyperbolic
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (expand "atanh_series_n")
   (expand "atanh_series_term")
   (skolem 1 ("_" "z"))
   (induct "n")
   (("1"
     (expand "sigma")
     (expand "sigma")
     (expand "sigma")
     (lemma "atanh_nderiv_0" ("n" "1"))
     (lemma "atanh_nderiv_0" ("n" "2"))
     (expand "even?" -2)
     (case "even?(2)")
     (("1"
       (replace -1 -2)
       (replace -2)
       (replace -3)
       (expand "factorial")
       (expand "factorial")
       (assert))
      ("2" (expand "even?" 1) (inst + "1") (assert))))
    ("2"
     (skosimp*)
     (expand "sigma" 1)
     (expand "sigma" 1 2)
     (replace -1 1)
     (hide -1)
     (lemma "atanh_nderiv_0" ("n" "4+2*j!1"))
     (case "even?(4+2*j!1)")
     (("1"
       (replace -1)
       (replace -2)
       (rewrite "zero_times1" 1)
       (simplify 1)
       (hide -1 -2)
       (lemma "sigma_eq[nat]"
        ("low"
         "0"
         "high"
         "2+2*j!1"
         "F"
         "LAMBDA (nn: nat):
                       IF nn > 2 + 2 * j!1 OR nn = 0 THEN 0
                       ELSE nderiv[real_abs_lt1](nn, atanh)(0) * z ^ nn /
                             factorial(nn)
                       ENDIF"
         "G"
         "LAMBDA (nn: nat):
                        IF nn > 4 + 2 * j!1 OR nn = 0 THEN 0
                        ELSE nderiv[real_abs_lt1](nn, atanh)(0) * z ^ nn /
                              factorial(nn)
                        ENDIF"))
       (("1"
         (split -1)
         (("1"
           (replace -1 1)
           (hide -1)
           (simplify 1)
           (lemma "atanh_nderiv_0" ("n" "3+2*j!1"))
           (rewrite "even_or_odd" -1)
           (replace -1 1)
           (hide -1)
           (expand "factorial" 1 2)
           (lemma "div_cancel1"
            ("x"
             "(z ^ (3 + 2 * j!1)) / (3 + 2 * j!1)"
             "n0z"
             "factorial(2 + 2 * j!1)"))
           (rewrite "div_div2" -1)
           (replace -1 1)
           (propax))
          ("2" (hide 2) (skosimp*) (assert))))
        ("2"
         (hide 2)
         (skosimp*)
         (lemma "atanh_n_times_derivable" ("n" "nn!1"))
         (propax))
        ("3"
         (hide 2)
         (skosimp*)
         (lemma "atanh_n_times_derivable" ("n" "nn!1"))
         (propax))))
      ("2" (expand "even?" 1) (inst + "2+j!1") (assert))))
    ("3"
     (hide 2)
     (skosimp*)
     (lemma "atanh_n_times_derivable" ("n" "nn!1"))
     (propax))))


proof_type: f_proof
decl_type: formula
library: lnexp_fnd
theory: hyperbolic
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (lemma "Taylors[real_abs_lt1]"
    ("f" "atanh" "n" "2*n!1+2" "aa" "0" "bb" "z!1"))
   (lemma "atanh_n_times_derivable" ("n" "2*n!1+3"))
   (replace -1 -2)
   (skosimp*)
   (inst + "c!1")
   (rewrite "atanh_series_eqv" 1)
   (replace -2 1)
   (simplify 1)
   (hide -1 -2)
   (lemma "extensionality"
    ("f"
     "LAMBDA (nn:nat):
                   IF nn > 2 + 2 * n!1 THEN 0
                   ELSIF nn = 0 THEN atanh(0)
                   ELSE nderiv[real_abs_lt1](nn, atanh)(0) * z!1 ^ nn / factorial(nn)
                   ENDIF"
     "g"
     "LAMBDA (nn: nat):
                    IF nn > 2 + 2 * n!1 OR nn = 0 THEN 0
                    ELSE nderiv[real_abs_lt1](nn, atanh)(0) * z!1 ^ nn /
                          factorial(nn)
                    ENDIF"))
   (("1"
     (split -1)
     (("1" (replace -1 1 rl) (propax))
      ("2"
       (hide 2)
       (skosimp*)
       (case-replace "x!1 > 2 + 2 * n!1")
       (case-replace "x!1=0")
       (("1" (expand "atanh") (rewrite "ln_1") (assert))
        ("2" (assert))))))
    ("2"
     (hide 2)
     (skosimp*)
     (lemma "atanh_n_times_derivable" ("n" "nn!1"))
     (propax))
    ("3"
     (hide 2)
     (skosimp*)
     (lemma "atanh_n_times_derivable" ("n" "nn!1"))
     (propax))))


proof_type: t_proof
decl_type: tcc
library: lnexp_fnd
theory: hyperbolic
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (expand "coth")
   (skosimp*)
   (typepred "tanh(px!1)")
   (case "strict_increasing?(tanh)")
   (("1"
     (expand "strict_increasing?")
     (inst - "0" "px!1")
     (assert)
     (expand "tanh" -1 1)
     (expand "sinh" -1 1)
     (expand "cosh" -1 1)
     (rewrite "exp_0")
     (assert)
     (cross-mult 1))
    ("2"
     (hide-all-but 1)
     (expand "strict_increasing?")
     (skosimp*)
     (expand "tanh")
     (rewrite "div_mult_pos_lt1" 1)
     (lemma "div_mult_pos_lt2"
      ("z" "sinh(y!1)*cosh(x!1)" "py" "cosh(y!1)" "x" "sinh(x!1)"))
     (replace -1)
     (hide -1)
     (expand "sinh")
     (expand "cosh")
     (assert)
     (lemma "both_sides_times_pos_lt1"
      ("pz"
       "4"
       "x"
       "(exp(x!1) - exp(-x!1)) / 2 * ((exp(-y!1) + exp(y!1)) / 2)"
       "y"
       "(exp(y!1) - exp(-y!1)) / 2 * ((exp(-x!1) + exp(x!1)) / 2)"))
     (replace -1 1 rl)
     (hide -1)
     (case-replace
      "(exp(x!1) - exp(-x!1)) / 2 * ((exp(-y!1) + exp(y!1)) / 2) * 4 = (exp(x!1) - exp(-x!1))*(exp(-y!1) + exp(y!1))")
     (("1"
       (case-replace
        "(exp(y!1) - exp(-y!1)) / 2 * ((exp(-x!1) + exp(x!1)) / 2) * 4 = (exp(y!1) - exp(-y!1))*(exp(-x!1) + exp(x!1))")
       (("1"
         (hide -1 -2)
         (assert)
         (name-replace "K1" "-1 * (exp(-x!1) * exp(-y!1))")
         (name-replace "K2" "exp(x!1) * exp(y!1)")
         (lemma "exp_sum" ("x" "-x!1" "y" "y!1"))
         (replace -1 1 rl)
         (lemma "exp_sum" ("x" "-y!1" "y" "x!1"))
         (replace -1 1 rl)
         (case-replace
          "K1 - exp(-x!1 + y!1) + (exp(-y!1 + x!1) + K2) <
                                 K1 - exp(-y!1 + x!1) + (exp(-x!1 + y!1) + K2) IFF exp(-y!1 + x!1) < exp(-x!1+y!1)")
         (("1"
           (hide -1 -2 -3)
           (lemma "exp_strict_increasing")
           (expand "strict_increasing?")
           (inst - "x!1-y!1" "y!1-x!1")
           (assert))
          ("2"
           (hide -1 -2 2)
           (lemma "both_sides_times_pos_lt1"
            ("x" "exp(-y!1 + x!1)" "y" "exp(-x!1 + y!1)" "pz" "2"))
           (replace -1 1 rl)
           (assert)
           (name-replace "K3" "exp(-y!1 + x!1)")
           (name-replace "K4" "exp(-x!1 + y!1)")
           (hide -1 -2)
           (grind))))
        ("2"
         (hide -1 -2 2)
         (name-replace "EXPX" "(exp(-x!1) + exp(x!1))")
         (name-replace "EXPY" "(exp(y!1)-exp(-y!1))")
         (assert))))
      ("2"
       (hide -1 2)
       (name-replace "EXPY" "(exp(-y!1)+exp(y!1))")
       (name-replace "EXPX" "(exp(x!1)-exp(-x!1))")
       (assert))))))


proof_type: t_proof
decl_type: tcc
library: lnexp_fnd
theory: hyperbolic
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (typepred "x!1")
   (lemma "sq_gt" ("nna" "x!1" "nnb" "1"))
   (rewrite "sq_1")
   (assert))


proof_type: t_proof
decl_type: tcc
library: lnexp_fnd
theory: hyperbolic
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (typepred "x!1")
   (lemma "sq_gt" ("nna" "x!1" "nnb" "1"))
   (rewrite "sq_1")
   (replace -2 -1)
   (flatten -1)
   (lemma "sqrt_pos" ("px" "sq(x!1)-1"))
   (("1" (assert)) ("2" (assert))))


proof_type: t_proof
decl_type: tcc
library: lnexp_fnd
theory: hyperbolic
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (typepred "x!1")
   (lemma "trichotomy" ("x" "x!1"))
   (split -1)
   (("1"
     (lemma "sq_lt" ("nna" "x!1" "nnb" "1"))
     (("1" (rewrite "sq_1") (assert)) ("2" (assert))))
    ("2" (replace -1) (rewrite "sq_0") (assert))
    ("3"
     (lemma "sq_lt" ("nna" "-x!1" "nnb" "1"))
     (("1" (rewrite "sq_neg") (rewrite "sq_1") (assert))
      ("2" (assert))))))


proof_type: t_proof
decl_type: tcc
library: lnexp_fnd
theory: hyperbolic
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "atanh_taylors_prep1" ("n" "n!1" "m" "1"))
   (expand "derivable_n_times?")
   (flatten))


proof_type: t_proof
decl_type: tcc
library: lnexp_fnd
theory: hyperbolic
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "atanh_taylors_prep1" ("n" "n!1" "m" "2"))
   (flatten -1)
   (expand "derivable_n_times?" -1)
   (expand "derivable_n_times?" -1)
   (flatten -1))


proof_type: t_proof
decl_type: tcc
library: lnexp_fnd
theory: hyperbolic
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (flatten)
   (hide -1 -2)
   (skosimp*)
   (expand "^")
   (typepred "g!1(x1!1)")
   (lemma "expt_nonzero" ("i" "pn!1" "n0x" "g!1(x1!1)"))
   (assert))


proof_type: t_proof
decl_type: tcc
library: lnexp_fnd
theory: hyperbolic
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (flatten)
   (hide -1 -2 -3)
   (expand "^")
   (skosimp*)
   (typepred "g!1(x1!1)")
   (lemma "expt_nonzero" ("n0x" "g!1(x1!1)" "i" "1+pn!1"))
   (assert))


proof_type: t_proof
decl_type: tcc
library: lnexp_fnd
theory: hyperbolic
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "derivable_n_times?")
   (expand "derivable_n_times?")
   (expand "derivable_n_times?")
   (lemma "atanh_taylors_prep1" ("n" "n!1" "m" "2"))
   (expand "derivable_n_times?")
   (expand "derivable_n_times?")
   (expand "derivable_n_times?")
   (flatten -1)
   (lemma "div_derivable_fun[real_abs_lt1]"
    ("f"
     "LAMBDA (x: real_abs_lt1): atanhN(n!1)(x)"
     "g"
     "LAMBDA (x: real_abs_lt1): atanhD(n!1)(x)"))
   (("1"
     (assert)
     (lemma "identity_derivable_fun[real_abs_lt1]")
     (expand "I")
     (lemma "composition_derivable_fun[real_abs_lt1,real]"
      ("f" "LAMBDA (x: real_abs_lt1): x" "g" "atanhN(n!1)"))
     (("1"
       (lemma "composition_derivable_fun[real_abs_lt1,real]"
        ("f" "LAMBDA (x: real_abs_lt1): x" "g" "atanhD(n!1)"))
       (assert)
       (expand "o")
       (assert)
       (expand "/")
       (assert)
       (lemma "composition_derivable_fun[real_abs_lt1,real]"
        ("f" "LAMBDA (x: real_abs_lt1): x" "g" "deriv(atanhN(n!1))"))
       (lemma "composition_derivable_fun[real_abs_lt1,real]"
        ("f" "LAMBDA (x: real_abs_lt1): x" "g" "deriv(atanhD(n!1))"))
       (assert)
       (expand "o")
       (lemma "deriv_div_fun[real_abs_lt1]"
        ("ff"
         "LAMBDA (x: real_abs_lt1): atanhN(n!1)(x)"
         "gg"
         "LAMBDA (x: real_abs_lt1): atanhD(n!1)(x)"))
       (expand "/")
       (replace -1 1)
       (expand "*" 1)
       (expand "-" 1)
       (hide -1)
       (lemma "div_derivable_fun[real_abs_lt1]"
        ("f"
         "LAMBDA (x_1: real_abs_lt1):
                                                (deriv(LAMBDA (x: real_abs_lt1): atanhN(n!1)(x))(x_1) *
                                                  atanhD(n!1)(x_1)
                                                  -
                                                  deriv(LAMBDA (x: real_abs_lt1): atanhD(n!1)(x))(x_1) *
                                                   atanhN(n!1)(x_1))"
         "g"
         "LAMBDA (x_1: real_abs_lt1):(atanhD(n!1)(x_1) * atanhD(n!1)(x_1))"))
       (("1"
         (split -1)
         (("1" (assert) (expand "/") (propax))
          ("2"
           (hide 2)
           (lemma "prod_derivable_fun[real_abs_lt1]"
            ("f1"
             "LAMBDA (x_1: real_abs_lt1):deriv(LAMBDA (x: real_abs_lt1): atanhD(n!1)(x))(x_1)"
             "f2"
             "LAMBDA (x: real_abs_lt1): atanhN(n!1)(x)"))
           (lemma "prod_derivable_fun[real_abs_lt1]"
            ("f1"
             "LAMBDA (x_1: real_abs_lt1):deriv(LAMBDA (x: real_abs_lt1): atanhN(n!1)(x))(x_1)"
             "f2"
             "LAMBDA (x: real_abs_lt1): atanhD(n!1)(x)"))
           (assert)
           (lemma "deriv_id_fun[real_abs_lt1]")
           (expand "I")
           (expand "const_fun")
           (lemma "deriv_comp_fun[real_abs_lt1,real]"
            ("ff" "LAMBDA (x: real_abs_lt1): x" "gg" "atanhD(n!1)"))
           (lemma "deriv_comp_fun[real_abs_lt1,real]"
            ("ff" "LAMBDA (x: real_abs_lt1): x" "gg" "atanhN(n!1)"))
           (replace -3)
           (expand "o")
           (expand "*")
           (replace -1)
           (replace -2)
           (simplify (-4 -5))
           (lemma "diff_derivable_fun[real_abs_lt1]"
            ("f1"
             "LAMBDA (x_1: real_abs_lt1):
                                                                deriv(atanhN(n!1))(x_1) * atanhD(n!1)(x_1)"
             "f2"
             "LAMBDA (x_1: real_abs_lt1):
                                                                deriv(atanhD(n!1))(x_1) * atanhN(n!1)(x_1)"))
           (assert)
           (expand "-")
           (propax))
          ("3"
           (hide 2)
           (lemma "prod_derivable_fun[real_abs_lt1]"
            ("f1"
             "LAMBDA (x_1: real_abs_lt1): atanhD(n!1)(x_1)"
             "f2"
             "LAMBDA (x_1: real_abs_lt1): atanhD(n!1)(x_1)"))
           (assert)
           (expand "*" -1)
           (propax))))
        ("2"
         (hide-all-but 1)
         (skosimp*)
         (expand "atanhD")
         (case "1-sq(x!1)>0")
         (("1"
           (lemma "expt_plus"
            ("n0x" "1-sq(x!1)" "i" "1+2*n!1" "j" "1+2*n!1"))
           (("1"
             (replace -1 -3 rl)
             (lemma "expt_nonzero" ("n0x" "1-sq(x!1)" "i" "2+4*n!1"))
             (assert))
            ("2" (assert))))
          ("2"
           (hide -1)
           (case "x!1>=0")
           (("1"
             (lemma "sq_gt" ("nna" "1" "nnb" "x!1"))
             (("1" (rewrite "sq_1") (assert)) ("2" (propax))))
            ("2"
             (lemma "sq_gt" ("nna" "1" "nnb" "-x!1"))
             (("1" (rewrite "sq_1") (rewrite "sq_neg") (assert))
              ("2" (assert))))))))))
      ("2" (hide 2) (skosimp*) (inst + "x!1+1") (assert))
      ("3"
       (hide-all-but 1)
       (assert)
       (lemma "deriv_domain_real")
       (propax))
      ("4"
       (hide-all-but 1)
       (skosimp*)
       (typepred "x!1")
       (case "x!1 = 0")
       (("1" (inst + "1/2") (grind)) ("2" (inst + "x!1/2") (assert))))
      ("5"
       (hide-all-but 1)
       (lemma "deriv_domain_open")
       (inst - "-1" "1"))))
    ("2"
     (hide-all-but 1)
     (expand "atanhD")
     (skosimp*)
     (lemma "expt_nonzero" ("n0x" "1-sq(x!1)" "i" "1+2*n!1"))
     (("1" (assert))
      ("2"
       (case "x!1>=0")
       (("1"
         (lemma "sq_gt" ("nna" "1" "nnb" "x!1"))
         (("1" (rewrite "sq_1") (assert)) ("2" (propax))))
        ("2"
         (lemma "sq_lt" ("nna" "-x!1" "nnb" "1"))
         (("1" (rewrite "sq_neg") (rewrite "sq_1") (assert))
          ("2" (assert))))))))))


proof_type: t_proof
decl_type: tcc
library: lnexp_fnd
theory: hyperbolic
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "atanhD")
   (skosimp*)
   (case "sq(x!1)< 1")
   (("1"
     (lemma "expt_pos" ("px" "1 - sq(x!1)" "i" "3 + 2 * n!1"))
     (("1" (assert)) ("2" (assert))))
    ("2"
     (hide -1)
     (lemma "sq_neg_pos_lt" ("a" "x!1" "nnc" "1"))
     (rewrite "sq_1")
     (assert))))


proof_type: t_proof
decl_type: tcc
library: lnexp_fnd
theory: hyperbolic
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (case-replace "n!1=0")
   (("1" (expand "derivable_n_times?") (propax))
    ("2"
     (expand "derivable_n_times?")
     (lemma "atanh_derivable2")
     (lemma "deriv_atanh")
     (replace -1 2)
     (assert)
     (hide -1 -2)
     (case "even?(n!1)")
     (("1"
       (expand "even?")
       (skosimp*)
       (replace -1)
       (lemma "atanh_taylors_prep7" ("n" "0" "m" "j!1"))
       (("1"
         (expand "atanhND")
         (expand "atanhN")
         (expand "atanhD")
         (expand "polynomial")
         (expand "sigma")
         (expand "atanhF")
         (rewrite "C_0")
         (expand "factorial")
         (expand "^" -1)
         (expand "expt" -1)
         (expand "expt" -1)
         (expand "odd?" -1)
         (expand "sigma")
         (lemma "derivable_n_times_lem[real_abs_lt1]"
          ("f"
           "(LAMBDA (x: real_abs_lt1): 1 / (1 - sq(x)))"
           "m"
           "2*j!1-1"
           "n"
           "2*j!1"))
         (("1" (assert)) ("2" (assert)) ("3" (assert))
          ("4"
           (hide-all-but 1)
           (skosimp*)
           (case "x!1>=0")
           (("1"
             (lemma "sq_gt" ("nna" "1" "nnb" "x!1"))
             (("1" (rewrite "sq_1") (assert)) ("2" (propax))))
            ("2"
             (lemma "sq_gt" ("nna" "1" "nnb" "-x!1"))
             (("1" (rewrite "sq_1") (rewrite "sq_neg") (assert))
              ("2" (assert))))))))
        ("2" (assert))))
      ("2"
       (rewrite "even_or_odd")
       (expand "odd?")
       (skosimp*)
       (replace -1 2)
       (lemma "atanh_taylors_prep7" ("n" "0" "m" "j!1"))
       (("1"
         (expand "atanhND")
         (expand "atanhN")
         (expand "atanhD")
         (expand "^" -1)
         (expand "expt" -1)
         (expand "expt" -1)
         (expand "polynomial" -1)
         (expand "sigma" -1)
         (expand "atanhF" -1)
         (rewrite "C_0")
         (expand "factorial")
         (expand "odd?" -1)
         (assert))
        ("2" (assert))))))))


proof_type: t_proof
decl_type: tcc
library: lnexp_fnd
theory: hyperbolic
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (typepred "n!1")
   (expand ">=" -1)
   (expand "<=" -1)
   (split -1)
   (("1"
     (case-replace "n!1=1")
     (("1" (expand "even?") (propax))
      ("2"
       (case "2<=n!1")
       (("1"
         (assert)
         (hide-all-but (-3 3))
         (expand "even?")
         (skosimp*)
         (replace -1)
         (lemma "div_cancel1" ("x" "j!1" "n0z" "2"))
         (replace -1)
         (assert))
        ("2" (assert))))))
    ("2" (assert))))


proof_type: t_proof
decl_type: tcc
library: lnexp_fnd
theory: hyperbolic
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (typepred "n!1")
   (expand ">=" -1)
   (expand "<=" -1)
   (split -1)
   (("1"
     (case-replace "n!1=1")
     (("1" (expand "even?") (propax))
      ("2"
       (case "2<=n!1")
       (("1"
         (hide 1 2 -2)
         (expand "even?")
         (skosimp*)
         (replace -2)
         (lemma "div_cancel1" ("x" "j!1" "n0z" "2"))
         (replace -1)
         (lemma "atanh_taylors_prep7" ("n" "j!1-1" "m" "1"))
         (("1" (expand "derivable_n_times?") (flatten -1))
          ("2" (assert))))
        ("2" (assert))))))
    ("2" (assert))))


proof_type: t_proof
decl_type: tcc
library: lnexp_fnd
theory: hyperbolic
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (rewrite "even_or_odd")
   (typepred "n!1")
   (expand ">=" -1)
   (expand "<=" -1)
   (split -1)
   (("1"
     (expand "odd?")
     (skosimp*)
     (replace -2)
     (lemma "div_cancel1" ("x" "j!1" "n0z" "2"))
     (replace -1)
     (assert))
    ("2" (assert))))


proof_type: t_proof
decl_type: tcc
library: lnexp_fnd
theory: hyperbolic
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (typepred "n!1")
   (expand ">=" -1)
   (expand "<=" -1)
   (split -1)
   (("1" (assert))
    ("2" (replace -1 1 rl) (expand "even?") (inst + "0") (assert))))


proof_type: f_proof
decl_type: formula
library: matrices
theory: matrices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (case "FORALL (i,nn: nat, LL: list[listn[real](nn)]) : i < length[list[real]](LL) IMPLIES  nth[listn[real](nn)](LL, i) = nth[list[real]](LL, i)")
   (("1" (skeep) (insteep) (assert))
    ("2"
     (hide 2)
     (induct "i")
     (("1" (grind))
      ("2"
       (skeep*)
       (expand "nth" 1)
       (inst -1 "nn" "cdr(LL)")
       (assert)
       (hide 2)
       (expand "length" -1)
       (grind))
      ("3" (hide 2) (skeep) (rewrite "length_matrix_eq"))))
    ("3" (hide 2) (skeep) (rewrite "length_matrix_eq"))))


proof_type: f_proof
decl_type: formula
library: matrices
theory: matrices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem 1 ("nn" _))
   (induct "LL")
   (("1" (grind))
    ("2" (skolem 1 ("v" "L")) (flatten) (expand "length" +) (propax))))


proof_type: f_proof
decl_type: formula
library: matrices
theory: matrices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem 1 ("nn" _ _))
   (induct "LL")
   (("1" (grind))
    ("2"
     (skolem 1 ("v" "L"))
     (flatten)
     (assert)
     (skeep)
     (expand "length" +)
     (lift-if)
     (ground)
     (("1"
       (typepred "L")
       (rewrite "every_nth")
       (expand "nth" -2)
       (lift-if)
       (ground)
       (("1" (typepred "v") (grind))
        ("2"
         (inst - "i-1")
         (("1" (flatten) (assert) (grind)) ("2" (grind))))))
      ("2"
       (expand "nth" 2)
       (lift-if)
       (ground)
       (("1"
         (typepred "v")
         (expand "length" -2)
         (lift-if)
         (ground)
         (grind))
        ("2"
         (inst - "i-1")
         (expand "length" -1)
         (lift-if)
         (ground)
         (grind))))))))


proof_type: f_proof
decl_type: formula
library: matrices
theory: matrices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "M")
   (("1" (skeep) (assert) (grind))
    ("2"
     (skolem 1 ("v" "M"))
     (flatten)
     (skeep)
     (assert)
     (splash +)
     (("1"
       (skeep)
       (typepred "j")
       (lift-if)
       (ground)
       (("1"
         (case "j = 0")
         (("1"
           (replace -1)
           (assert)
           (expand "nth" + 1)
           (expand "col" + 1)
           (expand "nth" + 2)
           (expand "access")
           (lift-if)
           (ground)
           (expand "nth" -2)
           (propax))
          ("2"
           (assert)
           (expand "nth" + 1)
           (expand "nth" + 3)
           (expand "col" +)
           (inst - "i")
           (flatten)
           (inst - "j-1")
           (("1" (assert) (lift-if) (ground) (expand "nth" -2) (propax))
            ("2"
             (expand "rows" -2)
             (expand "length" -2)
             (assert)
             (expand "rows" 1)
             (assert))))))
        ("2"
         (inst - "i")
         (flatten)
         (assert)
         (expand "col" +)
         (expand "nth" 2)
         (lift-if)
         (ground)
         (("1"
           (replaces -1)
           (expand "access" 1)
           (lift-if)
           (ground)
           (expand "nth" 2)
           (propax))
          ("2"
           (inst - "j-1")
           (("1"
             (assert)
             (replaces -4)
             (lift-if)
             (ground)
             (expand "nth" 3)
             (propax))
            ("2"
             (expand "rows" (-1 1))
             (expand "length" -1)
             (assert))))))))
      ("2" (typepred "col(cons(v,M))(i)") (propax))))
    ("3"
     (hide 2)
     (skeep)
     (skosimp*)
     (typepred "j!1")
     (expand "rows")
     (propax))
    ("4" (hide 2) (skosimp*) (typepred "j!1") (expand "rows") (propax))
    ("5" (hide 2) (skosimp*) (typepred "j!1") (expand "rows") (assert))))


proof_type: f_proof
decl_type: formula
library: matrices
theory: matrices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (rewrite "list_extensionality[real]")
   (splash)
   (("1"
     (skeep)
     (typepred "n")
     (lemma "col_def")
     (inst - "M" "i")
     (flatten)
     (assert)
     (inst - "n")
     (replaces -2)
     (assert)
     (typepred "columns(M)")
     (inst - "n")
     (("1"
       (assert)
       (expand "zero" 1)
       (typepred "array2list[real](rows(M))(LAMBDA (p: nat): 0)")
       (inst - "n"))
      ("2" (assert) (typepred "col(M)(i)") (expand "rows") (assert))))
    ("2" (typepred "col(M)(i)") (assert))))


proof_type: f_proof
decl_type: formula
library: matrices
theory: matrices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "access")
   (lift-if)
   (ground)
   (expand "zero" 1)
   (typepred "array2list[real](n)(LAMBDA (p: nat): 0)")
   (inst - "i")
   (assert))


proof_type: f_proof
decl_type: formula
library: matrices
theory: matrices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "col_def")
   (inst?)
   (flatten)
   (assert)
   (expand "access" 1)
   (lift-if)
   (ground)
   (("1"
     (inst - "i")
     (assert)
     (lift-if)
     (ground)
     (("1"
       (replaces -2)
       (expand "entry")
       (expand "access")
       (expand "row")
       (assert)
       (copy -3)
       (expand "rows" -1)
       (assert))
      ("2"
       (replaces -1)
       (expand "entry" 2)
       (expand "row" 2)
       (copy -2)
       (expand "rows" -1)
       (assert)
       (expand "access" 2)
       (propax))))
    ("2"
     (expand "entry" 2)
     (copy -1)
     (expand "rows" -1)
     (expand "row" 2)
     (assert)
     (expand "access" 2)
     (expand "length" 2)
     (propax))))


proof_type: f_proof
decl_type: formula
library: matrices
theory: matrices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (case "null?(SM)")
   (("1" (hide 2) (grind))
    ("2"
     (assert)
     (hide 2)
     (typepred "columns(SM)")
     (assert)
     (skosimp*)
     (typepred "SM")
     (assert)
     (inst - "0" "i!1")
     (expand "nth" -2 1)
     (assert))))


proof_type: f_proof
decl_type: formula
library: matrices
theory: matrices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (typepred "M")
   (typepred "columns(M)")
   (assert)
   (split)
   (("1" (flatten) (hide-all-but (-1 -5)) (grind))
    ("2" (skosimp*) (inst - "i!1") (inst - "i!1") (assert))))


proof_type: f_proof
decl_type: formula
library: matrices
theory: matrices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (typepred "SM")
   (assert)
   (split -)
   (("1" (hide-all-but (-1 -3)) (grind))
    ("2"
     (expand "row")
     (typepred "columns(SM)")
     (assert)
     (split -)
     (("1" (hide-all-but (-1 -5)) (grind))
      ("2" (skosimp*) (inst - "i" "i!1") (assert))))))


proof_type: f_proof
decl_type: formula
library: matrices
theory: matrices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "entry")
   (expand "row")
   (expand "access")
   (lift-if)
   (typepred "columns(M)")
   (ground)
   (("1" (inst - "i") (assert)) ("2" (inst - "i") (assert))))


proof_type: f_proof
decl_type: formula
library: matrices
theory: matrices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "entry")
   (expand "rows")
   (expand "row")
   (expand "access")
   (lift-if)
   (assert)
   (ground)
   (typepred "columns(M)")
   (inst - "i")
   (assert))


proof_type: f_proof
decl_type: formula
library: matrices
theory: matrices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "v1")
   (("1" (grind))
    ("2"
     (skolem 1 ("r" "v"))
     (flatten)
     (skeep)
     (expand "+")
     (expand "access" +)
     (lift-if)
     (lift-if)
     (lift-if)
     (lift-if)
     (lift-if)
     (lift-if)
     (assert)
     (lift-if)
     (ground)
     (("1"
       (expand "add" +)
       (lift-if)
       (ground)
       (("1" (grind))
        ("2"
         (expand "nth" + 1)
         (lift-if)
         (ground)
         (("1" (replaces -1) (expand "nth" +) (propax))
          ("2"
           (inst - "i-1" "cdr(v2)")
           (assert)
           (expand "nth" + 2)
           (assert)
           (expand "access")
           (lift-if)
           (lift-if)
           (lift-if)
           (lift-if)
           (assert)
           (lift-if)
           (lift-if)
           (lift-if)
           (assert)
           (ground)
           (("1" (grind)) ("2" (grind)) ("3" (grind)) ("4" (grind))
            ("5" (grind)) ("6" (grind)) ("7" (grind)) ("8" (grind))))))))
      ("2"
       (expand "add" +)
       (lift-if)
       (ground)
       (expand "nth" + 1)
       (lift-if)
       (ground)
       (("1"
         (replaces -1)
         (expand "nth" + 1)
         (expand "length" 3)
         (assert))
        ("2"
         (inst - "i-1" "cdr(v2)")
         (expand "access" -)
         (lift-if)
         (assert)
         (lift-if)
         (assert)
         (lift-if)
         (assert)
         (lift-if)
         (lift-if)
         (assert)
         (lift-if)
         (assert)
         (lift-if)
         (ground)
         (("1" (grind)) ("2" (grind)) ("3" (grind)) ("4" (grind))
          ("5" (grind)) ("6" (grind)) ("7" (grind)) ("8" (grind))))))
      ("3"
       (expand "add" +)
       (lift-if)
       (ground)
       (("1" (grind))
        ("2"
         (expand "nth" + 1)
         (lift-if)
         (ground)
         (("1" (grind))
          ("2"
           (inst - "i-1" "cdr(v2)")
           (expand "access")
           (lift-if)
           (assert)
           (lift-if)
           (assert)
           (lift-if)
           (assert)
           (lift-if)
           (lift-if)
           (assert)
           (lift-if)
           (assert)
           (lift-if)
           (grind))))))
      ("4"
       (typepred "add(cons(r,v),v2)")
       (expand "max")
       (lift-if)
       (ground))
      ("5"
       (typepred "add(cons(r,v),v2)")
       (expand "max")
       (lift-if)
       (ground))
      ("6" (typepred "add(cons(r,v),v2)") (expand "max") (ground))
      ("7" (typepred "add(cons(r,v),v2)") (expand "max") (ground))))))


proof_type: f_proof
decl_type: formula
library: matrices
theory: matrices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "v")
   (("1" (grind))
    ("2"
     (skolem 1 ("r" "v"))
     (flatten)
     (skosimp*)
     (expand "*")
     (expand "scal" +)
     (expand "access" +)
     (lift-if)
     (lift-if)
     (lift-if)
     (ground)
     (("1"
       (expand "nth" + 1)
       (lift-if)
       (ground)
       (("1" (replaces -1) (expand "nth" +) (propax))
        ("2"
         (inst - "i!1-1" "r!1")
         (expand "access")
         (assert)
         (lift-if)
         (lift-if)
         (lift-if)
         (assert)
         (ground)
         (("1" (replaces -2) (expand "nth" + 2) (propax))
          ("2"
           (expand "scal" 1)
           (lift-if)
           (ground)
           (("1" (expand "length" -2) (assert))
            ("2" (expand "length" 2) (grind))))))))
      ("2" (expand "length" -1) (grind)) ("3" (grind))))))


proof_type: f_proof
decl_type: formula
library: matrices
theory: matrices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "list_extensionality[real]")
   (inst?)
   (assert)
   (hide 2)
   (skosimp*)
   (lemma "access_scal")
   (inst - "n!1" "1" "v")
   (expand "access")
   (assert))


proof_type: f_proof
decl_type: formula
library: matrices
theory: matrices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "v1")
   (("1"
     (expand "length" 1 1)
     (expand "min")
     (assert)
     (skeep)
     (lift-if)
     (ground)
     (expand "dot")
     (propax))
    ("2"
     (skolem 1 ("r" "l"))
     (flatten)
     (skeep)
     (expand "dot" +)
     (lift-if)
     (ground)
     (("1"
       (case "NOT v2 = null")
       (("1" (assert))
        ("2"
         (replaces -1)
         (expand "length" + 2)
         (expand "min" +)
         (assert)
         (lift-if)
         (ground))))
      ("2"
       (expand "length" + 1)
       (assert)
       (inst - "cdr(v2)")
       (expand "length" + 1)
       (lift-if)
       (assert)
       (ground)
       (("1"
         (case "NOT l = null")
         (("1" (assert))
          ("2"
           (replaces -1)
           (assert)
           (expand "dot" 1 1)
           (expand "length" 1 1)
           (assert)
           (expand "min" 1)
           (expand "sigma")
           (expand "sigma")
           (expand "access" + 1)
           (expand "length" 1)
           (expand "nth" 1 1)
           (expand "access")
           (lift-if)
           (ground)
           (("1" (expand "nth") (propax))
            ("2" (expand "length" 1) (assert))))))
        ("2"
         (expand "length" -1 1)
         (expand "length" + 2)
         (case "NOT min(1 + length[real](cdr(l)), length[real](cdr(v2))) = min(length[real](cdr(l)), length(cdr(v2)) - 1) + 1")
         (("1" (hide-all-but 1) (expand "min") (lift-if) (ground))
          ("2"
           (replace -1)
           (invoke (name "S" "%1") (! -2 2 2))
           (replace -1)
           (rewrite "sigma_first" +)
           (lemma "sigma_shift")
           (inst -
            "LAMBDA (k: nat): access(cons(r, l))(k) * access(v2)(k)" "S"
            "0" "1")
           (assert)
           (replaces -1)
           (assert)
           (expand "access" + 3)
           (lift-if)
           (ground)
           (("1"
             (expand "nth" +)
             (expand "access" + 3)
             (lift-if)
             (ground)
             (("1"
               (expand "nth" +)
               (assert)
               (replaces -5)
               (rewrite "sigma_eq")
               (hide 2)
               (skolem 1 "nn")
               (expand "access")
               (lift-if)
               (lift-if)
               (lift-if)
               (lift-if)
               (lift-if)
               (lift-if)
               (lift-if)
               (assert)
               (ground)
               (("1" (expand "nth" + 3) (expand "nth" + 4) (propax))
                ("2" (expand "length" 1) (assert))
                ("3" (expand "length" 2) (assert))
                ("4" (expand "length" 3) (assert))
                ("5"
                 (expand "length" -1)
                 (assert)
                 (expand "length" 2)
                 (assert))))
              ("2" (expand "length" 1) (assert))))
            ("2" (expand "length" 1) (assert))))))))))
    ("3"
     (hide 2)
     (skeep)
     (inst + "min(length[real](v1), length[real](v2)) + 5")
     (assert))))


proof_type: f_proof
decl_type: formula
library: matrices
theory: matrices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "*")
   (rewrite "dot_eq_sigma")
   (rewrite "sigma_restrict_eq_0")
   (hide 2)
   (skosimp*)
   (expand "access" + 2)
   (ground)
   (expand "zero")
   (typepred "array2list[real](n)(LAMBDA (p: nat): 0)")
   (inst - "i!1")
   (assert))


proof_type: f_proof
decl_type: formula
library: matrices
theory: matrices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "v1")
   (("1" (grind))
    ("2"
     (skolem 1 ("r" "l"))
     (flatten)
     (assert)
     (skeep)
     (expand "*")
     (expand "dot" +)
     (lift-if)
     (ground)
     (inst - "cdr(v2)")
     (assert))))


proof_type: f_proof
decl_type: formula
library: matrices
theory: matrices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (invoke (name "KV" "%1") (! 2 1 1))
   (replaces -1)
   (typepred "KV")
   (typepred "columns(KV)")
   (split -)
   (("1"
     (flatten)
     (case "NOT m = 0")
     (("1" (hide-all-but (-1 -5 1)) (grind)) ("2" (propax))))
    ("2" (skosimp*) (inst - "i!1") (inst - "i!1") (assert))))


proof_type: f_proof
decl_type: formula
library: matrices
theory: matrices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (split)
   (("1" (flatten) (assert))
    ("2"
     (flatten)
     (case "null?(SM1) OR null?(SM2)")
     (("1" (hide (-3 -4)) (grind))
      ("2"
       (flatten)
       (copy 3)
       (label "ans" 4)
       (hide "ans")
       (rewrite "list_extensionality[list[real]]" 1)
       (reveal "ans")
       (copy -1)
       (expand "rows" -1)
       (assert)
       (skolem 2 "i")
       (rewrite "list_extensionality[real]" 2)
       (lemma "full_matrix_columns")
       (inst-cp - "SM1")
       (inst - "SM2")
       (assert)
       (typepred "SM1")
       (assert)
       (hide -1)
       (inst - "i" "0")
       (typepred "SM2")
       (assert)
       (hide -1)
       (inst - "i" "0")
       (expand "nth" -1 2)
       (expand "nth" -2 2)
       (assert)
       (skolem + "j")
       (inst - "i" "j")
       (("1" (expand "entry") (expand "access") (expand "row") (propax))
        ("2" (assert) (typepred "i") (expand "rows" 1) (propax))))))))


proof_type: f_proof
decl_type: formula
library: matrices
theory: matrices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (case "null?(SM)")
   (("1" (grind))
    ("2"
     (rewrite "full_matrix_eq")
     (("1"
       (name "FM" "form_matrix(entry(SM), rows(SM), columns(SM))")
       (assert)
       (replace -1)
       (case "NOT (rows(SM) = rows(FM) AND
                              columns(SM) = columns(FM))")
       (("1"
         (hide 3)
         (split)
         (("1" (typepred "FM") (expand "rows") (assert))
          ("2"
           (typepred "FM")
           (typepred "columns(FM)")
           (assert)
           (case "null?(FM)")
           (("1" (hide-all-but (-1 -5 2)) (grind))
            ("2" (assert) (skosimp*) (inst -5 "i!1") (assert))))))
        ("2"
         (flatten)
         (assert)
         (typepred "FM")
         (skeep)
         (inst - "i" "j")
         (assert)
         (expand "entry")
         (expand "row")
         (expand "access")
         (assert)
         (lift-if)
         (lift-if)
         (lift-if)
         (assert)
         (lift-if)
         (ground)
         (copy -5)
         (expand "rows" -1)
         (assert)
         (grind))))
      ("2"
       (flatten)
       (assert)
       (skosimp*)
       (name "FM" "form_matrix(entry(SM), rows(SM), columns(SM))")
       (replaces -1)
       (typepred "FM")
       (inst-cp - "i!1")
       (inst - "j!1")
       (assert))))))


proof_type: f_proof
decl_type: formula
library: matrices
theory: matrices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (name "FM" "form_matrix(F,m,n)")
   (replaces -1)
   (typepred "FM")
   (expand "entry")
   (expand "row")
   (assert)
   (expand "access")
   (assert)
   (lift-if)
   (lift-if)
   (lift-if)
   (lift-if)
   (ground)
   (("1" (inst - "i") (inst - "i" "j")) ("2" (inst - "i") (assert))
    ("3" (inst - "i") (assert))))


proof_type: f_proof
decl_type: formula
library: matrices
theory: matrices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (name "FM" "form_matrix(F,m,n)")
   (replaces -1)
   (typepred "FM")
   (expand "entry")
   (expand "row")
   (assert)
   (expand "access")
   (assert)
   (lift-if)
   (ground)
   (("1" (inst - "i") (inst - "i" "j")) ("2" (inst - "i") (assert))))


proof_type: f_proof
decl_type: formula
library: matrices
theory: matrices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (ground)
   (("1"
     (skeep)
     (lemma "entry_form_matrix2")
     (inst - "F" "i" "j" "m" "n")
     (assert)
     (lemma "entry_form_matrix2")
     (inst - "G" "i" "j" "m" "n")
     (assert))
    ("2"
     (name "f" "form_matrix(F, m, n)")
     (replaces -1)
     (name "g" "form_matrix(G, m, n)")
     (replaces -1)
     (rewrite "full_matrix_eq")
     (("1"
       (case "NOT rows(f) = rows(g)")
       (("1" (assert) (hide 2) (expand "rows") (assert))
        ("2"
         (copy -1)
         (expand "rows" -1)
         (assert)
         (case "NOT columns(f)=columns(g)")
         (("1"
           (hide 2)
           (expand "f" 1)
           (expand "g" 1)
           (lemma "columns_form_matrix")
           (inst?)
           (assert)
           (split -)
           (("1"
             (typepred "form_matrix(F,0,n)")
             (case "NOT form_matrix(F,0,n)=null")
             (("1" (expand "length" -2) (assert))
              ("2"
               (replace -1)
               (typepred "form_matrix(G,0,n)")
               (case "NOT form_matrix(G,0,n)=null")
               (("1" (expand "length" -2) (assert)) ("2" (assert))))))
            ("2"
             (assert)
             (lemma "columns_form_matrix")
             (inst - "m" "n" "G")
             (assert)
             (replace -1)
             (typepred "form_matrix(F,0,n)")
             (case "NOT form_matrix(F,0,n)=null")
             (("1" (expand "length" -2) (assert))
              ("2"
               (assert)
               (typepred "form_matrix(G,0,n)")
               (case "NOT form_matrix(G,0,n)=null")
               (("1" (expand "length" -2) (assert)) ("2" (assert))))))))
          ("2"
           (assert)
           (copy -3)
           (expand "rows" -1)
           (skeep)
           (expand "f" 1)
           (expand "g" 1)
           (rewrite "entry_form_matrix2" 1)
           (("1"
             (rewrite "entry_form_matrix2" 1)
             (("1"
               (inst - "i" "j")
               (assert)
               (typepred "i")
               (expand "rows" -1)
               (assert)
               (typepred "j")
               (expand "f" -1)
               (lemma "columns_form_matrix")
               (inst?)
               (assert))
              ("2" (typepred "i") (expand "rows" -1) (assert))
              ("3"
               (typepred "j")
               (expand "f" -1)
               (lemma "columns_form_matrix")
               (inst?)
               (assert)
               (typepred "i")
               (expand "rows" -1)
               (assert))))
            ("2" (typepred "i") (expand "rows" -1) (assert))
            ("3"
             (typepred "j")
             (expand "f" -1)
             (lemma "columns_form_matrix")
             (inst?)
             (assert)
             (typepred "i")
             (expand "rows" -1)
             (assert))))))))
      ("2"
       (flatten)
       (typepred "g")
       (skeep)
       (inst-cp - "i")
       (inst - "j")
       (assert))
      ("3"
       (flatten)
       (typepred "f")
       (skeep)
       (inst-cp - "i")
       (inst - "j")
       (assert))))))


proof_type: f_proof
decl_type: formula
library: matrices
theory: matrices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (case "m = 0")
   (("1"
     (skeep)
     (case "NOT M = null")
     (("1" (typepred "M") (grind))
      ("2"
       (inst - "LAMBDA (i,j): 0")
       (case "NOT form_matrix(LAMBDA (i,j):0,m,n)=null")
       (("1"
         (replaces -2)
         (typepred "form_matrix(LAMBDA (i, j): 0, 0, n)")
         (expand "length" -2)
         (assert))
        ("2" (assert))))))
    ("2"
     (skeep)
     (case "M = null")
     (("1" (typepred "M") (expand "length" -2) (assert))
      ("2"
       (lemma "matrix2array")
       (inst - "M")
       (("1"
         (case "rows(M) = m and columns(M)=n")
         (("1" (inst?) (ground))
          ("2"
           (split +)
           (("1" (expand "rows" 1) (assert))
            ("2"
             (typepred "columns(M)")
             (assert)
             (skosimp*)
             (typepred "M")
             (inst - "i!1")
             (assert))))))
        ("2"
         (assert)
         (skeep)
         (typepred "M")
         (inst-cp - "i")
         (inst - "j")
         (assert))))))))


proof_type: f_proof
decl_type: formula
library: matrices
theory: matrices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (typepred "null[list[real]]*M")
   (expand "rows" -2)
   (hide-all-but (-2 +))
   (grind :exclude "*"))


proof_type: f_proof
decl_type: formula
library: matrices
theory: matrices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (name "NN" "M*null[list[real]]")
   (replace -1)
   (assert)
   (splash)
   (("1"
     (typepred "NN")
     (skeep)
     (inst - "i")
     (hide-all-but (-3 1))
     (grind))
    ("2" (typepred "NN") (expand "rows" -2) (propax))))


proof_type: f_proof
decl_type: formula
library: matrices
theory: matrices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (assert)
   (typepred "columns(M*N)")
   (typepred "M*N")
   (assert)
   (case "null?(M*N)")
   (("1"
     (assert)
     (case "NOT M = null")
     (("1" (hide-all-but (-1 -3 1)) (grind))
      ("2" (replace -1) (rewrite "mult_null_left"))))
    ("2" (assert) (skosimp*) (inst - "i!1") (assert))))


proof_type: f_proof
decl_type: formula
library: matrices
theory: matrices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (typepred "columns(append(M,N))")
   (split -)
   (("1"
     (flatten)
     (case "NOT (M = null and N = null)")
     (("1"
       (lemma "length_append[list[real]]")
       (inst - "M" "N")
       (hide-all-but (-1 -2 1))
       (grind :exclude "append"))
      ("2"
       (flatten)
       (replaces -1)
       (replaces -1)
       (assert)
       (hide -)
       (grind))))
    ("2"
     (skosimp*)
     (typepred "i!1")
     (rewrite "length_append" -1)
     (typepred "columns(M)")
     (assert)
     (case "null?(M)")
     (("1"
       (case "NOT M = null")
       (("1" (assert))
        ("2"
         (replaces -1)
         (rewrite "append_null_left")
         (expand "columns" + 2)
         (expand "max")
         (lift-if)
         (ground))))
      ("2"
       (case "null?(N)")
       (("1"
         (case "N = null")
         (("1"
           (replaces -1)
           (rewrite "append_null")
           (expand "columns" + 3)
           (expand "max")
           (propax))
          ("2" (assert))))
        ("2"
         (assert)
         (typepred "columns(N)")
         (assert)
         (skolem - ("jn"))
         (skolem - ("jm"))
         (case "columns(append(M, N)) <= max(columns(M), columns(N))")
         (("1"
           (case "columns(append(M, N)) >= max(columns(M), columns(N))")
           (("1" (assert))
            ("2"
             (hide (-1 4))
             (inst-cp -7 "jm")
             (("1"
               (inst-cp -7 "length(M)+jn")
               (("1"
                 (rewrite "nth_append" -8)
                 (rewrite "nth_append" -9)
                 (assert)
                 (expand "max" 1)
                 (lift-if)
                 (ground))
                ("2" (rewrite "length_append") (assert))))
              ("2" (rewrite "length_append") (assert))))))
          ("2"
           (hide 4)
           (case "i!1 < length(M)")
           (("1"
             (rewrite "nth_append")
             (assert)
             (inst -4 "i!1")
             (assert))
            ("2"
             (inst -1 "i!1-length(M)")
             (("1" (rewrite "nth_append") (assert))
              ("2" (assert))))))))))))))


proof_type: f_proof
decl_type: formula
library: matrices
theory: matrices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "full_matrix_eq")
   (inst?)
   (("1"
     (assert)
     (hide 3)
     (case "NOT (rows(append(M, N) * A) = rows(append(M * A, N * A)) AND
                                                       columns(append(M, N) * A) = columns(append(M * A, N * A)))")
     (("1"
       (hide 2)
       (split)
       (("1"
         (rewrite "rows_mult")
         (expand "rows")
         (rewrite "length_append")
         (rewrite "length_append")
         (typepred "M*A")
         (typepred "N*A")
         (expand "rows")
         (assert))
        ("2"
         (lemma "columns_mult")
         (inst?)
         (split -)
         (("1"
           (replaces -1)
           (assert)
           (rewrite "columns_append")
           (lemma "columns_mult")
           (inst-cp - "M" "A")
           (assert)
           (replaces -2)
           (inst - "N" "A")
           (ground)
           (("1" (grind)) ("2" (expand "max") (grind))))
          ("2" (assert) (hide 1) (grind))))))
      ("2"
       (flatten)
       (assert)
       (skeep)
       (typepred "i")
       (typepred "j")
       (lemma "columns_mult")
       (inst?)
       (ground)
       (("1"
         (replaces -1)
         (rewrite "rows_mult")
         (expand "rows" -2)
         (rewrite "length_append")
         (expand "*" 1 1)
         (expand "mult")
         (rewrite "entry_form_matrix")
         (expand "entry" 1)
         (expand "row")
         (lift-if)
         (lift-if)
         (lift-if)
         (assert)
         (ground)
         (("1"
           (rewrite "length_append")
           (rewrite "length_append")
           (lemma "rows_mult")
           (inst-cp - "M" "A")
           (inst - "N" "A")
           (expand "rows")
           (replaces -1)
           (replaces -1)
           (assert))
          ("2"
           (rewrite "length_append")
           (rewrite "length_append")
           (lemma "rows_mult")
           (inst-cp - "M" "A")
           (inst - "N" "A")
           (expand "rows")
           (assert))
          ("3"
           (rewrite "length_append")
           (rewrite "length_append")
           (lemma "rows_mult")
           (inst-cp - "M" "A")
           (inst - "N" "A")
           (expand "rows")
           (assert))
          ("4"
           (expand "access")
           (lift-if)
           (assert)
           (ground)
           (("1"
             (rewrite "nth_append" 1)
             (rewrite "nth_append" 1)
             (("1"
               (lemma "rows_mult")
               (expand "rows" -1)
               (rewrite -1)
               (hide -1)
               (lift-if)
               (ground)
               (("1"
                 (typepred "M*A")
                 (hide (-1 -2 -3))
                 (inst - "i" "j")
                 (expand "entry" -1)
                 (expand "row" -1)
                 (expand "access")
                 (lemma "rows_mult")
                 (expand "rows" -1)
                 (rewrite -1)
                 (assert)
                 (expand "*")
                 (assert))
                ("2"
                 (typepred "N*A")
                 (hide (-1 -2 -3))
                 (inst - "i-length(M)" "j")
                 (expand "entry")
                 (expand "row" -1)
                 (expand "access")
                 (lemma "rows_mult")
                 (expand "rows" -1)
                 (rewrite -1)
                 (assert)
                 (expand "*")
                 (assert))))
              ("2"
               (hide 2)
               (lemma "rows_mult")
               (expand "rows" -1)
               (rewrite -1)
               (rewrite -1))))
            ("2"
             (rewrite "nth_append" 1)
             (("1"
               (lemma "rows_mult")
               (expand "rows" -1)
               (rewrite -1)
               (hide -1)
               (lift-if)
               (ground)
               (("1" (typepred "M*A") (inst - "i") (assert))
                ("2" (typepred "N*A") (inst - "i-length(M)") (assert))))
              ("2"
               (lemma "rows_mult")
               (expand "rows" -1)
               (rewrite -1)
               (rewrite -1))))))))
        ("2" (hide-all-but (-1 2)) (grind))))))
    ("2"
     (flatten)
     (skosimp*)
     (rewrite "nth_append")
     (("1"
       (rewrite "nth_append")
       (("1"
         (lemma "rows_mult")
         (expand "rows" -1)
         (rewrite -1)
         (rewrite -1)
         (assert)
         (assert)
         (lift-if)
         (lift-if)
         (lift-if)
         (ground)
         (("1"
           (typepred "M*A")
           (inst-cp - "i!1")
           (inst-cp - "j!1")
           (ground))
          ("2"
           (typepred "M*A")
           (inst?)
           (typepred "N*A")
           (inst?)
           (assert))
          ("3"
           (typepred "M*A")
           (inst?)
           (typepred "N*A")
           (inst?)
           (assert))
          ("4"
           (typepred "N*A")
           (inst-cp - "i!1-length(M)")
           (inst-cp - "j!1-length(M)")
           (ground))))
        ("2"
         (assert)
         (lift-if)
         (ground)
         (("1"
           (rewrite "nth_append")
           (("1"
             (typepred "M*A")
             (inst?)
             (typepred "N*A")
             (inst?)
             (assert))
            ("2" (typepred "j!1") (rewrite "length_append"))))
          ("2" (typepred "j!1") (rewrite "length_append"))))))
      ("2" (typepred "i!1") (rewrite "length_append"))))))


proof_type: f_proof
decl_type: formula
library: matrices
theory: matrices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "M")
   (("1"
     (skeep)
     (rewrite "mult_null_left")
     (rewrite "mult_null_left")
     (rewrite "mult_null_left"))
    ("2"
     (skolem 1 ("v" "M"))
     (flatten)
     (skeep)
     (rewrite "cons_append")
     (lemma "append_mult")
     (inst - "N" "(: v :)" "M")
     (assert)
     (replaces -1)
     (lemma "append_mult")
     (inst - "A" "(: v :) * N" "M*N")
     (assert)
     (split -)
     (("1"
       (replaces -1)
       (lemma "append_mult")
       (inst - "N*A" "(: v :)" "M")
       (assert)
       (replaces -1)
       (assert)
       (inst-cp - "A" "N")
       (replaces -2)
       (assert)
       (case "FORALL (X,Y:Matrix): null?(X) OR LET K = (: v :) IN (K*X)*Y = K*(X*Y)")
       (("1" (inst - "N" "A") (assert))
        ("2"
         (hide-all-but 1)
         (skeep)
         (assert)
         (name "K" "(: v :)")
         (replace -1)
         (case "NOT length(K) = 1")
         (("1" (expand "K" 1) (grind))
          ("2"
           (rewrite "full_matrix_eq" 2)
           (case "NOT (rows((K * X) * Y) = rows(K * (X * Y)) AND
                                                                                                                                                                columns((K * X) * Y) = columns(K * (X * Y)))")
           (("1"
             (hide 3)
             (split)
             (("1"
               (assert)
               (rewrite "rows_mult")
               (rewrite "rows_mult")
               (rewrite "rows_mult"))
              ("2"
               (lemma "columns_mult")
               (inst?)
               (split -)
               (("1"
                 (replaces -1)
                 (lemma "columns_mult")
                 (inst?)
                 (assert)
                 (replaces -1)
                 (lemma "columns_mult")
                 (inst?)
                 (assert))
                ("2"
                 (typepred "K*X")
                 (expand "rows")
                 (assert)
                 (replace -7)
                 (hide-all-but (-2 -5))
                 (grind))))))
            ("2"
             (flatten)
             (assert)
             (skeep)
             (typepred "i")
             (typepred "j")
             (copy -2)
             (expand "rows" -1)
             (assert)
             (expand "*" +)
             (expand "mult" +)
             (rewrite "entry_form_matrix2")
             (("1"
               (rewrite "entry_form_matrix2")
               (("1"
                 (case "NOT i = 0")
                 (("1"
                   (assert)
                   (rewrite "rows_mult")
                   (rewrite "rows_mult")
                   (expand "rows")
                   (assert))
                  ("2"
                   (replaces -1)
                   (assert)
                   (expand "row" + 1)
                   (assert)
                   (lift-if)
                   (ground)
                   (("1"
                     (typepred
                      "form_matrix(LAMBDA (i, j: nat): dot(row(K)(i),col(X)(j)),
                                                                                                                                                                                                                rows(K), columns(X))")
                     (expand "rows")
                     (assert))
                    ("2"
                     (expand "row" + 2)
                     (case "NOT rows(K) = 1")
                     (("1" (expand "rows" 1) (propax))
                      ("2"
                       (replaces -1)
                       (assert)
                       (name "FKXM"
                             "form_matrix(LAMBDA (i, j: nat): dot(row(K)(i),col(X)(j)), 1,
                                                                                                                                                                                                                                                                               columns(X))")
                       (replace -1)
                       (name "FXYM"
                             "form_matrix(LAMBDA (i, j: nat): dot(row(X)(i) , col(Y)(j)), rows(X),
                                                                                                                                                                                                                                                                             columns(Y))")
                       (replace -1)
                       (typepred "FKXM")
                       (case "nth(K,0) = v")
                       (("1"
                         (replace -1)
                         (assert)
                         (typepred "FKXM")
                         (inst -4 "0" _)
                         (expand "row" -4 1)
                         (hide (-1 -6))
                         (rewrite "dot_eq_sigma" 2)
                         (inst-cp - "0")
                         (replaces -3)
                         (assert)
                         (typepred "col(Y)(j)")
                         (hide -1)
                         (replaces -1)
                         (case "NOT (LAMBDA (k: nat):
                                                                                                                                                                                                                                                                                     access(nth(FKXM, 0))(k) * access(col(Y)(j))(k))=(LAMBDA (k:nat):dot(row(K)(0) , col(X)(k))*access(col(Y)(j))(k))")
                         (("1"
                           (hide 3)
                           (decompose-equality 1)
                           (inst -3 "x!1")
                           (("1"
                             (assert)
                             (expand "access" 1 1)
                             (lift-if)
                             (assert)
                             (ground)
                             (inst-cp -6 "0")
                             (replace -7)
                             (assert)
                             (lemma "col_zero")
                             (inst - "X" "x!1")
                             (assert)
                             (replaces -1)
                             (lemma "dot_zero_right")
                             (expand "*" -1)
                             (rewrite -1))
                            ("2"
                             (assert)
                             (lemma "col_zero")
                             (inst - "X" "x!1")
                             (assert)
                             (replaces -1)
                             (lemma "dot_zero_right")
                             (expand "*" -1)
                             (rewrite -1)
                             (assert)
                             (expand "access" + 1)
                             (lift-if)
                             (ground)
                             (inst - "0"))))
                          ("2"
                           (replaces -1)
                           (case "NOT row(K)(0) = v")
                           (("1" (expand "row" 1) (propax))
                            ("2"
                             (replace -1)
                             (assert)
                             (lemma "dot_eq_sigma")
                             (case "NOT (LAMBDA (k: nat): dot(v , col(X)(k)) * access(col(Y)(j))(k)) = (LAMBDA (k: nat): sigma(0, min(length(v)-1, rows(X)-1),
                                                                                                                                                                                                                                                                                                                          LAMBDA (i: nat): (access(v)(i) * access(col(X)(k))(i))*access(col(Y)(j))(k)))")
                             (("1"
                               (decompose-equality 1)
                               (("1"
                                 (inst - "v" "col(X)(x!1)")
                                 (replaces -1)
                                 (rewrite "sigma_scal_right" :dir rl)
                                 (typepred "col(X)(x!1)")
                                 (replace -2)
                                 (propax))
                                ("2"
                                 (flatten)
                                 (inst + "2")
                                 (hide-all-but (1 2))
                                 (assert))))
                              ("2"
                               (replaces -1)
                               (rewrite "sigma_swap")
                               (hide (-1 -2 -3 -4 -5 -6 -7 -8 -9 -10))
                               (typepred "FXYM")
                               (hide -1)
                               (rewrite "dot_eq_sigma" 2)
                               (typepred "col(FXYM)(j)")
                               (hide -1)
                               (replace -1)
                               (expand "rows" + 3)
                               (replace -2)
                               (rewrite "sigma_eq")
                               (("1"
                                 (hide 3)
                                 (skosimp*)
                                 (typepred "n!1")
                                 (expand "access" + 5)
                                 (lift-if)
                                 (assert)
                                 (ground)
                                 (("1"
                                   (lemma "col_def")
                                   (inst - "FXYM" "j")
                                   (flatten)
                                   (assert)
                                   (inst - "n!1")
                                   (assert)
                                   (lift-if)
                                   (ground)
                                   (("1"
                                     (replaces -2)
                                     (inst -9 "n!1" "j")
                                     (("1"
                                       (expand "row" -9)
                                       (assert)
                                       (lift-if)
                                       (ground)
                                       (("1"
                                         (typepred "col(FXYM)(j)")
                                         (replaces -2)
                                         (assert)
                                         (expand "rows")
                                         (assert))
                                        ("2"
                                         (expand "rows")
                                         (assert)
                                         (replaces -1)
                                         (rewrite "dot_eq_sigma" 2)
                                         (rewrite "sigma_scal" :dir rl)
                                         (typepred "col(Y)(j)")
                                         (hide -1)
                                         (replaces -1)
                                         (expand "rows" 2)
                                         (invoke
                                          (name "K1" "%1")
                                          (! 2 1 2))
                                         (replace -1)
                                         (invoke
                                          (name "K2" "%1")
                                          (! 2 2 2))
                                         (replace -1)
                                         (invoke
                                          (name "F1" "%1")
                                          (! 2 1 3))
                                         (replace -1)
                                         (invoke
                                          (name "F2" "%1")
                                          (! 2 2 3))
                                         (replace -1)
                                         (hide (-1 -2 -3 -4))
                                         (case "NOT K1>=K2")
                                         (("1"
                                           (expand "K1" 1)
                                           (expand "K2" 1)
                                           (typepred "columns(X)")
                                           (inst - "n!1")
                                           (assert)
                                           (expand "min" 1)
                                           (lift-if)
                                           (lift-if)
                                           (lift-if)
                                           (assert))
                                          ("2"
                                           (lemma "sigma_split")
                                           (inst - "F1" "K1" "0" "K2")
                                           (assert)
                                           (replaces -1)
                                           (case "NOT -1<=K2")
                                           (("1"
                                             (expand "K2" 1)
                                             (expand "min")
                                             (lift-if)
                                             (ground))
                                            ("2"
                                             (assert)
                                             (hide -1)
                                             (replaces -1)
                                             (case
                                              "NOT sigma(1+K2,K1,F1)=0")
                                             (("1"
                                               (hide 3)
                                               (rewrite
                                                "sigma_restrict_eq_0")
                                               (skosimp*)
                                               (typepred "i!1")
                                               (expand "K2")
                                               (expand "min" -1)
                                               (lift-if)
                                               (ground)
                                               (expand "F1" 2)
                                               (case
                                                "access(col(X)(i!1))(n!1)=0")
                                               (("1" (assert))
                                                ("2"
                                                 (expand "access" 1)
                                                 (lift-if)
                                                 (ground)
                                                 (lemma "col_def")
                                                 (inst - "X" "i!1")
                                                 (flatten)
                                                 (replaces -1)
                                                 (inst - "n!1")
                                                 (assert))))
                                              ("2"
                                               (replaces -1)
                                               (assert)
                                               (rewrite "sigma_eq" 2)
                                               (skosimp*)
                                               (expand "F1" 1)
                                               (expand "F2" 1)
                                               (lemma "col_def")
                                               (inst - "X" "n!2")
                                               (flatten)
                                               (inst - "n!1")
                                               (assert)
                                               (expand "access" 1 1)
                                               (replaces -2)
                                               (assert)
                                               (expand "access" + 4)
                                               (assert))))))))))
                                      ("2" (inst - "n!1") (assert))))
                                    ("2"
                                     (inst - "n!1")
                                     (assert)
                                     (typepred "j")
                                     (lemma "columns_mult")
                                     (inst?)
                                     (assert)
                                     (case "NOT K*X = null")
                                     (("1" (assert))
                                      ("2"
                                       (replace -1)
                                       (assert)
                                       (expand "rows" -16)
                                       (expand "*" -16)
                                       (expand "mult")
                                       (assert)
                                       (typepred
                                        "form_matrix(LAMBDA (i, j: nat): dot(row(null)(i) , col(Y)(j)),
                                                                                                                                                                                                                          rows(null), columns(Y))")
                                       (replaces -2)
                                       (expand "rows" -19)
                                       (assert))))))
                                  ("2"
                                   (replace -3)
                                   (expand "rows" 1)
                                   (replace -4)
                                   (hide-all-but (-2 1))
                                   (grind :exclude "length"))))
                                ("2" (flatten) (inst + "2") (assert))))
                              ("3" (flatten) (inst + "2") (assert))))))))
                        ("2"
                         (replace -13 1 :dir rl)
                         (hide-all-but 1)
                         (grind))))))))))
                ("2" (rewrite "rows_mult" -3) (rewrite "rows_mult" -3))
                ("3"
                 (invoke (name "KV" "%1") (! 1 2 1))
                 (replace -1)
                 (lemma "columns_mult")
                 (inst - "K*X" "Y")
                 (assert)
                 (split -1)
                 (("1"
                   (assert)
                   (typepred "KV")
                   (replace -5)
                   (lemma "columns_form_matrix")
                   (inst?)
                   (assert)
                   (hide-all-but (-1 2))
                   (grind))
                  ("2"
                   (typepred "K*X")
                   (hide-all-but (-2 -6 -14))
                   (grind))))))
              ("2"
               (rewrite "rows_mult")
               (rewrite "rows_mult")
               (rewrite "rows_form_matrix"))
              ("3"
               (lemma "columns_mult")
               (inst?)
               (assert)
               (typepred "K*X")
               (replaces -2)
               (case "NOT rows(K)=0")
               (("1"
                 (expand "rows")
                 (assert)
                 (hide-all-but (-2 -6 1))
                 (grind))
                ("2"
                 (hide-all-but (-14 -1))
                 (replace -2 :dir rl)
                 (grind))))))))))))
      ("2" (grind))))))


proof_type: f_proof
decl_type: formula
library: matrices
theory: matrices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (invoke (name "f" "%1") (! 1 1 1))
   (replaces -1)
   (invoke (name "g" "%1") (! 1 1 2))
   (replaces -1)
   (invoke (name "h" "%1") (! 1 2))
   (("1"
     (replaces -1)
     (case "f = null")
     (("1"
       (replace -1)
       (rewrite "mult_null_left")
       (case "length(h)=0")
       (("1" (grind))
        ("2"
         (hide 2)
         (typepred "h")
         (typepred "f")
         (replace -9)
         (rewrite "length_null")
         (assert))))
      ("2"
       (case "g = null")
       (("1" (typepred "g") (replace -5) (expand "length" -2) (assert))
        ("2"
         (case "h = null")
         (("1"
           (typepred "h")
           (replace -5)
           (expand "length" -2)
           (typepred "f")
           (expand "length" -2)
           (lift-if)
           (ground))
          ("2"
           (rewrite "full_matrix_eq" 4)
           (("1"
             (case "NOT rows(f*g)=rows(h)")
             (("1"
               (hide 5)
               (rewrite "rows_mult")
               (expand "rows")
               (assert))
              ("2"
               (assert)
               (case "NOT columns(f*g)=columns(h)")
               (("1"
                 (rewrite "columns_mult")
                 (typepred "g")
                 (expand "g" 1)
                 (expand "h" 1)
                 (lemma "columns_form_matrix")
                 (inst?)
                 (assert)
                 (replaces -1)
                 (lemma "columns_form_matrix")
                 (inst?)
                 (assert))
                ("2"
                 (assert)
                 (skeep)
                 (typepred "i")
                 (typepred "j")
                 (typepred "f*g")
                 (inst - "i" "j")
                 (hide (-1 -2 -3 -5))
                 (replaces -1)
                 (expand "*" +)
                 (rewrite "dot_eq_sigma")
                 (case "NOT columns(f*g)=n")
                 (("1"
                   (lemma "columns_mult")
                   (inst?)
                   (assert)
                   (replaces -1)
                   (expand "g" 1)
                   (lemma "columns_form_matrix")
                   (inst?)
                   (assert))
                  ("2"
                   (case "NOT rows(f*g) = k")
                   (("1"
                     (expand "rows" 1)
                     (assert)
                     (typepred "f*g")
                     (expand "rows")
                     (assert))
                    ("2"
                     (typepred "h")
                     (inst - "i" "j")
                     (("1"
                       (hide -1)
                       (expand "row" -3)
                       (lift-if)
                       (assert)
                       (expand "entry" +)
                       (expand "row" +)
                       (expand "access" + 3)
                       (lift-if)
                       (assert)
                       (ground)
                       (("1"
                         (replaces -4)
                         (case "NOT length(nth(f, i)) = m")
                         (("1" (typepred "f") (inst - "i"))
                          ("2"
                           (replaces -1)
                           (assert)
                           (case "NOT length(col(g)(j))=m")
                           (("1"
                             (hide 2)
                             (lemma "col_def")
                             (inst?)
                             (flatten)
                             (assert)
                             (replaces -1)
                             (expand "rows" 1)
                             (assert))
                            ("2"
                             (replaces -1)
                             (expand "min" 1 1)
                             (rewrite "sigma_eq")
                             (hide 2)
                             (skosimp*)
                             (lemma "col_def")
                             (inst?)
                             (flatten)
                             (expand "access" 1 2)
                             (assert)
                             (lift-if)
                             (ground)
                             (("1"
                               (inst - "n!1")
                               (replaces -3)
                               (assert)
                               (lift-if)
                               (ground)
                               (("1"
                                 (expand "access" 1)
                                 (lift-if)
                                 (ground)
                                 (("1"
                                   (typepred "f")
                                   (inst - "i" "n!1")
                                   (typepred "g")
                                   (inst - "n!1" "j")
                                   (assert)
                                   (expand "row")
                                   (assert))
                                  ("2"
                                   (expand "rows")
                                   (assert)
                                   (replace -3)
                                   (typepred "f")
                                   (inst - "i")
                                   (assert))))
                                ("2"
                                 (typepred "g")
                                 (inst - "n!1")
                                 (assert))))
                              ("2" (expand "rows") (assert))))))))
                        ("2" (typepred "h") (inst - "i") (assert))))
                      ("2" (assert)) ("3" (assert))))))))))))
            ("2"
             (skeep)
             (typepred "h")
             (inst-cp - "i")
             (inst - "j")
             (assert))))))))))
    ("2" (hide 2) (skosimp*) (inst + "m+10") (assert))))


proof_type: f_proof
decl_type: formula
library: matrices
theory: matrices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (assert)
   (expand "+")
   (expand "add")
   (lemma "columns_form_matrix")
   (inst?)
   (assert)
   (invoke (name "FM" "%1") (! 1 1 1))
   (replaces -1)
   (typepred "FM")
   (case "NOT (M = null and N = null)")
   (("1" (hide-all-but (-5 1)) (grind))
    ("2"
     (flatten)
     (replaces -1)
     (replaces -1)
     (replace -5)
     (case "NOT FM = null")
     (("1" (assert) (hide-all-but (-2 1)) (grind))
      ("2" (replaces -1) (expand "columns" +) (expand "max") (propax))))))


proof_type: f_proof
decl_type: formula
library: matrices
theory: matrices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (rewrite "full_matrix_eq")
   (("1"
     (splash +)
     (("1"
       (skeep)
       (typepred "i")
       (typepred "j")
       (typepred "(M+N)+A")
       (inst - "i" "j")
       (replaces -4)
       (typepred "M+N")
       (inst - "i" "j")
       (replaces -4)
       (typepred "M+(N+A)")
       (inst - "i" "j")
       (replaces -4)
       (typepred "N+A")
       (inst - "i" "j")
       (replaces -4)
       (assert))
      ("2"
       (rewrite "columns_add")
       (rewrite "columns_add")
       (rewrite "columns_add")
       (rewrite "columns_add")
       (hide -)
       (grind :exclude "columns"))
      ("3"
       (rewrite "rows_add")
       (rewrite "rows_add")
       (rewrite "rows_add")
       (rewrite "rows_add")
       (grind :exclude "rows"))))
    ("2"
     (flatten)
     (skeep)
     (typepred "i")
     (typepred "j")
     (assert)
     (typepred "M+(N+A)")
     (inst-cp - "i")
     (inst - "j")
     (assert))
    ("3"
     (flatten)
     (typepred "(M+N)+A")
     (skeep)
     (inst-cp - "i")
     (inst-cp - "j")
     (assert))))


proof_type: f_proof
decl_type: formula
library: matrices
theory: matrices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (rewrite "full_matrix_eq")
   (("1"
     (splash +)
     (("1"
       (skeep)
       (typepred "i")
       (typepred "j")
       (typepred "M+N")
       (inst -4 "i" "j")
       (replace -4)
       (typepred "N+M")
       (inst -4 "i" "j")
       (replace -4)
       (propax))
      ("2"
       (rewrite "columns_add")
       (rewrite "columns_add")
       (ground)
       (expand "max")
       (hide -)
       (grind :exclude "columns"))
      ("3"
       (rewrite "rows_add")
       (rewrite "rows_add")
       (grind :exclude "rows"))))
    ("2"
     (flatten)
     (skeep)
     (typepred "i")
     (typepred "j")
     (assert)
     (typepred "N+M")
     (inst-cp - "i")
     (inst - "j")
     (assert))
    ("3"
     (flatten)
     (typepred "M+N")
     (skeep)
     (inst-cp - "i")
     (inst-cp - "j")
     (assert))))


proof_type: f_proof
decl_type: formula
library: matrices
theory: matrices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "*")
   (expand "scal")
   (lemma "columns_form_matrix")
   (inst?)
   (ground)
   (copy -1)
   (expand "rows" -1)
   (replace -2)
   (assert)
   (expand "form_matrix")
   (expand "array2list" + 1)
   (expand "array2list_it")
   (case "M = null")
   (("1" (assert)) ("2" (assert) (expand "length" -1) (assert))))


proof_type: f_proof
decl_type: formula
library: matrices
theory: matrices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (typepred "Id(pm)")
   (inst -8 "columns(D1)" "D1")
   (assert)
   (split 1)
   (("1" (expand "rows") (propax))
    ("2"
     (skosimp*)
     (typepred "D1")
     (split -2)
     (("1" (expand "rows") (expand "length") (assert))
      ("2"
       (typepred "columns(D1)")
       (assert)
       (skosimp*)
       (inst - "i!2" "i!1")
       (assert))))))


proof_type: f_proof
decl_type: formula
library: matrices
theory: matrices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (typepred "Id(pm)")
   (inst -9 "rows(D1)" "D1")
   (assert)
   (split 1)
   (("1" (expand "rows") (propax))
    ("2"
     (skosimp*)
     (typepred "D1")
     (split -2)
     (("1" (expand "rows") (expand "length") (assert))
      ("2"
       (typepred "columns(D1)")
       (assert)
       (skosimp*)
       (inst - "i!2" "i!1")
       (assert))))))


proof_type: f_proof
decl_type: formula
library: matrices
theory: matrices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "transpose")
   (rewrite "entry_form_matrix")
   (lift-if)
   (ground)
   (("1"
     (expand "entry")
     (expand "row")
     (expand "access")
     (lift-if)
     (assert)
     (ground)
     (typepred "columns(PFM)")
     (assert)
     (inst - "j")
     (assert))
    ("2"
     (expand "rows")
     (expand "entry")
     (expand "access")
     (expand "row")
     (lift-if)
     (lift-if)
     (lift-if)
     (ground))))


proof_type: f_proof
decl_type: formula
library: matrices
theory: matrices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (rewrite "full_matrix_eq")
   (split)
   (("1" (rewrite "rows_transpose") (rewrite "columns_transpose"))
    ("2" (rewrite "columns_transpose") (rewrite "rows_transpose"))
    ("3"
     (skosimp*)
     (rewrite "entry_transpose")
     (rewrite "entry_transpose"))))


proof_type: f_proof
decl_type: formula
library: matrices
theory: matrices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "transpose")
   (replace -1)
   (rewrite "form_matrix_mult")
   (lemma "columns_mult")
   (inst?)
   (assert)
   (split -)
   (("1"
     (replace -1)
     (rewrite "rows_mult")
     (rewrite "form_matrix_eq")
     (skosimp*)
     (assert)
     (expand "*" + 1)
     (expand "mult" 1)
     (rewrite "entry_form_matrix")
     (rewrite "dot_eq_sigma" 1)
     (rewrite "length_row")
     (("1"
       (rewrite "length_col")
       (replace -2)
       (expand "min" 1)
       (rewrite "sigma_eq")
       (hide 2)
       (skosimp*)
       (lemma "col_def")
       (inst?)
       (assert)
       (expand "access")
       (lift-if)
       (ground)
       (("1"
         (rewrite -2)
         (lift-if)
         (ground)
         (("1"
           (expand "entry")
           (expand "row")
           (expand "access")
           (lift-if)
           (lift-if)
           (lift-if)
           (lift-if)
           (lift-if)
           (lift-if)
           (assert)
           (lift-if)
           (lift-if)
           (assert)
           (ground)
           (typepred "columns(D1)")
           (inst - "j!1")
           (assert)
           (expand "rows")
           (assert))
          ("2"
           (lemma "length_row")
           (inst - "D2" "n!1")
           (assert)
           (expand "row" -1)
           (assert)
           (ground)
           (("1" (lift-if) (ground))
            ("2"
             (lemma "length_row")
             (inst?)
             (expand "rows")
             (assert))))))
        ("2"
         (typepred "n!1")
         (rewrite "length_row" 1)
         (("1" (assert)) ("2" (expand "rows") (propax))))))
      ("2" (expand "rows") (propax))))
    ("2"
     (typepred "D1")
     (expand "rows" -3)
     (expand "length" -3)
     (assert))))


proof_type: f_proof
decl_type: formula
library: matrices
theory: matrices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (rewrite "full_matrix_eq")
   (split)
   (("1" (rewrite "rows_transpose") (assert))
    ("2" (rewrite "columns_transpose") (assert))
    ("3"
     (skosimp*)
     (rewrite "entry_transpose")
     (rewrite "entry_Id")
     (rewrite "entry_Id")
     (lift-if)
     (lift-if)
     (lift-if)
     (ground))))


proof_type: f_proof
decl_type: formula
library: matrices
theory: matrices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "list_extensionality[real]")
   (inst?)
   (assert)
   (skosimp*)
   (both-sides-f -3 "entry")
   (decompose-equality -1)
   (inst - "(0,n!1)")
   (expand "vect2matrix")
   (rewrite "entry_form_matrix")
   (rewrite "entry_form_matrix")
   (expand "access")
   (propax))


proof_type: t_proof
decl_type: tcc
library: matrices
theory: matrices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (assert)
   (split)
   (("1"
     (expand "max")
     (case "length[real](car[list[real]](M)) < v(cdr[list[real]](M))")
     (("1"
       (assert)
       (typepred "v(cdr[list[real]](M))")
       (skeep)
       (typepred "i")
       (case "i = 0")
       (("1" (expand "nth" 1) (assert))
        ("2"
         (assert)
         (inst - "i-1")
         (("1" (assert) (expand "nth" +) (propax))
          ("2" (assert) (expand "length" -1) (assert))))))
      ("2"
       (assert)
       (skeep)
       (case "i = 0")
       (("1" (expand "nth" 2) (assert))
        ("2"
         (assert)
         (typepred "v(cdr[list[real]](M))")
         (inst - "i-1")
         (("1" (assert) (expand "nth" 3) (assert))
          ("2" (typepred "i") (expand "length" -1) (assert))))))
      ("3" (expand "length" 1 2) (assert))))
    ("2"
     (expand "max" 1)
     (case "length[real](car[list[real]](M)) < v(cdr[list[real]](M))")
     (("1"
       (assert)
       (typepred "v(cdr[list[real]](M))")
       (assert)
       (skosimp*)
       (inst + "i!1+1")
       (("1" (expand "nth" 1) (propax))
        ("2" (typepred "i!1") (expand "length" 1) (assert))))
      ("2"
       (assert)
       (inst + "0")
       (("1" (expand "nth" 2) (propax)) ("2" (assert) (hide 2) (grind))))
      ("3" (assert) (expand "length" 1 2) (assert))))))


proof_type: t_proof
decl_type: tcc
library: matrices
theory: matrices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "rows" +)
   (expand "length" + 2)
   (assert)
   (expand "length" + 1)
   (typepred "v(cdr[list[real]](M))(i)")
   (replaces -2)
   (expand "rows")
   (propax))


proof_type: t_proof
decl_type: tcc
library: matrices
theory: matrices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "length" + 1)
   (typepred "v(cdr[real](v1), cdr[real](v2))")
   (assert)
   (replaces -2)
   (expand "length" + 3)
   (expand "length" + 4)
   (expand "max" +)
   (lift-if)
   (lift-if)
   (lift-if)
   (ground))


proof_type: t_proof
decl_type: tcc
library: matrices
theory: matrices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (typepred "v(r, cdr[real](v2))")
   (expand "length" + 1)
   (expand "length" + 2)
   (assert))


proof_type: t_proof
decl_type: tcc
library: matrices
theory: matrices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (case "FORALL (n: nat): EXISTS (x: listn[real](n)): TRUE")
   (("1" (skeep) (inst - "n"))
    ("2"
     (hide 2)
     (induct "n")
     (("1" (inst + "null"))
      ("2"
       (skeep)
       (skeep)
       (inst + "cons(0,x)")
       (expand "length")
       (assert))))))


proof_type: t_proof
decl_type: tcc
library: matrices
theory: matrices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (invoke (case "NOT (%1)") (! 1 1 1))
   (("1"
     (hide 2)
     (lemma "length_matrix_equiv")
     (inst - "n"
      "array2list[listn[real](n)]
                      (m)
                      (LAMBDA (k: nat):
                         array2list[real](n)(LAMBDA (p: nat): F(k, p)))")
     (assert))
    ("2"
     (assert)
     (invoke (case "NOT (%1)") (! 1 1))
     (("1"
       (hide 2)
       (skosimp*)
       (lemma "length_matrix_nth")
       (inst - "n"
        "array2list[listn[real](n)]
                            (m)
                            (LAMBDA (k: nat):
                               array2list[real](n)(LAMBDA (p: nat): F(k, p)))"
        "i!1"))
      ("2"
       (assert)
       (replace -1)
       (expand "row")
       (skeep)
       (typepred
        "array2list[listn[real](n)]
                           (m)
                           (LAMBDA (k: nat):
                              array2list[real](n)(LAMBDA (p: nat): F(k, p)))")
       (inst - "i")
       (assert)
       (lemma "matrix_listn_nth")
       (inst - "n"
        "array2list[listn[real](n)]
                           (m)
                           (LAMBDA (k: nat):
                              array2list[real](n)(LAMBDA (p: nat): F(k, p)))"
        "i" "j")
       (assert)
       (replace -4 :dir rl)
       (replace -1 :dir rl)
       (typepred "array2list[real](n)(LAMBDA (p: nat): F(i, p))")
       (inst - "j")
       (assert))))))


proof_type: t_proof
decl_type: tcc
library: matrices
theory: matrices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (skosimp*)
   (rewrite "entry_form_matrix")
   (expand "*")
   (lift-if)
   (ground)
   (("1"
     (rewrite "dot_eq_sigma")
     (rewrite "sigma_restrict_eq_0")
     (skosimp*)
     (expand "row" + 1)
     (copy 2)
     (expand "rows" 1)
     (assert)
     (expand "access" 2 1)
     (expand "length" 2 1)
     (assert))
    ("2"
     (rewrite "dot_eq_sigma")
     (rewrite "sigma_restrict_eq_0")
     (skosimp*)
     (rewrite "col_zero" 1)
     (rewrite "access_zero")
     (assert))))


proof_type: t_proof
decl_type: tcc
library: matrices
theory: matrices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (skolem 1 ("ii" "jj"))
   (invoke (name "FM" "%1") (! 1 1 0 1))
   (typepred "FM")
   (case "ii < max(rows(M),rows(N))")
   (("1"
     (case "jj < max(columns(M), columns(N))")
     (("1"
       (replace -7)
       (inst -6 "ii" "jj")
       (replace -6 :dir rl)
       (expand "entry" +)
       (expand "row" +)
       (expand "access" +)
       (lift-if)
       (ground)
       (inst - "ii")
       (assert))
      ("2"
       (replace -6)
       (expand "FM" +)
       (rewrite "entry_form_matrix")
       (assert)
       (expand "entry" 2)
       (expand "row" 2)
       (expand "access" 2)
       (lift-if)
       (lift-if)
       (lift-if)
       (lift-if)
       (lift-if)
       (assert)
       (ground)
       (("1" (typepred "columns(N)") (inst - "ii") (assert))
        ("2" (typepred "columns(M)") (inst - "ii") (assert))
        ("3" (typepred "columns(M)") (inst - "ii") (assert))
        ("4" (typepred "columns(M)") (inst - "ii") (assert))
        ("5" (typepred "columns(N)") (inst - "ii") (assert))))))
    ("2"
     (rewrite "entry_form_matrix")
     (assert)
     (expand "entry" 2)
     (expand "row" 2)
     (expand "access" 2)
     (lift-if)
     (lift-if)
     (lift-if)
     (lift-if)
     (lift-if)
     (assert)
     (ground)
     (("1" (expand "rows") (assert)) ("2" (expand "rows") (assert))
      ("3" (expand "rows") (assert)) ("4" (expand "rows") (assert))
      ("5" (expand "rows") (assert))))))


proof_type: t_proof
decl_type: tcc
library: matrices
theory: matrices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (skosimp*)
   (rewrite "entry_form_matrix")
   (assert)
   (lift-if)
   (ground)
   (("1"
     (expand "entry")
     (expand "rows")
     (expand "row")
     (expand "access")
     (lift-if)
     (assert))
    ("2"
     (expand "entry")
     (expand "row")
     (expand "access")
     (lift-if)
     (ground)
     (typepred "columns(M)")
     (inst - "i!1")
     (assert))))


proof_type: t_proof
decl_type: tcc
library: matrices
theory: matrices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (split)
   (("1"
     (lemma "rows_add")
     (expand "rows" -1 1)
     (rewrite -1)
     (hide -1)
     (rewrite "rows_scal"))
    ("2"
     (skeep)
     (lemma "columns_add")
     (inst - "M" "(-1)*N")
     (typepred "M+(-1)*N")
     (inst - "i")
     (replace -3)
     (rewrite "columns_scal" 1))
    ("3"
     (skeep)
     (typepred "M+(-1)*N")
     (inst - "i" "j")
     (replaces -4)
     (typepred "(-1)*N")
     (inst - "i" "j")
     (assert))))


proof_type: t_proof
decl_type: tcc
library: matrices
theory: matrices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (name "IV"
         "form_matrix(LAMBDA (i, j: nat): IF i = j THEN 1 ELSE 0 ENDIF,
                                                               pm, pm)")
   (replace -1)
   (split)
   (("1"
     (flatten)
     (skosimp*)
     (typepred "IV")
     (inst-cp - "i!1")
     (inst - "j!1")
     (assert))
    ("2" (expand "rows") (assert))
    ("3" (lemma "columns_form_matrix") (inst?) (assert))
    ("4"
     (lemma "rows_form_matrix")
     (inst?)
     (lemma "columns_form_matrix")
     (inst?)
     (assert))
    ("5" (expand "rows") (assert))
    ("6"
     (skosimp*)
     (expand "IV" 1)
     (rewrite "entry_form_matrix")
     (lift-if)
     (lift-if)
     (lift-if)
     (lift-if)
     (assert)
     (ground))
    ("7"
     (name "P" "LAMBDA (M:Matrix): IV*M=M")
     (lemma "matrix_reduce_prop")
     (skeep)
     (inst - "pm" "pn" "P")
     (split -)
     (("1" (inst - "N") (assert) (expand "P" -1) (propax))
      ("2"
       (hide-all-but 1)
       (skeep)
       (expand "P")
       (expand "IV")
       (name "H" "LAMBDA (i, j: nat): IF i = j THEN 1 ELSE 0 ENDIF")
       (replaces -1)
       (rewrite "form_matrix_mult")
       (assert)
       (rewrite "form_matrix_eq")
       (skosimp*)
       (lift-if)
       (ground)
       (lemma "sigma_eq_one_arg")
       (inst?)
       (inst - "i!1")
       (assert)
       (split -)
       (("1" (expand "H" -1 2) (assert))
        ("2" (hide 4) (skosimp*) (expand "H" 1) (assert))
        ("3" (hide 4) (skosimp*) (expand "H" 1) (assert))))))
    ("8"
     (name "P" "LAMBDA (M:Matrix): M*IV=M")
     (lemma "matrix_reduce_prop")
     (skeep)
     (inst - "pn" "pm" "P")
     (split -1)
     (("1" (inst - "N") (expand "P" -1) (propax))
      ("2"
       (hide-all-but 1)
       (skeep)
       (expand "P")
       (expand "IV")
       (name "H" "LAMBDA (i, j: nat): IF i = j THEN 1 ELSE 0 ENDIF")
       (replaces -1)
       (rewrite "form_matrix_mult")
       (assert)
       (rewrite "form_matrix_eq")
       (skosimp*)
       (lift-if)
       (ground)
       (lemma "sigma_eq_one_arg")
       (inst?)
       (inst - "j!1")
       (assert)
       (split -)
       (("1" (expand "H" -1 2) (propax))
        ("2" (hide 4) (skosimp*) (expand "H" 1) (propax))
        ("3" (assert) (hide 4) (skosimp*) (expand "H" 1) (propax))))))))


proof_type: t_proof
decl_type: tcc
library: matrices
theory: matrices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (name "FM"
         "form_matrix(LAMBDA (i, j: nat): entry(PFM)(j, i),
                                     columns(PFM), rows(PFM))")
   (replaces -1)
   (split)
   (("1"
     (flatten)
     (assert)
     (skosimp*)
     (typepred "FM")
     (inst-cp - "i!1")
     (inst - "j!1")
     (assert))
    ("2" (expand "FM") (rewrite "rows_form_matrix") (assert))
    ("3" (expand "FM") (lemma "columns_form_matrix") (inst?) (assert))))


proof_type: t_proof
decl_type: tcc
library: matrices
theory: matrices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (split)
   (("1" (rewrite "rows_mult") (assert))
    ("2"
     (lemma "columns_mult")
     (inst?)
     (assert)
     (typepred "D1")
     (expand "rows")
     (expand "length")
     (assert))))


proof_type: j_proof
decl_type: tcc
library: matrices
theory: matrices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (name "FM" "form_matrix(F,i,j)")
   (replace -1)
   (assert)
   (typepred "FM")
   (skosimp*)
   (inst-cp - "i!1")
   (inst - "j!1")
   (assert))


proof_type: f_proof
decl_type: formula
library: matrices
theory: matrix_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (rewrite "full_matrix_eq")
   (("1"
     (split)
     (("1" (grind :exclude "entry")) ("2" (grind :exclude "entry"))
      ("3"
       (skosimp*)
       (case "(i!1=0 OR i!1=1) AND (j!1 = 0 OR j!1=1)")
       (("1"
         (ground)
         (("1"
           (replaces -1)
           (replaces -1)
           (expand "entry" + 2)
           (grind :exclude "entry"))
          ("2"
           (replaces -1)
           (replaces -1)
           (expand "entry" + 2)
           (grind :exclude "entry"))
          ("3"
           (replaces -1)
           (replaces -1)
           (expand "entry" + 2)
           (grind :exclude "entry"))
          ("4"
           (replaces -1)
           (replaces -1)
           (expand "entry" + 2)
           (grind :exclude "entry"))))
        ("2" (ground))))))
    ("2"
     (hide 2)
     (skosimp*)
     (case "(i!1=0 OR i!1=1) AND (j!1 = 0 OR j!1=1)")
     (("1"
       (ground)
       (("1"
         (replaces -1)
         (replaces -1)
         (expand "entry" + 2)
         (grind :exclude "entry"))
        ("2"
         (replaces -1)
         (replaces -1)
         (expand "entry" + 2)
         (grind :exclude "entry"))))
      ("2"
       (replaces -1)
       (replaces -1)
       (expand "entry" + 2)
       (typepred "i!1")
       (typepred "j!1")
       (hide 2)
       (grind :exclude "entry"))))))


proof_type: f_proof
decl_type: formula
library: matrices
theory: matrix_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "row")
   (expand "rows")
   (lift-if)
   (ground)
   (typepred "columns(SM)")
   (assert)
   (split -)
   (("1" (grind))
    ("2"
     (skosimp*)
     (typepred "SM")
     (split -)
     (("1" (grind)) ("2" (inst - "i" "i!1") (assert))))))


proof_type: f_proof
decl_type: formula
library: matrices
theory: matrix_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "length_row")
   (inst - "SM" "i")
   (assert)
   (expand "rows")
   (assert)
   (expand "row")
   (propax))


proof_type: f_proof
decl_type: formula
library: matrices
theory: matrix_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (typepred "columns(cdr(D))")
   (assert)
   (split -)
   (("1" (grind))
    ("2"
     (skosimp*)
     (typepred "columns(D)")
     (split -)
     (("1" (grind))
      ("2"
       (skosimp*)
       (typepred "D")
       (split -)
       (("1" (grind))
        ("2"
         (inst - "i!1+1" "i!2")
         (("1" (assert) (expand "nth" -1 1) (ground))
          ("2"
           (expand "length" 1)
           (assert)
           (lift-if)
           (ground)
           (grind))))))))))


proof_type: f_proof
decl_type: formula
library: matrices
theory: matrix_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "access")
   (lift-if)
   (lift-if)
   (lift-if)
   (ground)
   (("1"
     (lemma "col_def")
     (inst?)
     (assert)
     (inst - "j")
     (replaces -1)
     (lift-if)
     (ground)
     (("1"
       (expand "row" 1)
       (lift-if)
       (ground)
       (rewrite "length_col")
       (expand "rows")
       (assert))
      ("2"
       (rewrite "length_nth_row")
       (("1" (rewrite "length_row"))
        ("2" (rewrite "length_col") (expand "rows") (propax))))))
    ("2"
     (rewrite "length_row")
     (rewrite "length_col")
     (assert)
     (lemma "col_def")
     (inst?)
     (assert)
     (inst?)
     (assert)
     (lift-if)
     (ground)
     (rewrite "length_nth_row")
     (expand "rows")
     (propax))
    ("3" (rewrite "length_col") (rewrite "length_row") (assert))))


proof_type: f_proof
decl_type: formula
library: matrices
theory: matrix_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "remove")
   (lift-if)
   (ground)
   (("1" (grind)) ("2" (grind)) ("3" (rewrite "rows_form_matrix"))))


proof_type: f_proof
decl_type: formula
library: matrices
theory: matrix_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "remove")
   (lift-if)
   (ground)
   (("1" (grind)) ("2" (grind))
    ("3"
     (lemma "columns_form_matrix")
     (inst?)
     (assert)
     (lift-if)
     (ground)
     (("1"
       (replace -2)
       (expand "form_matrix" 1)
       (expand "array2list" + 1)
       (expand "array2list_it")
       (grind))
      ("2"
       (case "rows(M)=1")
       (("1"
         (replaces -1)
         (assert)
         (expand "form_matrix" 1)
         (expand "array2list" + 1)
         (expand "array2list_it")
         (grind))
        ("2" (assert))))))))


proof_type: f_proof
decl_type: formula
library: matrices
theory: matrix_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "full_matrix_eq")
   (inst?)
   (("1"
     (assert)
     (hide 2)
     (invoke (case "NOT %1") (! 1 1))
     (("1"
       (hide 2)
       (assert)
       (typepred "remove(D,1,1+n)")
       (assert)
       (assert)
       (flatten)
       (typepred "remove(D,0,m)")
       (assert)
       (flatten)
       (assert)
       (typepred "remove(remove(D, 1, 1 + n), 0, m)")
       (assert)
       (flatten)
       (assert)
       (typepred "remove(remove(D, 0, m), 0, n)")
       (assert))
      ("2"
       (assert)
       (invoke (case "NOT %1") (! 1 1))
       (("1"
         (hide 2)
         (assert)
         (typepred "remove(D,1,1+n)")
         (assert)
         (assert)
         (flatten)
         (typepred "remove(D,0,m)")
         (assert)
         (flatten)
         (assert)
         (typepred "remove(remove(D, 1, 1 + n), 0, m)")
         (assert)
         (flatten)
         (assert)
         (typepred "remove(remove(D, 0, m), 0, n)")
         (assert))
        ("2"
         (assert)
         (skosimp*)
         (typepred "remove(remove(D, 1, 1 + n), 0, m)")
         (assert)
         (hide (-1 -2))
         (inst?)
         (replaces -1)
         (assert)
         (typepred "remove(remove(D, 0, m), 0, n)")
         (hide (-1 -2))
         (inst?)
         (replaces -1)
         (assert)
         (typepred "remove(D,1,1+n)")
         (hide (-1 -2))
         (inst?)
         (replaces -1)
         (typepred "remove(D,0,m)")
         (hide (-1 -2))
         (inst?)
         (replaces -1)
         (assert)
         (hide (-1 -2))
         (typepred "remove(D,1,1+n)")
         (hide (-1 -3 -4))
         (assert)
         (flatten)
         (typepred "remove(D,0,m)")
         (hide (-1 -3 -4))
         (assert)
         (flatten)
         (typepred "remove(remove(D, 1, 1 + n), 0, m)")
         (hide (-1 -3))
         (assert)
         (flatten)
         (lift-if)
         (assert)
         (lift-if)
         (assert))))))
    ("2"
     (flatten)
     (lemma "remove_posfullmatrix")
     (inst?)
     (("1" (split -) (("1" (propax)) ("2" (propax))))
      ("2" (typepred "remove(D,0,m)") (assert) (flatten) (assert))))
    ("3"
     (flatten)
     (lemma "remove_posfullmatrix")
     (inst?)
     (("1" (assert))
      ("2" (typepred "remove(D,1,1+n)") (assert) (flatten) (assert))))))


proof_type: f_proof
decl_type: formula
library: matrices
theory: matrix_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "full_matrix_eq")
   (inst?)
   (("1"
     (assert)
     (hide 2)
     (invoke (case "NOT %1") (! 1 1))
     (("1"
       (hide 2)
       (assert)
       (typepred "remove(D,1,0)")
       (assert)
       (assert)
       (flatten)
       (typepred "remove(D,0,1+n)")
       (assert)
       (flatten)
       (assert)
       (typepred "remove(remove(D, 1, 0), 0, n)")
       (assert)
       (flatten)
       (assert)
       (typepred "remove(remove(D, 0, 1+n), 0, 0)")
       (assert))
      ("2"
       (assert)
       (invoke (case "NOT %1") (! 1 1))
       (("1"
         (hide 2)
         (assert)
         (typepred "remove(D,1,0)")
         (assert)
         (assert)
         (flatten)
         (typepred "remove(D,0,1+n)")
         (assert)
         (flatten)
         (assert)
         (typepred "remove(remove(D, 1, 0), 0, n)")
         (assert)
         (flatten)
         (assert)
         (typepred "remove(remove(D, 0, 1+n), 0, 0)")
         (assert))
        ("2"
         (assert)
         (skosimp*)
         (typepred "remove(remove(D, 1, 0), 0, n)")
         (assert)
         (hide (-1 -2))
         (inst?)
         (replaces -1)
         (assert)
         (typepred "remove(remove(D, 0, 1 + n), 0, 0)")
         (hide (-1 -2))
         (inst?)
         (replaces -1)
         (assert)
         (typepred "remove(D,1,0)")
         (hide (-1 -2))
         (inst?)
         (replaces -1)
         (typepred "remove(D,0,1+n)")
         (hide (-1 -2))
         (inst?)
         (replaces -1)
         (assert)
         (hide (-1 -2))
         (typepred "remove(D,1,0)")
         (hide (-1 -3 -4))
         (assert)
         (typepred "remove(D,0,1+n)")
         (flatten)
         (hide (-1 -3 -4))
         (assert)
         (flatten)
         (lift-if)
         (lift-if)
         (lift-if)
         (assert))))))
    ("2"
     (flatten)
     (lemma "remove_posfullmatrix")
     (inst?)
     (("1" (split -) (("1" (propax)) ("2" (propax))))
      ("2" (typepred "remove(D,0,1+n)") (assert) (flatten) (assert))))
    ("3"
     (flatten)
     (lemma "remove_posfullmatrix")
     (inst?)
     (("1" (assert))
      ("2" (typepred "remove(D,1,0)") (assert) (flatten) (assert))))))


proof_type: f_proof
decl_type: formula
library: matrices
theory: matrix_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "full_matrix_eq")
   (inst?)
   (("1"
     (assert)
     (hide 2)
     (invoke (case "NOT %1") (! 1 1))
     (("1"
       (hide 2)
       (assert)
       (typepred "remove(D,1,n)")
       (assert)
       (assert)
       (flatten)
       (typepred "remove(D,0,1+m+n)")
       (assert)
       (flatten)
       (assert)
       (typepred "remove(remove(D, 1, n), 0, m + n)")
       (assert)
       (flatten)
       (assert)
       (typepred "remove(remove(D, 0, 1 + m + n), 0, n)")
       (assert))
      ("2"
       (assert)
       (invoke (case "NOT %1") (! 1 1))
       (("1"
         (hide 2)
         (assert)
         (typepred "remove(D,1,n)")
         (assert)
         (assert)
         (flatten)
         (typepred "remove(D,0,1+m+n)")
         (assert)
         (flatten)
         (assert)
         (typepred "remove(remove(D, 1, n), 0, m + n)")
         (assert)
         (flatten)
         (assert)
         (typepred "remove(remove(D, 0, 1 + m + n), 0, n)")
         (assert))
        ("2"
         (assert)
         (skosimp*)
         (typepred "remove(remove(D, 1, n), 0, m + n)")
         (assert)
         (hide (-1 -2))
         (inst?)
         (replaces -1)
         (assert)
         (typepred "remove(remove(D, 0, 1 + m + n), 0, n)")
         (hide (-1 -2))
         (inst?)
         (replaces -1)
         (assert)
         (typepred "remove(D,1,n)")
         (hide (-1 -2))
         (inst?)
         (replaces -1)
         (typepred "remove(D,0,1+m+n)")
         (hide (-1 -2))
         (inst?)
         (replaces -1)
         (assert)
         (hide (-1 -2))
         (typepred "remove(D,1,n)")
         (hide (-1 -3 -4))
         (assert)
         (flatten)
         (typepred "remove(D,0,1+m+n)")
         (hide (-1 -3 -4))
         (assert)
         (flatten)
         (typepred "remove(remove(D, 1, n), 0, m + n)")
         (hide (-1 -3))
         (assert)
         (flatten)
         (lift-if)
         (assert)
         (lift-if)
         (assert))))))
    ("2"
     (flatten)
     (lemma "remove_posfullmatrix")
     (inst?)
     (("1" (split -) (("1" (propax)) ("2" (propax))))
      ("2" (typepred "remove(D,0,1+m+n)") (assert) (flatten) (assert))))
    ("3"
     (flatten)
     (lemma "remove_posfullmatrix")
     (inst?)
     (("1" (assert))
      ("2" (typepred "remove(D,1,n)") (assert) (flatten) (assert))))))


proof_type: f_proof
decl_type: formula
library: matrices
theory: matrix_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (rewrite "full_matrix_eq")
   (split)
   (("1" (rewrite "rows_remove") (assert))
    ("2" (rewrite "columns_remove") (assert))
    ("3"
     (skosimp*)
     (rewrite "entry_remove")
     (rewrite "entry_Id")
     (rewrite "entry_Id")
     (lift-if)
     (ground))))


proof_type: f_proof
decl_type: formula
library: matrices
theory: matrix_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (name "S" "swap(0,1)(D)")
   (replace -1)
   (name "RS" "remove(S,0,n)")
   (replace -1)
   (name "RD" "remove(D,1,n)")
   (replace -1)
   (lemma "full_matrix_eq")
   (inst - "RS" "RD")
   (("1"
     (assert)
     (hide 2)
     (case "NOT rows(RS)=rows(RD)")
     (("1"
       (hide 2)
       (typepred "RS")
       (assert)
       (flatten)
       (typepred "RD")
       (assert))
      ("2"
       (assert)
       (case "NOT columns(RS)=columns(RD)")
       (("1"
         (typepred "RS")
         (typepred "RD")
         (assert)
         (typepred "S")
         (assert)
         (flatten)
         (assert))
        ("2"
         (assert)
         (skosimp*)
         (typepred "i!1")
         (typepred "j!1")
         (typepred "RS")
         (hide (-1 -2))
         (inst?)
         (replaces -1)
         (typepred "RD")
         (hide (-1 -2))
         (inst?)
         (replaces -1)
         (assert)
         (typepred "S")
         (assert)
         (hide (-1 -2 -3 -4 -5 -6))
         (inst?)
         (replaces -1)
         (lift-if)
         (lift-if)
         (lift-if)
         (lift-if)
         (assert)
         (lift-if)
         (lift-if)
         (assert)
         (ground))))))
    ("2"
     (flatten)
     (skosimp*)
     (typepred "RS")
     (lemma "remove_posfullmatrix")
     (inst - "S" "0" "n")
     (assert)
     (inst - "i!1" "j!1")
     (assert))))


proof_type: f_proof
decl_type: formula
library: matrices
theory: matrix_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (rewrite "full_matrix_eq")
   (assert)
   (invoke (case "NOT %1") (! 3 1))
   (("1"
     (hide 4)
     (typepred "remove(swap(i, j)(D), 0, n)")
     (assert)
     (flatten)
     (assert)
     (replaces -2)
     (typepred "remove(D,0,n)")
     (assert))
    ("2"
     (assert)
     (invoke (case "NOT %1") (! 3 1))
     (("1"
       (hide 4)
       (typepred "remove(swap(i, j)(D), 0, n)")
       (assert)
       (flatten)
       (assert)
       (typepred "remove(D,0,n)")
       (assert))
      ("2"
       (assert)
       (skosimp*)
       (typepred "remove(swap(i, j)(D), 0, n)")
       (assert)
       (flatten)
       (hide (-1 -5))
       (inst?)
       (replaces -3)
       (assert)
       (typepred "swap(i - 1, j - 1)(remove(D, 0, n))")
       (hide (-1 -2))
       (assert)
       (inst?)
       (replaces -5)
       (assert)
       (typepred "remove(D,0,n)")
       (rewrite -3)
       (rewrite -3)
       (rewrite -3)
       (assert)
       (hide -2)
       (hide -3)
       (typepred "swap(i,j)(D)")
       (assert)
       (hide (-1 -2))
       (rewrite -5)
       (hide (-1 -2 -3 -4 -5))
       (lift-if)
       (lift-if)
       (assert)
       (lift-if)
       (lift-if)
       (ground))))))


proof_type: f_proof
decl_type: formula
library: matrices
theory: matrix_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (rewrite "full_matrix_eq")
   (assert)
   (skosimp*)
   (expand "swap" +)
   (rewrite "entry_form_matrix")
   (rewrite "entry_form_matrix")
   (expand "swap")
   (lift-if)
   (lift-if)
   (ground))


proof_type: f_proof
decl_type: formula
library: matrices
theory: matrix_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (case "rows(D)/=columns(D)")
   (("1" (flatten) (expand "det" + 2) (assert) (expand "det" +) (propax))
    ("2"
     (flatten)
     (assert)
     (case "rows(D) = 2")
     (("1"
       (case "EXISTS (a,b,c,d:real): D = (:(:a,b:),(:c,d:):)")
       (("1" (skeep) (replaces -1) (grind))
        ("2"
         (hide (-3 2))
         (typepred "D")
         (inst + "entry(D)(0,0)" "entry(D)(0,1)" "entry(D)(1,0)"
          "entry(D)(1,1)")
         (rewrite "list_extensionality[list[real]]")
         (splash +)
         (("1"
           (skosimp*)
           (case "NOT (n!1 = 0 OR n!1=1)")
           (("1" (typepred "n!1") (expand "rows") (assert) (ground))
            ("2"
             (rewrite "list_extensionality[real]" 1)
             (split +)
             (("1"
               (assert)
               (split -4)
               (("1" (grind))
                ("2"
                 (case "NOT columns(D)=2")
                 (("1" (assert))
                  ("2"
                   (typepred "columns(D)")
                   (split -2)
                   (("1" (grind))
                    ("2"
                     (skosimp*)
                     (inst - "n!1" "i!1")
                     (assert)
                     (replace -4)
                     (replace -1)
                     (replace -3)
                     (hide-all-but (-5 1))
                     (grind))))))))
              ("2"
               (skosimp*)
               (case "NOT (n!2 = 0 OR n!2 = 1)")
               (("1"
                 (hide 2)
                 (typepred "n!2")
                 (typepred "columns(D)")
                 (split -2)
                 (("1" (grind))
                  ("2"
                   (skosimp*)
                   (split -7)
                   (("1" (grind)) ("2" (inst - "n!1" "i!1") (assert))))))
                ("2"
                 (case "NOT (rows(D)=2 AND columns(D)=2)")
                 (("1" (assert))
                  ("2"
                   (expand "entry")
                   (expand "access")
                   (expand "row")
                   (rewrite "length_null")
                   (assert)
                   (case "NOT length(D)=2")
                   (("1" (expand "rows") (propax))
                    ("2"
                     (assert)
                     (hide -2)
                     (case "null?(D)")
                     (("1" (grind))
                      ("2"
                       (assert)
                       (ground)
                       (("1"
                         (replaces -1)
                         (replaces -1)
                         (assert)
                         (hide -)
                         (grind))
                        ("2"
                         (replaces -1)
                         (replaces -1)
                         (hide -)
                         (grind))
                        ("3"
                         (replaces -1)
                         (replaces -1)
                         (hide -)
                         (grind))
                        ("4"
                         (replaces -1)
                         (replaces -1)
                         (hide -)
                         (grind))))))))))))))))
          ("2" (hide (-1 -2 -4)) (hide -3) (grind))))))
      ("2"
       (case "NOT rows(D)>=3")
       (("1" (assert))
        ("2"
         (hide (-3 1))
         (copy -2)
         (hide -3)
         (name "S" "swap(0,1)(D)")
         (replaces -1)
         (expand "det")
         (assert)
         (lift-if)
         (lift-if)
         (lift-if)
         (lift-if)
         (assert)
         (ground)
         (("1" (typepred "S") (grind)) ("2" (typepred "S") (grind))
          ("3"
           (typepred "S")
           (hide (-1 -2 -3 -4 -7))
           (case "NOT FORALL (rr:real): -rr = (-1)*rr")
           (("1" (assert))
            ("2"
             (invoke (inst - "%1") (! 2 2 1))
             (replaces -1)
             (rewrite "sigma_scal" :dir rl)
             (expand "det" + 2)
             (invoke
              (case "NOT (%1 = (sigma(0, columns(D) - 1,
                                                   LAMBDA (i: nat):
                                                     sigma(0, columns(remove(D, 0, i)) - 1,
                                                                   LAMBDA (k):
                                                                     det(remove(remove(D, 0, i), 0, k)) *
                                                                      entry(remove(D, 0, i))(0, k)
                                                                      * (-1) ^ k*(-1) *
                                                      entry(D)(0, i) * (-1) ^ i))))")
              (! 2 2))
             (("1"
               (hide 3)
               (rewrite "sigma_eq")
               (("1"
                 (hide 2)
                 (skosimp*)
                 (lift-if)
                 (ground)
                 (("1"
                   (typepred "remove(D,0,n!1)")
                   (assert)
                   (flatten)
                   (grind :exclude "remove"))
                  ("2"
                   (typepred "remove(D,0,n!1)")
                   (assert)
                   (flatten)
                   (assert))
                  ("3" (typepred "remove(D,0,n!1)") (assert))
                  ("4"
                   (rewrite "sigma_scal" :dir rl)
                   (rewrite "sigma_scal" :dir rl)
                   (assert))))
                ("2" (hide 2) (skosimp*) (inst + "10") (assert))
                ("3" (hide 2) (skosimp*) (inst + "10") (assert))))
              ("2"
               (replaces -1)
               (replace -2)
               (assert)
               (case "NOT (LAMBDA (i: nat):
                                                        sigma(0, columns(remove(D, 0, i)) - 1,
                                                              LAMBDA (k):
                                                                -1 *
                                                                 (det(remove(remove(D, 0, i), 0, k)) *
                                                                   entry(remove(D, 0, i))(0, k)
                                                                   * entry(D)(0, i)
                                                                   * (-1) ^ i
                                                                   * (-1) ^ k))) = (LAMBDA (i: nat):
                                                        sigma(0, columns(D)-2,
                                                              LAMBDA (k):
                                                                -1 *
                                                                 (det(remove(remove(D, 0, i), 0, k)) *
                                                                   entry(remove(D, 0, i))(0, k)
                                                                   * entry(D)(0, i)
                                                                   * (-1) ^ i
                                                                   * (-1) ^ k)))")
               (("1"
                 (hide 3)
                 (decompose-equality)
                 (("1" (typepred "remove(D,0,x!1)") (assert))
                  ("2"
                   (skosimp*)
                   (typepred "remove(D,0,i!1)")
                   (assert))))
                ("2"
                 (replaces -1)
                 (rewrite "sigma_swap")
                 (name "H"
                       "LAMBDA (j:nat): LAMBDA (i_1:nat): -1 *
                                                                    (det(remove(remove(D, 0, i_1), 0, j)) *
                                                                      entry(remove(D, 0, i_1))(0, j)
                                                                      * entry(D)(0, i_1)
                                                                      * (-1) ^ i_1
                                                                      * (-1) ^ j)")
                 (invoke
                  (case "NOT %1 = sigma(0,columns(D)-2,LAMBDA (j:nat): sigma(0,columns(D)-1,H(j)))")
                  (! 2 2))
                 (("1" (hide (3)) (expand "H" 1) (propax))
                  ("2"
                   (replaces -1)
                   (name "H1"
                         "LAMBDA (j:nat): LAMBDA (i_1:nat): IF j<i_1 THEN H(j)(i_1) ELSE 0 ENDIF")
                   (name "H2"
                         "LAMBDA (j:nat): LAMBDA (i_1:nat): IF j>=i_1 THEN H(j)(i_1) ELSE 0 ENDIF")
                   (case "NOT (LAMBDA (j: nat): sigma(0, columns(D) - 1, H(j))) = (LAMBDA (j: nat): sigma(0, columns(D) - 1, H1(j)) + sigma(0,columns(D)-1,H2(j)))")
                   (("1"
                     (hide-all-but 1)
                     (decompose-equality)
                     (rewrite "sigma_sum")
                     (rewrite "sigma_eq")
                     (hide 2)
                     (skosimp*)
                     (expand "H1")
                     (expand "H2")
                     (lift-if)
                     (lift-if)
                     (lift-if)
                     (ground))
                    ("2"
                     (replaces -1)
                     (name "K1"
                           "LAMBDA (j:nat): sigma(0, columns(D) - 1, H1(j))")
                     (name "K2"
                           "LAMBDA (j:nat): sigma(0, columns(D) - 1, H2(j))")
                     (invoke (case "NOT %1 = K1+K2") (! 2 2 3))
                     (("1"
                       (decompose-equality 1)
                       (expand "+" 1)
                       (expand "K1" 1)
                       (expand "K2" 1)
                       (propax))
                      ("2"
                       (replaces -1)
                       (name "H3"
                             "LAMBDA (j:nat): IF j>=1 THEN H2(j-1) ELSE (LAMBDA (kj:nat): 0) ENDIF")
                       (("1"
                         (name "K3"
                               "LAMBDA (j:nat): sigma(0, columns(D) - 1, H3(j))")
                         (expand "+" 2)
                         (rewrite "sigma_sum" 2 :dir rl)
                         (case "NOT sigma(0, columns(D) - 2, K2) = sigma(0,columns(D)-1,K3)")
                         (("1"
                           (hide 3)
                           (lemma "sigma_split")
                           (inst - "K3" _ _ _)
                           (inst?)
                           (inst - "0")
                           (assert)
                           (replaces -1)
                           (expand "sigma" + 2)
                           (expand "sigma" + 2)
                           (expand "K3" + 1)
                           (expand "H3" + 1)
                           (invoke (case "NOT %1 = 0") (! 1 2 1))
                           (("1" (rewrite "sigma_restrict_eq_0" 1))
                            ("2"
                             (replaces -1)
                             (assert)
                             (rewrite "sigma_shift_fun_eq")
                             (skeep)
                             (expand "K3" 1)
                             (expand "K2" 1)
                             (rewrite "sigma_eq" 1)
                             (skosimp*)
                             (expand "H3" 1)
                             (propax))))
                          ("2"
                           (replace -1)
                           (name "D8"
                                 "LAMBDA (k:nat): IF k<=columns(D)-2 THEN K1(k) ELSE 0 ENDIF")
                           (case "NOT sigma(0,columns(D)-2,K1)=sigma(0,columns(D)-1,D8)")
                           (("1"
                             (expand "sigma" + 2)
                             (expand "D8" + 1)
                             (rewrite "sigma_eq")
                             (skosimp*)
                             (expand "D8" 1)
                             (propax))
                            ("2"
                             (replaces -1)
                             (rewrite "sigma_sum")
                             (rewrite "sigma_eq" 2)
                             (hide 3)
                             (skosimp*)
                             (typepred "n!1")
                             (expand "D8" 1)
                             (assert)
                             (expand "K3" 1)
                             (typepred "S")
                             (hide (-1 -2 -3 -4 -5 -6))
                             (inst - "0" "n!1")
                             (assert)
                             (replaces -1)
                             (expand "S" 1)
                             (rewrite "remove_swap_1")
                             (case "n!1 = columns(D)-1")
                             (("1"
                               (assert)
                               (expand "H3" 1)
                               (expand "H2" 1)
                               (expand "H" 1)
                               (expand "det" + 1)
                               (lift-if)
                               (assert)
                               (split 1)
                               (("1"
                                 (flatten)
                                 (assert)
                                 (split -1)
                                 (("1"
                                   (case "NOT rows(remove(D,1,n!1))=0")
                                   (("1"
                                     (expand "rows" 1)
                                     (expand "length" 1)
                                     (typepred "remove(D,1,n!1)")
                                     (assert))
                                    ("2"
                                     (typepred "remove(D,1,n!1)")
                                     (assert))))
                                  ("2"
                                   (typepred "remove(D,1,n!1)")
                                   (assert)
                                   (flatten)
                                   (assert))))
                                ("2"
                                 (flatten)
                                 (split 2)
                                 (("1"
                                   (flatten)
                                   (typepred "remove(D,1,n!1)")
                                   (assert))
                                  ("2"
                                   (flatten)
                                   (rewrite "sigma_scal" :dir rl)
                                   (case
                                    "NOT columns(remove(D,1,n!1))=columns(D)-1")
                                   (("1"
                                     (typepred "remove(D,1,n!1)")
                                     (assert))
                                    ("2"
                                     (replace -1 2)
                                     (assert)
                                     (expand "sigma" + 2)
                                     (rewrite "sigma_eq" 2)
                                     (hide 3)
                                     (skosimp*)
                                     (case "(-1)^(n!1)=-(-1)^(n!1-1)")
                                     (("1"
                                       (replaces -1)
                                       (typepred "remove(D,0,n!2)")
                                       (hide (-1 -2 -4))
                                       (inst?)
                                       (replace -1)
                                       (assert)
                                       (typepred "remove(D,1,n!1)")
                                       (hide (-1 -2 -4))
                                       (inst?)
                                       (replaces -1)
                                       (assert)
                                       (lemma "remove_remove_1_0")
                                       (inst - "D" "n!2" "n!1-1")
                                       (assert))
                                      ("2"
                                       (expand "^" 1)
                                       (expand "expt" + 1)
                                       (assert))))))))))
                              ("2"
                               (assert)
                               (case "n!1 = 0")
                               (("1"
                                 (replaces -1)
                                 (expand "K1" +)
                                 (expand "^" +)
                                 (expand "expt" +)
                                 (rewrite "sigma_first" +)
                                 (expand "H1" 2 1)
                                 (invoke (case "NOT %1 = 0") (! 2 2 1))
                                 (("1"
                                   (rewrite "sigma_restrict_eq_0" 1)
                                   (skosimp*)
                                   (expand "H3" 1)
                                   (propax))
                                  ("2"
                                   (replaces -1)
                                   (assert)
                                   (expand "det" +)
                                   (lift-if)
                                   (assert)
                                   (ground)
                                   (("1"
                                     (typepred "remove(D,1,0)")
                                     (assert)
                                     (flatten)
                                     (expand "rows")
                                     (expand "length")
                                     (assert))
                                    ("2"
                                     (typepred "remove(D,1,0)")
                                     (assert)
                                     (flatten)
                                     (assert))
                                    ("3"
                                     (typepred "remove(D,1,0)")
                                     (assert))
                                    ("4"
                                     (typepred "remove(D,1,0)")
                                     (assert)
                                     (flatten)
                                     (replace -3 +)
                                     (assert)
                                     (rewrite "sigma_scal_right" :dir rl)
                                     (rewrite "sigma_shift_fun_eq" 2)
                                     (hide 3)
                                     (skosimp*)
                                     (typepred "i!1")
                                     (expand "H1" 1)
                                     (expand "H" 1)
                                     (typepred "remove(D,1,0)")
                                     (hide (-1 -2 -4))
                                     (inst?)
                                     (replaces -1)
                                     (assert)
                                     (typepred "remove(D,0,1+i!1)")
                                     (hide (-1 -2 -4))
                                     (inst?)
                                     (replaces -1)
                                     (assert)
                                     (case "NOT (-1)^0=1")
                                     (("1" (hide-all-but 1) (grind))
                                      ("2"
                                       (case
                                        "NOT (-1)^(1+i!1) = -(-1)^i!1")
                                       (("1" (hide-all-but 1) (grind))
                                        ("2"
                                         (replaces -1)
                                         (assert)
                                         (rewrite "remove_remove_1_0_0")
                                         (assert))))))))))
                                ("2"
                                 (assert)
                                 (expand "H3" +)
                                 (case
                                  "NOT sigma(0, columns(D) - 1, H2(n!1 - 1)) = sigma(0, n!1-1, H(n!1 - 1))")
                                 (("1"
                                   (lemma "sigma_split")
                                   (inst?)
                                   (inst - "n!1-1")
                                   (assert)
                                   (replaces -1)
                                   (invoke (case "NOT %1 = 0") (! 1 1 2))
                                   (("1"
                                     (rewrite "sigma_restrict_eq_0")
                                     (skosimp*)
                                     (expand "H2")
                                     (propax))
                                    ("2"
                                     (replaces -1)
                                     (lemma "sigma_eq")
                                     (inst
                                      -
                                      "H2(n!1-1)"
                                      "H(n!1-1)"
                                      "n!1-1"
                                      "0")
                                     (assert)
                                     (skosimp*)
                                     (expand "H2" 1)
                                     (propax))))
                                  ("2"
                                   (replaces -1)
                                   (expand "K1" +)
                                   (case
                                    "NOT sigma(0, columns(D) - 1, H1(n!1)) = sigma(n!1+1, columns(D) - 1, H(n!1))")
                                   (("1"
                                     (lemma "sigma_split")
                                     (inst?)
                                     (inst - "n!1")
                                     (assert)
                                     (invoke
                                      (case "NOT %1 = 0")
                                      (! -1 2 1))
                                     (("1"
                                       (rewrite "sigma_restrict_eq_0")
                                       (skosimp*)
                                       (expand "H1" 1)
                                       (propax))
                                      ("2"
                                       (replaces -1)
                                       (assert)
                                       (replaces -1)
                                       (rewrite "sigma_eq" 1)
                                       (skosimp*)
                                       (expand "H1" 1)
                                       (propax))))
                                    ("2"
                                     (replaces -1)
                                     (assert)
                                     (expand "det" +)
                                     (lift-if)
                                     (assert)
                                     (ground)
                                     (("1"
                                       (typepred "remove(D,1,n!1)")
                                       (assert)
                                       (flatten)
                                       (expand "rows")
                                       (expand "length" -2 1)
                                       (assert))
                                      ("2"
                                       (typepred "remove(D,1,n!1)")
                                       (assert)
                                       (flatten)
                                       (assert))
                                      ("3"
                                       (typepred "remove(D,1,n!1)")
                                       (assert))
                                      ("4"
                                       (typepred "remove(D,1,n!1)")
                                       (hide (-1 -3 -4))
                                       (assert)
                                       (flatten)
                                       (replaces -2)
                                       (assert)
                                       (rewrite "sigma_scal" :dir rl)
                                       (lemma "sigma_split")
                                       (inst?)
                                       (inst - "n!1-1")
                                       (assert)
                                       (replaces -1)
                                       (case
                                        "FORALL (aa,bb,cc,dd:real): aa=cc AND bb=dd IMPLIES aa+bb=cc+dd")
                                       (("1"
                                         (rewrite -1 2)
                                         (("1"
                                           (hide 3)
                                           (hide -1)
                                           (rewrite "sigma_eq" 1)
                                           (hide 2)
                                           (skosimp*)
                                           (expand "H" 1)
                                           (case
                                            "NOT (-1)^n!1 = -(-1)^(n!1-1)")
                                           (("1"
                                             (hide-all-but 1)
                                             (grind))
                                            ("2"
                                             (replaces -1)
                                             (assert)
                                             (lemma "remove_remove_1_0")
                                             (inst - "D" "n!2" "n!1-1")
                                             (assert)
                                             (replaces -1)
                                             (assert)
                                             (typepred "remove(D,1,n!1)")
                                             (hide (-1 -2 -4))
                                             (inst?)
                                             (assert)
                                             (replaces -1)
                                             (typepred "remove(D,0,n!2)")
                                             (hide (-1 -2 -4))
                                             (inst?)
                                             (assert))))
                                          ("2"
                                           (hide 3)
                                           (lemma "sigma_shift_fun_eq")
                                           (inst?)
                                           (assert)
                                           (hide 2)
                                           (skosimp*)
                                           (typepred "i!1")
                                           (expand "H" 1)
                                           (lemma "remove_remove_1_0")
                                           (lemma "remove_remove_1_n")
                                           (rewrite -1 1)
                                           (typepred "remove(D,1,n!1)")
                                           (hide (-1 -2 -4))
                                           (inst?)
                                           (assert)
                                           (replaces -1)
                                           (typepred
                                            "remove(D,0,1+i!1+n!1)")
                                           (hide (-1 -2 -4))
                                           (inst?)
                                           (assert)
                                           (replaces -1)
                                           (case
                                            "(-1)^(1+i!1+n!1) = -(-1)^(i!1+n!1)")
                                           (("1" (assert))
                                            ("2"
                                             (hide-all-but 1)
                                             (grind))))))
                                        ("2"
                                         (assert)
                                         (skosimp*)
                                         (assert))))))))))))))))))
                        ("2" (skosimp*) (assert))))))))))
                ("3"
                 (hide 3)
                 (skosimp*)
                 (typepred "remove(D,0,i!1)")
                 (assert))))
              ("3" (hide 3) (skosimp*) (inst + "10") (assert))
              ("4" (hide 3) (skosimp*) (inst + "10") (assert))))))))))))))


