# Proofs

proof_type: f_proof
decl_type: formula
library: series
theory: power_series_deriv
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: o
script:
  (""
   (skosimp*)
   (lemma "powerseries_derivable")
   (inst?)
   (assert)
   (expand "continuous?")
   (skosimp*)
   (expand "derivable?")
   (inst?)
   (lemma "derivable_continuous[T]")
   (("1"
     (inst?)
     (("1" (assert))
      ("2" (skosimp*) (expand "conv_powerseries?") (inst?))))
    ("2" (lemma "not_one_element") (propax))
    ("3"
     (hide 2)
     (lemma "deriv_domain")
     (expand "deriv_domain?")
     (propax))))


proof_type: f_proof
decl_type: formula
library: series
theory: power_series_deriv
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "powerseries_deriv")
   (inst?)
   (expand "conv_powerseries?")
   (replace -2)
   (flatten)
   (assert)
   (expand "Inf_sum")
   (propax))


proof_type: f_proof
decl_type: formula
library: series
theory: power_series_deriv
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "powerseries_deriv")
   (inst?)
   (replace -2)
   (flatten)
   (assert)
   (expand "Inf_sum")
   (replace -2 * rl)
   (hide -2)
   (apply-extensionality 1 :hide? t)
   (("1"
     (expand "powerseries" +)
     (lemma "deriv_series_shift")
     (inst?)
     (replace -3)
     (propax))
    ("2"
     (skosimp*)
     (lemma "derivseq_conv")
     (inst?)
     (inst?)
     (replace -3)
     (expand "powerseries")
     (propax))
    ("3"
     (lemma "deriv_powerseries_conv")
     (inst?)
     (skosimp*)
     (replace -3)
     (inst?))))


proof_type: f_proof
decl_type: formula
library: series
theory: power_series_deriv
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "Inf_sum")
   (lemma "deriv_Inf_sum")
   (inst?)
   (assert)
   (expand "Inf_sum")
   (replace -1)
   (hide -1)
   (lemma "powerseries_derivable")
   (hide -2)
   (inst?)
   (split -1)
   (("1" (propax))
    ("2"
     (hide 2)
     (expand "conv_powerseries?")
     (skosimp*)
     (expand "powerseries")
     (rewrite "derivseq_conv"))))


proof_type: f_proof
decl_type: formula
library: series
theory: power_series_deriv
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "Inf_sum")
   (induct "n" 1)
   (("1" (skosimp*) (expand "derivable_n_times?") (propax))
    ("2"
     (skosimp*)
     (expand "derivable_n_times?" 1)
     (split +)
     (("1"
       (lemma "powerseries_derivable")
       (expand "powerseries")
       (inst?)
       (assert))
      ("2"
       (lemma "deriv_Inf_sum")
       (inst?)
       (assert)
       (expand "Inf_sum")
       (expand "powerseries")
       (assert)
       (replace -1)
       (hide -1)
       (inst?)
       (assert)
       (hide 1)
       (rewrite "conv_derivseq"))))
    ("3" (hide 2) (skosimp*) (lemma "not_one_element") (inst?))
    ("4" (hide 2) (skosimp*) (lemma "deriv_domain") (inst?))
    ("5" (hide 2) (skosimp*) (expand "conv_powerseries?") (inst?))))


proof_type: f_proof
decl_type: formula
library: series
theory: power_series_integ
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "conv_powerseries?")
   (skosimp*)
   (lemma "powerseries_abs_conv")
   (inst?)
   (replace -2)
   (inst?)
   (expand "powerseries")
   (rewrite "convergent_abs " +)
   (hide 2)
   (lemma "comparison_test_gen")
   (inst -
    "(LAMBDA (k: nat):
                                            IF k = 0 THEN abs(a!1(0))
                                            ELSE abs(a!1(k) * x!1 ^ k/(k+1))
                                            ENDIF)"
    "abs(powerseq(a!1,x!1))")
   (assert)
   (split -1)
   (("1"
     (lemma "convergent_scal")
     (inst?)
     (inst - "abs(x!1)")
     (assert)
     (hide -2 -3)
     (rewrite "series_scal")
     (expand "integseq")
     (rewrite "apow_rew")
     (("1"
       (expand "apowerseq")
       (hide -2)
       (expand "abs" +)
       (lemma "conv_series_shift")
       (inst -1 "1"
        "(LAMBDA (k_1: nat):
                                                  IF k_1 = 0 THEN abs(0)
                                                  ELSE abs(a!1(k_1 - 1) / k_1 * x!1 ^ k_1)
                                                  ENDIF)")
       (("1"
         (assert)
         (hide 2)
         (case-replace
          "(LAMBDA n:
                                                abs(x!1) *
                                                 IF n = 0 THEN abs(a!1(0))
                                                 ELSE abs(a!1(n) * x!1 ^ n / (1 + n))
                                                 ENDIF) = (LAMBDA n: abs((a!1(n) / (1 + n)) * x!1 ^ (1 + n)))")
         (hide -1 2)
         (apply-extensionality 1 :hide? t)
         (lift-if)
         (ground)
         (("1" (replace -1) (assert) (rewrite "abs_mult") (assert))
          ("2"
           (rewrite "abs_mult")
           (rewrite "abs_div")
           (rewrite "abs_div")
           (rewrite "abs_mult")
           (case-replace
            "abs(x!1 ^ (1 + x!2)) = abs(x!1)*abs(x!1 ^ x!2)")
           (("1" (assert))
            ("2"
             (hide 3)
             (rewrite "abs_hat")
             (("1"
               (rewrite "abs_hat")
               (("1" (grind))
                ("2"
                 (flatten)
                 (replace -1)
                 (assert)
                 (rewrite "abs_0")
                 (assert))))
              ("2" (flatten) (replace -1) (grind))))))))
        ("2" (skosimp*)) ("3" (skosimp*) (assert))))
      ("2" (hide 2) (skosimp*)) ("3" (skosimp*) (assert))))
    ("2"
     (hide -1 -2 2)
     (inst + "1")
     (skosimp*)
     (lift-if)
     (ground)
     (rewrite "abs_abs")
     (rewrite "apow_rew")
     (expand "apowerseq")
     (assert)
     (expand "abs" 2 2)
     (rewrite "abs_mult")
     (rewrite "abs_div")
     (rewrite "abs_mult")
     (cross-mult 2)
     (assert)
     (name-replace "AAA" "abs(a!1(n!1)) * abs(x!1 ^ n!1)")
     (grind))))


proof_type: f_proof
decl_type: formula
library: series
theory: power_series_integ
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "conv_integseq")
   (inst?)
   (assert)
   (hide -2)
   (expand "integseq")
   (expand "conv_powerseries?")
   (expand "powerseries")
   (expand "integ_powerseq")
   (expand "powerseq")
   (inst?)
   (lemma "conv_series_shift")
   (inst?)
   (("1" (inst - "1") (assert)) ("2" (skosimp*))
    ("3" (skosimp*) (assert))))


proof_type: f_proof
decl_type: formula
library: series
theory: power_series_integ
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (apply-extensionality 1 :hide? t)
   (("1"
     (lemma "conv_integseq")
     (inst?)
     (assert)
     (hide -2)
     (lemma "limit_series_shift")
     (inst?)
     (inst - "1")
     (assert)
     (expand "conv_powerseries?")
     (inst?)
     (expand "powerseries")
     (assert)
     (replace -1)
     (hide -1)
     (expand "sigma")
     (expand "integseq")
     (expand "powerseq")
     (expand "integ_powerseq")
     (assert))
    ("2" (skosimp*) (lemma "integ_powerseries_conv") (inst?) (assert))
    ("3"
     (lemma "conv_integseq")
     (inst?)
     (assert)
     (expand "conv_powerseries?")
     (expand "powerseries")
     (propax))))


proof_type: f_proof
decl_type: formula
library: series
theory: power_series_integ
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (lemma "powerseries_cont")
   (inst?)
   (assert)
   (lemma "cont_fun_integrable?")
   (inst?)
   (("1" (assert)) ("2" (expand "conv_powerseries?") (propax))))


proof_type: f_proof
decl_type: formula
library: series
theory: power_series_integ
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (lemma "conv_integseq")
   (inst?)
   (assert)
   (lemma "integseq_lim_shift")
   (inst?)
   (assert)
   (replace -1 * rl)
   (hide -1)
   (lemma "antiderivative_lem")
   (inst?)
   (("1"
     (assert)
     (inst -
      "deriv(LAMBDA x: limit(series(powerseq(integseq(a!1), x))))")
     (("1"
       (split -1)
       (("1" (propax))
        ("2"
         (hide 2)
         (expand "antiderivative?")
         (typepred "integral[T](LAMBDA x: limit(powerseries(a!1)(x)))")
         (("1"
           (replace -2)
           (apply-extensionality 1 :hide? t)
           (("1"
             (lemma "deriv_Inf_sum")
             (inst - "integseq(a!1)")
             (split -1)
             (("1"
               (expand "Inf_sum")
               (expand "powerseries")
               (replace -1)
               (hide -1 -2 -3)
               (expand "derivseq")
               (expand "integseq")
               (case-replace
                "(LAMBDA (k: nat):
                                                                                                                                                             a!1(k) / (1 + k) + k * (a!1(k) / (1 + k))) = a!1")
               (hide 2)
               (apply-extensionality 1 :hide? t)
               (factor 1 l)
               (name-replace "XP1" "1+x!2")
               (assert))
              ("2" (propax))))
            ("2" (lemma "deriv_domain") (propax))
            ("3"
             (hide -1 -2)
             (lemma "powerseries_derivable")
             (expand "conv_powerseries?")
             (inst - "integseq(a!1)")
             (expand "powerseries")
             (propax))
            ("4"
             (hide -1 -2)
             (expand "conv_powerseries?")
             (expand "powerseries")
             (propax))
            ("5" (hide -1 -2 -3) (expand "conv_powerseries?") (propax))))
          ("2"
           (hide -1 -2 2)
           (lemma "powerseries_cont")
           (inst?)
           (assert)
           (hide -1 2)
           (lemma "powerseries_integrable?")
           (inst?)
           (assert))
          ("3"
           (skosimp*)
           (hide -1 2)
           (expand "conv_powerseries?")
           (inst?))))
        ("3"
         (hide 2)
         (lemma "powerseries_derivable")
         (inst - "integseq(a!1)")
         (assert)
         (expand "powerseries")
         (propax))))
      ("2" (lemma "deriv_domain") (propax))
      ("3"
       (hide 2)
       (lemma "powerseries_derivable")
       (inst - "integseq(a!1)")
       (assert)
       (expand "powerseries")
       (propax))
      ("4"
       (hide 2)
       (skosimp*)
       (expand "conv_powerseries?")
       (inst?)
       (expand "powerseries")
       (propax))))
    ("2"
     (hide 2)
     (skosimp*)
     (expand "conv_powerseries?")
     (inst?)
     (expand "powerseries")
     (propax))
    ("3"
     (hide -1 2)
     (lemma "powerseries_cont")
     (inst?)
     (assert)
     (hide -1 2)
     (expand "conv_powerseries?")
     (assert)
     (lemma "powerseries_integrable?")
     (inst?)
     (assert))
    ("4" (hide -1 2) (skosimp*) (expand "conv_powerseries?") (inst?))))


proof_type: f_proof
decl_type: formula
library: series
theory: power_series_integ
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (lemma "powerseries_integral")
   (inst?)
   (assert)
   (skosimp*)
   (lemma "fundamental_indef")
   (inst?)
   (("1"
     (assert)
     (lemma "powerseries_cont")
     (inst?)
     (assert)
     (flatten)
     (replace -3)
     (assert)
     (replace -4)
     (assert)
     (expand "+ ")
     (expand "const_fun")
     (hide -1 -2 -3 -4)
     (expand "integ_powerseq")
     (expand "^")
     (expand "expt")
     (lemma "zero_series_limit")
     (assert))
    ("2" (hide 2) (skosimp*) (expand "conv_powerseries?") (inst?))))


proof_type: t_proof
decl_type: tcc
library: series
theory: power_series_integ
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "conv_integseq")
   (inst?)
   (assert)
   (expand "conv_powerseries?")
   (inst?)
   (expand "powerseries")
   (propax))


proof_type: f_proof
decl_type: formula
library: series
theory: taylor_series
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (name "XX" "choose({X:T | TRUE})")
   (("1"
     (lemma "ball")
     (inst - "XX")
     (assert)
     (lemma "connected_domain")
     (expand "connected?")
     (case "XX >= 0")
     (("1" (inst - "-XX" "XX" "0") (assert))
      ("2" (inst - "XX" "-XX" "0") (assert))))
    ("2"
     (expand "nonempty?")
     (expand "empty?")
     (expand "member")
     (propax))))


proof_type: f_proof
decl_type: formula
library: series
theory: taylor_series
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (lemma connected_domain)
   (lemma not_one_element)
   (lemma connected_deriv_domain[T])
   (assert))


proof_type: f_proof
decl_type: formula
library: series
theory: taylor_series
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "Inf_sum")
   (assert)
   (expand "powerseries")
   (expand "powerseq")
   (case-replace
    "(LAMBDA (k: nat): a!1(k) * 0 ^ k) =
                           (LAMBDA (k: nat):
                           IF k = 0 THEN a!1(0) ELSE 0 ENDIF)")
   (("1"
     (hide -1)
     (expand "series")
     (lemma "sigma_first[nat]")
     (inst?)
     (case-replace
      "(LAMBDA (n: nat):
                        sigma(0, n,
                              (LAMBDA (k: nat): IF k = 0 THEN a!1(0) ELSE 0 ENDIF))) =
                       (LAMBDA (n: nat): a!1(0) )")
     (("1"
       (lemma "limit_const")
       (inst - "a!1(0)")
       (assert)
       (expand "const_fun")
       (propax))
      ("2"
       (hide 2)
       (apply-extensionality 1 :hide? t)
       (lemma "sigma_first[nat]")
       (inst?)
       (assert)
       (case-replace "x!1 = 0")
       (("1" (expand "sigma" 1) (expand "sigma") (propax))
        ("2"
         (assert)
         (replace -1)
         (hide -1)
         (rewrite "sigma_restrict_to")
         (expand "restrict")
         (lemma "sigma_const")
         (inst?)
         (assert))))))
    ("2"
     (hide 2)
     (apply-extensionality 1 :hide? t)
     (lift-if)
     (ground)
     (grind))))


proof_type: f_proof
decl_type: formula
library: series
theory: taylor_series
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "nderivseq")
   (apply-extensionality 1 :hide? t)
   (rewrite "factorial_plus1")
   (assert)
   (expand "derivseq")
   (name-replace "FNX" "factorial(n!1 + x!1)")
   (field 1))


proof_type: f_proof
decl_type: formula
library: series
theory: taylor_series
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "n")
   (("1"
     (skosimp*)
     (expand "nderivseq")
     (case-replace
      "(LAMBDA (k: nat): factorial(k) / factorial(k) * a!1(k)) = a!1")
     (apply-extensionality 1 :hide? t))
    ("2"
     (skosimp*)
     (rewrite "nderivseq_lem")
     (inst?)
     (assert)
     (hide 2)
     (rewrite "conv_derivseq"))))


proof_type: f_proof
decl_type: formula
library: series
theory: taylor_series
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "n")
   (("1" (skosimp*) (expand "derivable_n_times?") (propax))
    ("2"
     (skosimp*)
     (expand "derivable_n_times?" 1)
     (rewrite "Inf_sum_derivable")
     (inst - "derivseq(a!1)")
     (rewrite "conv_derivseq")
     (rewrite "deriv_Inf_sum"))
    ("3" (hide 2) (lemma "not_one_element") (skosimp*))
    ("4" (hide 2) (lemma "connected_domain") (skosimp*))))


proof_type: f_proof
decl_type: formula
library: series
theory: taylor_series
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "n")
   (("1"
     (skosimp*)
     (expand "nderiv")
     (expand "nderivseq")
     (case-replace
      "(LAMBDA (k: nat): factorial(k) / factorial(k) * a!1(k)) = a!1")
     (hide 2)
     (apply-extensionality 1 :hide? t))
    ("2"
     (skosimp*)
     (expand "nderiv" 1)
     (lemma "deriv_Inf_sum")
     (inst?)
     (assert)
     (replace -1)
     (hide -1)
     (inst?)
     (rewrite "conv_derivseq")
     (replace -1)
     (hide -1)
     (case-replace
      "nderivseq(j!1, derivseq(a!1)) = nderivseq(1 + j!1, a!1)")
     (hide 2)
     (expand "nderivseq")
     (expand "derivseq")
     (apply-extensionality 1 :hide? t)
     (name-replace "AA" "a!1(1 + j!1 + x!1)")
     (case-replace
      "factorial(1 + j!1 + x!1) = (1 + j!1 + x!1)*factorial(j!1 + x!1)")
     (("1" (name-replace "FF" "factorial(j!1 + x!1)") (field 1))
      ("2" (hide 2) (expand "factorial" 1 1) (propax))))
    ("3" (hide 2) (skosimp*) (rewrite "conv_nderivseq"))
    ("4" (hide 2) (skosimp*) (rewrite "Inf_sum_derivable_n_times"))))


proof_type: f_proof
decl_type: formula
library: series
theory: taylor_series
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (replace -2)
   (lemma "nderiv_Inf_sum")
   (inst?)
   (assert)
   (replace -1)
   (hide -1)
   (lemma "Inf_sum_0")
   (rewrite "Inf_sum_0")
   (("1"
     (lemma "Inf_sum_derivable_n_times")
     (inst?)
     (assert)
     (expand "nderivseq")
     (expand "factorial" 1 3)
     (assert))
    ("2" (hide 2) (rewrite "conv_nderivseq"))))


proof_type: f_proof
decl_type: formula
library: series
theory: taylor_series
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (apply-extensionality 1 :hide? t)
   (("1" (expand "Taylor_seq") (expand "Taylor_term") (lift-if) (ground))
    ("2" (rewrite "T_pred_0")) ("3" (rewrite "T_pred_0") (skosimp*))))


proof_type: f_proof
decl_type: formula
library: series
theory: taylor_series
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "conv_powerseries?")
   (skosimp*)
   (case-replace
    "powerseries(Taylor_seq(f!1))(x!1) = (LAMBDA n:
                              f!1(x!1) - Taylor_rem(n, f!1, 0, x!1, GET_C(f!1,x!1,n)))")
   (("1"
     (hide -1)
     (inst?)
     (lemma "convergent_diff")
     (inst - "(LAMBDA n: f!1(x!1))"
      "(LAMBDA n: Taylor_rem(n, f!1, 0, x!1, GET_C(f!1, x!1, n)))")
     (("1"
       (assert)
       (expand "-")
       (assert)
       (hide 2)
       (lemma "convergent_const")
       (expand "const_fun")
       (inst?))
      ("2" (rewrite "T_pred_0"))
      ("3" (skosimp*) (expand "inf_deriv_fun?") (inst?))))
    ("2"
     (hide 2)
     (apply-extensionality 1 :hide? t)
     (("1" (rewrite "T_pred_0"))
      ("2" (skosimp*) (expand "inf_deriv_fun?") (inst?))))
    ("3" (rewrite "T_pred_0"))
    ("4" (skosimp*) (expand "inf_deriv_fun?") (inst?))))


proof_type: f_proof
decl_type: formula
library: series
theory: taylor_series
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: sdf
script:
  (""
   (skosimp*)
   (apply-extensionality 1 :hide? t)
   (("1"
     (expand "Inf_sum")
     (expand "powerseries")
     (lemma "limit_def")
     (inst?)
     (("1"
       (inst - "f!1(x!1)")
       (assert)
       (hide 2)
       (inst?)
       (expand "convergence")
       (skosimp*)
       (inst - "epsilon!1")
       (skosimp*)
       (inst + "n!1")
       (skosimp*)
       (inst - "i!1")
       (assert)
       (name "C" "GET_C(f!1, x!1, i!1)")
       (typepred "C")
       (expand "powerseries")
       (replace -5)
       (hide -5)
       (lemma "abs_neg")
       (inst - "Taylor_rem(i!1, f!1, 0, x!1, C)")
       (("1" (assert)) ("2" (rewrite "T_pred_0"))
        ("3" (expand "inf_deriv_fun?") (inst?))))
      ("2"
       (hide 2)
       (lemma "is_taylor_prep")
       (inst?)
       (assert)
       (expand "conv_powerseries?")
       (split -1)
       (("1" (expand "powerseries") (inst?))
        ("2"
         (hide 2)
         (skosimp*)
         (expand "convergent?")
         (inst + "0")
         (inst?))))))
    ("2"
     (lemma "is_taylor_prep")
     (inst?)
     (assert)
     (hide 2)
     (skosimp*)
     (inst?)
     (assert)
     (expand "convergent?")
     (inst + "0"))))


proof_type: t_proof
decl_type: tcc
library: series
theory: taylor_series
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (name "XX" "epsilon({X:T | TRUE})")
   (lemma "ball")
   (inst - "XX")
   (assert)
   (lemma "connected_domain")
   (expand "connected?")
   (case "XX >= 0")
   (("1" (inst - "-XX" "XX" "0") (assert))
    ("2" (inst - "XX" "-XX" "0") (assert))))


proof_type: t_proof
decl_type: tcc
library: series
theory: taylor_series
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (inst +
    "(LAMBDA (f:(inf_deriv_fun?[T]), x:T, k: nat):
                                 choose({c: between[T](0, x) |
                                          powerseries(Taylor_seq(f))(x)(k) =
                                           f(x) -
                                            Taylor_rem(k, f, 0, x, c)}))")
   (("1"
     (skosimp*)
     (expand "nonempty?")
     (expand "empty?")
     (expand "member")
     (lemma "Taylors_inf[T]")
     (inst - "0" "x!1" "f!1" "k!1")
     (("1"
       (assert)
       (skosimp*)
       (inst - "c!1")
       (lemma "Taylor_seq_term")
       (inst?)
       (assert)
       (replace -2)
       (assert)
       (expand "powerseries")
       (expand "powerseq")
       (replace -1 * rl)
       (hide -1)
       (expand "series")
       (case-replace
        "(LAMBDA (k: nat): Taylor_seq(f!1)(k) * x!1 ^ k
                                             ) = (LAMBDA n:
                                                       IF n = 0 THEN f!1(0) ELSE Taylor_seq(f!1)(n) * x!1 ^ n ENDIF)")
       (hide 2)
       (apply-extensionality 1 :hide? t)
       (lift-if)
       (ground)
       (expand "Taylor_seq")
       (expand "nderiv")
       (assert)
       (replace -1)
       (assert))
      ("2" (rewrite "T_pred_0"))))
    ("2" (skosimp*) (rewrite "T_pred_0"))
    ("3" (skosimp*) (typepred "f!1") (expand "inf_deriv_fun?") (inst?))))


proof_type: t_proof
decl_type: tcc
library: series
theory: taylor_series
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "is_taylor_prep")
   (inst?)
   (assert)
   (hide 2)
   (skosimp*)
   (inst?)
   (expand "convergent?")
   (inst + "0"))


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


proof_type: f_proof
decl_type: formula
library: series
theory: trig_fun
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "altsign")
   (lift-if)
   (ground)
   (("1"
     (rewrite "abs_hat")
     (("1"
       (expand "abs")
       (lemma "expt_1i")
       (inst?)
       (("1" (assert))
        ("2" (expand "even?") (skosimp*) (replace -1) (assert))))
      ("2" (expand "even?") (propax))))
    ("2"
     (lemma "odd_iff_not_even")
     (inst?)
     (assert)
     (rewrite "abs_hat")
     (("1"
       (expand "abs")
       (rewrite "expt_1i")
       (lemma "odd_div2")
       (inst?)
       (assert))
      ("2" (lemma "odd_div2") (inst?) (assert))))))


proof_type: f_proof
decl_type: formula
library: series
theory: trig_fun
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "conv_powerseries?")
   (skosimp*)
   (lemma "useful_prep")
   (inst?)
   (lemma "comparison_test")
   (assert)
   (inst -1 "powerseq(sin_coef, x!1)"
    "(LAMBDA n:  (abs(x!1)) ^ n / factorial(n))")
   (expand "powerseries")
   (assert)
   (hide -1 2)
   (skosimp*)
   (rewrite "apow_rew")
   (expand "apowerseq")
   (expand "sin_coef")
   (lift-if)
   (ground)
   (("1" (expand "abs" 1 1) (assert))
    ("2" (rewrite "abs_mult") (rewrite "abs_0") (assert))
    ("3"
     (rewrite "abs_mult")
     (rewrite "abs_div")
     (expand "abs" 2 2)
     (rewrite "abs_altsign")
     (rewrite "abs_hat")
     (("1" (assert))
      ("2" (flatten) (replace -1) (assert) (rewrite "abs_0") (assert))))))


proof_type: f_proof
decl_type: formula
library: series
theory: trig_fun
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "conv_powerseries?")
   (skosimp*)
   (lemma "useful_prep")
   (inst?)
   (lemma "comparison_test")
   (assert)
   (inst -1 "powerseq(cos_coef, x!1)"
    "(LAMBDA n:  (abs(x!1)) ^ n / factorial(n))")
   (expand "powerseries")
   (assert)
   (hide -1 2)
   (skosimp*)
   (rewrite "apow_rew")
   (expand "apowerseq")
   (expand "cos_coef")
   (lift-if)
   (ground)
   (("1"
     (rewrite "abs_div")
     (case-replace "abs(altsign(n!1)) = 1")
     (("1"
       (expand "abs" 1 1)
       (rewrite "abs_hat_nat")
       (assert)
       (lift-if)
       (expand "altsign")
       (assert)
       (expand "factorial")
       (expand "abs" 1 1)
       (assert)
       (typepred "x!1")
       (replace -3)
       (assert))
      ("2"
       (hide 2)
       (expand "altsign")
       (lemma "altsign_prep")
       (inst?)
       (expand "abs")
       (lift-if)
       (ground))))
    ("2"
     (rewrite "abs_mult")
     (rewrite "abs_hat_nat")
     (case-replace "abs(altsign(n!1)) = 1")
     (("1"
       (rewrite "abs_div")
       (rewrite "abs_altsign")
       (expand "abs" 1 1)
       (assert))
      ("2"
       (hide 2 3)
       (lemma "altsign_prep")
       (expand "altsign")
       (inst?)
       (("1" (expand "abs") (lift-if) (ground))
        ("2"
         (reveal 1)
         (assert)
         (rewrite "abs_div")
         (assert)
         (rewrite "abs_altsign")
         (expand "abs" 1 1)
         (assert))))))
    ("3" (rewrite "abs_0") (assert))))


proof_type: f_proof
decl_type: formula
library: series
theory: trig_fun
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "sin")
   (expand "inf_sum")
   (lemma "limit_series_shift")
   (inst?)
   (inst -1 "1")
   (split -1)
   (("1"
     (assert)
     (replace -1)
     (hide -1)
     (expand "sigma")
     (expand "powerseq")
     (case-replace "sin_coef(0) * 0 ^ 0 = 0")
     (("1"
       (hide -1)
       (assert)
       (case-replace
        "(LAMBDA n: sin_coef(1 + n) * 0 ^ (1 + n)) = (LAMBDA n: 0)")
       (("1"
         (hide -1)
         (rewrite "zero_series_limit")
         (expand "sin_coef")
         (expand "sigma")
         (propax))
        ("2" (hide 2) (apply-extensionality 1 :hide? t))))
      ("2" (hide 2) (expand "sin_coef") (grind))))
    ("2"
     (hide 2)
     (lemma "sin_conv")
     (expand "conv_powerseries?")
     (expand "powerseries")
     (inst?))))


proof_type: f_proof
decl_type: formula
library: series
theory: trig_fun
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "cos")
   (expand "inf_sum")
   (lemma "limit_series_shift")
   (inst?)
   (inst -1 "1")
   (split -1)
   (("1"
     (assert)
     (replace -1)
     (hide -1)
     (expand "sigma")
     (expand "powerseq")
     (case-replace "cos_coef(0) * 0 ^ 0 = 1")
     (("1"
       (hide -1)
       (assert)
       (case-replace
        "(LAMBDA n: cos_coef(1 + n) * 0 ^ (1 + n)) = (LAMBDA n: 0)")
       (("1"
         (hide -1)
         (rewrite "zero_series_limit")
         (expand "cos_coef")
         (grind))
        ("2"
         (hide 2)
         (apply-extensionality 1 :hide? t)
         (typepred "x!1")
         (expand "cos_coef")
         (case-replace "0 ^ (1 + x!1) = 0")
         (("1" (assert)) ("2" (hide 2) (grind))))))
      ("2"
       (hide 2)
       (expand "cos_coef")
       (expand "factorial")
       (expand "^")
       (expand "expt")
       (assert)
       (expand "altsign")
       (assert))))
    ("2"
     (hide 2)
     (lemma "cos_conv")
     (expand "conv_powerseries?")
     (expand "powerseries")
     (inst?))))


proof_type: t_proof
decl_type: tcc
library: series
theory: trig_fun
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (case "(FORALL n: integer_pred((-1)^n))")
   (("1"
     (skosimp*)
     (inst?)
     (("1"
       (assert)
       (case "(FORALL n: (-1) ^ (n) = -1 OR (-1) ^ (n) = 1)")
       (("1" (inst -1 "n!1/2") (rewrite "even_div2"))
        ("2"
         (hide 2)
         (induct "n")
         (("1" (expand "^") (expand "expt") (propax))
          ("2"
           (skosimp*)
           (expand "^")
           (expand "expt" 1)
           (expand "expt" 2)
           (assert))))))
      ("2" (hide 2) (assert) (rewrite "even_div2"))))
    ("2" (hide 2) (skosimp*) (assert))))


proof_type: t_proof
decl_type: tcc
library: series
theory: trig_fun
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (case "(n!1 - 1) / 2 >= 0")
   (("1"
     (lemma "even_iff_not_odd")
     (inst?)
     (assert)
     (lemma "odd_div2")
     (inst?)
     (assert)
     (case "integer_pred((-1) ^ ((n!1 - 1) / 2))")
     (("1" (lemma "altsign_prep") (inst?) (assert))
      ("2" (hide 3) (lemma "altsign_prep") (inst?) (assert))))
    ("2" (assert))))


proof_type: t_proof
decl_type: tcc
library: series
theory: trig_fun
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "sin_conv")
   (expand "conv_powerseries?")
   (inst?)
   (expand "powerseries")
   (expand "conv_series?")
   (propax))


proof_type: t_proof
decl_type: tcc
library: series
theory: trig_fun
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "conv_series?")
   (lemma "cos_conv")
   (expand "conv_powerseries?")
   (inst?)
   (expand "powerseries")
   (propax))


proof_type: f_proof
decl_type: formula
library: series
theory: trig_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (lemma "sin_conv")
   (lemma "powerseries_derivable[real]")
   (expand "sin")
   (expand "inf_sum")
   (inst?)
   (assert)
   (expand "powerseries")
   (propax))


proof_type: f_proof
decl_type: formula
library: series
theory: trig_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "deriv_Inf_sum[real]")
   (inst -1 "sin_coef")
   (rewrite "sin_conv")
   (expand "sin")
   (assert)
   (expand "Inf_sum")
   (expand "inf_sum")
   (expand "powerseries")
   (replace -1)
   (hide -1)
   (expand "cos")
   (expand "inf_sum")
   (case-replace
    "series(powerseq(derivseq[real](sin_coef),x!1)) = series(powerseq(cos_coef, x!1))")
   (hide 2)
   (expand "series")
   (apply-extensionality 1 :hide? t)
   (case-replace
    "powerseq(derivseq[real](sin_coef), x!1) = powerseq(cos_coef, x!1)")
   (hide 2)
   (rewrite "apow_rew")
   (rewrite "apow_rew")
   (expand "apowerseq")
   (expand "derivseq")
   (apply-extensionality 1 :hide? t)
   (lift-if)
   (ground)
   (("1"
     (expand "sin_coef")
     (expand "cos_coef")
     (expand "factorial")
     (expand "factorial")
     (expand "even?")
     (expand "altsign")
     (expand "even?")
     (grind))
    ("2"
     (expand "sin_coef")
     (lift-if)
     (ground)
     (("1"
       (expand "cos_coef")
       (lemma "even_plus1")
       (inst - "x!3")
       (assert))
      ("2"
       (expand "altsign")
       (expand "cos_coef")
       (lemma "even_plus1")
       (inst - "x!3")
       (assert)
       (expand "altsign")
       (expand "factorial" 2 1)
       (expand "factorial" 2 3)
       (assert)
       (name-replace "FF" "factorial(x!3)")
       (name-replace "M1" "(-1) ^ (x!3 / 2)")
       (("1" (name-replace "X23" "x!1 ^ x!3 ") (assert) (field 2))
        ("2" (expand "even?") (skosimp*) (replace -1) (assert))))))))


proof_type: f_proof
decl_type: formula
library: series
theory: trig_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (lemma "cos_conv")
   (lemma "powerseries_derivable[real]")
   (("1"
     (expand "cos")
     (inst?)
     (assert)
     (expand "inf_sum")
     (assert)
     (expand "powerseries")
     (propax))
    ("2" (skosimp*) (inst + "x!1 + 1") (assert))))


proof_type: f_proof
decl_type: formula
library: series
theory: trig_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "deriv_Inf_sum[real]")
   (inst -1 "cos_coef")
   (rewrite "cos_conv")
   (expand "cos")
   (assert)
   (expand "Inf_sum")
   (expand "inf_sum")
   (expand "powerseries")
   (replace -1)
   (hide -1)
   (expand "sin")
   (expand "inf_sum")
   (case-replace
    "series(powerseq(derivseq[real](cos_coef),x!1)) = -series(powerseq(sin_coef, x!1))")
   (("1" (hide -1) (rewrite "limit_neg"))
    ("2"
     (hide 2)
     (expand "series")
     (apply-extensionality 1 :hide? t)
     (case-replace
      "powerseq(derivseq[real](cos_coef), x!1) = -powerseq(sin_coef, x!1)")
     (("1"
       (assert)
       (expand "-")
       (lemma "sigma_scal")
       (inst - "LAMBDA (x: nat): powerseq(sin_coef, x!1)(x)" "-1" "x!2"
        "0")
       (assert)
       (replace -1)
       (case-replace
        "(LAMBDA (x: nat): powerseq(sin_coef, x!1)(x)) =powerseq(sin_coef, x!1)")
       (("1" (assert)) ("2" (hide 2) (apply-extensionality 1 :hide? t))))
      ("2"
       (hide 2)
       (rewrite "apow_rew")
       (rewrite "apow_rew")
       (expand "apowerseq")
       (expand "derivseq")
       (expand "-")
       (apply-extensionality 1 :hide? t)
       (lift-if)
       (ground)
       (("1"
         (expand "cos_coef")
         (expand "sin_coef")
         (expand "even?")
         (assert))
        ("2"
         (expand "cos_coef")
         (lift-if)
         (expand "sin_coef")
         (lemma "even_plus1")
         (inst - "x!3")
         (assert)
         (prop)
         (("1" (lift-if) (assert))
          ("2"
           (lift-if)
           (assert)
           (case-replace "altsign(1 + x!3) = -altsign(x!3)")
           (("1"
             (hide -1)
             (name "FF" "factorial(x!3)")
             (name-replace "AA" "altsign(x!3)")
             (name-replace "X23" "x!1 ^ x!3 ")
             (factor 1 l)
             (name "XP1" "(1 + x!3)")
             (replace -1)
             (case-replace "factorial(XP1) = XP1*factorial(x!3)")
             (("1" (name-replace "F1" "factorial(x!3)") (field 1))
              ("2"
               (hide 2)
               (replace -1 * rl)
               (expand "factorial" 1 1)
               (propax))))
            ("2"
             (hide 2)
             (hide -1)
             (expand "altsign")
             (expand "even?")
             (skosimp*)
             (replace -1)
             (case-replace "x!3 - 1 = 2 * j!1 - 2")
             (("1"
               (case-replace "2 * j!1 / 2 = j!1")
               (("1"
                 (case-replace "(2 * j!1 -2)/ 2 = j!1-1")
                 (("1"
                   (hide-all-but 1)
                   (lemma "expt_plus")
                   (inst - "j!1-1" "1" "-1")
                   (assert))
                  ("2" (assert))))
                ("2" (assert))))
              ("2" (assert))))))))))))))


proof_type: f_proof
decl_type: formula
library: series
theory: trig_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (lemma "cos_derivable")
   (lemma "sin_derivable")
   (expand "derivable?")
   (skosimp*)
   (inst?)
   (inst?)
   (lemma "sum_derivable[real]")
   (("1"
     (inst -1 "sin*sin" "cos*cos" "x!1")
     (assert)
     (hide 2)
     (lemma "prod_derivable[real]")
     (inst -1 "sin" "sin" "x!1")
     (assert)
     (lemma "prod_derivable[real]")
     (inst -1 "cos" "cos" "x!1")
     (assert))
    ("2"
     (assert)
     (expand "not_one_element?")
     (skosimp*)
     (inst + "x!2+1")
     (assert))
    ("3" (hide-all-but 1) (lemma "deriv_domain_real") (propax))))


proof_type: f_proof
decl_type: formula
library: series
theory: trig_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "const_fun")
   (lemma "cos_derivable")
   (lemma "sin_derivable")
   (case "derivable?[real](cos * cos)")
   (("1"
     (case "derivable?[real](sin * sin)")
     (("1"
       (case-replace "derivable?[real](sin * sin + cos * cos)")
       (("1"
         (case "deriv(sin*sin+cos*cos) = const_fun(0)")
         (("1"
           (lemma "null_derivative[real]")
           (("1"
             (inst -1 "sin*sin+cos*cos")
             (flatten)
             (hide -1)
             (split -1)
             (("1"
               (hide -2)
               (hide -2)
               (case "(sin * sin + cos * cos)(0) = 1")
               (("1"
                 (expand "constant?")
                 (apply-extensionality 1 :hide? t)
                 (inst -2 "x!1" "0")
                 (replace -1)
                 (propax))
                ("2"
                 (hide -1 2)
                 (lemma "sin_0")
                 (lemma "cos_0")
                 (expand "+ ")
                 (expand "*")
                 (assert))))
              ("2"
               (skosimp*)
               (hide 2)
               (case "deriv(sin * sin + cos * cos)(x!1) = const_fun(0)(x!1)")
               (("1"
                 (hide -2)
                 (expand "deriv" -1)
                 (replace -1)
                 (expand "const_fun")
                 (propax))
                ("2" (replace -1) (propax))))))
            ("2"
             (hide -1 2)
             (assert)
             (expand "not_one_element?")
             (skosimp*)
             (inst + "x!1+1")
             (assert))
            ("3" (expand "connected?") (propax))))
          ("2"
           (hide 2)
           (lemma "deriv_sum[real]")
           (("1"
             (apply-extensionality 1 :hide? t)
             (inst -1 "sin*sin" "cos*cos" "x!1")
             (expand "derivable?" -3)
             (expand "derivable?" -4)
             (inst?)
             (inst?)
             (assert)
             (expand "deriv" 1)
             (replace -1)
             (hide -1 -2)
             (lemma "deriv_prod[real]")
             (inst -1 "sin" "sin" "x!1")
             (assert)
             (expand "derivable?" -4)
             (expand "derivable?" -5)
             (inst?)
             (inst?)
             (assert)
             (replace -1)
             (hide -1 -2)
             (lemma "deriv_prod[real]")
             (inst -1 "cos" "cos" "x!1")
             (assert)
             (replace -1)
             (hide -1 -2)
             (lemma "deriv_cos")
             (inst?)
             (expand "deriv" -1)
             (replace -1)
             (hide -1)
             (lemma "deriv_sin")
             (inst?)
             (expand "deriv" -1)
             (replace -1)
             (hide -1)
             (expand "const_fun")
             (assert))
            ("2"
             (assert)
             (expand "not_one_element?")
             (skosimp*)
             (inst + "x!1+1")
             (assert))
            ("3" (hide-all-but 1) (lemma "deriv_domain_real") (propax))))
          ("3" (propax))))
        ("2"
         (hide 2)
         (lemma "sum_derivable[real]")
         (("1"
           (expand "derivable?" 1)
           (skosimp*)
           (inst -1 "sin*sin" "cos*cos" "x!1")
           (expand "derivable?" -2)
           (expand "derivable?" -3)
           (inst?)
           (inst?)
           (assert))
          ("2"
           (assert)
           (expand "not_one_element?")
           (skosimp*)
           (inst + "x!1+1")
           (assert))
          ("3" (hide-all-but 1) (lemma "deriv_domain_real") (propax))))))
      ("2"
       (hide 2)
       (lemma "prod_derivable[real]")
       (("1"
         (expand "derivable?" 1)
         (skosimp*)
         (inst?)
         (expand "derivable?" -3)
         (expand "derivable?" -4)
         (inst?)
         (inst?)
         (assert))
        ("2"
         (assert)
         (expand "not_one_element?")
         (skosimp*)
         (inst + "x!1+1")
         (assert))
        ("3" (hide-all-but 1) (lemma "deriv_domain_real") (propax))))))
    ("2"
     (hide 2)
     (lemma "prod_derivable[real]")
     (("1"
       (expand "derivable?" 1)
       (skosimp*)
       (inst?)
       (expand "derivable?" -3)
       (inst?)
       (assert))
      ("2"
       (assert)
       (expand "not_one_element?")
       (skosimp*)
       (inst + "x!1+1")
       (assert))
      ("3" (hide-all-but 1) (lemma "deriv_domain_real") (propax))))))


proof_type: f_proof
decl_type: formula
library: series
theory: trig_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "cos_derivable")
   (lemma "sin_derivable")
   (case "derivable?[real](cos * cos)")
   (("1"
     (case "derivable?[real](sin * sin)")
     (("1"
       (case-replace "derivable?[real](sin * sin + cos * cos)")
       (("1"
         (case "deriv(sin*sin+cos*cos) = const_fun(0)")
         (("1"
           (lemma "null_derivative[real]")
           (("1"
             (inst -1 "sin*sin+cos*cos")
             (flatten)
             (hide -1)
             (split -1)
             (("1"
               (hide -2)
               (case "(sin * sin + cos * cos)(0) = 1")
               (("1"
                 (expand "constant?")
                 (inst -2 "x!1" "0")
                 (replace -1)
                 (assert)
                 (hide -1)
                 (expand "*")
                 (assert)
                 (expand "+")
                 (propax))
                ("2"
                 (hide -1 2)
                 (lemma "sin_0")
                 (lemma "cos_0")
                 (expand "+ ")
                 (expand "*")
                 (assert))))
              ("2"
               (skosimp*)
               (hide 2)
               (case-replace
                "deriv(sin * sin + cos * cos)(x!2) = const_fun(0)(x!2)")
               (("1"
                 (hide -2)
                 (expand "deriv" -1)
                 (replace -1)
                 (expand "const_fun")
                 (propax))
                ("2" (assert))))))
            ("2"
             (assert)
             (expand "not_one_element?")
             (skosimp*)
             (inst + "x!2+1")
             (assert))
            ("3" (expand "connected?") (propax))))
          ("2"
           (hide 2)
           (lemma "deriv_sum[real]")
           (("1"
             (apply-extensionality 1 :hide? t)
             (inst -1 "sin*sin" "cos*cos" "x!2")
             (expand "derivable?" -3)
             (expand "derivable?" -4)
             (inst?)
             (inst?)
             (assert)
             (expand "deriv" 1)
             (replace -1)
             (hide -1 -2)
             (lemma "deriv_prod[real]")
             (inst -1 "sin" "sin" "x!2")
             (assert)
             (expand "derivable?" -4)
             (expand "derivable?" -5)
             (inst?)
             (inst?)
             (assert)
             (replace -1)
             (hide -1 -2)
             (lemma "deriv_prod[real]")
             (inst -1 "cos" "cos" "x!2")
             (assert)
             (replace -1)
             (hide -1 -2)
             (lemma "deriv_cos")
             (inst?)
             (expand "deriv" -1)
             (replace -1)
             (hide -1)
             (lemma "deriv_sin")
             (inst?)
             (expand "deriv" -1)
             (replace -1)
             (hide -1)
             (expand "const_fun")
             (assert))
            ("2"
             (assert)
             (expand "not_one_element?")
             (skosimp*)
             (inst + "x!2+1")
             (assert))
            ("3" (hide-all-but 1) (lemma "deriv_domain_real") (propax))))
          ("3" (propax))))
        ("2"
         (hide 2)
         (lemma "sum_derivable[real]")
         (("1"
           (expand "derivable?" 1)
           (skosimp*)
           (inst -1 "sin*sin" "cos*cos" "x!2")
           (expand "derivable?" -2)
           (expand "derivable?" -3)
           (inst?)
           (inst?)
           (assert))
          ("2"
           (assert)
           (expand "not_one_element?")
           (skosimp*)
           (inst + "x!2+1")
           (assert))
          ("3" (hide-all-but 1) (lemma "deriv_domain_real") (propax))))))
      ("2"
       (hide 2)
       (lemma "prod_derivable[real]")
       (("1"
         (expand "derivable?" 1)
         (skosimp*)
         (inst?)
         (expand "derivable?" -3)
         (expand "derivable?" -4)
         (inst?)
         (inst?)
         (assert))
        ("2"
         (assert)
         (expand "not_one_element?")
         (skosimp*)
         (inst + "x!2+1")
         (assert))
        ("3" (hide-all-but 1) (lemma "deriv_domain_real") (propax))))))
    ("2"
     (hide 2)
     (lemma "prod_derivable[real]")
     (("1"
       (expand "derivable?" 1)
       (skosimp*)
       (inst?)
       (expand "derivable?" -3)
       (inst?)
       (assert))
      ("2"
       (assert)
       (expand "not_one_element?")
       (skosimp*)
       (inst + "x!2+1")
       (assert))
      ("3" (hide-all-but 1) (lemma "deriv_domain_real") (propax))))))


proof_type: f_proof
decl_type: formula
library: series
theory: trig_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "sin_cos_one")
   (inst?)
   (case "sin(x!1) * sin(x!1) <= 1")
   (("1" (hide -2) (lemma "sqrt_1_le") (inst?) (assert))
    ("2"
     (assert)
     (hide 2)
     (case "cos(x!1) * cos(x!1) >= 0")
     (("1" (assert))
      ("2"
       (hide -1 2)
       (assert)
       (rewrite "abs_square" :dir rl)
       (assert))))))


proof_type: f_proof
decl_type: formula
library: series
theory: series_lems
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "partial_sums" ("a" "a!1"))
   (replace -1 1)
   (hide -1)
   (skosimp)
   (inst + "n!1+1")
   (skosimp)
   (lemma "sigma_eq"
    ("low" "m!1+1" "high" "n!2" "F" "a!1" "G" "lambda (n:nat): 0"))
   (rewrite "sigma_zero")
   (split -1)
   (("1" (replace -1) (expand "abs") (assert))
    ("2" (hide 2) (skosimp*) (typepred "n!3") (inst - "n!3") (assert))))


proof_type: f_proof
decl_type: formula
library: series
theory: series_lems
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "zero_tail_series_conv" ("a" "a!1" "n" "n!1"))
   (replace -2 -1)
   (expand "series" 1 2)
   (lemma "limit_series_shift" ("a" "a!1" "pn" "n!1+1"))
   (replace -2 -1)
   (replace -1 1)
   (assert)
   (hide -1)
   (case-replace
    "(LAMBDA (n:nat): a!1(1 + n + n!1)) = (LAMBDA (n:nat): 0)")
   (("1" (rewrite "zero_series_limit"))
    ("2"
     (hide 2)
     (apply-extensionality :hide? t)
     (inst - "1+n!1+x!1")
     (assert))))


proof_type: f_proof
decl_type: formula
library: series
theory: series_lems
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "zero_tail_series_conv" ("a" "a!1" "n" "n!1"))
   (lemma "zero_tail_series_limit" ("a" "a!1" "n" "n!1"))
   (replace -3 (-1 -2))
   (rewrite "limit_equiv")
   (assert))


proof_type: f_proof
decl_type: formula
library: series
theory: series_lems
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "zero_tail_series_conv" ("a" "a!1" "n" "n!1"))
   (split)
   (("1" (propax)) ("2" (skosimp) (inst - "m!1") (assert))))


proof_type: f_proof
decl_type: formula
library: series
theory: series_lems
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "zero_tail_series_limit" ("a" "a!1" "n" "n!1"))
   (split -1)
   (("1"
     (expand "series" -1 2)
     (expand "sigma" -1)
     (case-replace "n!1=0")
     (("1" (assert))
      ("2"
       (lemma "sigma_restrict_eq"
        ("low" "0" "high" "n!1-1" "F" "a!1" "G" "lambda (i:nat): 0"))
       (rewrite "sigma_zero")
       (split)
       (("1" (replace -1) (assert))
        ("2"
         (expand "restrict")
         (apply-extensionality :hide? t)
         (inst - "x!1")
         (lift-if)
         (prop)
         (assert))))))
    ("2" (skosimp) (inst - "m!1") (assert))))


proof_type: f_proof
decl_type: formula
library: series
theory: series_lems
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "single_nz_series_conv" ("a" "a!1" "n" "n!1"))
   (lemma "single_nz_series_limit" ("a" "a!1" "n" "n!1"))
   (assert)
   (replace -3 (-1 -2))
   (rewrite "limit_equiv")
   (assert))


proof_type: f_proof
decl_type: formula
library: series
theory: series_lems
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "cnv_seq_order"
    ("s1" "LAMBDA n: 0" "s2" "nna!1" "l1" "0" "l2" "limit(nna!1)"))
   (lemma "limit_equiv" ("s" "nna!1" "l" "limit(nna!1)"))
   (simplify -1)
   (replace -3 -1)
   (simplify -1)
   (replace -1 -2)
   (split -2)
   (("1" (assert))
    ("2" (hide-all-but 1) (expand "convergence") (expand "abs") (propax))
    ("3" (hide-all-but 1) (skosimp) (assert))))


proof_type: f_proof
decl_type: formula
library: series
theory: series_lems
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (case "FORALL m: n!1 < m => nna!1(m) = 0")
   (("1"
     (lemma "zero_tail_series" ("a" "nna!1" "n" "n!1"))
     (replace -2 -1)
     (lemma "unique_limit"
      ("u" "series(nna!1)" "l1" "nnx!1" "l2" "series(nna!1)(n!1)"))
     (assert))
    ("2"
     (skosimp)
     (expand "convergence")
     (inst - "nna!1(m!1)")
     (("1"
       (skosimp)
       (inst - "max(n!2,m!1)")
       (split -2)
       (("1"
         (case "increasing?(series(nna!1))")
         (("1"
           (expand "abs")
           (case-replace "series(nna!1)(max(n!2, m!1)) - nnx!1 < 0")
           (("1"
             (expand "increasing?")
             (inst - "n!1" "max(n!2,m!1)")
             (assert))
            ("2"
             (assert)
             (hide 1)
             (expand "series")
             (expand "max")
             (case-replace "n!2<m!1")
             (("1"
               (expand "sigma" -3)
               (assert)
               (expand "increasing?")
               (inst - "n!1" "m!1-1")
               (assert))
              ("2"
               (assert)
               (case "n!2 >= m!1")
               (("1"
                 (hide 1)
                 (expand ">=")
                 (expand "<=" -1)
                 (split -1)
                 (("1"
                   (lemma "sigma_middle[nat]"
                    ("high" "n!2" "i" "m!1" "low" "0" "F" "nna!1"))
                   (assert)
                   (replace -1 -4)
                   (hide -1)
                   (case "forall m: 0 <= sigma(1 + m!1, 1+m!1+m, nna!1)")
                   (("1"
                     (inst - "n!2-m!1-1")
                     (expand "increasing?")
                     (inst - "n!1" "m!1-1")
                     (assert))
                    ("2"
                     (hide-all-but 1)
                     (induct "m")
                     (("1" (expand "sigma") (expand "sigma") (assert))
                      ("2" (skosimp*) (expand "sigma" 1) (assert))))))
                  ("2"
                   (replace -1 * rl)
                   (hide -1)
                   (expand "sigma" -2)
                   (expand "increasing?")
                   (inst - "n!1" "m!1-1")
                   (assert))))
                ("2" (assert))))))))
          ("2"
           (hide-all-but 1)
           (expand "increasing?")
           (expand "series")
           (case "forall n,m: sigma(0, n, nna!1) <= sigma(0, n+m, nna!1)")
           (("1"
             (skosimp)
             (inst - "x!1" "y!1-x!1")
             (("1" (assert)) ("2" (assert))))
            ("2"
             (hide 2)
             (induct "m")
             (("1" (skosimp) (assert))
              ("2"
               (skosimp*)
               (inst - "n!3")
               (expand "sigma" 1 2)
               (assert))))))))
        ("2"
         (expand "max")
         (case-replace "n!2 < m!1")
         (("1" (assert)) ("2" (assert))))))
      ("2" (assert))))))


proof_type: f_proof
decl_type: formula
library: series
theory: series_lems
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (typepred "phi!1")
   (name "MM"
         "LAMBDA (f:(bijective?[nat,nat]),n:nat): image(LAMBDA (i:below[n+1]): f(i))(fullset[below[n+1]])")
   (lemma "surjective_inverse_exists[nat,nat]" ("f" "phi!1"))
   (lemma "bij_inv_is_bij_alt[nat,nat]" ("f" "phi!1"))
   (skolem - ("phi1"))
   (inst - "phi1")
   (case "forall (f: (bijective?[nat, nat]), n: nat): is_finite[nat](MM(f,n))")
   (("1"
     (case "FORALL (f: (bijective?[nat, nat]), n: nat): has_greatest?(MM(f,n),reals.<=)")
     (("1"
       (expand "restrict")
       (expand "has_greatest?")
       (expand "greatest?")
       (expand "upper_bound?")
       (case "increasing?(series(nna!1))")
       (("1"
         (case "increasing?(series(nna!1 o phi!1))")
         (("1"
           (case "FORALL n: EXISTS m: series(nna!1 o phi!1)(n) <= series(nna!1)(m)")
           (("1"
             (case "FORALL (a: sequence[nnreal], l: real):
                                                             increasing?(a) & convergence(a, l) => (FORALL (j: nat): a(j) <= l)")
             (("1"
               (inst - "series(nna!1)" "nnx!1")
               (("1"
                 (assert)
                 (case "FORALL (j: nat): series(nna!1 o phi!1)(j) <= nnx!1")
                 (("1"
                   (expand "convergence")
                   (skosimp)
                   (inst -12 "epsilon!1")
                   (skosimp)
                   (case "FORALL i: i >= n!1 IMPLIES nnx!1-series(nna!1)(i) < epsilon!1")
                   (("1"
                     (case "EXISTS n:
                                                                                     FORALL i:
                                                                                       i >= n IMPLIES nnx!1 - series(nna!1 o phi!1)(i) < epsilon!1")
                     (("1"
                       (skosimp)
                       (inst + "n!2")
                       (skosimp)
                       (inst - "i!1")
                       (assert)
                       (expand "abs" 1)
                       (assert)
                       (inst -3 "i!1")
                       (assert)
                       (expand "<=" -3)
                       (split -3)
                       (("1" (assert)) ("2" (assert))))
                      ("2"
                       (hide 2)
                       (case "FORALL n: EXISTS m: series(nna!1)(n) <= series(nna!1 o phi!1)(m)")
                       (("1"
                         (inst - "n!1")
                         (skosimp)
                         (inst - "n!1")
                         (assert)
                         (inst + "m!1")
                         (skosimp)
                         (expand "increasing?" -7)
                         (inst -7 "m!1" "i!1")
                         (("1" (assert)) ("2" (assert))))
                        ("2"
                         (hide-all-but (1 -12 -11 -10 -9 -8 -7 -5 -6))
                         (skosimp)
                         (inst -3 "phi!1" "n!2")
                         (case " EXISTS (t: nat):
                                                                                                 MM(phi1, n!2)(t) AND
                                                                                                  (FORALL (r: (MM(phi1, n!2))): (reals.<=(r, t)))")
                         (("1"
                           (hide -4)
                           (skosimp)
                           (inst + "t!1")
                           (case "FORALL (j: nat):
                                                                                                       j <= n!2 =>
                                                                                                        sigma(0, j, nna!1) =
                                                                                                         sigma(0, t!1,
                                                                                                               LAMBDA (i: nat):
                                                                                                                 IF MM(phi1, j)(i) THEN nna!1(phi!1(i)) ELSE 0 ENDIF)")
                           (("1"
                             (expand "series")
                             (inst - "n!2")
                             (assert)
                             (replace -1)
                             (lemma "sigma_le"
                              ("low"
                               "0"
                               "high"
                               "t!1"
                               "F"
                               "LAMBDA (i: nat):
                                                                                                       IF MM(phi1, n!2)(i) THEN nna!1(phi!1(i)) ELSE 0 ENDIF"
                               "G"
                               "nna!1 o phi!1"))
                             (split -1)
                             (("1" (propax))
                              ("2"
                               (hide 2)
                               (skosimp)
                               (expand "o" 1)
                               (case-replace "MM(phi1, n!2)(n!3)")
                               (("1" (assert)) ("2" (assert))))))
                            ("2"
                             (hide 2)
                             (induct "j")
                             (("1"
                               (assert)
                               (expand "sigma" 1 1)
                               (lemma "sigma_with"
                                ("low"
                                 "0"
                                 "high"
                                 "t!1"
                                 "i"
                                 "phi1(0)"
                                 "a"
                                 "nna!1(0)"
                                 "F"
                                 "LAMBDA (i: nat):
                                                                                                              IF MM(phi1, 0)(i) THEN nna!1(phi!1(i)) ELSE 0 ENDIF"
                                 "G"
                                 "LAMBDA (i:nat): 0"))
                               (split -1)
                               (("1"
                                 (replace -1)
                                 (lemma
                                  "sigma_zero"
                                  ("low" "0" "high" "t!1"))
                                 (assert))
                                ("2" (assert))
                                ("3"
                                 (inst - "phi1(0)")
                                 (expand "MM")
                                 (expand "image")
                                 (expand "image")
                                 (inst + "0")
                                 (expand "fullset")
                                 (propax))
                                ("4"
                                 (hide 2)
                                 (apply-extensionality 1 :hide? t)
                                 (case-replace "x!1=phi1(0)")
                                 (("1"
                                   (assert)
                                   (case-replace "MM(phi1, 0)(phi1(0))")
                                   (("1"
                                     (lemma
                                      "comp_inverse_right_alt[nat,nat]"
                                      ("f" "phi!1" "g" "phi1" "r" "0"))
                                     (assert))
                                    ("2"
                                     (hide 2)
                                     (expand "MM")
                                     (expand "image")
                                     (expand "image")
                                     (inst + "0")
                                     (expand "fullset")
                                     (propax))))
                                  ("2"
                                   (assert)
                                   (lift-if 2)
                                   (case-replace "MM(phi1, 0)(x!1)")
                                   (("1"
                                     (expand "MM")
                                     (expand "image")
                                     (expand "image")
                                     (propax))
                                    ("2" (assert))))))))
                              ("2"
                               (skosimp*)
                               (assert)
                               (expand "sigma" 1 1)
                               (replace -1)
                               (hide -1)
                               (lemma "sigma_with"
                                ("low"
                                 "0"
                                 "high"
                                 "t!1"
                                 "F"
                                 "LAMBDA (i: nat):
                                                                                                              IF MM(phi1, 1 + j!1)(i) THEN nna!1(phi!1(i)) ELSE 0 ENDIF"
                                 "G"
                                 "LAMBDA (i: nat):
                                                                                                              IF MM(phi1, j!1)(i) THEN nna!1(phi!1(i)) ELSE 0 ENDIF"
                                 "i"
                                 "phi1(1+j!1)"
                                 "a"
                                 "nna!1(1+j!1)"))
                               (split -1)
                               (("1"
                                 (replace -1 1)
                                 (assert)
                                 (case "MM(phi1, j!1)(phi1(1 + j!1))")
                                 (("1"
                                   (hide 1 -2)
                                   (expand "MM")
                                   (expand "image")
                                   (expand "image")
                                   (skosimp)
                                   (typepred "x!1")
                                   (expand "bijective?" -10)
                                   (flatten)
                                   (expand "injective?")
                                   (inst -10 "1+j!1" "x!1")
                                   (assert))
                                  ("2" (assert))))
                                ("2" (assert))
                                ("3"
                                 (assert)
                                 (inst - "phi1(1+j!1)")
                                 (expand "MM")
                                 (expand "image")
                                 (expand "image")
                                 (inst + "1+j!1")
                                 (expand "fullset")
                                 (propax))
                                ("4"
                                 (hide 2)
                                 (apply-extensionality 1 :hide? t)
                                 (case-replace "x!1=phi1(1 + j!1)")
                                 (("1"
                                   (assert)
                                   (case-replace
                                    "MM(phi1, 1 + j!1)(phi1(1 + j!1))")
                                   (("1"
                                     (lemma
                                      "comp_inverse_right_alt[nat,nat]"
                                      ("f"
                                       "phi!1"
                                       "g"
                                       "phi1"
                                       "r"
                                       "1+j!1"))
                                     (assert))
                                    ("2"
                                     (hide 2)
                                     (expand "MM")
                                     (expand "image")
                                     (expand "image")
                                     (inst + "1+j!1")
                                     (expand "fullset")
                                     (propax))))
                                  ("2"
                                   (assert)
                                   (case-replace
                                    "MM(phi1, 1 + j!1)(x!1)")
                                   (("1"
                                     (case-replace "MM(phi1,j!1)(x!1)")
                                     (hide 3)
                                     (expand "MM")
                                     (expand "image")
                                     (expand "image")
                                     (skosimp)
                                     (typepred "x!2")
                                     (inst + "x!2")
                                     (expand "fullset")
                                     (assert))
                                    ("2"
                                     (assert)
                                     (hide-all-but (-9 1 2 3))
                                     (replace -1 :dir RL :hide? t)
                                     (beta)
                                     (expand "image")
                                     (expand "image")
                                     (lift-if)
                                     (ground)
                                     (skeep)
                                     (inst?)
                                     (typepred "x")
                                     (expand "fullset")
                                     (propax))))))))))))
                          ("2"
                           (hide 2)
                           (hide -3 -7)
                           (inst - "phi1" "n!2")
                           (lemma "non_empty_finite_has_greatest[nat]"
                            ("NF" "MM(phi1,n!2)"))
                           (("1"
                             (inst - "LAMBDA (i,j:nat): reals.<=(i,j)")
                             (("1"
                               (expand "has_greatest?")
                               (expand "greatest?")
                               (expand "upper_bound?")
                               (propax))
                              ("2" (hide-all-but 1) (grind))))
                            ("2"
                             (assert)
                             (expand "empty?")
                             (expand "member")
                             (hide-all-but -1)
                             (expand "MM")
                             (expand "fullset")
                             (expand "image")
                             (expand "image")
                             (inst - "phi1(0)")
                             (inst + "0"))))))))
                      ("3" (skosimp) (assert))))
                    ("2"
                     (hide 2)
                     (skosimp)
                     (inst -13 "i!1")
                     (("1"
                       (assert)
                       (inst -3 "i!1")
                       (expand "abs")
                       (assert))
                      ("2" (assert))))
                    ("3" (skosimp) (assert))))
                  ("2"
                   (hide-all-but (-1 -2 1))
                   (skosimp)
                   (inst -2 "j!1")
                   (skosimp)
                   (inst - "m!1")
                   (assert))))
                ("2"
                 (skosimp)
                 (expand "increasing?")
                 (hide-all-but (-3 1))
                 (inst - "0" "x1!1")
                 (assert)
                 (expand "series" -1 1)
                 (expand "sigma")
                 (assert))))
              ("2"
               (hide-all-but 1)
               (skosimp)
               (lemma "convergence_cauchy" ("u" "a!1"))
               (lemma "cauchy_bounded" ("u" "a!1"))
               (replace -2 -1 rl)
               (lemma "increasing_bounded_convergence" ("v1" "a!1"))
               (("1"
                 (assert)
                 (lemma "unique_limit"
                  ("u" "a!1" "l1" "l!1" "l2" "sup(a!1)"))
                 (assert)
                 (replace -1)
                 (expand "sup")
                 (typepred "lub(Im(a!1))")
                 (expand "least_upper_bound?")
                 (flatten)
                 (expand "upper_bound?")
                 (skosimp)
                 (inst - "a!1(j!1)")
                 (expand "Im")
                 (inst + "j!1"))
                ("2"
                 (split -1)
                 (("1" (flatten))
                  ("2" (expand "convergent?") (inst + "l!1"))))))))
            ("2"
             (hide 2)
             (skosimp)
             (inst - "phi!1" "n!1")
             (skosimp)
             (inst + "t!1")
             (case "series(nna!1 o phi!1)(n!1) =
                                                            series(LAMBDA (i: nat):
                                                                     IF MM(phi!1, n!1)(i) THEN nna!1(i) ELSE 0 ENDIF)
                                                                  (t!1)")
             (("1"
               (replace -1 1)
               (hide -1)
               (expand "series")
               (lemma "sigma_le"
                ("low"
                 "0"
                 "high"
                 "t!1"
                 "F"
                 "LAMBDA (i: nat):
                                                             IF MM(phi!1, n!1)(i) THEN nna!1(i) ELSE 0 ENDIF"
                 "G"
                 "nna!1"))
               (split -1)
               (("1" (propax))
                ("2"
                 (hide 2)
                 (skosimp)
                 (typepred "n!2")
                 (case-replace "MM(phi!1, n!1)(n!2)")
                 (("1" (assert)) ("2" (assert))))))
              ("2"
               (hide-all-but (1 -9 -3 -4 -5 -6 -7 -9))
               (expand "series")
               (case "forall (j:nat): j <= n!1 => sigma(0, j, nna!1 o phi!1) =
                                                                  sigma(0, t!1,
                                                                        LAMBDA (i: nat):
                                                                          IF MM(phi!1, j)(i) THEN nna!1(i) ELSE 0 ENDIF)")
               (("1" (inst - "n!1") (assert))
                ("2"
                 (hide 2)
                 (induct "j")
                 (("1"
                   (assert)
                   (expand "sigma" 1 1)
                   (expand "o" 1)
                   (inst -2 "phi!1(0)")
                   (("1"
                     (typepred "phi!1(0)")
                     (lemma "sigma_with"
                      ("low"
                       "0"
                       "high"
                       "t!1"
                       "F"
                       "LAMBDA (i: nat): IF MM(phi!1, 0)(i) THEN nna!1(i) ELSE 0 ENDIF"
                       "G"
                       "LAMBDA (i:nat): 0"
                       "a"
                       "nna!1(phi!1(0))"
                       "i"
                       "phi!1(0)"))
                     (assert)
                     (split -1)
                     (("1"
                       (replace -1)
                       (lemma "sigma_zero" ("low" "0" "high" "t!1"))
                       (assert))
                      ("2"
                       (hide 2)
                       (apply-extensionality 1 :hide? t)
                       (lift-if 1)
                       (case-replace "MM(phi!1, 0)(x!1)")
                       (("1"
                         (assert)
                         (case-replace "x!1=phi!1(0)")
                         (("1" (assert))
                          ("2"
                           (assert)
                           (expand "MM")
                           (expand "image")
                           (expand "image")
                           (propax))))
                        ("2"
                         (assert)
                         (case-replace "x!1=phi!1(0)")
                         (("1"
                           (assert)
                           (expand "MM")
                           (expand "image")
                           (expand "image")
                           (inst + "0")
                           (expand "fullset")
                           (propax))
                          ("2" (assert))))))))
                    ("2"
                     (expand "MM")
                     (expand "image")
                     (expand "image")
                     (inst + "0")
                     (expand "fullset")
                     (propax))))
                  ("2"
                   (skosimp*)
                   (assert)
                   (expand "sigma" 1 1)
                   (replace -1 1)
                   (hide -1)
                   (lemma "sigma_with"
                    ("low"
                     "0"
                     "high"
                     "t!1"
                     "G"
                     "LAMBDA (i:nat): IF MM(phi!1, j!1)(i) THEN nna!1(i) ELSE 0 ENDIF"
                     "F"
                     "LAMBDA (i:nat): IF MM(phi!1, 1 + j!1)(i) THEN nna!1(i) ELSE 0 ENDIF"
                     "i"
                     "phi!1(1+j!1)"
                     "a"
                     "nna!1(phi!1(1+j!1))"))
                   (typepred "phi!1(1+j!1)")
                   (inst -5 "phi!1(1+j!1)")
                   (("1"
                     (assert)
                     (split -2)
                     (("1"
                       (replace -1 1)
                       (assert)
                       (expand "o" 1)
                       (lift-if 1)
                       (assert)
                       (case-replace "MM(phi!1, j!1)(phi!1(1 + j!1))")
                       (("1"
                         (expand "MM")
                         (expand "image")
                         (expand "image")
                         (skosimp)
                         (typepred "x!1")
                         (hide-all-but (-1 -2 -3 -12))
                         (expand "bijective?")
                         (flatten)
                         (expand "injective?")
                         (inst - "1+j!1" "x!1")
                         (assert))
                        ("2" (assert))))
                      ("2"
                       (hide 2)
                       (apply-extensionality 1 :hide? t)
                       (case-replace "x!1=phi!1(1 + j!1)")
                       (("1"
                         (assert)
                         (lift-if 1)
                         (case-replace
                          "MM(phi!1, 1 + j!1)(phi!1(1 + j!1))")
                         (assert)
                         (expand "MM")
                         (expand "image")
                         (expand "image")
                         (inst + "1+j!1")
                         (expand "fullset")
                         (propax))
                        ("2"
                         (assert)
                         (case-replace "MM(phi!1, j!1)(x!1)")
                         (("1"
                           (case-replace "MM(phi!1, 1+j!1)(x!1)")
                           (expand "MM")
                           (expand "image")
                           (expand "image")
                           (skosimp)
                           (typepred "x!2")
                           (inst + "x!2")
                           (expand "fullset")
                           (propax))
                          ("2"
                           (assert)
                           (case-replace "MM(phi!1, 1 + j!1)(x!1)")
                           (("1"
                             (expand "MM")
                             (expand "image")
                             (expand "image")
                             (skosimp)
                             (typepred "x!2")
                             (inst + "x!2")
                             (expand "fullset")
                             (assert))
                            ("2" (assert))))))))))
                    ("2"
                     (hide -2 2)
                     (expand "MM")
                     (expand "image")
                     (expand "image")
                     (inst + "1+j!1")
                     (expand "fullset")
                     (propax))))))))))))
          ("2"
           (hide-all-but 1)
           (expand "increasing?")
           (expand "o ")
           (expand "series")
           (skosimp*)
           (expand "<=" -1)
           (split -1)
           (("1"
             (assert)
             (lemma "sigma_zero" ("low" "1+x!1" "high" "y!1"))
             (lemma "sigma_le"
              ("low"
               "1+x!1"
               "high"
               "y!1"
               "F"
               "LAMBDA (i: nat): 0"
               "G"
               "LAMBDA (x: nat): nna!1(phi!1(x))"))
             (split -1)
             (("1"
               (assert)
               (replace -2)
               (hide -2)
               (lemma "sigma_split"
                ("low"
                 "0"
                 "high"
                 "y!1"
                 "z"
                 "x!1"
                 "F"
                 "LAMBDA (x: nat): nna!1(phi!1(x))"))
               (assert))
              ("2" (hide-all-but 1) (skosimp*) (assert))))
            ("2" (assert))))))
        ("2"
         (hide-all-but 1)
         (expand "increasing?")
         (expand "series")
         (skosimp*)
         (expand "<=" -1)
         (split -1)
         (("1"
           (assert)
           (hide -1)
           (lemma "sigma_le"
            ("low"
             "1+x!1"
             "high"
             "y!1"
             "F"
             "lambda (i:nat): 0"
             "G"
             "nna!1"))
           (split -1)
           (("1"
             (lemma "sigma_zero" ("low" "1+x!1" "high" "y!1"))
             (assert)
             (reveal -1)
             (replace -2 -3)
             (hide -2)
             (lemma "sigma_split"
              ("low" "0" "high" "y!1" "z" "x!1" "F" "nna!1"))
             (assert))
            ("2" (skosimp) (assert))))
          ("2" (assert))))))
      ("2"
       (hide-all-but (1 -1))
       (skosimp)
       (inst - "f!1" "n!1")
       (expand "restrict")
       (lemma "non_empty_finite_has_greatest[nat]"
        ("NF" "MM(f!1,n!1)" "le" "LAMBDA (s: [nat, nat]): reals.<=(s)"))
       (("1" (propax)) ("2" (hide-all-but 1) (grind))
        ("3"
         (assert)
         (expand "empty?")
         (expand "member")
         (expand "MM")
         (expand "fullset")
         (expand "image")
         (expand "image")
         (inst - "f!1(0)")
         (inst + "0"))))))
    ("2"
     (hide 2 -3)
     (skosimp)
     (expand "MM")
     (lemma "finite_image[below[1+n!1],nat]"
      ("f" "f!1" "S" "fullset[below[1 + n!1]]"))
     (("1"
       (expand "restrict")
       (expand "image")
       (expand "image")
       (propax))
      ("2"
       (hide 2)
       (expand "fullset")
       (expand "is_finite")
       (inst + "1+n!1" "LAMBDA (n:below[1+n!1]): n")
       (expand "injective?")
       (skosimp))))))


proof_type: f_proof
decl_type: formula
library: series
theory: series_lems
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (expand "convergent?")
   (skosimp)
   (inst + "l!1")
   (lemma "nonneg_series_bij" ("nna" "nna!1" "phi" "phi!1" "nnx" "l!1"))
   (("1" (assert))
    ("2"
     (lemma "limit_nonneg" ("nna" "series(nna!1)"))
     (("1" (rewrite "limit_equiv" -2) (flatten) (assert))
      ("2"
       (hide-all-but 1)
       (expand "series")
       (induct "x1")
       (("1" (expand "sigma") (assert))
        ("2" (skosimp*) (expand "sigma" 1) (assert))))))))


proof_type: f_proof
decl_type: formula
library: series
theory: series_lems
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (lemma "nonneg_series_bij_conv" ("nna" "nna!1" "phi" "phi!1"))
   (assert)
   (expand "convergent?")
   (skosimp*)
   (lemma "nonneg_series_bij" ("nna" "nna!1" "phi" "phi!1" "nnx" "l!2"))
   (("1"
     (assert)
     (lemma "unique_limit"
      ("u" "series(nna!1 o phi!1)" "l1" "l!1" "l2" "l!2"))
     (assert)
     (rewrite "limit_equiv" -2)
     (rewrite "limit_equiv" -4)
     (assert))
    ("2"
     (hide -1 2)
     (lemma "limit_nonneg" ("nna" "series(nna!1)"))
     (("1"
       (assert)
       (lemma "limit_def" ("v" "series(nna!1)" "l" "l!2"))
       (assert))
      ("2"
       (hide-all-but 1)
       (expand "series")
       (induct "x1")
       (("1" (expand "sigma") (assert))
        ("2" (skosimp) (expand "sigma" 1) (assert))))))))


proof_type: f_proof
decl_type: formula
library: series
theory: series_lems
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (name "AA" "lambda (n:nat): IF a!1(n) < 0 THEN 0 ELSE a!1(n) ENDIF")
   (name "BB" "lambda (n:nat): IF a!1(n) < 0 THEN -a!1(n) ELSE 0 ENDIF")
   (case "a!1 = AA-BB")
   (("1"
     (hide -2 -3)
     (case "convergent?(series(AA))")
     (("1"
       (case "convergent?(series(BB))")
       (("1"
         (replace -3)
         (hide -3 -4)
         (expand "convergent?")
         (skosimp*)
         (assert)
         (lemma "nonneg_series_bij"
          ("nna" "AA" "nnx" "l!2" "phi" "phi!1"))
         (("1"
           (lemma "nonneg_series_bij"
            ("nna" "BB" "nnx" "l!1" "phi" "phi!1"))
           (("1"
             (assert)
             (case-replace "series(AA) - series(BB) = series(AA - BB)")
             (("1"
               (case-replace
                "series(AA o phi!1) - series(BB o phi!1) = series((AA -BB)o phi!1)")
               (("1"
                 (lemma "unique_limit"
                  ("u" "series(AA - BB)" "l1" "l!2-l!1" "l2" "x!1"))
                 (assert)
                 (replace -3 -1 rl)
                 (lemma "cnv_seq_diff"
                  ("s1"
                   "series(AA)"
                   "s2"
                   "series(BB)"
                   "l1"
                   "l!2"
                   "l2"
                   "l!1"))
                 (assert)
                 (replace -2)
                 (replace -3 1 rl)
                 (lemma "cnv_seq_diff"
                  ("s1"
                   "series(AA o phi!1)"
                   "s2"
                   "series(BB o phi!1)"
                   "l1"
                   "l!2"
                   "l2"
                   "l!1"))
                 (assert)
                 (hide-all-but (1 -5 -6))
                 (expand "o")
                 (expand "series")
                 (expand "convergence")
                 (assert)
                 (split 1)
                 (("1" (propax)) ("2" (propax))))
                ("2"
                 (hide-all-but 1)
                 (expand "o")
                 (expand "series")
                 (apply-extensionality :hide? t)
                 (expand "-")
                 (lemma "sigma_minus[nat]"
                  ("low"
                   "0"
                   "high"
                   "x!2"
                   "F"
                   "LAMBDA (x: nat): AA(phi!1(x))"
                   "G"
                   "LAMBDA (x: nat): BB(phi!1(x))"))
                 (assert))))
              ("2"
               (hide-all-but 1)
               (expand "series")
               (apply-extensionality :hide? t)
               (expand "-")
               (lemma "sigma_minus[nat]"
                ("low" "0" "high" "x!2" "F" "AA" "G" "BB"))
               (propax))))
            ("2"
             (hide-all-but (1 -3))
             (lemma "limit_nonneg" ("nna" "series(BB)"))
             (("1"
               (split -1)
               (("1"
                 (rewrite "limit_equiv" -2)
                 (flatten)
                 (assert)
                 (hide -2 -3)
                 (reveal -4)
                 (rewrite "limit_equiv"))
                ("2"
                 (expand "convergent?")
                 (inst + "l!1")
                 (reveal -2)
                 (propax))))
              ("2"
               (hide-all-but 1)
               (expand "series")
               (induct "x1")
               (("1" (expand "sigma") (expand "BB") (grind))
                ("2"
                 (expand "BB")
                 (skosimp)
                 (expand "sigma" 1)
                 (case-replace "a!1(1 + j!1) < 0")
                 (("1" (assert)) ("2" (assert))))))))
            ("3" (hide-all-but 1) (expand "BB") (grind))))
          ("2"
           (hide-all-but (1 -3))
           (lemma "limit_nonneg" ("nna" "series(AA)"))
           (("1"
             (reveal -2)
             (split -2)
             (("1" (rewrite "limit_equiv" -2) (flatten) (assert))
              ("2" (expand "convergent?") (inst + "l!2"))))
            ("2"
             (hide-all-but 1)
             (expand "series")
             (expand "AA")
             (induct "x1")
             (("1" (grind))
              ("2"
               (skosimp)
               (expand "sigma" 1)
               (case-replace "a!1(1 + j!1) < 0")
               (("1" (assert)) ("2" (assert))))))))
          ("3" (hide-all-but 1) (expand "AA") (grind))))
        ("2"
         (hide-all-but (-3 1))
         (lemma "comparison_test" ("a" "BB" "b" "abs(a!1)"))
         (assert)
         (hide-all-but 1)
         (skosimp)
         (expand "BB")
         (expand "abs")
         (lift-if)
         (expand "abs")
         (propax))))
      ("2"
       (hide-all-but (-2 1))
       (lemma "comparison_test" ("b" "abs(a!1)" "a" "AA"))
       (assert)
       (hide-all-but 1)
       (expand "AA")
       (grind))))
    ("2"
     (hide-all-but 1)
     (apply-extensionality :hide? t)
     (expand "-")
     (expand "AA")
     (expand "BB")
     (case-replace "a!1(x!2) < 0")
     (("1" (assert)) ("2" (assert))))))


proof_type: f_proof
decl_type: formula
library: series
theory: series_lems
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (lemma "convergent_abs" ("a" "a!1"))
   (assert)
   (expand "convergent?" (-1 1))
   (skosimp)
   (lemma "abs_series_bij" ("a" "a!1" "phi" "phi!1" "x" "l!1"))
   (assert)
   (inst + "l!1"))


proof_type: f_proof
decl_type: formula
library: series
theory: series_lems
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (lemma "abs_series_bij_conv" ("a" "a!1" "phi" "phi!1"))
   (lemma "convergent_abs" ("a" "a!1"))
   (assert)
   (expand "convergent?" (-1 -2))
   (skosimp*)
   (lemma "abs_series_bij" ("a" "a!1" "phi" "phi!1" "x" "l!1"))
   (assert)
   (lemma "unique_limit"
    ("u" "series(a!1 o phi!1)" "l1" "l!1" "l2" "l!2"))
   (assert)
   (rewrite "limit_equiv" -2)
   (rewrite "limit_equiv" -3)
   (assert))


proof_type: f_proof
decl_type: formula
library: series
theory: absconv_series
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (typepred "phi!1")
   (split)
   (("1"
     (flatten)
     (lemma "bijective_inverse_exists[nat,nat]" ("f" "phi!1"))
     (expand "exists1")
     (flatten)
     (skosimp)
     (lemma "bij_inv_is_bij_alt" ("f" "phi!1" "g" "x!2"))
     (("1"
       (lemma "abs_series_bij"
        ("a" "aa!1 o phi!1" "phi" "x!2" "x" "x!1"))
       (("1"
         (split -1)
         (("1"
           (lemma "extensionality" ("f" "aa!1 o phi!1 o x!2" "g" "aa!1"))
           (split -1)
           (("1" (assert))
            ("2"
             (hide-all-but (-2 -3 -4 -6 1))
             (rewrite "assoc")
             (case-replace "phi!1 o x!2 = lambda (n:nat): n")
             (("1" (expand "o" 1) (propax))
              ("2"
               (hide 2)
               (apply-extensionality 1 :hide? t)
               (expand "o")
               (lemma "comp_inverse_right_alt"
                ("f" "phi!1" "g" "x!2" "r" "x!3"))
               (propax))))))
          ("2"
           (typepred "aa!1")
           (expand "absconvergent?")
           (hide-all-but (-1 -6 1))
           (lemma "abs_series_bij_conv" ("a" "abs(aa!1)" "phi" "phi!1"))
           (split -1)
           (("1" (hide -2 -3) (expand "o ") (expand "abs") (propax))
            ("2"
             (case-replace "abs(abs(aa!1)) = abs(aa!1)")
             (hide-all-but 1)
             (apply-extensionality :hide? t)
             (grind))))
          ("3" (propax))))
        ("2" (propax))))
      ("2" (propax))))
    ("2"
     (flatten)
     (lemma "abs_series_bij" ("a" "aa!1" "phi" "phi!1" "x" "x!1"))
     (assert)
     (typepred "aa!1")
     (expand "absconvergent?")
     (propax))))


proof_type: f_proof
decl_type: formula
library: series
theory: absconv_series
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (lemma "abs_series_bij_abs" ("aa" "aa!1" "phi" "phi!1"))
   (expand "convergent?")
   (split)
   (("1" (skosimp*) (inst - "l!1") (inst + "l!1") (assert))
    ("2" (skosimp*) (inst - "l!1") (inst + "l!1") (assert))))


proof_type: f_proof
decl_type: formula
library: series
theory: absconv_series
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (lemma "abs_series_bij_abs" ("aa" "aa!1" "phi" "phi!1"))
   (typepred "aa!1")
   (expand "absconvergent?")
   (inst - "limit(series(aa!1))")
   (lemma "limit_equiv" ("s" "series(aa!1)" "l" "limit(series(aa!1))"))
   (assert)
   (lemma "absconvergent_series_is_convergent" ("x" "aa!1"))
   (assert)
   (rewrite "limit_equiv" -4))


proof_type: f_proof
decl_type: formula
library: series
theory: absconv_series
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "convergent?")
   (skosimp*)
   (inst + "l!1")
   (lemma "convergence_subsequence"
    ("u1" "series(a!1)" "u2" "series(a!1) o f!1" "l" "l!1"))
   (assert)
   (hide-all-but 1)
   (expand "subseq")
   (inst + "f!1")
   (expand "o")
   (propax))


proof_type: f_proof
decl_type: formula
library: series
theory: absconv_series
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "f!1")
   (expand "o")
   (expand "series")
   (rewrite "extensionality_postulate" 1 :dir rl)
   (("1"
     (case "forall (n:nat): sigma(if n = 0 then 0 else f!1(n-1)+1 endif,f!1(n),LAMBDA n: IF EXISTS m: n = f!1(m) THEN a!1(n) ELSE 0 ENDIF) = a!1(f!1(n))")
     (("1"
       (induct "x_1")
       (("1"
         (inst - "0")
         (replace -1)
         (hide -1)
         (expand "sigma")
         (expand "sigma")
         (propax))
        ("2"
         (skosimp*)
         (inst - "j!1+1")
         (assert)
         (assert)
         (expand "strict_increasing?")
         (inst - "j!1" "1+j!1")
         (assert)
         (expand "sigma" 1 1)
         (name-replace "F"
          "LAMBDA (n_1: nat):
                         IF EXISTS (m_1: nat): n_1 = f!1(m_1) THEN a!1(n_1)
                         ELSE 0
                         ENDIF")
         (replace -1 1)
         (hide -1)
         (replace -1 1 rl)
         (lemma "sigma_split"
          ("low" "0" "high" "f!1(1 + j!1)" "F" "F" "z" "f!1(j!1)"))
         (assert)
         (assert))
        ("3" (typepred "f!1") (skosimp) (assert))))
      ("2"
       (hide 2)
       (expand "strict_increasing?")
       (skosimp)
       (case-replace "n!1=0")
       (("1"
         (hide -1)
         (typepred "f!1(0)")
         (expand ">=")
         (expand "<=")
         (split -1)
         (("1"
           (expand "sigma" 1)
           (assert)
           (case-replace "EXISTS m: f!1(0) = f!1(m)")
           (("1"
             (assert)
             (hide -1)
             (lemma "sigma_restrict_eq[nat]"
              ("low"
               "0"
               "high"
               "f!1(0)-1"
               "F"
               "LAMBDA n: IF EXISTS m: n = f!1(m) THEN a!1(n) ELSE 0 ENDIF"
               "G"
               "LAMBDA n: 0"))
             (split -1)
             (("1" (rewrite "sigma_zero"))
              ("2"
               (hide 2)
               (expand "restrict")
               (apply-extensionality 1 :hide? t)
               (typepred "x!1")
               (case "x!1<f!1(0)")
               (("1"
                 (assert)
                 (case-replace "EXISTS m: x!1 = f!1(m)")
                 (("1"
                   (hide 1)
                   (skosimp)
                   (typepred "m!1")
                   (expand ">=")
                   (expand "<=" -1)
                   (split -1)
                   (("1" (inst - "0" "m!1") (assert))
                    ("2" (replace -1 * rl) (assert))))
                  ("2" (replace 1 2) (propax))))
                ("2" (assert))))))
            ("2" (inst + "0"))))
          ("2"
           (replace -1 * rl)
           (expand "sigma" 1)
           (case-replace "EXISTS m: 0 = f!1(m)")
           (("1" (expand "sigma") (propax)) ("2" (inst + "0"))))))
        ("2"
         (assert)
         (typepred "f!1(n!1 - 1)")
         (inst-cp - "n!1-1" "n!1")
         (assert)
         (expand "sigma" 2)
         (assert)
         (case-replace "EXISTS m: f!1(n!1) = f!1(m)")
         (("1"
           (case-replace "1 + f!1(n!1 - 1) = f!1(n!1)")
           (("1" (expand "sigma") (propax))
            ("2"
             (assert)
             (hide -1)
             (lemma "sigma_restrict_eq[nat]"
              ("low"
               "1 + f!1(n!1 - 1)"
               "high"
               "f!1(n!1) - 1"
               "F"
               "LAMBDA n: IF EXISTS m: n = f!1(m) THEN a!1(n) ELSE 0 ENDIF"
               "G"
               "lambda n:0"))
             (split -1)
             (("1" (rewrite "sigma_zero[nat]"))
              ("2"
               (hide 4)
               (expand "restrict")
               (apply-extensionality 1 :hide? t)
               (typepred "x!1")
               (lift-if 1)
               (case-replace
                "x!1 < 1 + f!1(n!1 - 1) OR x!1 > f!1(n!1) - 1")
               (replace 1 2)
               (flatten)
               (case-replace "EXISTS m: x!1 = f!1(m)")
               (("1"
                 (skosimp)
                 (replace -1)
                 (hide -1 3)
                 (lemma "trich_lt" ("x" "m!1" "y" "n!1"))
                 (split -1)
                 (("1"
                   (case "m!1=n!1-1")
                   (("1" (assert))
                    ("2" (inst - "m!1" "n!1-1") (assert))))
                  ("2" (assert)) ("3" (inst - "n!1" "m!1") (assert))))
                ("2" (replace 1 4) (propax))))))))
          ("2" (inst + "n!1"))))))
      ("3" (hide-all-but 1) (grind)) ("4" (skosimp*) (assert))
      ("5" (skosimp*) (assert))))
    ("2" (skosimp*) (assert))))


proof_type: f_proof
decl_type: formula
library: series
theory: absconv_series
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "subseq")
   (skosimp*)
   (typepred "bb!1")
   (expand "absconvergent?")
   (case-replace "series(abs(a!1)) = series(abs(bb!1) o f!1)")
   (("1"
     (hide -1 -3)
     (rewrite "extract_comp")
     (name-replace "DRL"
      "LAMBDA n:
                                IF EXISTS m: n = f!1(m) THEN abs(bb!1)(n)
                                ELSE 0
                                ENDIF")
     (("1"
       (lemma "comparison_test" ("b" "abs(bb!1)" "a" "DRL"))
       (split -1)
       (("1" (lemma "extract_convergent" ("a" "DRL" "f" "f!1")) (assert))
        ("2" (propax))
        ("3"
         (hide-all-but 1)
         (expand "abs" 1 2)
         (expand "DRL")
         (skosimp)
         (expand "abs" 1 2)
         (expand "abs" 1 3)
         (lift-if 1)
         (case-replace "EXISTS m: n!1 = f!1(m)")
         (("1"
           (expand "abs" 1 1)
           (case-replace "abs(bb!1(n!1)) < 0")
           (("1" (assert)) ("2" (assert))))
          ("2" (replace 1 2) (assert))))))
      ("2" (skosimp*) (assert) (expand "abs") (assert))))
    ("2"
     (hide -1 2)
     (expand "series")
     (rewrite "extensionality_postulate" 1 :dir rl)
     (expand "o")
     (case "FORALL (i:nat): abs(a!1(i)) = abs(bb!1(f!1(i)))")
     (("1"
       (hide -2)
       (expand "abs" 1)
       (induct "x")
       (("1" (expand "sigma") (inst - "0") (expand "sigma") (propax))
        ("2" (skosimp*) (expand "sigma" 1) (inst - "1+j!1") (assert))))
      ("2" (hide 2) (skosimp) (inst - "i!1") (assert))))))


proof_type: f_proof
decl_type: formula
library: series
theory: absconv_series
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "subseq_absconvergent" ("a" "nna!1" "bb" "nnb!1"))
   (("1"
     (assert)
     (lemma "absconvergent_series_is_convergent" ("x" "nna!1"))
     (lemma "limit_nonneg" ("nna" "series(nna!1)"))
     (("1"
       (assert)
       (expand "convergent?")
       (skosimp)
       (lemma "limit_equiv" ("s" "series(nna!1)" "l" "l!1"))
       (inst + "l!1")
       (("1"
         (assert)
         (lemma "subseq_def" ("u" "nna!1" "v" "nnb!1"))
         (assert)
         (skosimp)
         (case "nna!1 = nnb!1 o f!1")
         (("1"
           (lemma "extract_comp" ("a" "nnb!1" "f" "f!1"))
           (expand "o" -1 1)
           (expand "o" -2)
           (replace -2 -1 rl)
           (lemma "limit_order"
            ("s1"
             "series(nna!1)"
             "l1"
             "l!1"
             "s2"
             "series(nnb!1) o f!1"
             "l2"
             "nny!1"))
           (replace -7)
           (lemma "convergence_subsequence"
            ("u1"
             "series(nnb!1)"
             "l"
             "nny!1"
             "u2"
             "series(nnb!1) o f!1"))
           (replace -11)
           (split -1)
           (("1"
             (replace -1 -2)
             (split -2)
             (("1" (propax))
              ("2"
               (replace -2 1)
               (expand "o")
               (expand "series")
               (skosimp)
               (lemma "sigma_le"
                ("low"
                 "0"
                 "high"
                 "f!1(n!1)"
                 "F"
                 "LAMBDA n: IF EXISTS m: n = f!1(m) THEN nnb!1(n) ELSE 0 ENDIF"
                 "G"
                 "nnb!1"))
               (split -1)
               (("1" (propax))
                ("2"
                 (skosimp)
                 (lift-if 1)
                 (prop)
                 (("1" (skosimp) (assert))
                  ("2" (typepred "n!2") (assert))))))))
            ("2"
             (expand "subseq")
             (inst + "f!1")
             (skosimp)
             (expand "o ")
             (propax))))
          ("2" (expand "o ") (apply-extensionality 1 :hide? t))))
        ("2" (assert))))
      ("2"
       (hide 2)
       (expand "series")
       (skosimp)
       (lemma "sigma_nonneg" ("low" "0" "high" "x1!1" "F" "nna!1"))
       (split -1)
       (("1" (propax)) ("2" (skosimp) (assert))))))
    ("2"
     (expand "absconvergent?")
     (expand "convergent?")
     (inst + "nny!1")
     (hide-all-but (-2 1))
     (expand "convergence")
     (skosimp)
     (inst - "epsilon!1")
     (skosimp)
     (inst + "n!1")
     (skosimp)
     (inst - "i!1")
     (assert)
     (expand "abs" 1 2)
     (expand "abs" 1 2)
     (case-replace
      "(LAMBDA (n: nat):
                             IF nnb!1(n) < 0 THEN -nnb!1(n) ELSE nnb!1(n) ENDIF) = nnb!1")
     (apply-extensionality 1 :hide? t))))


proof_type: f_proof
decl_type: formula
library: series
theory: absconv_series
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "aa!1")
   (typepred "bb!1")
   (expand "absconvergent?")
   (lemma "series_sum_conv" ("a" "abs(aa!1)" "b" "abs(bb!1)"))
   (assert)
   (lemma "comparison_test"
    ("b" "abs(aa!1) + abs(bb!1)" "a" "abs(aa!1 + bb!1)"))
   (assert)
   (hide-all-but 1)
   (skosimp)
   (expand "abs")
   (expand "+")
   (case-replace "abs(aa!1(n!1) + bb!1(n!1)) < 0")
   (("1" (lemma "triangle" ("x" "aa!1(n!1)" "y" "bb!1(n!1)")) (assert))
    ("2"
     (assert)
     (lemma "triangle" ("x" "aa!1(n!1)" "y" "bb!1(n!1)"))
     (propax))))


proof_type: f_proof
decl_type: formula
library: series
theory: absconv_series
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "aa!1")
   (expand "absconvergent?")
   (case-replace "abs(-aa!1) = abs(aa!1)")
   (("1"
     (hide-all-but 1)
     (expand "-")
     (expand "abs")
     (apply-extensionality :hide? t)
     (("1"
       (expand "abs")
       (lemma "trichotomy" ("x" "aa!1(x!1)"))
       (split -1)
       (("1" (assert)) ("2" (assert)) ("3" (assert))))
      ("2"
       (skosimp)
       (expand "abs")
       (case-replace "aa!1(n!1) < 0")
       (("1" (assert)) ("2" (assert))))))
    ("2"
     (hide-all-but 1)
     (expand "abs")
     (expand "abs")
     (skosimp)
     (lemma "trichotomy" ("x" "aa!1(x1!1)"))
     (split -1)
     (("1" (assert)) ("2" (assert)) ("3" (assert))))
    ("3" (hide-all-but 1) (grind))))


proof_type: f_proof
decl_type: formula
library: series
theory: absconv_series
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "bb!1")
   (lemma "opp_absconvergent" ("aa" "bb!1"))
   (lemma "sum_absconvergent" ("aa" "aa!1" "bb" "-bb!1"))
   (("1"
     (expand "-")
     (expand "+")
     (case-replace
      "(LAMBDA (x_1: nat): aa!1(x_1) + -bb!1(x_1)) = (LAMBDA (x: nat): aa!1(x) - bb!1(x))")
     (hide-all-but 1)
     (apply-extensionality :hide? t))
    ("2" (propax))))


proof_type: f_proof
decl_type: formula
library: series
theory: absconv_series
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (case "forall (px:posreal): absconvergent?(px * aa!1)")
   (("1"
     (lemma "trichotomy" ("x" "x!1"))
     (split -1)
     (("1" (inst - "x!1") (assert))
      ("2"
       (replace -1)
       (hide-all-but 1)
       (expand "absconvergent?")
       (expand "*")
       (case-replace
        "abs(LAMBDA (x: nat): 0 * aa!1(x)) = LAMBDA (x: nat): 0")
       (("1" (rewrite "zero_series_conv"))
        ("2"
         (hide 2)
         (apply-extensionality :hide? t)
         (expand "abs")
         (expand "abs")
         (assert))))
      ("3"
       (inst - "-x!1")
       (("1"
         (lemma "opp_absconvergent" ("aa" "-x!1 * aa!1"))
         (("1"
           (case-replace "-(-x!1 * aa!1) = x!1 * aa!1")
           (hide-all-but 1)
           (apply-extensionality :hide? t)
           (grind))
          ("2" (propax))))
        ("2" (assert))))))
    ("2"
     (hide 2)
     (typepred "aa!1")
     (skosimp)
     (expand "absconvergent?")
     (lemma "convergent_scal" ("s1" "series(abs(aa!1))" "a" "px!1"))
     (assert)
     (hide -2)
     (case-replace "series(abs(px!1 * aa!1)) = px!1 * series(abs(aa!1))")
     (hide-all-but 1)
     (apply-extensionality :hide? t)
     (expand "series")
     (expand "abs")
     (expand "*")
     (rewrite "sigma_scal[nat]" 1 :dir rl)
     (lemma "sigma_eq[nat]"
      ("low"
       "0"
       "high"
       "x!2"
       "F"
       "LAMBDA (n: nat): abs(px!1 * aa!1(n))"
       "G"
       "LAMBDA (i: nat): px!1 * abs(aa!1(i))"))
     (split -1)
     (("1" (propax))
      ("2"
       (hide 2)
       (skosimp*)
       (rewrite "abs_mult" 1)
       (expand "abs" 1 1)
       (propax))))))


proof_type: t_proof
decl_type: tcc
library: series
theory: absconv_series
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
script:
  (""
   (lemma "single_nz_series_conv" ("a" "LAMBDA n: 0" "n" "0"))
   (split -1)
   (("1" (propax)) ("2" (hide 2) (skosimp))))


proof_type: t_proof
decl_type: tcc
library: series
theory: absconv_series
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (inst + "lambda n: 0")
   (expand "absconvergent?")
   (expand "abs")
   (expand "abs")
   (rewrite "zero_series_conv"))


proof_type: j_proof
decl_type: tcc
library: series
theory: absconv_series
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "x!1")
   (expand "absconvergent?")
   (lemma "convergent_abs" ("a" "x!1"))
   (assert))


proof_type: t_proof
decl_type: tcc
library: series
theory: absconv_series
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (typepred "aa!1")
   (expand "absconvergent?")
   (lemma "abs_series_bij_conv" ("a" "aa!1" "phi" "phi!1"))
   (assert))


proof_type: f_proof
decl_type: formula
library: series
theory: series_aux
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (case "FORALL m: n!1 < m => nna!1(m) = 0")
   (("1"
     (lemma "zero_tail_series" ("a" "nna!1" "n" "n!1"))
     (replace -2 -1)
     (lemma "unique_limit"
      ("u" "series(nna!1)" "l1" "nnx!1" "l2" "series(nna!1)(n!1)"))
     (assert))
    ("2"
     (skosimp)
     (expand "convergence")
     (inst - "nna!1(m!1)")
     (("1"
       (skosimp)
       (inst - "max(n!2,m!1)")
       (split -2)
       (("1"
         (case "increasing?(series(nna!1))")
         (("1"
           (expand "abs")
           (case-replace "series(nna!1)(max(n!2, m!1)) - nnx!1 < 0")
           (("1"
             (expand "increasing?")
             (inst - "n!1" "max(n!2,m!1)")
             (assert))
            ("2"
             (assert)
             (hide 1)
             (expand "series")
             (expand "max")
             (case-replace "n!2<m!1")
             (("1"
               (expand "sigma" -3)
               (assert)
               (expand "increasing?")
               (inst - "n!1" "m!1-1")
               (assert))
              ("2"
               (assert)
               (case "n!2 >= m!1")
               (("1"
                 (hide 1)
                 (expand ">=")
                 (expand "<=" -1)
                 (split -1)
                 (("1"
                   (lemma "sigma_middle[nat]"
                    ("high" "n!2" "i" "m!1" "low" "0" "F" "nna!1"))
                   (assert)
                   (replace -1 -4)
                   (hide -1)
                   (case "forall m: 0 <= sigma(1 + m!1, 1+m!1+m, nna!1)")
                   (("1"
                     (inst - "n!2-m!1-1")
                     (expand "increasing?")
                     (inst - "n!1" "m!1-1")
                     (assert))
                    ("2"
                     (hide-all-but 1)
                     (induct "m")
                     (("1"
                       (expand "sigma")
                       (assert)
                       (expand "sigma")
                       (assert))
                      ("2" (skosimp*) (expand "sigma" 1) (assert))))))
                  ("2"
                   (replace -1 * rl)
                   (hide -1)
                   (expand "sigma" -2)
                   (expand "increasing?")
                   (inst - "n!1" "m!1-1")
                   (assert))))
                ("2" (assert))))))))
          ("2"
           (hide-all-but 1)
           (expand "increasing?")
           (expand "series")
           (case "forall n,m: sigma(0, n, nna!1) <= sigma(0, n+m, nna!1)")
           (("1"
             (skosimp)
             (inst - "x!1" "y!1-x!1")
             (("1" (assert)) ("2" (assert))))
            ("2"
             (hide 2)
             (induct "m")
             (("1" (skosimp) (assert))
              ("2"
               (skosimp*)
               (inst - "n!3")
               (expand "sigma" 1 2)
               (assert))))))))
        ("2"
         (expand "max")
         (case-replace "n!2 < m!1")
         (("1" (assert)) ("2" (assert))))))
      ("2" (assert))))))


proof_type: f_proof
decl_type: formula
library: series
theory: series_aux
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (typepred "phi!1")
   (name "MM"
         "LAMBDA (f:(bijective?[nat,nat]),n:nat): image(LAMBDA (i:below[n+1]): f(i))(fullset[below[n+1]])")
   (lemma "surjective_inverse_exists[nat,nat]" ("f" "phi!1"))
   (lemma "bij_inv_is_bij_alt[nat,nat]" ("f" "phi!1"))
   (skolem - ("phi1"))
   (inst - "phi1")
   (case "forall (f: (bijective?[nat, nat]), n: nat): is_finite[nat](MM(f,n))")
   (("1"
     (case "FORALL (f: (bijective?[nat, nat]), n: nat): has_greatest?(MM(f,n),reals.<=)")
     (("1"
       (expand "restrict")
       (expand "has_greatest?")
       (expand "greatest?")
       (expand "upper_bound?")
       (case "increasing?(series(nna!1))")
       (("1"
         (case "increasing?(series(nna!1 o phi!1))")
         (("1"
           (case "FORALL n: EXISTS m: series(nna!1 o phi!1)(n) <= series(nna!1)(m)")
           (("1"
             (case "FORALL (a: sequence[nnreal], l: real):
                                            increasing?(a) & convergence(a, l) => (FORALL (j: nat): a(j) <= l)")
             (("1"
               (inst - "series(nna!1)" "nnx!1")
               (("1"
                 (assert)
                 (case "FORALL (j: nat): series(nna!1 o phi!1)(j) <= nnx!1")
                 (("1"
                   (expand "convergence")
                   (skosimp)
                   (inst -12 "epsilon!1")
                   (skosimp)
                   (case "FORALL i: i >= n!1 IMPLIES nnx!1-series(nna!1)(i) < epsilon!1")
                   (("1"
                     (case "EXISTS n:
                                                            FORALL i:
                                                              i >= n IMPLIES nnx!1 - series(nna!1 o phi!1)(i) < epsilon!1")
                     (("1"
                       (skosimp)
                       (inst + "n!2")
                       (skosimp)
                       (inst - "i!1")
                       (assert)
                       (expand "abs" 1)
                       (assert)
                       (inst -3 "i!1")
                       (assert)
                       (expand "<=" -3)
                       (split -3)
                       (("1" (assert)) ("2" (assert))))
                      ("2"
                       (hide 2)
                       (case "FORALL n: EXISTS m: series(nna!1)(n) <= series(nna!1 o phi!1)(m)")
                       (("1"
                         (inst - "n!1")
                         (skosimp)
                         (inst - "n!1")
                         (assert)
                         (inst + "m!1")
                         (skosimp)
                         (expand "increasing?" -7)
                         (inst -7 "m!1" "i!1")
                         (("1" (assert)) ("2" (assert))))
                        ("2"
                         (hide-all-but (1 -12 -11 -10 -9 -8 -7 -5 -6))
                         (skosimp)
                         (inst -3 "phi!1" "n!2")
                         (case " EXISTS (t: nat):
                                                                    MM(phi1, n!2)(t) AND
                                                                     (FORALL (r: (MM(phi1, n!2))): (reals.<=(r, t)))")
                         (("1"
                           (hide -4)
                           (skosimp)
                           (inst + "t!1")
                           (case "FORALL (j: nat):
                                                                        j <= n!2 =>
                                                                         sigma(0, j, nna!1) =
                                                                          sigma(0, t!1,
                                                                                LAMBDA (i: nat):
                                                                                  IF MM(phi1, j)(i) THEN nna!1(phi!1(i)) ELSE 0 ENDIF)")
                           (("1"
                             (expand "series")
                             (inst - "n!2")
                             (assert)
                             (replace -1)
                             (lemma "sigma_le"
                              ("low"
                               "0"
                               "high"
                               "t!1"
                               "F"
                               "LAMBDA (i: nat):
                                                                          IF MM(phi1, n!2)(i) THEN nna!1(phi!1(i)) ELSE 0 ENDIF"
                               "G"
                               "nna!1 o phi!1"))
                             (split -1)
                             (("1" (propax))
                              ("2"
                               (hide 2)
                               (skosimp)
                               (expand "o" 1)
                               (case-replace "MM(phi1, n!2)(n!3)")
                               (("1" (assert)) ("2" (assert))))))
                            ("2"
                             (hide 2)
                             (induct "j")
                             (("1"
                               (assert)
                               (expand "sigma" 1 1)
                               (lemma "sigma_with"
                                ("low"
                                 "0"
                                 "high"
                                 "t!1"
                                 "i"
                                 "phi1(0)"
                                 "a"
                                 "nna!1(0)"
                                 "F"
                                 "LAMBDA (i: nat):
                                                                               IF MM(phi1, 0)(i) THEN nna!1(phi!1(i)) ELSE 0 ENDIF"
                                 "G"
                                 "LAMBDA (i:nat): 0"))
                               (split -1)
                               (("1"
                                 (replace -1)
                                 (lemma
                                  "sigma_zero"
                                  ("low" "0" "high" "t!1"))
                                 (assert))
                                ("2" (assert))
                                ("3"
                                 (inst - "phi1(0)")
                                 (expand "MM")
                                 (expand "image")
                                 (expand "image")
                                 (inst + "0")
                                 (expand "fullset")
                                 (propax))
                                ("4"
                                 (hide 2)
                                 (apply-extensionality 1 :hide? t)
                                 (case-replace "x!1=phi1(0)")
                                 (("1"
                                   (assert)
                                   (case-replace "MM(phi1, 0)(phi1(0))")
                                   (("1"
                                     (lemma
                                      "comp_inverse_right_alt[nat,nat]"
                                      ("f" "phi!1" "g" "phi1" "r" "0"))
                                     (assert))
                                    ("2"
                                     (hide 2)
                                     (expand "MM")
                                     (expand "image")
                                     (expand "image")
                                     (inst + "0")
                                     (expand "fullset")
                                     (propax))))
                                  ("2"
                                   (assert)
                                   (lift-if 2)
                                   (case-replace "MM(phi1, 0)(x!1)")
                                   (("1"
                                     (expand "MM")
                                     (expand "image")
                                     (expand "image")
                                     (propax))
                                    ("2" (assert))))))))
                              ("2"
                               (skosimp*)
                               (assert)
                               (expand "sigma" 1 1)
                               (replace -1)
                               (hide -1)
                               (lemma "sigma_with"
                                ("low"
                                 "0"
                                 "high"
                                 "t!1"
                                 "F"
                                 "LAMBDA (i: nat):
                                                                               IF MM(phi1, 1 + j!1)(i) THEN nna!1(phi!1(i)) ELSE 0 ENDIF"
                                 "G"
                                 "LAMBDA (i: nat):
                                                                               IF MM(phi1, j!1)(i) THEN nna!1(phi!1(i)) ELSE 0 ENDIF"
                                 "i"
                                 "phi1(1+j!1)"
                                 "a"
                                 "nna!1(1+j!1)"))
                               (split -1)
                               (("1"
                                 (replace -1 1)
                                 (assert)
                                 (case "MM(phi1, j!1)(phi1(1 + j!1))")
                                 (("1"
                                   (hide 1 -2)
                                   (expand "MM")
                                   (expand "image")
                                   (expand "image")
                                   (skosimp)
                                   (typepred "x!1")
                                   (expand "bijective?" -10)
                                   (flatten)
                                   (expand "injective?")
                                   (inst -10 "1+j!1" "x!1")
                                   (assert))
                                  ("2" (assert))))
                                ("2" (assert))
                                ("3"
                                 (assert)
                                 (inst - "phi1(1+j!1)")
                                 (expand "MM")
                                 (expand "image")
                                 (expand "image")
                                 (inst + "1+j!1")
                                 (expand "fullset")
                                 (propax))
                                ("4"
                                 (hide 2)
                                 (apply-extensionality 1 :hide? t)
                                 (case-replace "x!1=phi1(1 + j!1)")
                                 (("1"
                                   (assert)
                                   (case-replace
                                    "MM(phi1, 1 + j!1)(phi1(1 + j!1))")
                                   (("1"
                                     (lemma
                                      "comp_inverse_right_alt[nat,nat]"
                                      ("f"
                                       "phi!1"
                                       "g"
                                       "phi1"
                                       "r"
                                       "1+j!1"))
                                     (assert))
                                    ("2"
                                     (hide 2)
                                     (expand "MM")
                                     (expand "image")
                                     (expand "image")
                                     (inst + "1+j!1")
                                     (expand "fullset")
                                     (propax))))
                                  ("2"
                                   (assert)
                                   (case-replace
                                    "MM(phi1, 1 + j!1)(x!1)")
                                   (("1"
                                     (case-replace "MM(phi1,j!1)(x!1)")
                                     (hide 3)
                                     (expand "MM")
                                     (expand "image")
                                     (expand "image")
                                     (skosimp)
                                     (typepred "x!2")
                                     (inst + "x!2")
                                     (expand "fullset")
                                     (assert))
                                    ("2"
                                     (assert)
                                     (hide-all-but (-9 1 2 3))
                                     (replace -1 :dir RL :hide? t)
                                     (beta)
                                     (expand "image")
                                     (expand "image")
                                     (lift-if)
                                     (ground)
                                     (skeep)
                                     (inst?)
                                     (typepred "x")
                                     (expand "fullset")
                                     (propax))))))))))))
                          ("2"
                           (hide 2)
                           (hide -3 -7)
                           (inst - "phi1" "n!2")
                           (lemma "non_empty_finite_has_greatest[nat]"
                            ("NF" "MM(phi1,n!2)"))
                           (("1"
                             (inst - "LAMBDA (i,j:nat): reals.<=(i,j)")
                             (("1"
                               (expand "has_greatest?")
                               (expand "greatest?")
                               (expand "upper_bound?")
                               (propax))
                              ("2" (hide-all-but 1) (grind))))
                            ("2"
                             (assert)
                             (expand "empty?")
                             (expand "member")
                             (hide-all-but -1)
                             (expand "MM")
                             (expand "fullset")
                             (expand "image")
                             (expand "image")
                             (inst - "phi1(0)")
                             (inst + "0"))))))))
                      ("3" (skosimp) (assert))))
                    ("2"
                     (hide 2)
                     (skosimp)
                     (inst -13 "i!1")
                     (("1"
                       (assert)
                       (inst -3 "i!1")
                       (expand "abs")
                       (assert))
                      ("2" (assert))))
                    ("3" (skosimp) (assert))))
                  ("2"
                   (hide-all-but (-1 -2 1))
                   (skosimp)
                   (inst -2 "j!1")
                   (skosimp)
                   (inst - "m!1")
                   (assert))))
                ("2"
                 (skosimp)
                 (expand "increasing?")
                 (hide-all-but (-3 1))
                 (inst - "0" "x1!1")
                 (assert)
                 (expand "series" -1 1)
                 (expand "sigma")
                 (assert))))
              ("2"
               (hide-all-but 1)
               (skosimp)
               (lemma "convergence_cauchy" ("u" "a!1"))
               (lemma "cauchy_bounded" ("u" "a!1"))
               (replace -2 -1 rl)
               (lemma "increasing_bounded_convergence" ("v1" "a!1"))
               (("1"
                 (assert)
                 (lemma "unique_limit"
                  ("u" "a!1" "l1" "l!1" "l2" "sup(a!1)"))
                 (assert)
                 (replace -1)
                 (expand "sup")
                 (typepred "lub(Im(a!1))")
                 (expand "least_upper_bound?")
                 (flatten)
                 (expand "upper_bound?")
                 (skosimp)
                 (inst - "a!1(j!1)")
                 (expand "Im")
                 (inst + "j!1"))
                ("2"
                 (split -1)
                 (("1" (flatten))
                  ("2" (expand "convergent?") (inst + "l!1"))))))))
            ("2"
             (hide 2)
             (skosimp)
             (inst - "phi!1" "n!1")
             (skosimp)
             (inst + "t!1")
             (case "series(nna!1 o phi!1)(n!1) =
                                           series(LAMBDA (i: nat):
                                                    IF MM(phi!1, n!1)(i) THEN nna!1(i) ELSE 0 ENDIF)
                                                 (t!1)")
             (("1"
               (replace -1 1)
               (hide -1)
               (expand "series")
               (lemma "sigma_le"
                ("low"
                 "0"
                 "high"
                 "t!1"
                 "F"
                 "LAMBDA (i: nat):
                                              IF MM(phi!1, n!1)(i) THEN nna!1(i) ELSE 0 ENDIF"
                 "G"
                 "nna!1"))
               (split -1)
               (("1" (propax))
                ("2"
                 (hide 2)
                 (skosimp)
                 (typepred "n!2")
                 (case-replace "MM(phi!1, n!1)(n!2)")
                 (("1" (assert)) ("2" (assert))))))
              ("2"
               (hide-all-but (1 -9 -3 -4 -5 -6 -7 -9))
               (expand "series")
               (case "forall (j:nat): j <= n!1 => sigma(0, j, nna!1 o phi!1) =
                                               sigma(0, t!1,
                                                     LAMBDA (i: nat):
                                                       IF MM(phi!1, j)(i) THEN nna!1(i) ELSE 0 ENDIF)")
               (("1" (inst - "n!1") (assert))
                ("2"
                 (hide 2)
                 (induct "j")
                 (("1"
                   (assert)
                   (expand "sigma" 1 1)
                   (expand "o" 1)
                   (inst -2 "phi!1(0)")
                   (("1"
                     (typepred "phi!1(0)")
                     (lemma "sigma_with"
                      ("low"
                       "0"
                       "high"
                       "t!1"
                       "F"
                       "LAMBDA (i: nat): IF MM(phi!1, 0)(i) THEN nna!1(i) ELSE 0 ENDIF"
                       "G"
                       "LAMBDA (i:nat): 0"
                       "a"
                       "nna!1(phi!1(0))"
                       "i"
                       "phi!1(0)"))
                     (assert)
                     (split -1)
                     (("1"
                       (replace -1)
                       (lemma "sigma_zero" ("low" "0" "high" "t!1"))
                       (assert))
                      ("2"
                       (hide 2)
                       (apply-extensionality 1 :hide? t)
                       (lift-if 1)
                       (case-replace "MM(phi!1, 0)(x!1)")
                       (("1"
                         (assert)
                         (case-replace "x!1=phi!1(0)")
                         (("1" (assert))
                          ("2"
                           (assert)
                           (expand "MM")
                           (expand "image")
                           (expand "image")
                           (propax))))
                        ("2"
                         (assert)
                         (case-replace "x!1=phi!1(0)")
                         (("1"
                           (assert)
                           (expand "MM")
                           (expand "image")
                           (expand "image")
                           (inst + "0")
                           (expand "fullset")
                           (propax))
                          ("2" (assert))))))))
                    ("2"
                     (expand "MM")
                     (expand "image")
                     (expand "image")
                     (inst + "0")
                     (expand "fullset")
                     (propax))))
                  ("2"
                   (skosimp*)
                   (assert)
                   (expand "sigma" 1 1)
                   (replace -1 1)
                   (hide -1)
                   (lemma "sigma_with"
                    ("low"
                     "0"
                     "high"
                     "t!1"
                     "G"
                     "LAMBDA (i:nat): IF MM(phi!1, j!1)(i) THEN nna!1(i) ELSE 0 ENDIF"
                     "F"
                     "LAMBDA (i:nat): IF MM(phi!1, 1 + j!1)(i) THEN nna!1(i) ELSE 0 ENDIF"
                     "i"
                     "phi!1(1+j!1)"
                     "a"
                     "nna!1(phi!1(1+j!1))"))
                   (typepred "phi!1(1+j!1)")
                   (inst -5 "phi!1(1+j!1)")
                   (("1"
                     (assert)
                     (split -2)
                     (("1"
                       (replace -1 1)
                       (assert)
                       (expand "o" 1)
                       (lift-if 1)
                       (assert)
                       (case-replace "MM(phi!1, j!1)(phi!1(1 + j!1))")
                       (("1"
                         (expand "MM")
                         (expand "image")
                         (expand "image")
                         (skosimp)
                         (typepred "x!1")
                         (hide-all-but (-1 -2 -3 -12))
                         (expand "bijective?")
                         (flatten)
                         (expand "injective?")
                         (inst - "1+j!1" "x!1")
                         (assert))
                        ("2" (assert))))
                      ("2"
                       (hide 2)
                       (apply-extensionality 1 :hide? t)
                       (case-replace "x!1=phi!1(1 + j!1)")
                       (("1"
                         (assert)
                         (lift-if 1)
                         (case-replace
                          "MM(phi!1, 1 + j!1)(phi!1(1 + j!1))")
                         (assert)
                         (expand "MM")
                         (expand "image")
                         (expand "image")
                         (inst + "1+j!1")
                         (expand "fullset")
                         (propax))
                        ("2"
                         (assert)
                         (case-replace "MM(phi!1, j!1)(x!1)")
                         (("1"
                           (case-replace "MM(phi!1, 1+j!1)(x!1)")
                           (expand "MM")
                           (expand "image")
                           (expand "image")
                           (skosimp)
                           (typepred "x!2")
                           (inst + "x!2")
                           (expand "fullset")
                           (propax))
                          ("2"
                           (assert)
                           (case-replace "MM(phi!1, 1 + j!1)(x!1)")
                           (("1"
                             (expand "MM")
                             (expand "image")
                             (expand "image")
                             (skosimp)
                             (typepred "x!2")
                             (inst + "x!2")
                             (expand "fullset")
                             (assert))
                            ("2" (assert))))))))))
                    ("2"
                     (hide -2 2)
                     (expand "MM")
                     (expand "image")
                     (expand "image")
                     (inst + "1+j!1")
                     (expand "fullset")
                     (propax))))))))))))
          ("2"
           (hide-all-but 1)
           (expand "increasing?")
           (expand "o ")
           (expand "series")
           (skosimp*)
           (expand "<=" -1)
           (split -1)
           (("1"
             (assert)
             (lemma "sigma_zero" ("low" "1+x!1" "high" "y!1"))
             (lemma "sigma_le"
              ("low"
               "1+x!1"
               "high"
               "y!1"
               "F"
               "LAMBDA (i: nat): 0"
               "G"
               "LAMBDA (x: nat): nna!1(phi!1(x))"))
             (split -1)
             (("1"
               (assert)
               (replace -2)
               (hide -2)
               (lemma "sigma_split"
                ("low"
                 "0"
                 "high"
                 "y!1"
                 "z"
                 "x!1"
                 "F"
                 "LAMBDA (x: nat): nna!1(phi!1(x))"))
               (assert))
              ("2" (hide-all-but 1) (skosimp*) (assert))))
            ("2" (assert))))))
        ("2"
         (hide-all-but 1)
         (expand "increasing?")
         (expand "series")
         (skosimp*)
         (expand "<=" -1)
         (split -1)
         (("1"
           (assert)
           (hide -1)
           (lemma "sigma_le"
            ("low"
             "1+x!1"
             "high"
             "y!1"
             "F"
             "lambda (i:nat): 0"
             "G"
             "nna!1"))
           (split -1)
           (("1"
             (lemma "sigma_zero" ("low" "1+x!1" "high" "y!1"))
             (assert)
             (reveal -1)
             (replace -2 -3)
             (hide -2)
             (lemma "sigma_split"
              ("low" "0" "high" "y!1" "z" "x!1" "F" "nna!1"))
             (assert))
            ("2" (skosimp) (assert))))
          ("2" (assert))))))
      ("2"
       (hide-all-but (1 -1))
       (skosimp)
       (inst - "f!1" "n!1")
       (expand "restrict")
       (lemma "non_empty_finite_has_greatest[nat]"
        ("NF" "MM(f!1,n!1)" "le" "LAMBDA (s: [nat, nat]): reals.<=(s)"))
       (("1" (propax)) ("2" (hide-all-but 1) (grind))
        ("3"
         (assert)
         (expand "empty?")
         (expand "member")
         (expand "MM")
         (expand "fullset")
         (expand "image")
         (expand "image")
         (inst - "f!1(0)")
         (inst + "0"))))))
    ("2"
     (hide 2 -3)
     (skosimp)
     (expand "MM")
     (lemma "finite_image[below[1+n!1],nat]"
      ("f" "f!1" "S" "fullset[below[1 + n!1]]"))
     (("1"
       (expand "restrict")
       (expand "image")
       (expand "image")
       (propax))
      ("2"
       (hide 2)
       (expand "fullset")
       (expand "is_finite")
       (inst + "1+n!1" "LAMBDA (n:below[1+n!1]): n")
       (expand "injective?")
       (skosimp))))))


proof_type: f_proof
decl_type: formula
library: sigma_set
theory: absconv_series_aux
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "inj!1")
   (name "SS" "image(inj!1,fullset[nat])")
   (lemma "infinite_injective_image[nat,(SS)]"
    ("S" "fullset[nat]" "f" "inj!1"))
   (("1"
     (name "F" "enum(SS)")
     (("1"
       (lemma "extract_bij" ("f" "F"))
       (("1"
         (case "bijective?[nat,(image(inj!1, fullset[nat]))](inj!1)")
         (("1"
           (lemma
            "bijective_inverse_exists[nat, (image(inj!1, fullset[nat]))]"
            ("f" "inj!1"))
           (("1"
             (expand "exists1")
             (flatten)
             (hide -2)
             (skolem - "PSI")
             (inst + "_" "F")
             (("1"
               (lemma
                "bijective_inverse_exists[nat, ((image(F, fullset[nat])))]"
                ("f" "F"))
               (("1"
                 (expand "exists1")
                 (flatten)
                 (hide -2)
                 (skolem - ("F_INV"))
                 (lemma "enum_def" ("S" "SS"))
                 (replace -6)
                 (inst +
                  "lambda (n:nat): IF SS(n) THEN inj!1(F_INV(n)) ELSE n ENDIF")
                 (("1"
                   (apply-extensionality 2 :hide? t)
                   (("1"
                     (expand "o" 1)
                     (lemma "comp_inverse_left_alt"
                      ("f" "F" "g" "F_INV" "d" "x!1"))
                     (replace -1)
                     (case-replace "SS(F(x!1))")
                     (replace -2 1 rl)
                     (expand "fullset")
                     (expand "image")
                     (inst + "x!1"))
                    ("2"
                     (expand "SS")
                     (skosimp)
                     (replace -2 1)
                     (propax))))
                  ("2"
                   (lemma
                    "bij_inv_is_bij_alt[nat, ((image(F, fullset[nat])))]"
                    ("f" "F" "g" "F_INV"))
                   (("1"
                     (lemma "composition_bijective[(SS),nat,(SS)]"
                      ("f1" "F_INV" "f2" "inj!1"))
                     (("1"
                       (expand "bijective?")
                       (flatten)
                       (split 1)
                       (("1"
                         (expand "injective?")
                         (skosimp)
                         (case-replace "SS(x1!1)")
                         (("1"
                           (case-replace "SS(x2!1)")
                           (("1"
                             (inst - "x1!1" "x2!1")
                             (expand "o")
                             (assert))
                            ("2"
                             (assert)
                             (replace -15 1 rl)
                             (expand "image")
                             (inst + "F_INV(x1!1)")
                             (("1" (assert))
                              ("2" (expand "fullset") (propax))))))
                          ("2"
                           (case-replace "SS(x2!1)")
                           (("1"
                             (assert)
                             (replace -15 1 rl)
                             (expand "image")
                             (inst + "F_INV(x2!1)")
                             (expand "fullset")
                             (propax))
                            ("2" (assert))))))
                        ("2"
                         (expand "surjective?")
                         (skosimp)
                         (case "SS(y!1)")
                         (("1"
                           (inst -3 "y!1")
                           (skosimp)
                           (inst + "x!1")
                           (expand "o")
                           (assert))
                          ("2" (inst + "y!1") (assert))))))
                      ("2"
                       (hide-all-but (-5 1 -8))
                       (expand "bijective?")
                       (flatten)
                       (split)
                       (("1" (expand "injective?") (propax))
                        ("2"
                         (expand "surjective?")
                         (skosimp)
                         (typepred "y!1")
                         (replace -4 -1 rl)
                         (inst - "y!1"))))
                      ("3"
                       (hide-all-but (-1 -8 1 -2))
                       (split 1)
                       (("1" (skosimp) (replace -2) (assert))
                        ("2"
                         (expand "bijective?")
                         (flatten)
                         (split 1)
                         (("1"
                           (expand "injective?")
                           (skosimp)
                           (typepred "x1!1")
                           (typepred "x2!1")
                           (replace -6 -1 rl)
                           (replace -6 -2 rl)
                           (inst - "x1!1" "x2!1")
                           (assert))
                          ("2"
                           (expand "surjective?")
                           (skosimp)
                           (inst - "y!1")
                           (skosimp)
                           (typepred "x!1")
                           (replace -4 -1)
                           (inst + "x!1"))))))))
                    ("2" (propax))))
                  ("3" (skosimp) (replace -2) (propax))))
                ("2" (propax))))
              ("2"
               (lemma "enum_strictly_monotone" ("S" "SS"))
               (expand "strictly_monotone?")
               (expand "strict_increasing?")
               (expand "F")
               (propax))))
            ("2" (propax))))
          ("2"
           (expand "bijective?")
           (flatten)
           (split)
           (("1" (hide-all-but (-5 1)) (expand "injective?") (propax))
            ("2"
             (expand "surjective?")
             (skosimp)
             (typepred "y!1")
             (expand "fullset")
             (expand "image")
             (skosimp)
             (inst + "x!1")
             (assert))))
          ("3"
           (skosimp)
           (expand "fullset")
           (expand "image")
           (inst + "x1!1"))))
        ("2"
         (lemma "enum_strictly_monotone" ("S" "SS"))
         (expand "strictly_monotone?")
         (expand "strict_increasing?")
         (expand "F" 1)
         (propax))))
      ("2"
       (expand "enumerable?")
       (replace -1 1 rl)
       (split 1)
       (("1"
         (expand "bounded_below?")
         (inst + "0")
         (expand "lower_bound?")
         (skosimp)
         (expand "restrict")
         (assert))
        ("2"
         (expand "is_finite")
         (skosimp)
         (inst + "N!1" "f!1")
         (("1"
           (hide 2 -3)
           (expand "injective?")
           (skosimp*)
           (typepred "x1!1")
           (typepred "x2!1")
           (replace -7 -1 rl)
           (replace -7 -3 rl)
           (hide -2 -4 -7)
           (inst - "x1!1" "x2!1")
           (assert))
          ("2"
           (skosimp)
           (replace -2)
           (case-replace "SS(x!1)")
           (("1"
             (assert)
             (hide-all-but (-1 -3 1))
             (expand "image")
             (replace -2 -1 rl)
             (assert))
            ("2" (assert))))))))))
    ("2"
     (hide 2)
     (split 1)
     (("1"
       (skosimp)
       (expand "SS")
       (expand "image")
       (inst + "x1!1")
       (expand "fullset")
       (propax))
      ("2" (expand "injective?") (propax))))
    ("3"
     (hide-all-but -1)
     (expand "fullset")
     (expand "is_finite")
     (skosimp)
     (lemma "composition_injective[below[N!1 + 1],nat, below[N!1]]")
     (inst - "lambda (n:below[N!1+1]): n" "f!1")
     (("1"
       (lemma "injection_n_to_m" ("n" "N!1+1" "m" "N!1"))
       (split -1)
       (("1" (assert))
        ("2" (inst + "f!1 o (LAMBDA (n: below[N!1 + 1]): n)"))))
      ("2" (expand "injective?") (hide -1) (skosimp))))))


proof_type: f_proof
decl_type: formula
library: sigma_set
theory: absconv_series_aux
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (lemma "inj_is_bij_extract" ("inj" "inj!1"))
   (skosimp)
   (replace -1)
   (lemma "nonneg_series_bij_conv" ("nna" "nna!1" "phi" "phi!1"))
   (assert)
   (lemma "subseq_absconvergent"
    ("a" "nna!1 o (phi!1 o f!1)" "bb" "nna!1 o phi!1"))
   (("1"
     (split -1)
     (("1"
       (lemma "absconvergent_series_is_convergent")
       (inst - "nna!1 o (phi!1 o f!1)"))
      ("2"
       (hide-all-but 1)
       (expand "subseq")
       (inst + "f!1")
       (skosimp)
       (expand "o")
       (propax))))
    ("2"
     (expand "o")
     (expand "absconvergent?")
     (expand "abs" 1)
     (hide-all-but (-1 1))
     (case-replace
      "(LAMBDA (n: nat): abs(nna!1(phi!1(n)))) = (LAMBDA (x: nat): nna!1(phi!1(x)))")
     (hide-all-but 1)
     (apply-extensionality :hide? t)
     (("1" (expand "abs") (propax))
      ("2" (skosimp) (typepred "nna!1(phi!1(x!1))") (assert))))))


proof_type: f_proof
decl_type: formula
library: sigma_set
theory: absconv_series_aux
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (lemma "nonneg_series_inj_conv" ("nna" "nna!1" "inj" "inj!1"))
   (assert)
   (lemma "inj_is_bij_extract" ("inj" "inj!1"))
   (skosimp)
   (replace -1)
   (hide -1)
   (lemma "nonneg_series_bij_conv" ("nna" "nna!1" "phi" "phi!1"))
   (lemma "nonneg_series_bij_limit" ("nna" "nna!1" "phi" "phi!1"))
   (assert)
   (lemma "nonneg_subseq"
    ("nna"
     "nna!1 o (phi!1 o f!1)"
     "nnb"
     "nna!1 o phi!1"
     "nny"
     "limit(series(nna!1 o phi!1))"))
   (("1"
     (split -1)
     (("1" (skosimp) (replace -3) (rewrite "limit_equiv" -1) (assert))
      ("2"
       (hide 2)
       (rewrite "subseq_def" 1)
       (inst + "f!1")
       (expand "o")
       (propax))
      ("3" (hide 2) (rewrite "limit_equiv" 1))))
    ("2"
     (lemma "limit_nonneg" ("nna" "series(nna!1 o phi!1)"))
     (("1" (assert))
      ("2"
       (hide 2 3)
       (expand "o")
       (expand "series")
       (hide-all-but 1)
       (induct "x1")
       (("1" (expand "sigma") (assert))
        ("2" (skosimp*) (expand "sigma" 1) (assert))))))))


proof_type: f_proof
decl_type: formula
library: sigma_set
theory: absconv_series_aux
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (typepred "aa!1")
   (name "AA"
         "lambda (n:nat): IF aa!1(n) >= 0 THEN aa!1(n) ELSE 0 ENDIF")
   (name "BB"
         "lambda (n:nat): IF aa!1(n) < 0 THEN -aa!1(n) ELSE 0 ENDIF")
   (case "aa!1=AA-BB")
   (("1"
     (case "convergent?(series(AA))")
     (("1"
       (case "convergent?(series(BB))")
       (("1"
         (lemma "nonneg_series_inj_conv" ("nna" "AA" "inj" "inj!1"))
         (("1"
           (assert)
           (lemma "nonneg_series_inj_conv" ("nna" "BB" "inj" "inj!1"))
           (("1"
             (assert)
             (lemma "series_sum_conv"
              ("a" "AA o inj!1" "b" "-(BB o inj!1)"))
             (split -1)
             (("1"
               (expand "o")
               (replace -6 1)
               (expand "-")
               (expand "+")
               (assert))
              ("2" (hide-all-but (-2 1)) (expand "o") (propax))
              ("3"
               (hide-all-but (-1 1))
               (assert)
               (case-replace
                "-1 * series(BB o inj!1) = series(-(BB o inj!1))")
               (("1"
                 (hide-all-but 1)
                 (expand "o")
                 (lemma "scal_series_conv" ("a" "BB o inj!1" "c" "-1"))
                 (split -1)
                 (("1"
                   (case-replace
                    "-1 * series(BB o inj!1) = series(-(LAMBDA (x: nat): BB(inj!1(x))))")
                   (hide -1 2)
                   (apply-extensionality 1 :hide? t)
                   (expand "-")
                   (rewrite "series_scal" 1)
                   (expand "o")
                   (assert))
                  ("2"
                   (hide 2)
                   (lemma "nonneg_series_inj_conv"
                    ("nna" "BB" "inj" "inj!1"))
                   (split -1)
                   (("1"
                     (expand "convergent?")
                     (skosimp)
                     (inst + "l!1")
                     (expand "convergence")
                     (skosimp)
                     (inst - "epsilon!1")
                     (skosimp)
                     (inst + "n!1")
                     (skosimp)
                     (inst - "i!1")
                     (assert)
                     (expand "o ")
                     (propax))
                    ("2"
                     (hide 2)
                     (typepred "aa!1")
                     (expand "absconvergent?")
                     (lemma "comparison_test" ("b" "abs(aa!1)" "a" "BB"))
                     (split -1)
                     (("1" (propax)) ("2" (propax))
                      ("3"
                       (hide-all-but 1)
                       (skosimp)
                       (expand "BB")
                       (expand "abs")
                       (expand "abs")
                       (lift-if 1)
                       (assert))))))))
                ("2"
                 (hide-all-but 1)
                 (expand "series")
                 (apply-extensionality 1 :hide? t)
                 (expand "o")
                 (assert)
                 (expand "-")
                 (expand "*")
                 (rewrite "sigma_scal" 1 :dir rl)
                 (assert))))))
            ("2"
             (hide-all-but 1)
             (skosimp)
             (expand "BB")
             (case-replace "aa!1(x1!1) < 0")
             (("1" (assert)) ("2" (assert))))))
          ("2"
           (hide-all-but 1)
           (expand "AA")
           (skosimp)
           (case-replace "aa!1(x1!1) >= 0")
           (assert))))
        ("2"
         (hide-all-but (1 -5))
         (expand "absconvergent?")
         (lemma "comparison_test" ("b" "abs(aa!1)" "a" "BB"))
         (assert)
         (hide-all-but 1)
         (skosimp)
         (expand "abs")
         (expand "abs")
         (expand "BB")
         (case-replace "aa!1(n!1) < 0")
         (("1" (assert)) ("2" (assert))))))
      ("2"
       (expand "absconvergent?")
       (lemma "comparison_test" ("b" "abs(aa!1)" "a" "AA"))
       (assert)
       (hide-all-but 1)
       (expand "abs")
       (expand "abs")
       (skosimp)
       (expand "AA")
       (case-replace "aa!1(n!1) < 0")
       (("1" (assert)) ("2" (assert))))))
    ("2"
     (hide-all-but 1)
     (expand "BB")
     (expand "AA")
     (expand "-")
     (apply-extensionality :hide? t)
     (case-replace "aa!1(x!1) < 0")
     (("1" (assert)) ("2" (assert))))))


proof_type: t_proof
decl_type: tcc
library: sigma_set
theory: absconv_series_aux
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "fullset")
   (expand "image")
   (skosimp*)
   (typepred "f!1")
   (typepred "x1!1")
   (inst + "x1!1"))


proof_type: f_proof
decl_type: formula
library: sigma_set
theory: sigma_bijection
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (case "forall (n:nat,F:[below[n+1]->real],phi:(bijective?[below[n+1],below[n+1]])): sigma[below[n+1]](0,n,F)=sigma[below[n+1]](0,n,F o phi)")
   (("1"
     (skosimp)
     (skosimp)
     (typepred "phi!1")
     (name "N" "high!1-low!1")
     (name "PHI" "LAMBDA (n:below[N+1]): phi!1(n+low!1)-low!1")
     (("1"
       (name "FF" "LAMBDA (n: below[N + 1]): F!1(n+low!1)")
       (("1"
         (inst - "N" "FF" "PHI")
         (("1"
           (hide -1 -2 -3 -4)
           (case "forall (n:nat): n <= N => sigma[below[1 + N]](0,n,FF)=sigma[subrange_T(low!1, high!1)]
                           (low!1, low!1+n,
                            restrict[T, subrange_T(low!1, high!1), real](F!1))")
           (("1"
             (inst - "N")
             (("1"
               (assert)
               (replace -1 -2)
               (hide -1)
               (expand "N" -1 1)
               (replace -1)
               (hide -1)
               (case "forall (n:nat): n <= N => sigma[below[1 + N]](0, n, FF o PHI) =
                            sigma[subrange_T(low!1, high!1)](low!1, low!1+n, F!1 o phi!1)")
               (("1"
                 (inst - "N")
                 (("1" (assert) (replace -1) (expand "N") (propax))
                  ("2" (assert) (expand "N") (assert))))
                ("2"
                 (hide 2)
                 (induct "n")
                 (("1"
                   (flatten)
                   (expand "sigma")
                   (expand "o")
                   (expand "PHI")
                   (expand "FF")
                   (expand "sigma")
                   (propax))
                  ("2"
                   (skosimp*)
                   (assert)
                   (expand "sigma" 1)
                   (replace -1 1 rl)
                   (assert)
                   (hide -1)
                   (expand "PHI")
                   (expand "FF")
                   (expand "o ")
                   (propax))
                  ("3"
                   (skosimp*)
                   (expand "N")
                   (assert)
                   (lemma "connected_domain"
                    ("x" "low!1" "y" "high!1" "z" "z!1"))
                   (assert))
                  ("4"
                   (skosimp*)
                   (expand "N")
                   (lemma "connected_domain"
                    ("x" "low!1" "y" "high!1" "z" "n!2+low!1"))
                   (assert))
                  ("5" (skosimp*) (assert))
                  ("6"
                   (skosimp*)
                   (expand "PHI")
                   (expand "N")
                   (assert)
                   (assert))
                  ("7" (skosimp*) (assert)) ("8" (skosimp*) (assert))))
                ("3"
                 (skosimp)
                 (expand "N")
                 (lemma "connected_domain"
                  ("x" "low!1" "y" "high!1" "z" "n!1+low!1"))
                 (assert))
                ("4" (skosimp) (expand "N") (assert))))
              ("2" (expand "N") (assert))))
            ("2"
             (hide 2)
             (induct "n")
             (("1"
               (assert)
               (flatten)
               (expand "sigma")
               (expand "restrict")
               (expand "FF")
               (expand "sigma")
               (propax))
              ("2"
               (skosimp*)
               (assert)
               (expand "sigma" 1)
               (replace -1)
               (assert)
               (expand "restrict")
               (expand "FF")
               (propax))
              ("3"
               (skosimp*)
               (assert)
               (lemma "connected_domain"
                ("x" "low!1" "y" "high!1" "z" "z!1"))
               (assert))
              ("4"
               (skosimp*)
               (expand "N")
               (lemma "connected_domain"
                ("x" "low!1" "y" "high!1" "z" "n!2+low!1"))
               (assert))
              ("5" (skosimp)) ("6" (skosimp*) (assert))
              ("7" (skosimp*) (assert))))
            ("3"
             (skosimp*)
             (lemma "connected_domain"
              ("x" "low!1" "y" "high!1" "z" "z!1"))
             (assert))
            ("4"
             (skosimp)
             (expand "N")
             (lemma "connected_domain"
              ("x" "low!1" "y" "high!1" "z" "n!1+low!1"))
             (assert))
            ("5"
             (skosimp*)
             (expand "N")
             (assert)
             (typepred "y!1")
             (expand "N")
             (assert))
            ("6" (skosimp) (expand "N") (assert))))
          ("2"
           (hide 2)
           (split 1)
           (("1"
             (skosimp)
             (expand "PHI")
             (expand "N")
             (assert)
             (typepred "x1!1")
             (typepred "phi!1(low!1+x1!1)")
             (("1" (assert)) ("2" (expand "N") (assert))))
            ("2"
             (hide -1 -2 -3)
             (expand "bijective?")
             (flatten)
             (expand "PHI")
             (split)
             (("1"
               (expand "injective?")
               (skosimp)
               (inst - "x1!1 + low!1" "x2!1 + low!1")
               (assert))
              ("2"
               (expand "surjective?")
               (skosimp)
               (inst - "y!1+low!1")
               (("1"
                 (skosimp)
                 (typepred "x!1")
                 (inst + "x!1-low!1")
                 (("1" (assert)) ("2" (expand "N") (assert))))
                ("2"
                 (lemma "connected_domain"
                  ("x" "low!1" "y" "high!1" "z" "low!1+y!1"))
                 (assert)
                 (typepred "y!1")
                 (expand "N")
                 (assert))))))))
          ("3" (expand "N") (assert))))
        ("2"
         (skosimp)
         (lemma "connected_domain"
          ("x" "low!1" "y" "high!1" "z" "n!1+low!1"))
         (assert))))
      ("2"
       (skosimp)
       (typepred "n!1")
       (replace -2 -1 rl)
       (lemma "connected_domain"
        ("x" "low!1" "y" "high!1" "z" "n!1+low!1"))
       (assert))
      ("3" (assert))))
    ("2"
     (hide 2)
     (case "FORALL (n: nat, F: [nat -> real],
                         phi: (bijective?[below[n + 1], below[n + 1]])):
                   sigma[nat](0, n, F) = sigma[nat](0, n, F o (LAMBDA (i:nat): IF i < n+1 THEN phi(i) ELSE i ENDIF))")
     (("1"
       (skosimp)
       (inst - "n!1" "_" "phi!1")
       (inst - "LAMBDA (n:nat): IF n < 1+n!1 THEN F!1(n) ELSE 0 ENDIF")
       (expand "o")
       (case "forall (i:nat): i <= n!1 => sigma[nat]
                       (0, i,
                        LAMBDA (n: nat): IF n < 1 + n!1 THEN F!1(n) ELSE 0 ENDIF) = sigma[below[1 + n!1]](0, i, F!1)")
       (("1"
         (inst - "n!1")
         (assert)
         (replace -1)
         (replace -2)
         (hide -1 -2)
         (case "forall (i:nat): i <= n!1 => sigma[nat]
                         (0, i,
                          LAMBDA (x: nat):
                            IF IF x < 1 + n!1 THEN phi!1(x) ELSE x ENDIF < 1 + n!1
                              THEN IF x < 1 + n!1 THEN F!1(phi!1(x)) ELSE F!1(x) ENDIF
                            ELSE 0
                            ENDIF)
                      =
                      sigma[below[1 + n!1]]
                          (0, i, LAMBDA (x: below[1 + n!1]): F!1(phi!1(x)))")
         (("1" (inst - "n!1") (assert))
          ("2"
           (hide 2)
           (induct "i")
           (("1"
             (assert)
             (expand "sigma")
             (typepred "phi!1(0)")
             (assert)
             (expand "sigma")
             (propax))
            ("2"
             (skosimp*)
             (assert)
             (expand "sigma" 1)
             (replace -1)
             (hide -1)
             (typepred "phi!1(1 + j!1)")
             (assert))
            ("3" (skosimp) (assert) (skosimp*) (assert))
            ("4" (skosimp) (assert)) ("5" (skosimp*) (assert))
            ("6" (skosimp*) (assert))))
          ("3" (skosimp*) (assert)) ("4" (hide 2) (skosimp*) (assert))))
        ("2"
         (hide-all-but 1)
         (induct "i")
         (("1" (assert) (expand "sigma") (expand "sigma") (propax))
          ("2" (skosimp*) (expand "sigma" 1) (assert))
          ("3" (skosimp) (assert) (skosimp*) (assert))
          ("4" (skosimp*) (assert)) ("5" (skosimp*) (assert))))
        ("3" (skosimp) (skosimp) (assert)) ("4" (skosimp) (assert))
        ("5" (skosimp) (skosimp) (assert))))
      ("2"
       (hide 2)
       (induct "n")
       (("1"
         (skosimp)
         (expand "sigma")
         (expand "o")
         (typepred "phi!1(0)")
         (assert)
         (expand "sigma")
         (assert))
        ("2"
         (skosimp*)
         (expand "sigma" 1)
         (expand "o")
         (case "phi!1(1+j!1)<= 1+j!1")
         (("1"
           (expand "<=" -1)
           (split -1)
           (("1"
             (typepred "phi!1")
             (lemma
              "surjective_inverse_exists[below[2 + j!1], below[2 + j!1]]"
              ("f" "phi!1"))
             (skosimp)
             (lemma "bij_inv_is_bij_alt[below[2 + j!1], below[2 + j!1]]"
              ("f" "phi!1" "g" "g!1"))
             (("1"
               (case "g!1(1+j!1)<1+j!1")
               (("1"
                 (name "PHI"
                       "LAMBDA (n:below[1+j!1]): IF n = g!1(1+j!1) THEN phi!1(1+j!1) ELSE phi!1(n) ENDIF")
                 (case "bijective?[below[1 + j!1], below[1 + j!1]](PHI)")
                 (("1"
                   (case "PHI(g!1(1+j!1)) = phi!1(1+j!1)")
                   (("1"
                     (name "FF"
                           "LAMBDA (n:nat): IF n = phi!1(1 + j!1) THEN F!1(1 + j!1)  ELSE F!1(n) ENDIF")
                     (inst - "FF" "PHI")
                     (lemma "sigma_with[nat]"
                      ("low"
                       "0"
                       "high"
                       "j!1"
                       "F"
                       "F!1"
                       "G"
                       "FF"
                       "i"
                       "phi!1(1+j!1)"
                       "a"
                       "F!1(phi!1(1 + j!1))"))
                     (("1"
                       (split -1)
                       (("1"
                         (replace -1)
                         (assert)
                         (replace -11 1)
                         (hide -1 -11)
                         (assert)
                         (expand "FF" 1 3)
                         (lemma "sigma_eq[nat]"
                          ("low"
                           "0"
                           "high"
                           "j!1"
                           "F"
                           "LAMBDA (x: nat):
                                        IF x < 1 + j!1 THEN FF(PHI(x)) ELSE FF(x) ENDIF"
                           "G"
                           "LAMBDA (x: nat):
                                          IF x < 2 + j!1 THEN F!1(phi!1(x)) ELSE F!1(x) ENDIF"))
                         (split -1)
                         (("1" (propax))
                          ("2"
                           (hide -1 -4 2)
                           (skosimp)
                           (typepred "n!1")
                           (assert)
                           (expand "PHI")
                           (expand "FF")
                           (lift-if 1)
                           (case-replace "n!1 = g!1(1 + j!1)")
                           (("1"
                             (assert)
                             (lemma
                              "comp_inverse_right_surj_alt[below[2 + j!1], below[2 + j!1]]"
                              ("f" "phi!1" "g" "g!1" "r" "1+j!1"))
                             (assert))
                            ("2"
                             (assert)
                             (case-replace "phi!1(n!1) = phi!1(1 + j!1)")
                             (("1"
                               (expand "bijective?")
                               (flatten)
                               (expand "injective?")
                               (inst -10 "n!1" "1+j!1")
                               (assert))
                              ("2" (assert))))))))
                        ("2" (assert)) ("3" (assert))
                        ("4"
                         (hide 2 -1 -4 -10)
                         (apply-extensionality 1 :hide? t)
                         (case-replace "x!1=phi!1(1 + j!1)")
                         (("1" (assert))
                          ("2" (assert) (expand "FF") (propax))))))
                      ("2" (skosimp) (assert))))
                    ("2" (hide 2 -8) (expand "PHI") (propax))
                    ("3" (propax))))
                  ("2"
                   (hide-all-but (-2 -3 -4 -5 -6 1))
                   (expand "bijective?")
                   (flatten)
                   (split)
                   (("1"
                     (expand "injective?")
                     (skosimp)
                     (expand "PHI")
                     (case-replace "x1!1 = g!1(1 + j!1)")
                     (("1" (assert) (inst -7 "1+j!1" "x2!1") (assert))
                      ("2"
                       (assert)
                       (case-replace "x2!1 = g!1(1 + j!1)")
                       (("1" (inst -7 "x1!1" "1+j!1") (assert))
                        ("2"
                         (assert)
                         (inst -6 "x1!1" "x2!1")
                         (assert))))))
                    ("2"
                     (expand "surjective?")
                     (expand "PHI")
                     (skosimp)
                     (typepred "y!1")
                     (inst -7 "y!1")
                     (skosimp)
                     (typepred "x!1")
                     (case-replace "x!1=g!1(1+j!1)")
                     (("1"
                       (inst + "x!1")
                       (("1"
                         (assert)
                         (lemma
                          "comp_inverse_right_surj_alt[below[2 + j!1],below[2 + j!1]]"
                          ("f" "phi!1" "g" "g!1" "r" "1+j!1"))
                         (assert))
                        ("2" (assert))))
                      ("2"
                       (case "x!1=1+j!1")
                       (("1"
                         (replace -1)
                         (hide -1 -2)
                         (inst + "g!1(1 + j!1)"))
                        ("2"
                         (inst + "x!1")
                         (("1" (assert)) ("2" (assert))))))))))
                  ("3"
                   (hide-all-but (-2 -6 -3 -4 -5 1))
                   (skosimp)
                   (typepred "x1!1")
                   (expand "PHI")
                   (case-replace "x1!1 = g!1(1 + j!1)")
                   (assert)
                   (expand "bijective?")
                   (flatten)
                   (expand "injective?")
                   (inst -6 "x1!1" "g!1(1+j!1)")
                   (assert)
                   (lemma
                    "comp_inverse_right_surj_alt[below[2 + j!1],below[2 + j!1]]"
                    ("f" "phi!1" "g" "g!1" "r" "1+j!1"))
                   (assert))))
                ("2"
                 (hide-all-but (-1 -2 -3 -4 1))
                 (expand "bijective?")
                 (flatten)
                 (expand "injective?")
                 (inst - "1+j!1" "phi!1(1+j!1)")
                 (split -1)
                 (("1" (assert))
                  ("2"
                   (lemma
                    "comp_inverse_left_inj_alt[below[2 + j!1],below[2 + j!1]]"
                    ("f" "phi!1" "g" "g!1" "d" "1+j!1"))
                   (replace -1)
                   (assert))))))
              ("2" (propax))))
            ("2"
             (replace -1)
             (assert)
             (inst - "F!1" "LAMBDA (n:below[1 + j!1]): phi!1(n)")
             (("1"
               (replace -2)
               (lemma "sigma_eq[nat]"
                ("low"
                 "0"
                 "high"
                 "j!1"
                 "F"
                 "LAMBDA (x: nat):
                              IF x < 1 + j!1 THEN F!1(phi!1(x)) ELSE F!1(x) ENDIF"
                 "G"
                 "             LAMBDA (x: nat):
                                IF x < 2 + j!1 THEN F!1(phi!1(x)) ELSE F!1(x) ENDIF"))
               (("1"
                 (split -1)
                 (("1" (propax)) ("2" (hide 2) (skosimp) (assert))))
                ("2" (skosimp) (assert)) ("3" (skosimp) (assert))))
              ("2"
               (typepred "phi!1")
               (hide 2)
               (expand "bijective?")
               (flatten)
               (split)
               (("1"
                 (expand "injective?")
                 (skosimp)
                 (inst - "x1!1" "x2!1")
                 (assert))
                ("2"
                 (expand "surjective?")
                 (skosimp)
                 (inst - "y!1")
                 (skosimp)
                 (typepred "x!1")
                 (expand "injective?")
                 (inst + "x!1")
                 (assert))))
              ("3"
               (hide 2)
               (skosimp)
               (typepred "n!1")
               (typepred "phi!1")
               (expand "bijective?")
               (flatten)
               (expand "injective?")
               (inst - "n!1" "1+j!1")
               (assert))))))
          ("2" (typepred "phi!1(1+j!1)") (assert))))
        ("3" (skosimp)) ("4" (skosimp*) (assert))))
      ("3" (skosimp)) ("4" (skosimp) (skosimp) (assert))))
    ("3" (skosimp) (skosimp) (typepred "x!1") (assert))))


proof_type: f_proof
decl_type: formula
library: sigma_set
theory: sigma_bijection_nat
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "series")
   (lemma "sigma_bijection[below[n!1+1]]" ("low" "0" "high" "n!1"))
   (("1"
     (expand "o")
     (expand "extend")
     (inst -
      "LAMBDA (x: nat):
                     IF x < 1 + n!1 THEN a!1(x) ELSE a!1(0) ENDIF")
     (expand "restrict")
     (inst - "phi!1")
     (("1"
       (expand "restrict")
       (case "forall (m:nat): m <= n!1 => sigma[subrange_T[below[n!1 + 1]](0, n!1)]
                       (0, m,
                        LAMBDA (s_1: subrange_T[below[n!1 + 1]](0, n!1)): a!1(s_1)) = sigma(0, m, a!1)")
       (("1"
         (inst - "n!1")
         (assert)
         (replace -1)
         (replace -2 1)
         (hide -1 -2)
         (case "forall (m:nat): m <= n!1 => sigma[subrange_T[below[n!1 + 1]](0, n!1)]
                         (0, m,
                          LAMBDA (x_1: subrange_T[below[n!1 + 1]](0, n!1)):
                            IF phi!1(x_1) < 1 + n!1 THEN a!1(phi!1(x_1))
                            ELSE a!1(0)
                            ENDIF)
                      =
                      sigma(0, m,
                            LAMBDA (x: nat):
                              IF x < 1 + n!1 THEN a!1(phi!1(x)) ELSE a!1(0) ENDIF)")
         (("1" (inst - "n!1") (assert))
          ("2"
           (hide 2)
           (induct "m")
           (("1"
             (assert)
             (expand "sigma")
             (assert)
             (typepred "phi!1(0)")
             (assert)
             (expand "sigma")
             (propax))
            ("2"
             (skosimp*)
             (assert)
             (expand "sigma" 1)
             (typepred "phi!1(1 + j!1)")
             (assert))
            ("3" (hide 2) (grind)) ("4" (hide 2) (grind))
            ("5" (hide 2) (grind))))
          ("3" (hide-all-but 1) (skosimp*) (assert))))
        ("2"
         (hide -1 2)
         (induct "m")
         (("1" (assert) (expand "sigma") (expand "sigma") (propax))
          ("2" (skosimp*) (assert) (expand "sigma" 1) (propax))
          ("3" (hide 2) (skosimp*) (assert)) ("4" (hide 2) (grind))
          ("5" (hide 2) (grind))))
        ("3" (hide -1 2) (grind)) ("4" (hide -1 2) (grind))
        ("5" (hide -1 2) (grind))))
      ("2"
       (hide 2)
       (typepred "phi!1")
       (expand "bijective?")
       (flatten)
       (split)
       (("1" (hide -2) (expand "injective?") (skosimp) (assert))
        ("2"
         (hide -1)
         (expand "restrict")
         (expand "surjective?")
         (typepred "phi!1")
         (expand "bijective?")
         (flatten)
         (hide-all-but (-1 1))
         (expand "injective?")
         (skosimp*)
         (inst - "x1!1" "x2!1")
         (assert))
        ("3"
         (expand "restrict")
         (expand "surjective?")
         (skosimp)
         (inst - "y!1")
         (skosimp)
         (inst + "x!1"))))))
    ("2" (hide 2) (grind))))


proof_type: f_proof
decl_type: formula
library: sigma_set
theory: finite_enumeration
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "fullset")
   (expand "image")
   (expand "restrict")
   (apply-extensionality :hide? t)
   (lemma "finite_enumeration_bij" ("X" "X!1"))
   (expand "bijective?")
   (flatten)
   (expand "surjective?")
   (inst - "x!1")
   (skosimp)
   (inst + "x!2")
   (assert))


proof_type: t_proof
decl_type: tcc
library: sigma_set
theory: finite_enumeration
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "nonempty?")
   (expand "empty?")
   (expand "member")
   (skosimp*)
   (lemma "bij_exists" ("S" "X!1"))
   (skosimp)
   (lemma "bijective_inverse_exists" ("f" "f!1"))
   (("1"
     (expand "exists1")
     (flatten)
     (skosimp)
     (inst - "x!1")
     (lemma "bij_inv_is_bij_alt" ("f" "f!1" "g" "x!1"))
     (("1" (propax)) ("2" (propax))))
    ("2" (propax))))


proof_type: f_proof
decl_type: formula
library: sigma_set
theory: denumerable_enumeration
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "restrict")
   (expand "fullset")
   (expand "image")
   (apply-extensionality :hide? t)
   (lemma "denumerable_enumeration_bij" ("X" "X!1"))
   (expand "bijective?")
   (flatten)
   (expand "surjective?")
   (inst - "x!1")
   (skosimp)
   (inst + "x!2")
   (assert))


proof_type: t_proof
decl_type: tcc
library: sigma_set
theory: denumerable_enumeration
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "X!1")
   (expand "is_countably_infinite")
   (skosimp)
   (typepred "f!1")
   (lemma "bijective_inverse_exists" ("f" "f!1"))
   (expand "exists1")
   (flatten)
   (skolem - "g")
   (lemma "bij_inv_is_bij_alt" ("f" "f!1" "g" "g"))
   (("1"
     (expand "nonempty?")
     (expand "empty?")
     (inst - "g")
     (expand "member")
     (propax))
    ("2" (propax))))


proof_type: f_proof
decl_type: formula
library: sigma_set
theory: countable_convergence
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "X!1")
   (expand "convergent?")
   (flatten)
   (expand "o")
   (expand "absconvergent?")
   (expand "abs")
   (expand "abs")
   (rewrite "zero_series_conv"))


proof_type: f_proof
decl_type: formula
library: sigma_set
theory: countable_convergence
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "X!1")
   (expand "convergent?")
   (flatten)
   (assert)
   (expand "absconvergent?")
   (name-replace "DX" "denumerable_enumeration(X!1)")
   (lemma "sum_absconvergent" ("aa" "f!1 o DX" "bb" "g!1 o DX"))
   (("1" (expand "absconvergent?") (expand "o ") (expand "+") (propax))
    ("2" (expand "o") (expand "absconvergent?") (propax))
    ("3" (expand "o") (expand "absconvergent?") (propax))))


proof_type: f_proof
decl_type: formula
library: sigma_set
theory: countable_convergence
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "convergent?")
   (flatten)
   (assert)
   (name-replace "DX" "denumerable_enumeration(X!1)")
   (lemma "scal_absconvergent" ("aa" "f!1 o DX" "x" "a!1"))
   (("1" (expand "o") (expand "*") (propax)) ("2" (propax))))


proof_type: f_proof
decl_type: formula
library: sigma_set
theory: countable_convergence
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "convergent_scal" ("X" "X!1" "f" "f!1" "a" "-1"))
   (expand "-")
   (expand "*")
   (assert))


proof_type: f_proof
decl_type: formula
library: sigma_set
theory: countable_convergence
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "convergent_opp" ("X" "X!1" "f" "g!1"))
   (assert)
   (lemma "convergent_plus" ("X" "X!1" "f" "f!1" "g" "-g!1"))
   (assert)
   (expand "-")
   (expand "+")
   (assert))


proof_type: f_proof
decl_type: formula
library: sigma_set
theory: countable_convergence
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "convergent?")
   (skosimp*)
   (assert)
   (expand "absconvergent?")
   (name-replace "DX" "denumerable_enumeration(X!1)")
   (lemma "comparison_test" ("b" "abs(f!1 o DX)" "a" "abs(g!1 o DX)"))
   (split -1)
   (("1" (propax)) ("2" (propax))
    ("3" (hide-all-but (-1 1)) (skosimp) (inst - "DX(n!1)") (grind))))


proof_type: f_proof
decl_type: formula
library: sigma_set
theory: countable_convergence
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "X!1")
   (expand "convergent?")
   (flatten)
   (expand "absconvergent?")
   (lemma "zero_series_conv")
   (expand "o ")
   (lemma "countably_infinite_def" ("S" "X!1"))
   (assert)
   (case-replace
    "abs(LAMBDA (x: nat):
                                  g!1(denumerable_enumeration(X!1)(x)))=lambda (x:nat): 0")
   (hide-all-but (1 -4 -1))
   (apply-extensionality :hide? t)
   (expand "abs")
   (inst - "denumerable_enumeration(X!1)(x!1)")
   (replace -2)
   (expand "abs")
   (propax))


proof_type: f_proof
decl_type: formula
library: sigma_set
theory: countable_convergence
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (expand "convergent?")
   (flatten)
   (case-replace "is_finite(Y!1)")
   (("1"
     (lemma "finite_subset" ("s" "X!1" "A" "Y!1"))
     (("1" (assert)) ("2" (propax))))
    ("2"
     (assert)
     (typepred "X!1")
     (typepred "Y!1")
     (rewrite "countable_props.countable_card" -1)
     (rewrite "countable_props.countable_card" -2)
     (hide 1 2)
     (lemma "denumerable_enumeration_bij" ("X" "X!1"))
     (lemma "denumerable_enumeration_bij" ("X" "Y!1"))
     (name-replace "PHI_X" "denumerable_enumeration(X!1)")
     (name-replace "PHI_Y" "denumerable_enumeration(Y!1)")
     (expand "o")
     (lemma "bijective_inverse_exists[nat, (X!1)]" ("f" "PHI_X"))
     (("1"
       (lemma "bijective_inverse_exists[nat, (Y!1)]" ("f" "PHI_Y"))
       (("1"
         (expand "exists1")
         (flatten)
         (skolem - ("PSI_Y"))
         (skolem - ("PSI_X"))
         (lemma "bij_inv_is_bij_alt[nat,(X!1)]"
          ("f" "PHI_X" "g" "PSI_X"))
         (("1"
           (lemma "bij_inv_is_bij_alt[nat,(Y!1)]"
            ("f" "PHI_Y" "g" "PSI_Y"))
           (("1"
             (case "FORALL (a:sequence[real],inj:(injective?[nat,nat])):absconvergent?(a) =>  absconvergent?(a o inj)")
             (("1"
               (case "injective?[nat,nat](PSI_Y o PHI_X)")
               (("1"
                 (inst - "g!1 o PHI_Y" "PSI_Y o PHI_X")
                 (split -2)
                 (("1"
                   (expand "o")
                   (lemma "comp_inverse_right_surj_alt[nat,(Y!1)]"
                    ("f" "PHI_Y" "g" "PSI_Y"))
                   (("1"
                     (lemma "extensionality"
                      ("f"
                       "LAMBDA (x_1: nat): g!1(PHI_Y(PSI_Y(PHI_X(x_1))))"
                       "g"
                       "LAMBDA (x: nat): g!1(PHI_X(x))"))
                     (split -1)
                     (("1" (replace -1) (propax))
                      ("2"
                       (skosimp)
                       (typepred "PHI_X(x!1)")
                       (hide-all-but (-1 -2 -15 1))
                       (expand "subset?")
                       (inst -3 "PHI_X(x!1)")
                       (expand "member")
                       (inst - "PHI_X(x!1)")
                       (assert))))
                    ("2" (expand "bijective?") (flatten))))
                  ("2" (expand "o ") (propax))))
                ("2"
                 (hide-all-but (-2 -12 -9 1))
                 (expand "bijective?")
                 (flatten)
                 (expand "injective?")
                 (skosimp)
                 (expand "o")
                 (inst -4 "x1!1" "x2!1")
                 (expand "subset?")
                 (expand "member")
                 (inst-cp -6 "PHI_X(x1!1)")
                 (inst -6 "PHI_X(x2!1)")
                 (assert)
                 (hide 1 -3 -4)
                 (inst - "PHI_X(x1!1)" "PHI_X(x2!1)")
                 (assert))
                ("3"
                 (hide -1 -13 2)
                 (skosimp)
                 (expand "subset?")
                 (inst - "PHI_X(x1!1)")
                 (expand "member")
                 (propax))))
              ("2"
               (hide-all-but 1)
               (skosimp*)
               (expand "absconvergent?")
               (lemma "abs_series_inj_conv"
                ("aa" "abs(a!1)" "inj" "inj!1"))
               (("1"
                 (lemma "extensionality"
                  ("f" "abs(a!1) o inj!1" "g" "abs(a!1 o inj!1)"))
                 (split -1)
                 (("1" (replace -1) (propax))
                  ("2"
                   (hide-all-but 1)
                   (skosimp)
                   (expand "abs")
                   (expand "o")
                   (propax))))
                ("2"
                 (expand "absconvergent?")
                 (hide 2)
                 (lemma "extensionality"
                  ("f" "abs(a!1)" "g" "abs(abs(a!1))"))
                 (split -1)
                 (("1" (assert)) ("2" (hide-all-but 1) (grind))))))))
            ("2" (propax))))
          ("2" (propax))))
        ("2" (propax))))
      ("2" (propax))))))


proof_type: f_proof
decl_type: formula
library: sigma_set
theory: countable_convergence
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (split)
   (("1"
     (lemma "convergent_subset"
      ("X" "intersection(X!1, Y!1)" "Y" "X!1" "g" "g!1"))
     (assert)
     (hide-all-but 1)
     (grind))
    ("2"
     (lemma "convergent_subset"
      ("X" "intersection(X!1, Y!1)" "Y" "Y!1" "g" "g!1"))
     (split)
     (("1" (propax)) ("2" (hide-all-but 1) (grind)) ("3" (propax))))))


proof_type: f_proof
decl_type: formula
library: sigma_set
theory: countable_convergence
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (lemma "convergent_subset"
    ("X" "difference(X!1, Y!1)" "Y" "X!1" "g" "g!1"))
   (assert)
   (hide-all-but 1)
   (grind))


proof_type: f_proof
decl_type: formula
library: sigma_set
theory: countable_convergence
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (case "FORALL (X:finite_set[T], Y: countable_set[T], g: [T -> real]):
                        disjoint?(X, Y) AND convergent?(X)(g) AND convergent?(Y)(g) IMPLIES
                         convergent?(union(X, Y))(g)")
   (("1"
     (skosimp)
     (expand "convergent?")
     (case-replace "is_finite(X!1)")
     (("1" (inst - "X!1" "Y!1" "g!1") (replace -4) (assert))
      ("2"
       (assert)
       (case-replace "is_finite(Y!1)")
       (("1"
         (inst - "Y!1" "X!1" "g!1")
         (assert)
         (split -2)
         (("1" (rewrite "union_commutative") (assert))
          ("2" (rewrite "union_commutative") (assert))
          ("3"
           (hide-all-but (-2 1))
           (expand "disjoint?")
           (rewrite "intersection_commutative"))))
        ("2"
         (flatten)
         (assert)
         (hide -1)
         (expand "absconvergent?")
         (lemma "denumerable_enumeration_bij" ("X" "X!1"))
         (lemma "denumerable_enumeration_bij" ("X" "Y!1"))
         (lemma "denumerable_enumeration_bij" ("X" "union(X!1,Y!1)"))
         (name-replace "DX" "denumerable_enumeration(X!1)")
         (name-replace "DY" "denumerable_enumeration(Y!1)")
         (name-replace "DXY" "denumerable_enumeration(union(X!1,Y!1))")
         (lemma "bijective_inverse_exists[nat, (union(X!1, Y!1))]"
          ("f" "DXY"))
         (("1"
           (expand "exists1")
           (flatten)
           (skolem - ("CXY"))
           (lemma "bij_inv_is_bij_alt[nat, (union(X!1, Y!1))]"
            ("f" "DXY" "g" "CXY"))
           (("1"
             (name "PHI"
                   "LAMBDA (n:nat): IF even?(n) THEN DX(n/2) ELSE DY((n-1)/2) ENDIF")
             (("1"
               (case "bijective?[nat, (union(X!1, Y!1))](PHI)")
               (("1"
                 (hide -2)
                 (case "forall (a:sequence[real]): convergent?(series(a)) => convergent?(series(LAMBDA (n:nat): IF even?(n) THEN a(n/2) ELSE 0 ENDIF))")
                 (("1"
                   (case "FORALL (a: sequence[real]):
                                                        convergent?(series(a)) =>
                                                         convergent?(series(LAMBDA (n: nat):
                                                                             IF odd?(n) THEN a((n-1)/2) ELSE 0 ENDIF))")
                   (("1"
                     (inst - "abs(g!1 o DY)")
                     (inst - "abs(g!1 o DX)")
                     (assert)
                     (lemma "series_sum_conv"
                      ("a"
                       "(LAMBDA (n: nat):
                                                                      IF even?(n) THEN abs(g!1 o DX)(n / 2)
                                                                      ELSE 0
                                                                      ENDIF)"
                       "b"
                       "(LAMBDA (n: nat):
                                                                      IF odd?(n) THEN abs(g!1 o DY)((n - 1) / 2)
                                                                      ELSE 0
                                                                      ENDIF)"))
                     (("1"
                       (assert)
                       (hide -2 -3)
                       (lemma "extensionality"
                        ("f"
                         "((LAMBDA (n: nat):
                                                                           IF even?(n) THEN abs(g!1 o DX)(n / 2)
                                                                           ELSE 0
                                                                           ENDIF)
                                                                         +
                                                                         (LAMBDA (n: nat):
                                                                            IF odd?(n) THEN abs(g!1 o DY)((n - 1) / 2)
                                                                            ELSE 0
                                                                            ENDIF))"
                         "g"
                         "abs(g!1 o PHI)"))
                       (("1"
                         (split -1)
                         (("1"
                           (replace -1)
                           (hide -1)
                           (lemma
                            "bijective_inverse_exists[nat, (union(X!1, Y!1))]"
                            ("f" "PHI"))
                           (expand "exists1")
                           (flatten)
                           (skolem - ("PSI"))
                           (hide -7 -2)
                           (lemma
                            "bij_inv_is_bij_alt[nat, (union(X!1, Y!1))]"
                            ("f" "PHI" "g" "PSI"))
                           (("1"
                             (lemma
                              "composition_bijective[nat,(union(X!1, Y!1)),nat]"
                              ("f2" "PSI" "f1" "DXY"))
                             (("1"
                               (lemma
                                "comp_inverse_right_alt[nat, (union(X!1, Y!1))]"
                                ("f" "PHI" "g" "PSI"))
                               (hide-all-but (-1 -2 -5 4))
                               (lemma "abs_series_bij_conv_abs"
                                ("phi"
                                 "PSI o DXY"
                                 "aa"
                                 "abs(g!1 o PHI)"))
                               (("1"
                                 (assert)
                                 (case-replace
                                  "abs(g!1 o PHI) o (PSI o DXY) = abs(g!1 o DXY)")
                                 (hide-all-but (-2 1))
                                 (apply-extensionality 1 :hide? t)
                                 (expand "o")
                                 (expand "abs")
                                 (inst - "DXY(x!1)")
                                 (assert))
                                ("2" (propax))
                                ("3"
                                 (expand "absconvergent?")
                                 (hide-all-but (-3 1))
                                 (case-replace
                                  "abs(abs(o[nat, T, real](g!1, PHI))) = abs(g!1 o PHI)")
                                 (hide-all-but 1)
                                 (apply-extensionality :hide? t)
                                 (expand "abs")
                                 (expand "o ")
                                 (grind))))
                              ("2" (propax))))
                            ("2" (propax))))
                          ("2"
                           (hide-all-but 1)
                           (skosimp)
                           (expand "+")
                           (expand "PHI")
                           (expand "abs")
                           (expand "o")
                           (case-replace "even?(x!1)")
                           (("1"
                             (lemma "even_or_odd" ("x" "x!1"))
                             (assert))
                            ("2"
                             (lemma "even_or_odd" ("x" "x!1"))
                             (assert))))))
                        ("2"
                         (hide-all-but 1)
                         (expand "even?")
                         (skosimp*)
                         (assert))))
                      ("2"
                       (hide-all-but 1)
                       (expand "odd?")
                       (skosimp*)
                       (assert)
                       (replace -1)
                       (assert)
                       (case "forall (i,j:int):i<j=>i+1<=j")
                       (("1" (inst - "-1" "j!1") (assert))
                        ("2" (hide-all-but 1) (grind))))
                      ("3"
                       (hide-all-but 1)
                       (expand "even?")
                       (skosimp*)
                       (assert))))
                    ("2"
                     (hide-all-but 1)
                     (skosimp)
                     (expand "convergent?")
                     (skosimp)
                     (inst + "l!1")
                     (expand "convergence")
                     (skosimp)
                     (inst - "epsilon!1")
                     (skosimp)
                     (case "FORALL (m: nat):
                                                            sigma(0, m, a!1) =
                                                             sigma(0, 2 * m + 1,
                                                                   LAMBDA (n: nat):
                                                                     IF odd?(n) THEN a!1((n - 1) / 2) ELSE 0 ENDIF)")
                     (("1"
                       (inst + "2*n!1+1")
                       (skosimp)
                       (case "even?(i!1)")
                       (("1"
                         (expand "even?")
                         (skosimp)
                         (expand "series")
                         (replace -1)
                         (case-replace "j!1=0")
                         (("1" (assert))
                          ("2"
                           (inst - "j!1-1")
                           (("1"
                             (inst - "j!1-1")
                             (("1"
                               (assert)
                               (replace -2 -3)
                               (expand "sigma" 2)
                               (expand "odd?" 2 1)
                               (propax))
                              ("2" (assert))))
                            ("2" (assert))))))
                        ("2"
                         (rewrite "even_or_odd" 1)
                         (expand "odd?" -1)
                         (skosimp)
                         (replace -1)
                         (inst -3 "j!1")
                         (("1"
                           (assert)
                           (inst - "j!1")
                           (expand "series")
                           (assert))
                          ("2" (assert))))))
                      ("2"
                       (hide-all-but 1)
                       (induct "m")
                       (("1"
                         (expand "sigma")
                         (expand "sigma")
                         (expand "odd?")
                         (assert))
                        ("2"
                         (skosimp*)
                         (expand "sigma" 1)
                         (expand "sigma" 1 2)
                         (replace -1 1 rl)
                         (hide -1)
                         (assert)
                         (expand "odd?")
                         (lemma "div_cancel2" ("x" "1+j!1" "n0z" "2"))
                         (assert))
                        ("3"
                         (hide 2)
                         (expand "odd?")
                         (skosimp*)
                         (replace -1)
                         (assert)
                         (case "forall (i,j:int):i<j=>i+1<=j")
                         (("1" (inst - "-1" "j!1") (assert))
                          ("2" (hide-all-but 1) (grind))))))
                      ("3"
                       (hide-all-but 1)
                       (expand "odd?")
                       (skosimp*)
                       (assert)
                       (assert)
                       (case "forall (i,j:int):i<j=>i+1<=j")
                       (("1" (inst - "-1" "j!1") (assert))
                        ("2" (hide-all-but 1) (grind))))))
                    ("3"
                     (skosimp*)
                     (hide-all-but (-2 1))
                     (expand "odd?")
                     (skosimp)
                     (replace -1)
                     (assert)
                     (typepred "n!1")
                     (case "forall (i,j:int): i<j => i+1<=j")
                     (("1" (inst - "-1" "j!1") (assert))
                      ("2" (hide-all-but 1) (skosimp) (assert))))))
                  ("2"
                   (hide-all-but 1)
                   (skosimp*)
                   (expand "convergent?")
                   (skosimp)
                   (inst + "l!1")
                   (expand "convergence")
                   (skosimp*)
                   (inst - "epsilon!1")
                   (skosimp)
                   (inst + "2*n!1")
                   (skosimp)
                   (case "even?(i!1)")
                   (("1"
                     (expand "even?" -1)
                     (skosimp)
                     (replace -1)
                     (inst - "j!1")
                     (("1"
                       (assert)
                       (expand "series")
                       (case "forall (m:nat): sigma(0, m, a!1) = sigma(0, 2*m,
                                                                        LAMBDA (n: nat):
                                                                          IF even?(n) THEN a!1(n / 2) ELSE 0 ENDIF)")
                       (("1" (inst - "j!1") (assert))
                        ("2"
                         (hide-all-but 1)
                         (induct "m")
                         (("1" (expand "sigma") (assert))
                          ("2"
                           (skosimp)
                           (expand "sigma" 1)
                           (expand "sigma" 1 2)
                           (lemma "div_cancel2" ("x" "1+j!1" "n0z" "2"))
                           (assert)
                           (expand "even?" 1 1)
                           (replace -2 1 rl)
                           (assert))
                          ("3" (expand "even?") (skosimp*) (assert))))
                        ("3"
                         (expand "even?")
                         (skosimp*)
                         (lemma "div_cancel2" ("x" "j!2" "n0z" "2"))
                         (assert))))
                      ("2" (assert))))
                    ("2"
                     (rewrite "even_or_odd" 1)
                     (expand "odd?")
                     (skosimp)
                     (replace -1)
                     (inst - "j!1")
                     (("1"
                       (assert)
                       (expand "series")
                       (case "forall (m:nat): sigma(0,m,a!1) = sigma(0,1+2*m,LAMBDA (n:nat): IF even?(n) THEN a!1(n/2) ELSE 0 ENDIF)")
                       (("1" (inst - "j!1") (assert))
                        ("2"
                         (hide-all-but 1)
                         (induct "m")
                         (("1"
                           (expand "sigma")
                           (expand "sigma")
                           (assert)
                           (expand "even?")
                           (assert))
                          ("2"
                           (skosimp*)
                           (expand "sigma" 1)
                           (expand "sigma" 1 2)
                           (replace -1 1 rl)
                           (assert)
                           (hide -1)
                           (expand "even?")
                           (lemma "div_cancel2" ("x" "1+j!2" "n0z" "2"))
                           (assert))
                          ("3"
                           (expand "even?")
                           (skosimp*)
                           (lemma "div_cancel2" ("x" "j!2" "n0z" "2"))
                           (assert))))
                        ("3"
                         (expand "even?")
                         (skosimp*)
                         (lemma "div_cancel2" ("x" "j!2" "n0z" "2"))
                         (assert))))
                      ("2" (assert))))))
                  ("3"
                   (skosimp)
                   (skosimp)
                   (hide-all-but (-2 1))
                   (expand "even?")
                   (skosimp)
                   (lemma "div_cancel2" ("x" "j!1" "n0z" "2"))
                   (assert))))
                ("2"
                 (hide-all-but (1 -6 -7 -8))
                 (expand "bijective?")
                 (flatten)
                 (expand "PHI")
                 (split)
                 (("1"
                   (expand "injective?")
                   (skosimp*)
                   (case-replace "even?(x1!1)")
                   (("1"
                     (case-replace "even?(x2!1)")
                     (("1"
                       (inst -6 "x1!1/2" "x2!1/2")
                       (("1" (assert))
                        ("2"
                         (hide-all-but (-1 1))
                         (expand "even?")
                         (skosimp)
                         (lemma "div_cancel2" ("x" "j!1" "n0z" "2"))
                         (assert))
                        ("3"
                         (hide-all-but (-2 1))
                         (expand "even?")
                         (skosimp)
                         (lemma "div_cancel2" ("x" "j!1" "n0z" "2"))
                         (assert))))
                      ("2"
                       (assert)
                       (expand "disjoint?")
                       (expand "intersection")
                       (expand "empty?")
                       (expand "member")
                       (inst -7 "DX(x1!1 / 2)")
                       (("1" (assert))
                        ("2"
                         (expand "even?")
                         (skosimp)
                         (lemma "div_cancel2" ("x" "j!1" "n0z" "2"))
                         (assert))))))
                    ("2"
                     (case-replace "even?(x2!1)")
                     (("1"
                       (assert)
                       (expand "disjoint?")
                       (expand "intersection")
                       (expand "empty?")
                       (expand "member")
                       (inst -7 "DX(x2!1 / 2)")
                       (("1" (assert))
                        ("2"
                         (expand "even?")
                         (skosimp)
                         (lemma "div_cancel2" ("x" "j!1" "n0z" "2"))
                         (assert))))
                      ("2"
                       (assert)
                       (inst -2 "(x1!1 - 1) / 2" "(x2!1 - 1) / 2")
                       (("1" (assert))
                        ("2"
                         (hide-all-but (1 2))
                         (rewrite "even_or_odd")
                         (expand "odd?")
                         (skosimp)
                         (lemma "div_cancel2" ("x" "j!1" "n0z" "2"))
                         (assert)
                         (replace -2)
                         (assert))
                        ("3"
                         (hide-all-but (1 3))
                         (rewrite "even_or_odd")
                         (expand "odd?")
                         (skosimp*)
                         (lemma "div_cancel2" ("x" "j!1" "n0z" "2"))
                         (assert)
                         (replace -2)
                         (assert))))))))
                  ("2"
                   (expand "surjective?")
                   (skosimp)
                   (typepred "y!1")
                   (expand "union")
                   (expand "member")
                   (expand "disjoint?")
                   (expand "intersection")
                   (expand "empty?")
                   (expand "member")
                   (split -1)
                   (("1"
                     (inst -5 "y!1")
                     (skosimp)
                     (inst + "2*x!1")
                     (assert))
                    ("2"
                     (inst -3 "y!1")
                     (skosimp)
                     (inst + "2*x!1+1")
                     (assert)
                     (lemma "div_cancel2" ("x" "x!1" "n0z" "2"))
                     (replace -1)
                     (assert)
                     (replace -4)
                     (lift-if 1)
                     (prop)
                     (expand "even?")
                     (propax))))))
                ("3"
                 (skosimp)
                 (expand "union")
                 (expand "member")
                 (expand "PHI")
                 (hide-all-but 1)
                 (prop)
                 (("1" (assert)) ("2" (assert))))))
              ("2"
               (skosimp)
               (hide-all-but (1 2))
               (rewrite "even_or_odd")
               (expand "odd?")
               (skosimp)
               (replace -1)
               (assert)
               (assert)
               (lemma "div_cancel1" ("x" "j!1" "n0z" "2"))
               (assert)
               (typepred "n!1")
               (case "0 <= j!1")
               (("1" (assert))
                ("2"
                 (lemma "trich_lt" ("x" "j!1" "y" "-1"))
                 (split -1)
                 (("1" (assert)) ("2" (assert))
                  ("3"
                   (assert)
                   (case "forall (i,j:int): i < j IFF i + 1 <= j")
                   (("1" (inst - "-1" "j!1") (assert))
                    ("2"
                     (hide-all-but 1)
                     (skosimp)
                     (split)
                     (("1" (flatten) (assert))
                      ("2" (flatten) (assert))))))))))
              ("3"
               (skosimp)
               (hide-all-but (1 -1))
               (expand "even?")
               (skosimp)
               (replace -1)
               (lemma "div_cancel1" ("x" "j!1" "n0z" "2"))
               (assert))))
            ("2" (propax))))
          ("2" (propax))))))))
    ("2"
     (hide 2)
     (skosimp)
     (expand "convergent?")
     (typepred "X!1")
     (hide -3)
     (flatten)
     (split -3)
     (("1"
       (lemma "finite_union" ("A" "X!1" "B" "Y!1"))
       (("1" (propax)) ("2" (propax))))
      ("2"
       (lemma "denumerable_enumeration_bij" ("X" "Y!1"))
       (lemma "denumerable_enumeration_bij" ("X" "union(X!1,Y!1)"))
       (lemma "infinite_union" ("S" "X!1" "R" "Y!1"))
       (assert)
       (name-replace "DXY" "denumerable_enumeration(union(X!1, Y!1))")
       (name-replace "DY" "denumerable_enumeration(Y!1)")
       (expand "absconvergent?")
       (lemma "bijective_inverse_exists[nat, (union(X!1, Y!1))]"
        ("f" "DXY"))
       (("1"
         (expand "exists1")
         (flatten)
         (skolem - ("CXY"))
         (hide -2)
         (lemma "bij_inv_is_bij_alt[nat, (union(X!1, Y!1))]"
          ("f" "DXY" "g" "CXY"))
         (("1"
           (name "N" "card(X!1)")
           (lemma "card_bij_inv" ("S" "X!1" "N" "N"))
           (assert)
           (skolem - ("DX"))
           (name "PHI"
                 "LAMBDA (n:nat): IF n < N THEN DX(n) ELSE DY(n-N) ENDIF")
           (("1"
             (case "bijective?[nat, (union(X!1, Y!1))](PHI)")
             (("1"
               (lemma "composition_bijective[nat,(union(X!1, Y!1)),nat]"
                ("f1" "PHI" "f2" "CXY"))
               (("1"
                 (case "absconvergent?(g!1 o PHI)")
                 (("1"
                   (lemma
                    "bijective_inverse_exists[nat,(union(X!1,Y!1))]"
                    ("f" "PHI"))
                   (expand "exists1")
                   (flatten)
                   (skolem - ("PSI"))
                   (lemma "bij_inv_is_bij_alt[nat,(union(X!1,Y!1))]"
                    ("f" "PHI" "g" "PSI"))
                   (("1"
                     (lemma
                      "composition_bijective[nat,(union(X!1,Y!1)),nat]"
                      ("f1" "DXY" "f2" "PSI"))
                     (("1"
                       (lemma "abs_series_bij_conv_abs"
                        ("aa" "abs(g!1 o PHI)" "phi" "PSI o DXY"))
                       (("1"
                         (expand "absconvergent?" -6)
                         (assert)
                         (lemma
                          "comp_inverse_right_alt[nat, (union(X!1, Y!1))]"
                          ("f" "PHI" "g" "PSI"))
                         (case-replace
                          "abs(g!1 o PHI) o (PSI o DXY) = abs(g!1 o DXY)")
                         (hide-all-but (1 -1))
                         (apply-extensionality 1 :hide? t)
                         (expand "o ")
                         (expand "abs")
                         (inst - "DXY(x!1)")
                         (assert))
                        ("2" (propax))
                        ("3"
                         (hide-all-but (-5 1))
                         (expand "absconvergent?")
                         (expand "o ")
                         (case-replace
                          "abs(abs(LAMBDA (x: nat): g!1(PHI(x)))) = abs(LAMBDA (x: nat): g!1(PHI(x)))")
                         (hide-all-but 1)
                         (apply-extensionality 1 :hide? t)
                         (expand "abs")
                         (grind))))
                      ("2" (propax))))
                    ("2" (propax))))
                  ("2"
                   (expand "absconvergent?")
                   (lemma "conv_series_shift" ("N" "N"))
                   (inst - "abs(g!1 o PHI)")
                   (replace -1 1)
                   (case-replace
                    "(LAMBDA n: abs(g!1 o PHI)(n + N)) = abs(g!1 o DY)")
                   (hide-all-but 1)
                   (apply-extensionality :hide? t)
                   (expand "abs")
                   (expand "o ")
                   (expand "abs")
                   (expand "PHI")
                   (propax))))
                ("2" (propax))))
              ("2"
               (hide-all-but (-2 -7 -10 1))
               (expand "bijective?")
               (flatten)
               (split)
               (("1"
                 (expand "injective?")
                 (skosimp)
                 (expand "PHI")
                 (case-replace "x1!1<N")
                 (("1"
                   (case-replace "x2!1 < N")
                   (("1" (inst -4 "x1!1" "x2!1") (assert))
                    ("2"
                     (assert)
                     (typepred "DX(x1!1)")
                     (typepred "DY(x2!1-N)")
                     (expand "disjoint?")
                     (expand "intersection")
                     (expand "empty?")
                     (expand "member")
                     (inst -9 "DX(x1!1)")
                     (assert))))
                  ("2"
                   (case-replace "x2!1<N")
                   (("1"
                     (assert)
                     (expand "disjoint?")
                     (expand "intersection")
                     (expand "empty?")
                     (expand "member")
                     (inst -7 "DX(x2!1)")
                     (assert))
                    ("2"
                     (assert)
                     (inst -4 "x1!1-N" "x2!1-N")
                     (assert))))))
                ("2"
                 (expand "surjective?")
                 (skosimp)
                 (typepred "y!1")
                 (expand "union")
                 (expand "member")
                 (split -1)
                 (("1"
                   (inst -3 "y!1")
                   (skosimp)
                   (inst + "x!1")
                   (expand "PHI")
                   (propax))
                  ("2"
                   (inst -5 "y!1")
                   (skosimp)
                   (inst + "N+x!1")
                   (expand "PHI")
                   (propax))))))
              ("3"
               (skosimp)
               (expand "PHI")
               (expand "union")
               (expand "member")
               (propax))))
            ("2" (skosimp) (assert))))
          ("2" (propax))))
        ("2" (propax))))))
    ("3" (hide 2) (skosimp) (rewrite "countable_union"))
    ("4"
     (skosimp)
     (assert)
     (typepred "X!1")
     (lemma "finite_countable" ("x" "X!1"))
     (propax))))


proof_type: f_proof
decl_type: formula
library: sigma_set
theory: countable_convergence
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (rewrite "union_difference")
   (lemma "convergent_difference" ("X" "Y!1" "Y" "X!1" "g" "g!1"))
   (assert)
   (lemma "convergent_disjoint_union"
    ("X" "X!1" "Y" "difference(Y!1,X!1)" "g" "g!1"))
   (assert)
   (hide-all-but 1)
   (grind))


proof_type: f_proof
decl_type: formula
library: sigma_set
theory: countable_convergence
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (lemma "add_as_union" ("x" "t!1" "a" "X!1"))
   (lemma "convergent_union" ("X" "X!1" "Y" "singleton(t!1)" "g" "g!1"))
   (("1" (rewrite "convergent_singleton") (assert))
    ("2" (lemma "finite_countable" ("x" "singleton[T](t!1)")) (propax))))


proof_type: f_proof
decl_type: formula
library: sigma_set
theory: countable_convergence
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (lemma "convergent_subset"
    ("X" "remove(t!1,X!1)" "Y" "X!1" "g" "g!1"))
   (split -1)
   (("1" (propax)) ("2" (hide-all-but 1) (grind)) ("3" (propax))))


proof_type: f_proof
decl_type: formula
library: sigma_set
theory: countable_convergence
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "convergent?")
   (case-replace "is_finite(X!1)")
   (("1" (assert))
    ("2"
     (assert)
     (name-replace "D" "denumerable_enumeration(X!1)")
     (expand "absconvergent?")
     (expand "o ")
     (expand "abs")
     (case-replace
      "(LAMBDA (n: nat): abs(abs(g!1(D(n)))))=(LAMBDA (n: nat): abs(g!1(D(n))))")
     (("1" (assert))
      ("2"
       (apply-extensionality :hide? t)
       (("1" (hide-all-but 1) (grind))
        ("2" (skosimp) (hide-all-but 1) (grind))))))))


proof_type: f_proof
decl_type: formula
library: sigma_set
theory: convergence_set
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "convergent?")
   (case-replace "nonzero_elts(LAMBDA t: 0, X!1)= emptyset[T]")
   (("1" (rewrite "countable_emptyset") (rewrite "convergent_empty"))
    ("2"
     (hide 2)
     (apply-extensionality :hide? t)
     (expand "emptyset")
     (expand "nonzero_elts")
     (propax))))


proof_type: f_proof
decl_type: formula
library: sigma_set
theory: convergence_set
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (expand "convergent?")
   (flatten)
   (split)
   (("1"
     (lemma "countable_subset"
      ("S"
       "nonzero_elts(f!1 + g!1, X!1)"
       "Count"
       "union(nonzero_elts(f!1, X!1),nonzero_elts(g!1, X!1))"))
     (("1"
       (split -1)
       (("1" (propax))
        ("2"
         (hide-all-but 1)
         (expand "subset?")
         (expand "nonzero_elts")
         (expand "union")
         (expand "member")
         (skosimp)
         (expand "+")
         (assert))))
      ("2"
       (lemma "countable_union"
        ("Count1"
         "nonzero_elts(f!1, X!1)"
         "Count2"
         "nonzero_elts(g!1, X!1)"))
       (propax))))
    ("2"
     (case "subset?(nonzero_elts(f!1 + g!1, X!1),union(nonzero_elts(f!1, X!1),nonzero_elts(g!1, X!1)))")
     (("1"
       (name-replace "FX" "nonzero_elts(f!1, X!1)")
       (name-replace "GX" "nonzero_elts(g!1, X!1)")
       (name-replace "FGX" "nonzero_elts(f!1+g!1, X!1)")
       (lemma "countable_union" ("Count1" "FX" "Count2" "GX"))
       (lemma "convergent_disjoint_union"
        ("g" "f!1" "X" "FX" "Y" "difference(union(FX, GX),FX)"))
       (("1"
         (lemma "convergent_disjoint_union"
          ("g" "g!1" "X" "GX" "Y" "difference(union(FX, GX),GX)"))
         (("1"
           (replace -6)
           (replace -8)
           (case-replace
            "union(GX, difference(union(FX, GX), GX))=union(FX, GX)")
           (("1"
             (hide -1)
             (case-replace
              "union(FX, difference(union(FX, GX), FX))=union(FX, GX)")
             (("1"
               (hide -1)
               (split -1)
               (("1"
                 (split -2)
                 (("1"
                   (lemma "convergent_plus"
                    ("X" "union(FX,GX)" "f" "f!1" "g" "g!1"))
                   (assert)
                   (lemma "convergent_subset"
                    ("X" "FGX" "Y" "union(FX, GX)" "g" "f!1+g!1"))
                   (assert))
                  ("2" (hide-all-but 1) (grind))
                  ("3"
                   (hide 2)
                   (lemma "convergent_zeros"
                    ("g" "f!1" "X" "difference(union(FX, GX), FX)"))
                   (assert)
                   (hide 2)
                   (skosimp)
                   (typepred "t!1")
                   (hide-all-but (-1 1))
                   (expand "FX")
                   (expand "nonzero_elts")
                   (expand "union")
                   (expand "difference")
                   (expand "member")
                   (flatten)
                   (expand "GX")
                   (expand "nonzero_elts")
                   (grind))))
                ("2" (hide-all-but 1) (grind))
                ("3"
                 (hide -1 2)
                 (lemma "convergent_zeros"
                  ("g" "g!1" "X" "difference(union(FX, GX), GX)"))
                 (assert)
                 (hide-all-but 1)
                 (skosimp)
                 (typepred "t!1")
                 (expand "GX")
                 (expand "FX")
                 (grind))))
              ("2"
               (hide-all-but 1)
               (apply-extensionality :hide? t)
               (grind))))
            ("2"
             (hide-all-but 1)
             (apply-extensionality :hide? t)
             (grind))))
          ("2" (rewrite "countable_difference"))))
        ("2" (rewrite "countable_difference"))))
      ("2"
       (hide-all-but 1)
       (expand "nonzero_elts")
       (expand "union")
       (expand "subset?")
       (expand "member")
       (skosimp)
       (expand "+ ")
       (assert))))))


proof_type: f_proof
decl_type: formula
library: sigma_set
theory: convergence_set
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "convergent?")
   (flatten)
   (case-replace "a!1=0")
   (("1"
     (case-replace "nonzero_elts(0 * f!1, X!1)=emptyset[T]")
     (("1" (rewrite "countable_emptyset") (rewrite "convergent_empty"))
      ("2"
       (hide-all-but 1)
       (apply-extensionality :hide? t)
       (expand "emptyset")
       (expand "nonzero_elts")
       (flatten)
       (expand "*")
       (assert))))
    ("2"
     (case-replace "nonzero_elts(a!1 * f!1, X!1)=nonzero_elts(f!1, X!1)")
     (("1"
       (assert)
       (hide -1 -2)
       (lemma "convergent_scal"
        ("X" "nonzero_elts(f!1, X!1)" "a" "a!1" "f" "f!1"))
       (assert))
      ("2"
       (hide-all-but (1 2))
       (apply-extensionality :hide? t)
       (expand "nonzero_elts")
       (expand "*")
       (assert)
       (case-replace "f!1(x!1)=0")
       (("1" (assert)) ("2" (assert))))))))


proof_type: f_proof
decl_type: formula
library: sigma_set
theory: convergence_set
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "convergent_scal" ("X" "X!1" "f" "f!1" "a" "-1"))
   (assert)
   (case-replace "-1*f!1=-f!1")
   (hide-all-but 1)
   (apply-extensionality :hide? t)
   (expand "*")
   (expand "-")
   (assert))


proof_type: f_proof
decl_type: formula
library: sigma_set
theory: convergence_set
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (lemma "convergent_opp" ("X" "X!1" "f" "g!1"))
   (assert)
   (lemma "convergent_plus" ("X" "X!1" "f" "f!1" "g" "-g!1"))
   (assert)
   (case-replace "f!1 + -g!1=f!1 - g!1")
   (hide-all-but 1)
   (apply-extensionality :hide? t)
   (expand "+")
   (expand "-")
   (assert))


proof_type: f_proof
decl_type: formula
library: sigma_set
theory: convergence_set
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (expand "convergent?")
   (flatten)
   (case "subset?(nonzero_elts(g!1, X!1),nonzero_elts(f!1, X!1))")
   (("1"
     (lemma "countable_subset"
      ("S" "nonzero_elts(g!1, X!1)" "Count" "nonzero_elts(f!1, X!1)"))
     (assert)
     (lemma "convergent_subset"
      ("X"
       "nonzero_elts(g!1, X!1)"
       "Y"
       "nonzero_elts(f!1, X!1)"
       "g"
       "f!1"))
     (assert)
     (lemma "convergent_le"
      ("g" "g!1" "f" "f!1" "X" "nonzero_elts(g!1, X!1)"))
     (assert))
    ("2"
     (hide-all-but (-1 1))
     (expand "subset?")
     (expand "nonzero_elts")
     (expand "member")
     (skosimp)
     (inst - "x!1")
     (grind))))


proof_type: f_proof
decl_type: formula
library: sigma_set
theory: convergence_set
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "convergent?")
   (case-replace "nonzero_elts(g!1, emptyset[T])=emptyset[T]")
   (("1" (rewrite "countable_emptyset") (rewrite "convergent_empty"))
    ("2"
     (hide 2)
     (apply-extensionality :hide? t)
     (expand "emptyset")
     (expand "nonzero_elts")
     (propax))))


proof_type: f_proof
decl_type: formula
library: sigma_set
theory: convergence_set
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "convergent?")
   (expand "absconvergent?")
   (case "g!1(t!1)=0")
   (("1"
     (case-replace "nonzeros(g!1, singleton(t!1))=emptyset[real]")
     (("1" (assert) (rewrite "countable_emptyset"))
      ("2"
       (hide 2)
       (apply-extensionality :hide? t)
       (expand "emptyset")
       (expand "nonzeros")
       (expand "extend")
       (prop)
       (skosimp)
       (expand "singleton")
       (assert))))
    ("2"
     (case-replace "nonzeros(g!1, singleton(t!1)) = singleton(g!1(t!1))")
     (("1"
       (hide -1)
       (rewrite "countable_singleton")
       (flatten)
       (rewrite "finite_singleton"))
      ("2"
       (hide 3)
       (apply-extensionality :hide? t)
       (expand "singleton")
       (expand "nonzeros")
       (expand "extend")
       (case-replace "x!1=g!1(t!1)")
       (("1" (assert) (inst + "t!1"))
        ("2" (assert) (prop) (skosimp) (assert))))))))


proof_type: f_proof
decl_type: formula
library: sigma_set
theory: convergence_set
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (expand "convergent?")
   (flatten)
   (case "subset?(nonzero_elts(g!1, X!1),nonzero_elts(g!1, Y!1))")
   (("1"
     (lemma "countable_subset"
      ("S" "nonzero_elts(g!1, X!1)" "Count" "nonzero_elts(g!1, Y!1)"))
     (assert)
     (lemma "convergent_subset"
      ("X"
       "nonzero_elts(g!1, X!1)"
       "Y"
       "nonzero_elts(g!1, Y!1)"
       "g"
       "g!1"))
     (assert))
    ("2"
     (hide-all-but (-1 1))
     (expand "subset?")
     (expand "nonzero_elts")
     (expand "member")
     (skosimp)
     (inst - "x!1")
     (assert))))


proof_type: f_proof
decl_type: formula
library: sigma_set
theory: convergence_set
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (split)
   (("1"
     (lemma "convergent_subset"
      ("X" "intersection(X!1, Y!1)" "Y" "X!1" "g" "g!1"))
     (rewrite "intersection_subset1")
     (assert))
    ("2"
     (lemma "convergent_subset"
      ("X" "intersection(X!1, Y!1)" "Y" "Y!1" "g" "g!1"))
     (rewrite "intersection_commutative")
     (rewrite "intersection_subset1")
     (assert))))


proof_type: f_proof
decl_type: formula
library: sigma_set
theory: convergence_set
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (lemma "convergent_subset"
    ("X" "difference(X!1, Y!1)" "Y" "X!1" "g" "g!1"))
   (rewrite "difference_subset")
   (assert))


proof_type: f_proof
decl_type: formula
library: sigma_set
theory: convergence_set
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (expand "convergent?")
   (flatten)
   (case-replace
    "nonzero_elts(g!1, union(X!1, Y!1))=union(nonzero_elts(g!1, X!1),nonzero_elts(g!1, Y!1))")
   (("1"
     (hide -1)
     (rewrite "countable_union")
     (lemma "convergent_disjoint_union"
      ("X"
       "nonzero_elts(g!1, X!1)"
       "Y"
       "nonzero_elts(g!1, Y!1)"
       "g"
       "g!1"))
     (assert)
     (hide-all-but (-1 1))
     (expand "disjoint?")
     (expand "intersection")
     (expand "empty?")
     (expand "member")
     (expand "nonzero_elts")
     (skosimp)
     (inst - "x!1")
     (assert))
    ("2"
     (hide-all-but 1)
     (apply-extensionality :hide? t)
     (expand "nonzero_elts")
     (expand "union")
     (expand "member")
     (case-replace "g!1(x!1)=0")
     (("1" (assert)) ("2" (assert))))))


proof_type: f_proof
decl_type: formula
library: sigma_set
theory: convergence_set
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (lemma "convergent_difference" ("X" "X!1" "Y" "Y!1" "g" "g!1"))
   (assert)
   (lemma "difference_disjoint" ("a" "Y!1" "b" "X!1"))
   (lemma "convergent_disjoint_union"
    ("X" "Y!1" "Y" "difference(X!1, Y!1)" "g" "g!1"))
   (assert)
   (rewrite "union_difference" -1 :dir rl)
   (rewrite "union_commutative"))


proof_type: f_proof
decl_type: formula
library: sigma_set
theory: convergence_set
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (rewrite "add_as_union")
   (lemma "convergent_union" ("g" "g!1" "X" "X!1" "Y" "singleton(t!1)"))
   (assert)
   (hide-all-but 1)
   (expand "convergent?")
   (case-replace "g!1(t!1)=0")
   (("1"
     (case-replace "nonzero_elts(g!1, singleton(t!1))=emptyset[T]")
     (("1"
       (rewrite "countable_emptyset")
       (rewrite "countable_convergence.convergent_empty"))
      ("2" (hide 2) (apply-extensionality :hide? t) (grind))))
    ("2"
     (case-replace "nonzero_elts(g!1, singleton(t!1))=singleton(t!1)")
     (("1"
       (rewrite "countable_singleton")
       (rewrite "countable_convergence.convergent_singleton"))
      ("2" (hide 3) (apply-extensionality :hide? t) (grind))))))


proof_type: f_proof
decl_type: formula
library: sigma_set
theory: convergence_set
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (lemma "convergent_subset"
    ("X" "remove(t!1, X!1)" "Y" "X!1" "g" "g!1"))
   (rewrite "subset_remove")
   (assert))


proof_type: f_proof
decl_type: formula
library: sigma_set
theory: convergence_set
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "convergent?")
   (case-replace "nonzero_elts(abs(g!1), X!1)=nonzero_elts(g!1, X!1)")
   (("1"
     (hide -1)
     (rewrite "convergent_abs")
     (split)
     (("1" (flatten) (assert)) ("2" (flatten) (assert))))
    ("2"
     (hide 2)
     (apply-extensionality :hide? t)
     (expand "nonzero_elts")
     (grind))))


proof_type: f_proof
decl_type: formula
library: sigma_set
theory: sigma_countable
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "sigma_finite" ("F" "singleton(t!1)" "g" "g!1"))
   (rewrite "card_singleton")
   (assert)
   (replace -1)
   (hide -1)
   (expand "sigma")
   (expand "o ")
   (typepred "finite_enumeration(singleton(t!1))(0)")
   (expand "singleton")
   (assert)
   (replace -1)
   (expand "sigma")
   (propax))


proof_type: f_proof
decl_type: formula
library: sigma_set
theory: sigma_countable
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "X!1")
   (expand "sigma" 1 1)
   (lemma "infinite_countably_infinite")
   (inst - "X!1")
   (assert)
   (lift-if 2)
   (case-replace "empty?(X!1)")
   (("1"
     (hide 2)
     (expand "is_countably_infinite")
     (skosimp)
     (typepred "f!2")
     (lemma "bijective_inverse_exists[(X!1),nat]" ("f" "f!2"))
     (expand "exists1")
     (flatten)
     (skolem -1 ("gg"))
     (expand "empty?")
     (inst - "gg(0)")
     (expand "member")
     (propax))
    ("2" (assert))))


proof_type: f_proof
decl_type: formula
library: sigma_set
theory: sigma_countable
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (case "FORALL (X:finite_set[T], Y:countably_infinite_set[T], f:(convergent?(union(X, Y)))):
                 disjoint?(X, Y) IMPLIES
                  sigma(union(X, Y), f) = sigma(X, f) + sigma(Y, f)")
   (("1"
     (skosimp)
     (typepred "X!1")
     (typepred "Y!1")
     (case "is_finite(X!1)")
     (("1"
       (case "is_finite(Y!1)")
       (("1"
         (hide -5 -3 -4)
         (name "NX" "card(X!1)")
         (("1"
           (name "NY" "card(Y!1)")
           (("1"
             (case-replace "X!1=emptyset[T]")
             (("1"
               (rewrite "union_commutative" 1)
               (rewrite "union_empty")
               (rewrite "sigma_empty")
               (assert))
              ("2"
               (case-replace "Y!1=emptyset[T]")
               (("1"
                 (rewrite "sigma_empty")
                 (rewrite "union_empty")
                 (assert))
                ("2"
                 (rewrite "emptyset_is_empty?" 1 :dir rl)
                 (rewrite "emptyset_is_empty?" 2 :dir rl)
                 (typepred "f!1")
                 (expand "sigma")
                 (assert)
                 (lemma "finite_union[T]")
                 (inst - "X!1" "Y!1")
                 (assert)
                 (case-replace "empty?(union(X!1, Y!1))")
                 (("1"
                   (hide-all-but (1 2 -1))
                   (expand "union")
                   (expand "empty?")
                   (skosimp*)
                   (expand "member")
                   (inst - "x!1")
                   (flatten))
                  ("2"
                   (assert)
                   (lemma "card_disj_union" ("A" "X!1" "B" "Y!1"))
                   (assert)
                   (replace -1)
                   (replace -4)
                   (replace -5)
                   (lemma "series_bijection")
                   (name "PHI"
                         "LAMBDA (n:[below[card(union(X!1,Y!1))]]): IF n < card(X!1) THEN finite_enumeration(X!1)(n) ELSE finite_enumeration(Y!1)(n-card(X!1)) ENDIF")
                   (("1"
                     (lemma "finite_enumeration_bij"
                      ("X" "union(X!1,Y!1)"))
                     (lemma "finite_enumeration_bij" ("X" "X!1"))
                     (lemma "finite_enumeration_bij" ("X" "Y!1"))
                     (name-replace "FX" "finite_enumeration(X!1)")
                     (name-replace "FY" "finite_enumeration(Y!1)")
                     (name-replace "FXY"
                      "finite_enumeration(union(X!1,Y!1))")
                     (case "bijective?[below[card[T](union(X!1,Y!1))],(union(X!1,Y!1))](PHI)")
                     (("1"
                       (lemma
                        "bijective_inverse_exists[below[card[T](union(X!1, Y!1))], (union(X!1, Y!1))]"
                        ("f" "FXY"))
                       (("1"
                         (expand "exists1")
                         (flatten)
                         (skolem - ("CXY"))
                         (hide -2)
                         (expand "series")
                         (hide -6 -7)
                         (lemma
                          "sigma_bijection[below[card(union(X!1, Y!1))]]"
                          ("low" "0" "high" "NX+NY-1" "F" "f!1 o FXY"))
                         (("1"
                           (split -1)
                           (("1"
                             (lemma
                              "bij_inv_is_bij_alt[below[card[T](union(X!1, Y!1))], (union(X!1, Y!1))]"
                              ("f" "FXY" "g" "CXY"))
                             (("1"
                               (lemma
                                "composition_bijective[below[card[T](union(X!1,Y!1))],(union(X!1,Y!1)),below[card[T](union(X!1, Y!1))]]"
                                ("f1" "PHI" "f2" "CXY"))
                               (("1"
                                 (inst - "CXY o PHI")
                                 (("1"
                                   (case-replace
                                    "sigma[subrange_T[below[card(union(X!1, Y!1))]](0, NX - 1 + NY)]
                                               (0, NX + NY - 1,
                                                f!1 o FXY o
                                                 restrict
                                                     [below[card[T](union[T](X!1, Y!1))],
                                                      subrange_T[below[card[T](union[T](X!1, Y!1))]](0,
                                                                                                     NX - 1
                                                                                                     +
                                                                                                     NY),
                                                      below[card[T](union[T](X!1, Y!1))]]
                                                     (CXY o PHI)) = sigma[below[card(union(X!1, Y!1))]](0, NX + NY - 1, f!1 o PHI)")
                                   (("1"
                                     (case-replace
                                      "sigma[subrange_T[below[card(union(X!1, Y!1))]](0, NX - 1 + NY)]
                                                (0, NX + NY - 1,
                                                 restrict
                                                     [below[card(union(X!1, Y!1))],
                                                      subrange_T[below[card(union(X!1, Y!1))]](0, NX - 1 + NY),
                                                      real]
                                                     (f!1 o FXY)) = sigma[below[card(union(X!1, Y!1))]](0, NX + NY - 1, f!1 o FXY)")
                                     (("1"
                                       (replace -5 4)
                                       (hide-all-but (4 2 3 -14 -15 -11))
                                       (lemma
                                        "nonempty_card"
                                        ("S" "X!1"))
                                       (lemma
                                        "nonempty_card"
                                        ("S" "Y!1"))
                                       (expand "nonempty?")
                                       (assert)
                                       (case
                                        "forall (n:nat): n <= NY-1 => sigma[below[card(union(X!1, Y!1))]](0, NX + n, f!1 o PHI) =
                                               sigma[below[card(Y!1)]](0, n, f!1 o FY) +
                                                sigma[below[card(X!1)]](0, NX - 1, f!1 o FX)")
                                       (("1" (inst - "NY-1") (assert))
                                        ("2"
                                         (hide 2 3 4)
                                         (induct "n")
                                         (("1"
                                           (assert)
                                           (expand "sigma" 1 2)
                                           (expand "sigma" 1 1)
                                           (expand "PHI" 1 1)
                                           (expand "FY" 1)
                                           (expand "o" 1 3)
                                           (expand "o" 1 1)
                                           (assert)
                                           (replace -5 1)
                                           (assert)
                                           (hide -1 -3 -4)
                                           (case
                                            "forall (n:nat): n<=NX-1 => sigma(0, n, f!1 o PHI) =
                                                   sigma[below[card(X!1)]](0, n, f!1 o FX)")
                                           (("1"
                                             (inst - "NX-1")
                                             (assert)
                                             (expand "sigma" 1 2)
                                             (propax))
                                            ("2"
                                             (hide 2)
                                             (induct "n")
                                             (("1"
                                               (expand "sigma")
                                               (expand "FX")
                                               (expand "PHI")
                                               (expand "o ")
                                               (expand "sigma")
                                               (propax))
                                              ("2"
                                               (skosimp*)
                                               (assert)
                                               (expand "sigma" 1)
                                               (assert)
                                               (replace -1 1)
                                               (assert)
                                               (expand "o")
                                               (expand "PHI")
                                               (expand "FX")
                                               (propax))
                                              ("3" (skosimp*) (assert))
                                              ("4" (skosimp*) (assert))
                                              ("5" (skosimp*) (assert))
                                              ("6" (skosimp*) (assert))))
                                            ("3" (skosimp*) (assert))
                                            ("4" (skosimp*) (assert))
                                            ("5" (skosimp*) (assert))
                                            ("6" (skosimp*) (assert))))
                                          ("2"
                                           (skosimp*)
                                           (assert)
                                           (expand "sigma" 1 2)
                                           (expand "sigma" 1 1)
                                           (assert)
                                           (replace -1 1)
                                           (assert)
                                           (expand "PHI" 1)
                                           (expand "o")
                                           (expand "FY")
                                           (assert))
                                          ("3"
                                           (skosimp)
                                           (assert)
                                           (skosimp*)
                                           (assert))
                                          ("4"
                                           (skosimp)
                                           (assert)
                                           (skosimp*)
                                           (assert))
                                          ("5" (skosimp*) (assert))
                                          ("6" (skosimp*) (assert))
                                          ("7" (skosimp*) (assert))))
                                        ("3" (skosimp*) (assert))
                                        ("4" (skosimp*) (assert))
                                        ("5" (skosimp*) (assert))
                                        ("6" (skosimp*) (assert))
                                        ("7" (skosimp*) (assert))))
                                      ("2"
                                       (case
                                        "forall (n:nat): n <= NX + NY - 1 => sigma[subrange_T[below[card(union(X!1, Y!1))]](0, NX - 1 + NY)]
                                                  (0, n,
                                                   restrict
                                                       [below[card(union(X!1, Y!1))],
                                                        subrange_T[below[card(union(X!1, Y!1))]](0, NX - 1 + NY),
                                                        real]
                                                       (f!1 o FXY))
                                               = sigma[below[card(union(X!1, Y!1))]](0, n, f!1 o FXY)")
                                       (("1"
                                         (inst - "NX+NY-1")
                                         (("1" (assert))
                                          ("2"
                                           (lemma
                                            "nonempty_card"
                                            ("S" "X!1"))
                                           (lemma
                                            "nonempty_card"
                                            ("S" "Y!1"))
                                           (expand "nonempty?")
                                           (assert))))
                                        ("2"
                                         (induct "n")
                                         (("1"
                                           (expand "sigma")
                                           (expand "restrict")
                                           (expand "sigma" 1)
                                           (propax))
                                          ("2"
                                           (skosimp*)
                                           (expand "sigma" 1)
                                           (expand "restrict")
                                           (assert))
                                          ("3" (skosimp*) (assert))
                                          ("4" (skosimp*) (assert))
                                          ("5" (skosimp*) (assert))
                                          ("6" (skosimp*) (assert))))
                                        ("3" (skosimp*) (assert))
                                        ("4" (skosimp*) (assert))
                                        ("5" (skosimp*) (assert))
                                        ("6" (skosimp*) (assert))))
                                      ("3" (skosimp*) (assert))))
                                    ("2"
                                     (hide 5 -3)
                                     (lemma
                                      "comp_inverse_right_alt[below[card[T](union(X!1, Y!1))], (union(X!1, Y!1))]"
                                      ("f" "FXY" "g" "CXY"))
                                     (hide -2 -3 -4 -5 -6 -7 -8)
                                     (lemma "nonempty_card" ("S" "X!1"))
                                     (lemma "nonempty_card" ("S" "Y!1"))
                                     (expand "nonempty?")
                                     (assert)
                                     (hide 2 3 4)
                                     (case
                                      "forall (n:nat): n <= NX-1+NY => sigma[subrange_T[below[card(union(X!1, Y!1))]](0, NX - 1 + NY)]
                                                (0, n,
                                                 f!1 o FXY o
                                                  restrict
                                                      [below[card[T](union[T](X!1, Y!1))],
                                                       subrange_T[below[card[T](union[T](X!1, Y!1))]]
                                                           (0, NX - 1 + NY),
                                                       below[card[T](union[T](X!1, Y!1))]]
                                                      (CXY o PHI))
                                             = sigma[below[card(union(X!1, Y!1))]](0, n, f!1 o PHI)")
                                     (("1" (inst - "NX-1+NY") (assert))
                                      ("2"
                                       (hide 2)
                                       (expand "restrict")
                                       (expand "o ")
                                       (induct "n")
                                       (("1"
                                         (expand "sigma")
                                         (inst - "PHI(0)")
                                         (assert)
                                         (expand "sigma" 1)
                                         (assert))
                                        ("2"
                                         (skosimp*)
                                         (expand "sigma" 1)
                                         (assert)
                                         (replace -1 1)
                                         (assert)
                                         (hide -1)
                                         (inst - "PHI(1+j!1)")
                                         (assert))
                                        ("3" (skosimp*) (assert))
                                        ("4" (skosimp*) (assert))
                                        ("5"
                                         (skosimp*)
                                         (expand "PHI")
                                         (case "x!1 < card(X!1)")
                                         (("1"
                                           (assert)
                                           (typepred
                                            "finite_enumeration(X!1)(x!1)")
                                           (expand "union")
                                           (expand "member")
                                           (propax))
                                          ("2"
                                           (assert)
                                           (expand "union")
                                           (expand "member")
                                           (propax))))
                                        ("6" (skosimp*) (assert))
                                        ("7" (skosimp*) (assert))))
                                      ("3" (skosimp*) (assert))
                                      ("4" (skosimp*) (assert))
                                      ("5" (skosimp*) (assert))
                                      ("6" (skosimp*) (assert))))
                                    ("3" (skosimp) (assert))))
                                  ("2"
                                   (split 1)
                                   (("1"
                                     (skosimp*)
                                     (expand "o")
                                     (typepred "CXY(PHI(x1!1))")
                                     (("1" (assert))
                                      ("2"
                                       (hide 2 3 4 5 6)
                                       (expand "union")
                                       (expand "member")
                                       (flatten)
                                       (expand "PHI")
                                       (case-replace "x1!1 < card(X!1)")
                                       (("1"
                                         (expand "finite_enumeration")
                                         (propax))
                                        ("2" (assert))))))
                                    ("2"
                                     (hide -2 -4 -5 -6 -7 5)
                                     (expand "bijective?")
                                     (flatten)
                                     (expand "o ")
                                     (split 1)
                                     (("1"
                                       (expand "restrict")
                                       (expand "injective?")
                                       (skosimp*)
                                       (typepred "x1!1")
                                       (typepred "x2!1")
                                       (inst - "x1!1" "x2!1")
                                       (assert))
                                      ("2"
                                       (expand "surjective?")
                                       (expand "restrict")
                                       (skosimp)
                                       (typepred "y!1")
                                       (inst - "y!1")
                                       (skosimp)
                                       (inst + "x!1"))))))))
                                ("2" (propax)) ("3" (propax))))
                              ("2" (propax))))
                            ("2"
                             (lemma "nonempty_card" ("S" "X!1"))
                             (lemma "nonempty_card" ("S" "Y!1"))
                             (expand "nonempty?")
                             (assert))))
                          ("2"
                           (lemma "nonempty_card" ("S" "X!1"))
                           (lemma "nonempty_card" ("S" "Y!1"))
                           (expand "nonempty?")
                           (assert))
                          ("3"
                           (assert)
                           (assert)
                           (lemma "nonempty_card"
                            ("S" "union(X!1, Y!1)"))
                           (expand "nonempty?")
                           (propax))
                          ("4" (skosimp*) (typepred "x!1") (assert))))
                        ("2" (propax))))
                      ("2"
                       (hide-all-but (3 4 1 -1 -2 -13 -11 -12))
                       (expand "bijective?")
                       (flatten)
                       (expand "PHI")
                       (expand "FY")
                       (expand "FX")
                       (split)
                       (("1"
                         (expand "injective?")
                         (skosimp*)
                         (case-replace "x1!1 < card(X!1)")
                         (("1"
                           (case-replace "x2!1 < card(X!1)")
                           (("1" (inst -6 "x1!1" "x2!1") (assert))
                            ("2"
                             (assert)
                             (expand "disjoint?")
                             (expand "intersection")
                             (expand "empty?")
                             (expand "member")
                             (inst -9 "finite_enumeration(X!1)(x1!1)")
                             (assert))))
                          ("2"
                           (case-replace "x2!1<card(X!1)")
                           (("1"
                             (expand "disjoint?")
                             (expand "intersection")
                             (expand "empty?")
                             (expand "member")
                             (inst -9 "finite_enumeration(X!1)(x2!1)")
                             (assert))
                            ("2"
                             (assert)
                             (inst -2 "x1!1-card(X!1)" "x2!1-card(X!1)")
                             (assert))))))
                        ("2"
                         (expand "surjective?")
                         (skosimp*)
                         (case "X!1(y!1)")
                         (("1"
                           (inst -5 "y!1")
                           (skosimp)
                           (inst + "x!1")
                           (assert))
                          ("2"
                           (expand "disjoint?")
                           (expand "intersection")
                           (typepred "y!1")
                           (expand "union")
                           (expand "member")
                           (assert)
                           (inst -3 "y!1")
                           (skosimp)
                           (inst + "x!1+card(X!1)")
                           (assert))))))
                      ("3"
                       (skosimp)
                       (typepred "x1!1")
                       (expand "PHI" 1)
                       (expand "union" 1)
                       (expand "member")
                       (propax))))
                    ("2" (skosimp) (assert))))))))))
            ("2" (propax))))
          ("2" (propax))))
        ("2"
         (inst - "X!1" "Y!1" "f!1")
         (("1" (assert)) ("2" (rewrite "countably_infinite_def"))))))
      ("2"
       (case "is_finite(Y!1)")
       (("1"
         (inst - "Y!1" "X!1" "f!1")
         (("1"
           (rewrite "union_commutative" -4)
           (assert)
           (hide-all-but (-4 2))
           (expand "disjoint?")
           (rewrite "intersection_commutative"))
          ("2" (rewrite "union_commutative") (typepred "f!1") (propax))
          ("3" (rewrite "countably_infinite_def"))))
        ("2"
         (assert)
         (hide -3)
         (typepred "f!1")
         (lemma "convergent_subset"
          ("X" "X!1" "Y" "union(X!1,Y!1)" "g" "f!1"))
         (lemma "convergent_subset"
          ("X" "Y!1" "Y" "union(X!1,Y!1)" "g" "f!1"))
         (assert)
         (split -1)
         (("1"
           (split -2)
           (("1"
             (expand "sigma")
             (expand "convergent?")
             (lemma "infinite_union_right" ("S" "X!1" "Inf" "Y!1"))
             (lemma "infinite_nonempty" ("x" "X!1"))
             (lemma "infinite_nonempty" ("x" "Y!1"))
             (lemma "infinite_nonempty" ("x" "union(X!1,Y!1)"))
             (("1"
               (expand "nonempty?")
               (assert)
               (lemma "denumerable_enumeration_bij" ("X" "X!1"))
               (lemma "denumerable_enumeration_bij" ("X" "Y!1"))
               (lemma "denumerable_enumeration_bij"
                ("X" "union(X!1,Y!1)"))
               (name-replace "DXY"
                "denumerable_enumeration(union(X!1,Y!1))")
               (name-replace "DX" "denumerable_enumeration(X!1)")
               (name-replace "DY" "denumerable_enumeration(Y!1)")
               (case "forall (n:nat): even?(n) IMPLIES integer_pred(n / 2) & n/2 >= 0")
               (("1"
                 (case "forall (n:nat): NOT even?(n) IMPLIES integer_pred((n-1) / 2) & (n-1)/2 >= 0")
                 (("1"
                   (name "PHI"
                         "LAMBDA (n:nat): IF even?(n) THEN DX(n/2) ELSE DY((n-1)/2) ENDIF")
                   (("1"
                     (case "bijective?[nat,(union(X!1, Y!1))](PHI)")
                     (("1"
                       (lemma
                        "bijective_inverse_exists[nat, (union(X!1, Y!1))]"
                        ("f" "DXY"))
                       (("1"
                         (expand "exists1")
                         (flatten)
                         (hide -2)
                         (skolem - ("CXY"))
                         (lemma
                          "bij_inv_is_bij_alt[nat, (union(X!1, Y!1))]"
                          ("f" "DXY" "g" "CXY"))
                         (("1"
                           (lemma
                            "comp_inverse_right_alt[nat, (union(X!1, Y!1))]"
                            ("f" "DXY" "g" "CXY"))
                           (lemma
                            "composition_bijective[nat,(union(X!1, Y!1)),nat]"
                            ("f1" "PHI" "f2" "CXY"))
                           (("1"
                             (lemma "abs_series_bij_limit"
                              ("a" "f!1 o DXY" "phi" "CXY o PHI"))
                             (("1"
                               (split -1)
                               (("1"
                                 (lemma
                                  "extensionality"
                                  ("f"
                                   "f!1 o DXY o (CXY o PHI)"
                                   "g"
                                   "f!1 o PHI"))
                                 (split -1)
                                 (("1"
                                   (replace -1)
                                   (replace -2)
                                   (case
                                    "forall (x:real): convergence(series(f!1 o DX),x) IFF convergence(series(LAMBDA (n:nat): if even?(n) then f!1(DX(n/2)) else 0 endif),x)")
                                   (("1"
                                     (inst - "limit(series(f!1 o DX))")
                                     (rewrite "limit_equiv" -1)
                                     (lemma
                                      "absconvergent_series_is_convergent"
                                      ("x" "f!1 o DX"))
                                     (("1"
                                       (assert)
                                       (case
                                        "forall (x:real): convergence(series(f!1 o DY),x) IFF convergence(series(LAMBDA (n:nat):IF odd?(n) THEN f!1(DY((n-1)/2)) ELSE 0 ENDIF),x)")
                                       (("1"
                                         (inst
                                          -
                                          "limit(series(f!1 o DY))")
                                         (rewrite "limit_equiv" -1)
                                         (lemma
                                          "absconvergent_series_is_convergent"
                                          ("x" "f!1 o DY"))
                                         (assert)
                                         (lemma
                                          "cnv_seq_sum"
                                          ("s1"
                                           "series(LAMBDA (n: nat):
                                                                      IF even?(n) THEN f!1(DX(n / 2)) ELSE 0 ENDIF)"
                                           "l1"
                                           "limit(series(f!1 o DX))"
                                           "s2"
                                           "series(LAMBDA (n: nat):
                                                                      IF odd?(n) THEN f!1(DY((n - 1) / 2))
                                                                      ELSE 0
                                                                      ENDIF)"
                                           "l2"
                                           "limit(series(f!1 o DY))"))
                                         (("1"
                                           (assert)
                                           (rewrite "series_sum" -1)
                                           (lemma
                                            "extensionality"
                                            ("f"
                                             "(LAMBDA (n: nat):
                                                                         IF even?(n) THEN f!1(DX(n / 2)) ELSE 0 ENDIF)
                                                                       +
                                                                       (LAMBDA (n: nat):
                                                                          IF odd?(n) THEN f!1(DY((n - 1) / 2))
                                                                          ELSE 0
                                                                          ENDIF)"
                                             "g"
                                             "f!1 o PHI"))
                                           (("1"
                                             (split -1)
                                             (("1"
                                               (replace -1)
                                               (rewrite
                                                "limit_equiv"
                                                -2))
                                              ("2"
                                               (hide-all-but 1)
                                               (expand "+")
                                               (expand "o")
                                               (expand "PHI")
                                               (skosimp)
                                               (case-replace
                                                "even?(x!1)")
                                               (("1"
                                                 (lemma
                                                  "even_iff_not_odd"
                                                  ("x" "x!1"))
                                                 (assert))
                                                ("2"
                                                 (lemma
                                                  "even_iff_not_odd"
                                                  ("x" "x!1"))
                                                 (assert))))))
                                            ("2" (propax))))
                                          ("2" (propax))))
                                        ("2"
                                         (hide-all-but 1)
                                         (skosimp)
                                         (expand "series")
                                         (case
                                          "forall (n:nat): sigma(0, n, f!1 o DY) = sigma(0,2*n+1 ,
                                                                     LAMBDA (n: nat):
                                                                       IF odd?(n) THEN f!1(DY((n - 1) / 2))
                                                                       ELSE 0
                                                                       ENDIF)")
                                         (("1"
                                           (case
                                            "FORALL (n: nat):
                                                    even?(n) =>
                                                     sigma(0, n,
                                                           (LAMBDA (n: nat):
                                                              IF odd?(n) THEN f!1(DY((n - 1) / 2)) ELSE 0 ENDIF))
                                                      = IF n = 0 THEN 0 ELSE sigma(0, n / 2-1, f!1 o DY) ENDIF")
                                           (("1"
                                             (case
                                              "FORALL (n: nat):
                                                      odd?(n) =>
                                                       sigma(0, n,
                                                             (LAMBDA (n: nat):
                                                                IF odd?(n) THEN f!1(DY((n - 1) / 2)) ELSE 0 ENDIF))
                                                        = sigma(0, (n-1)/ 2, f!1 o DY)")
                                             (("1"
                                               (expand "convergence")
                                               (split 1)
                                               (("1"
                                                 (skosimp*)
                                                 (inst - "epsilon!1")
                                                 (skosimp)
                                                 (inst + "2*n!1+1")
                                                 (skosimp)
                                                 (case "even?(i!1)")
                                                 (("1"
                                                   (inst -5 "i!1")
                                                   (assert)
                                                   (replace -5)
                                                   (inst -2 "i!1/2-1")
                                                   (("1"
                                                     (assert)
                                                     (hide-all-but
                                                      (-1 -2 1))
                                                     (expand "even?")
                                                     (propax))
                                                    ("2"
                                                     (case-replace
                                                      "i!1=0")
                                                     (("1" (assert))
                                                      ("2"
                                                       (expand "even?")
                                                       (skosimp)
                                                       (replace -1)
                                                       (assert)
                                                       (case-replace
                                                        "2 * j!1 / 2 = j!1")
                                                       (("1" (assert))
                                                        ("2"
                                                         (lemma
                                                          "div_cancel2"
                                                          ("x"
                                                           "j!1"
                                                           "n0z"
                                                           "2"))
                                                         (assert))))))))
                                                  ("2"
                                                   (rewrite
                                                    "even_iff_not_odd"
                                                    1)
                                                   (inst -4 "i!1")
                                                   (assert)
                                                   (replace -4)
                                                   (hide -5 -6 -4)
                                                   (inst - "(i!1-1)/2")
                                                   (("1"
                                                     (split -2)
                                                     (("1" (propax))
                                                      ("2" (assert))))
                                                    ("2"
                                                     (expand "odd?")
                                                     (skosimp)
                                                     (replace -1)
                                                     (assert))))))
                                                ("2"
                                                 (skosimp*)
                                                 (inst - "epsilon!1")
                                                 (skosimp)
                                                 (inst + "2*n!1+1")
                                                 (skosimp*)
                                                 (inst -5 "i!1")
                                                 (inst -1 "2*i!1+1")
                                                 (assert))))
                                              ("2"
                                               (hide-all-but (-2 1))
                                               (expand "odd?" 1 1)
                                               (skosimp*)
                                               (replace -1)
                                               (assert)
                                               (inst - "j!1")
                                               (("1" (assert))
                                                ("2"
                                                 (assert)
                                                 (case
                                                  "forall (i,j:int):i<j=>i+1<=j")
                                                 (("1"
                                                   (inst - "-1" "j!1")
                                                   (assert))
                                                  ("2"
                                                   (hide-all-but 1)
                                                   (grind))))))
                                              ("3"
                                               (hide -1 2)
                                               (skosimp*)
                                               (assert)
                                               (case
                                                "forall (i,j:int):i<j=>i+1<=j")
                                               (("1"
                                                 (assert)
                                                 (expand "odd?")
                                                 (skosimp)
                                                 (replace -2)
                                                 (assert)
                                                 (flatten)
                                                 (lemma
                                                  "trichotomy"
                                                  ("x" "j!1"))
                                                 (split -1)
                                                 (("1" (assert))
                                                  ("2" (assert))
                                                  ("3" (assert))))
                                                ("2"
                                                 (hide-all-but 1)
                                                 (grind))))
                                              ("4"
                                               (skosimp*)
                                               (hide-all-but (-2 1))
                                               (expand "odd?")
                                               (skosimp)
                                               (replace -1)
                                               (assert)
                                               (lemma
                                                "trichotomy"
                                                ("x" "j!1"))
                                               (split -1)
                                               (("1" (assert))
                                                ("2" (assert))
                                                ("3"
                                                 (case
                                                  "forall (i,j:int): i< j => i+1<=j")
                                                 (("1"
                                                   (inst - "j!1" "0")
                                                   (assert))
                                                  ("2"
                                                   (hide-all-but 1)
                                                   (grind))))))))
                                            ("2"
                                             (hide 2)
                                             (skosimp)
                                             (case-replace "n!1=0")
                                             (("1"
                                               (expand "sigma")
                                               (expand "odd?")
                                               (expand "sigma" 1)
                                               (propax))
                                              ("2"
                                               (assert)
                                               (expand "even?")
                                               (skosimp)
                                               (replace -1)
                                               (inst - "j!1-1")
                                               (("1"
                                                 (expand "sigma" 2 1)
                                                 (assert)
                                                 (lemma
                                                  "even_iff_not_odd"
                                                  ("x" "2*j!1"))
                                                 (expand "even?" -1)
                                                 (flatten -1)
                                                 (hide -2)
                                                 (split -1)
                                                 (("1" (assert))
                                                  ("2" (inst + "j!1"))))
                                                ("2" (assert))))))
                                            ("3"
                                             (expand "even?")
                                             (skosimp*)
                                             (assert)
                                             (typepred "n!1")
                                             (replace -2)
                                             (assert)
                                             (case
                                              "forall (i,j:int):i<j=>i+1<=j")
                                             (("1"
                                               (inst - "0" "j!1")
                                               (assert)
                                               (lemma
                                                "div_cancel2"
                                                ("x" "j!1" "n0z" "2"))
                                               (assert)
                                               (case-replace
                                                "2 * j!1 / 2 - 1 = j!1-1")
                                               (("1" (assert))
                                                ("2" (assert))))
                                              ("2"
                                               (hide-all-but 1)
                                               (grind))))
                                            ("4"
                                             (hide-all-but 1)
                                             (expand "odd?")
                                             (skosimp*)
                                             (replace -2)
                                             (assert)
                                             (case
                                              "forall (i,j:int):i<j=>i+1<=j")
                                             (("1"
                                               (inst - "-1" "j!1")
                                               (assert))
                                              ("2"
                                               (hide-all-but 1)
                                               (grind))))))
                                          ("2"
                                           (hide 2)
                                           (expand "o ")
                                           (induct "n")
                                           (("1"
                                             (expand "sigma")
                                             (expand "sigma")
                                             (expand "odd?")
                                             (assert))
                                            ("2"
                                             (skosimp*)
                                             (expand "sigma" 1)
                                             (expand "sigma" 1 2)
                                             (replace -1 1 rl)
                                             (expand "odd?")
                                             (assert))
                                            ("3"
                                             (expand "odd?")
                                             (skosimp*)
                                             (assert)
                                             (case
                                              "forall (i,j:int):i<j=>i+1<=j")
                                             (("1"
                                               (inst - "-1" "j!1")
                                               (assert))
                                              ("2"
                                               (hide-all-but 1)
                                               (grind))))))))
                                        ("3"
                                         (expand "odd?")
                                         (skosimp)
                                         (case
                                          "forall (i,j:int):i<j=>i+1<=j")
                                         (("1"
                                           (skosimp)
                                           (inst - "-1" "j!1")
                                           (assert))
                                          ("2"
                                           (hide-all-but 1)
                                           (grind))))))
                                      ("2" (propax))))
                                    ("2"
                                     (hide-all-but (1 -14))
                                     (skosimp*)
                                     (expand "series")
                                     (case
                                      "FORALL (n:nat):sigma(0,2*n,(LAMBDA (n: nat):
                                                        IF even?(n) THEN f!1(DX(n / 2)) ELSE 0 ENDIF))
                                                = sigma(0,n,f!1 o DX)")
                                     (("1"
                                       (case
                                        "FORALL (n: nat): even?(n) =>
                                                sigma(0, n,
                                                      (LAMBDA (n: nat):
                                                         IF even?(n) THEN f!1(DX(n / 2)) ELSE 0 ENDIF))
                                                 = sigma(0, n/2, f!1 o DX)")
                                       (("1"
                                         (case
                                          "FORALL (n: nat):
                                                  odd?(n) =>
                                                   sigma(0, n,
                                                         (LAMBDA (n: nat):
                                                            IF even?(n) THEN f!1(DX(n / 2)) ELSE 0 ENDIF))
                                                    = sigma(0, (n-1) / 2, f!1 o DX)")
                                         (("1"
                                           (expand "convergence")
                                           (split 1)
                                           (("1"
                                             (skosimp*)
                                             (inst - "epsilon!1")
                                             (skosimp)
                                             (inst + "2*n!1")
                                             (skosimp)
                                             (case "even?(i!1)")
                                             (("1"
                                               (expand "even?" -1)
                                               (skosimp)
                                               (inst - "j!1")
                                               (("1"
                                                 (assert)
                                                 (inst -5 "i!1")
                                                 (assert))
                                                ("2" (assert))))
                                              ("2"
                                               (rewrite "even_or_odd" 1)
                                               (inst -4 "i!1")
                                               (assert)
                                               (replace -4 1)
                                               (inst -2 "(i!1-1)/2")
                                               (("1"
                                                 (split -2)
                                                 (("1" (propax))
                                                  ("2"
                                                   (assert)
                                                   (hide-all-but
                                                    (-1 -2 1))
                                                   (expand "odd?")
                                                   (propax))))
                                                ("2"
                                                 (assert)
                                                 (expand "odd?")
                                                 (skosimp)
                                                 (assert))))))
                                            ("2"
                                             (skosimp*)
                                             (inst - "epsilon!1")
                                             (skosimp)
                                             (case "even?(n!1)")
                                             (("1"
                                               (expand "even?" -1)
                                               (skosimp)
                                               (replace -1)
                                               (inst + "j!1")
                                               (("1"
                                                 (skosimp)
                                                 (inst - "2*i!1")
                                                 (assert)
                                                 (inst -5 "2*i!1")
                                                 (assert))
                                                ("2" (assert))))
                                              ("2"
                                               (rewrite "even_or_odd" 1)
                                               (expand "odd?" -1)
                                               (skosimp)
                                               (replace -1)
                                               (inst + "j!1")
                                               (("1"
                                                 (skosimp)
                                                 (inst - "1+2*i!1")
                                                 (assert)
                                                 (inst -4 "1+2*i!1")
                                                 (split -4)
                                                 (("1" (assert))
                                                  ("2"
                                                   (expand "odd?")
                                                   (inst + "i!1"))))
                                                ("2" (assert))))))))
                                          ("2"
                                           (hide-all-but (-2 1))
                                           (expand "odd?")
                                           (skosimp*)
                                           (replace -1)
                                           (inst - "j!1")
                                           (("1"
                                             (assert)
                                             (expand "sigma" 1 1)
                                             (replace -2)
                                             (assert)
                                             (case
                                              "forall (i,j:int):i<j=>i+1<=j")
                                             (("1"
                                               (inst - "-1" "j!1")
                                               (assert)
                                               (lift-if 1)
                                               (assert)
                                               (rewrite "even_or_odd" 1))
                                              ("2"
                                               (hide-all-but 1)
                                               (grind))))
                                            ("2"
                                             (case
                                              "forall (i,j:int):i<j=>i+1<=j")
                                             (("1"
                                               (inst - "-1" "j!1")
                                               (assert))
                                              ("2"
                                               (hide-all-but 1)
                                               (grind))))))
                                          ("3"
                                           (expand "odd?")
                                           (skosimp*)
                                           (assert)
                                           (case
                                            "forall (i,j:int):i<j=>i+1<=j")
                                           (("1"
                                             (inst - "-1" "j!1")
                                             (assert))
                                            ("2"
                                             (hide-all-but 1)
                                             (grind))))
                                          ("4"
                                           (expand "even?")
                                           (skosimp*)
                                           (case
                                            "forall (i,j:int):i<j=>i+1<=j")
                                           (("1"
                                             (inst - "-1" "j!1")
                                             (assert))
                                            ("2"
                                             (hide-all-but 1)
                                             (grind))))))
                                        ("2"
                                         (hide-all-but (-1 1))
                                         (expand "even?" 1 1)
                                         (skosimp*)
                                         (inst - "j!1")
                                         (("1" (assert)) ("2" (assert))))
                                        ("3"
                                         (expand "even?")
                                         (skosimp*)
                                         (assert))
                                        ("4"
                                         (expand "even?")
                                         (skosimp*)
                                         (assert))))
                                      ("2"
                                       (hide-all-but 1)
                                       (induct "n")
                                       (("1"
                                         (expand "o")
                                         (expand "sigma")
                                         (assert))
                                        ("2"
                                         (skosimp*)
                                         (expand "sigma" 1)
                                         (expand "o")
                                         (assert)
                                         (expand "sigma" 1 1)
                                         (replace -1 1)
                                         (assert)
                                         (lift-if 1)
                                         (prop)
                                         (("1" (expand "even?") (propax))
                                          ("2"
                                           (rewrite "even_or_odd" 1)
                                           (assert))))
                                        ("3"
                                         (expand "even?")
                                         (skosimp*)
                                         (assert))))
                                      ("3"
                                       (skosimp*)
                                       (assert)
                                       (expand "even?")
                                       (propax))))
                                    ("3" (expand "even?") (propax))))
                                  ("2"
                                   (expand "o")
                                   (skosimp)
                                   (inst -3 "PHI(x!1)")
                                   (assert))))
                                ("2"
                                 (expand "absconvergent?")
                                 (propax))))
                              ("2" (propax))))
                            ("2" (propax)) ("3" (propax))))
                          ("2" (propax))))
                        ("2" (propax))))
                      ("2"
                       (hide-all-but (-2 -3 -5 -6 -12 1))
                       (expand "bijective?")
                       (expand "PHI")
                       (flatten)
                       (split 1)
                       (("1"
                         (expand "injective?")
                         (skosimp*)
                         (case-replace "even?(x1!1)")
                         (("1"
                           (case-replace "even?(x2!1)")
                           (("1"
                             (inst -8 "x1!1/2" "x2!1/2")
                             (("1" (assert))
                              ("2" (inst -5 "x2!1") (assert))
                              ("3" (inst -5 "x1!1") (assert))))
                            ("2"
                             (expand "disjoint?")
                             (expand "intersection")
                             (expand "empty?")
                             (expand "member")
                             (assert)
                             (inst -9 "DX(x1!1/2)")
                             (("1" (assert))
                              ("2" (inst -4 "x1!1") (assert))))))
                          ("2"
                           (case-replace "even?(x2!1)")
                           (("1"
                             (assert)
                             (expand "disjoint?")
                             (expand "intersection")
                             (expand "empty?")
                             (expand "member")
                             (inst -4 "x2!1")
                             (assert)
                             (typepred "DX(x2!1 / 2)")
                             (inst -10 "DX(x2!1 / 2)")
                             (assert))
                            ("2"
                             (assert)
                             (inst-cp - "x1!1")
                             (inst - "x2!1")
                             (assert)
                             (flatten)
                             (inst -7 "(x1!1 - 1) / 2" "(x2!1 - 1) / 2")
                             (("1" (assert)) ("2" (assert))
                              ("3" (assert))))))))
                        ("2"
                         (expand "surjective?")
                         (skosimp*)
                         (typepred "y!1")
                         (expand "union")
                         (expand "member")
                         (split -1)
                         (("1"
                           (inst -7 "y!1")
                           (skosimp)
                           (inst + "2*x!1")
                           (assert))
                          ("2"
                           (inst -5 "y!1")
                           (skosimp)
                           (inst + "2*x!1+1")
                           (assert)
                           (lemma "div_cancel2" ("x" "x!1" "n0z" "2"))
                           (lift-if 1)
                           (assert)
                           (prop)
                           (expand "even?")
                           (propax))))))
                      ("3"
                       (expand "PHI")
                       (expand "union")
                       (expand "member")
                       (propax))))
                    ("2" (propax))
                    ("3" (skosimp) (inst -3 "n!1") (assert))))
                  ("2"
                   (hide-all-but 1)
                   (skosimp)
                   (rewrite "even_or_odd")
                   (expand "odd?")
                   (skosimp)
                   (replace -1)
                   (assert)
                   (case "forall (i,j:int):i<j=>i+1<=j")
                   (("1" (inst - "-1" "j!1") (assert))
                    ("2" (hide-all-but 1) (grind))))))
                ("2"
                 (hide-all-but 1)
                 (expand "even?")
                 (skosimp*)
                 (assert))))
              ("2" (propax))))
            ("2" (hide-all-but 1) (grind))))
          ("2" (hide-all-but 1) (grind))))))))
    ("2"
     (hide 2)
     (skosimp*)
     (typepred "X!1")
     (typepred "Y!1")
     (typepred "f!1")
     (case-replace "X!1=emptyset[T]")
     (("1"
       (rewrite "sigma_empty" 1)
       (rewrite "union_commutative" 1)
       (rewrite "union_empty" 1)
       (assert))
      ("2"
       (rewrite "emptyset_is_empty?" 1 :dir rl)
       (rewrite "countably_infinite_def")
       (flatten)
       (lemma "infinite_union_right" ("S" "X!1" "Inf" "Y!1"))
       (expand "convergent?")
       (assert)
       (expand "sigma")
       (assert)
       (lemma "infinite_nonempty[T]" ("x" "Y!1"))
       (lemma "infinite_nonempty[T]" ("x" "union(X!1,Y!1)"))
       (expand "nonempty?")
       (assert)
       (lemma "convergent_subset"
        ("X" "Y!1" "Y" "union(X!1,Y!1)" "g" "f!1"))
       (split -1)
       (("1"
         (expand "convergent?")
         (lemma "denumerable_enumeration_bij" ("X" "union(X!1,Y!1)"))
         (lemma "denumerable_enumeration_bij" ("X" "Y!1"))
         (lemma "finite_enumeration_bij" ("X" "X!1"))
         (name-replace "DX" "finite_enumeration(X!1)")
         (name-replace "DY" "denumerable_enumeration(Y!1)")
         (name-replace "DXY" "denumerable_enumeration(union(X!1,Y!1))")
         (lemma "nonempty_card" ("S" "X!1"))
         (expand "nonempty?")
         (hide 1 2)
         (name "PHI"
               "LAMBDA (n:nat): IF n<card(X!1) THEN DX(n) ELSE DY(n-card(X!1)) ENDIF")
         (("1"
           (case "bijective?[nat, (union(X!1, Y!1))](PHI)")
           (("1"
             (lemma "bijective_inverse_exists[nat, (union(X!1, Y!1))]"
              ("f" "DXY"))
             (("1"
               (expand "exists1")
               (flatten)
               (hide -2)
               (skolem - ("CXY"))
               (lemma "bij_inv_is_bij_alt[nat, (union(X!1, Y!1))]"
                ("f" "DXY" "g" "CXY"))
               (("1"
                 (lemma "comp_inverse_right_alt[nat, (union(X!1, Y!1))]"
                  ("f" "DXY" "g" "CXY"))
                 (lemma
                  "composition_bijective[nat,(union(X!1, Y!1)),nat]"
                  ("f1" "PHI" "f2" "CXY"))
                 (("1"
                   (lemma "abs_series_bij_limit"
                    ("a" "f!1 o DXY" "phi" "CXY o PHI"))
                   (("1"
                     (split -1)
                     (("1"
                       (lemma "extensionality"
                        ("f" "f!1 o DXY o (CXY o PHI)" "g" "f!1 o PHI"))
                       (split -1)
                       (("1"
                         (replace -1)
                         (replace -2)
                         (lemma "limit_series_shift"
                          ("a" "f!1 o PHI" "pn" "card(X!1)"))
                         (("1"
                           (split -1)
                           (("1"
                             (replace -1)
                             (expand "o" 4)
                             (expand "PHI" 4)
                             (hide-all-but (4 -17 -10))
                             (case "forall (n:nat): n < card(X!1) => sigma(0,n,
                                               LAMBDA (x: nat):
                                                 IF x < card(X!1) THEN f!1(DX(x))
                                                 ELSE f!1(DY(x - card(X!1)))
                                                 ENDIF)
                                          =
                                          sigma[below[card(X!1)]]
                                              (0, n, LAMBDA (x: below[card(X!1)]): f!1(DX(x)))")
                             (("1"
                               (inst - "card(X!1)-1")
                               (("1" (assert)) ("2" (assert))))
                              ("2"
                               (hide 2)
                               (induct "n")
                               (("1"
                                 (expand "sigma")
                                 (assert)
                                 (expand "sigma" 1)
                                 (propax))
                                ("2"
                                 (skosimp*)
                                 (expand "sigma" 1)
                                 (assert))
                                ("3" (skosimp*) (assert))
                                ("4" (skosimp*))
                                ("5" (skosimp*) (assert))
                                ("6" (skosimp*) (assert))))
                              ("3" (skosimp*) (assert)) ("4" (skosimp*))
                              ("5" (skosimp*) (assert))))
                            ("2"
                             (lemma "abs_series_bij_conv"
                              ("a" "f!1 o DXY" "phi" "CXY o PHI"))
                             (replace -2 -1)
                             (expand "absconvergent?")
                             (replace -15)
                             (propax))))
                          ("2" (propax))))
                        ("2"
                         (skosimp)
                         (inst -3 "PHI(x!1)")
                         (("1" (hide-all-but (-3 1)) (grind))
                          ("2"
                           (expand "PHI")
                           (assert)
                           (expand "union")
                           (expand "member")
                           (propax))))))
                      ("2" (expand "absconvergent?") (propax))))
                    ("2" (propax))))
                  ("2" (propax)) ("3" (propax))))
                ("2" (propax))))
              ("2" (propax))))
            ("2"
             (hide-all-but (-2 -9 1 -3 -4 -10))
             (expand "bijective?")
             (flatten)
             (expand "PHI")
             (split)
             (("1"
               (expand "injective?")
               (skosimp*)
               (expand "disjoint?")
               (expand "intersection")
               (expand "empty?")
               (expand "member")
               (case-replace "x1!1 < card(X!1)")
               (("1"
                 (case-replace "x2!1 < card(X!1)")
                 (("1" (inst -5 "x1!1" "x2!1") (assert))
                  ("2" (assert) (inst -9 "DX(x1!1)") (assert))))
                ("2"
                 (case-replace "x2!1 < card(X!1)")
                 (("1" (inst -9 "DX(x2!1)") (assert))
                  ("2"
                   (assert)
                   (inst -5 "x1!1 - card(X!1)" "x2!1 - card(X!1)")
                   (assert))))))
              ("2"
               (expand "surjective?")
               (skosimp*)
               (typepred "y!1")
               (expand "disjoint?")
               (expand "intersection")
               (expand "union")
               (expand "empty?")
               (expand "member")
               (split -1)
               (("1" (inst -4 "y!1") (skosimp) (inst + "x!1") (assert))
                ("2"
                 (inst -6 "y!1")
                 (skosimp)
                 (inst + "x!1+card(X!1)")
                 (assert))))))
            ("3"
             (expand "PHI")
             (expand "union")
             (expand "member")
             (propax))))
          ("2" (skosimp*) (assert))))
        ("2" (hide-all-but 1) (grind))
        ("3" (expand "convergent?") (propax))))))
    ("3"
     (hide-all-but 1)
     (skosimp)
     (typepred "f!1")
     (lemma "convergent_subset"
      ("g" "f!1" "X" "Y!1" "Y" "union(X!1,Y!1)"))
     (assert)
     (hide-all-but 1)
     (grind))
    ("4"
     (skosimp)
     (typepred "f!1")
     (lemma "convergent_subset"
      ("g" "f!1" "X" "X!1" "Y" "union(X!1,Y!1)"))
     (assert)
     (hide-all-but 1)
     (typepred "Y!1")
     (rewrite "countably_infinite_def")
     (expand "subset?")
     (expand "union")
     (expand "member")
     (skosimp))))


proof_type: f_proof
decl_type: formula
library: sigma_set
theory: sigma_countable
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (rewrite "union_difference")
   (case "union(difference(Y!1, X!1), intersection(X!1, Y!1)) = Y!1")
   (("1"
     (lemma "sigma_disjoint_union"
      ("X"
       "difference(Y!1, X!1)"
       "Y"
       "intersection(X!1, Y!1)"
       "f"
       "f!1"))
     (("1"
       (case-replace
        "disjoint?(difference(Y!1, X!1), intersection(X!1, Y!1))")
       (("1"
         (replace -3 -2)
         (replace -2 1)
         (assert)
         (hide-all-but 1)
         (lemma "sigma_disjoint_union"
          ("X" "X!1" "Y" "difference(Y!1, X!1)" "f" "f!1"))
         (assert)
         (hide-all-but 1)
         (grind))
        ("2" (hide-all-but 1) (grind))))
      ("2"
       (replace -1)
       (lemma "convergent_subset"
        ("X" "Y!1" "Y" "union(X!1,Y!1)" "g" "f!1"))
       (typepred "f!1")
       (assert)
       (hide-all-but 1)
       (grind))))
    ("2" (hide-all-but 1) (apply-extensionality :hide? t) (grind))))


proof_type: f_proof
decl_type: formula
library: sigma_set
theory: sigma_countable
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (case "forall (X,Y:set[T]): disjoint?(difference(X,Y),intersection(X,Y)) & union(difference(X,Y),intersection(X,Y)) = X")
   (("1"
     (skosimp)
     (inst-cp - "X!1" "Y!1")
     (inst - "Y!1" "X!1")
     (rewrite "intersection_commutative" -1)
     (flatten)
     (lemma "convergent_subset" ("Y" "union(X!1,Y!1)" "g" "f!1"))
     (inst-cp - "X!1")
     (inst - "Y!1")
     (typepred "f!1")
     (assert)
     (split)
     (("1"
       (split)
       (("1"
         (lemma "sigma_disjoint_union"
          ("f"
           "f!1"
           "X"
           "difference(Y!1, X!1)"
           "Y"
           "intersection(X!1, Y!1)"))
         (("1"
           (lemma "sigma_disjoint_union"
            ("f"
             "f!1"
             "X"
             "difference(X!1, Y!1)"
             "Y"
             "intersection(X!1, Y!1)"))
           (("1" (assert)) ("2" (replace -8) (propax))))
          ("2" (replace -5) (propax))))
        ("2" (hide-all-but 1) (grind))))
      ("2" (hide-all-but 1) (grind))))
    ("2"
     (hide-all-but 1)
     (skosimp*)
     (split)
     (("1" (grind)) ("2" (apply-extensionality :hide? t) (grind))))))


proof_type: f_proof
decl_type: formula
library: sigma_set
theory: sigma_countable
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (lemma "sigma_difference" ("f" "f!1" "X" "X!1" "Y" "Y!1"))
   (("1"
     (lemma "difference_subset2" ("a" "X!1" "b" "Y!1"))
     (lemma "sigma_empty" ("g" "f!1"))
     (assert))
    ("2"
     (lemma "union_subset2" ("a" "X!1" "b" "Y!1"))
     (typepred "f!1")
     (assert))))


proof_type: f_proof
decl_type: formula
library: sigma_set
theory: sigma_countable
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (case-replace "member(t!1, X!1)")
   (("1" (lemma "member_add" ("x" "t!1" "a" "X!1")) (assert))
    ("2"
     (assert)
     (lemma "add_as_union" ("x" "t!1" "a" "X!1"))
     (replace -1)
     (lemma "sigma_disjoint_union"
      ("f" "f!1" "X" "X!1" "Y" "singleton(t!1)"))
     (("1"
       (split -1)
       (("1" (replace -1) (rewrite "sigma_singleton") (assert))
        ("2"
         (hide -1 3)
         (expand "singleton")
         (expand "disjoint?")
         (expand "intersection")
         (expand "empty?")
         (expand "member")
         (skosimp)
         (assert))))
      ("2"
       (lemma "finite_countable" ("x" "singleton[T](t!1)"))
       (propax))))))


proof_type: f_proof
decl_type: formula
library: sigma_set
theory: sigma_countable
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (case-replace "member(t!1, X!1)")
   (("1"
     (lemma "add_remove_member" ("x" "t!1" "a" "X!1"))
     (assert)
     (lemma "sigma_add" ("f" "f!1" "t" "t!1" "X" "remove(t!1, X!1)"))
     (replace -2 -1)
     (expand "remove" -1 1)
     (expand "member" -1 1)
     (replace -1 1)
     (assert))
    ("2"
     (assert)
     (case-replace "remove(t!1, X!1)=X!1")
     (hide 3)
     (apply-extensionality :hide? t)
     (expand "remove")
     (expand "member")
     (assert)
     (case-replace "x!1=t!1")
     (("1" (assert)) ("2" (assert))))))


proof_type: f_proof
decl_type: formula
library: sigma_set
theory: sigma_countable
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (typepred "X!1")
   (expand "nonempty_countable?")
   (flatten)
   (lemma "choose_rest" ("a" "X!1"))
   (split -1)
   (("1"
     (lemma "sigma_add" ("f" "f!1" "t" "choose(X!1)" "X" "rest(X!1)"))
     (replace -2)
     (lemma "choose_not_member" ("a" "X!1"))
     (split -1)
     (("1" (assert)) ("2" (expand "nonempty?") (propax))))
    ("2" (expand "nonempty?") (propax))))


proof_type: f_proof
decl_type: formula
library: sigma_set
theory: sigma_countable
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "sigma")
   (case-replace "empty?(X!1)")
   (replace 1 2)
   (expand "o")
   (case-replace "is_finite(X!1)")
   (("1"
     (lemma "sigma_zero[below[card(X!1)]]"
      ("low" "0" "high" "card(X!1) - 1"))
     (("1" (propax)) ("2" (hide 3) (skosimp) (assert))))
    ("2" (replace 1) (rewrite "zero_series_limit"))))


proof_type: f_proof
decl_type: formula
library: sigma_set
theory: sigma_countable
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "sigma")
   (case-replace "empty?(X!1)")
   (("1" (assert))
    ("2"
     (assert)
     (case-replace "is_finite(X!1)")
     (("1"
       (name-replace "FE" "finite_enumeration(X!1)")
       (lemma "sigma_scal[below[card(X!1)]]"
        ("low" "0" "high" "card(X!1) - 1" "F" "f!1 o FE" "a" "a!1"))
       (("1" (replace -1 2 rl) (expand "o") (expand "*") (propax))
        ("2" (skosimp) (assert))))
      ("2"
       (assert)
       (name-replace "DE" "denumerable_enumeration(X!1)")
       (lemma "series_scal" ("c" "a!1" "a" "f!1 o DE"))
       (expand "o")
       (expand "*")
       (replace -1 3 rl)
       (hide -1)
       (name-replace "SERIES" "series(LAMBDA (x_1: nat): f!1(DE(x_1)))")
       (rewrite "limit_scal" * :dir rl)
       (expand "*")
       (propax))))))


proof_type: f_proof
decl_type: formula
library: sigma_set
theory: sigma_countable
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "sigma_scal" ("X" "X!1" "f" "f!1" "a" "-1"))
   (case-replace "-1 * f!1=-f!1")
   (("1" (assert))
    ("2"
     (hide-all-but 1)
     (apply-extensionality :hide? t)
     (expand "*")
     (expand "-")
     (assert))))


proof_type: f_proof
decl_type: formula
library: sigma_set
theory: sigma_countable
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "sigma")
   (case-replace "empty?(X!1)")
   (("1" (assert))
    ("2"
     (replace 1)
     (case-replace "is_finite(X!1)")
     (("1"
       (name-replace "FE" "finite_enumeration(X!1)")
       (expand "o")
       (expand "+")
       (lemma "sigma_sum[below[card(X!1)]]"
        ("low"
         "0"
         "high"
         "card(X!1) - 1"
         "F"
         "LAMBDA (x: below[card(X!1)]): f!1(FE(x))"
         "G"
         "LAMBDA (x: below[card(X!1)]): g!1(FE(x))"))
       (("1" (assert)) ("2" (hide 3) (skosimp) (assert))))
      ("2"
       (replace 1)
       (name-replace "DE" "denumerable_enumeration(X!1)")
       (lemma "series_sum" ("a" "f!1 o DE" "b" "g!1 o DE"))
       (rewrite "limit_sum" * :dir rl)
       (replace -1)
       (hide -1)
       (expand "o ")
       (expand "+")
       (propax))))))


proof_type: f_proof
decl_type: formula
library: sigma_set
theory: sigma_countable
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "sigma_opp" ("X" "X!1" "f" "g!1"))
   (lemma "sigma_plus" ("X" "X!1" "f" "f!1" "g" "-g!1"))
   (case-replace "f!1 + -g!1=f!1 - g!1")
   (("1" (assert))
    ("2"
     (hide-all-but 1)
     (apply-extensionality :hide? t)
     (expand "-")
     (expand "+")
     (assert))))


proof_type: f_proof
decl_type: formula
library: sigma_set
theory: sigma_countable
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "sigma")
   (case-replace "empty?(X!1)")
   (("1" (assert))
    ("2"
     (assert)
     (case-replace "is_finite(X!1)")
     (("1"
       (lemma "sigma_ge_0[below[card(X!1)]]"
        ("low"
         "0"
         "high"
         "card(X!1) - 1"
         "F"
         "f!1 o finite_enumeration(X!1)"))
       (("1"
         (split -1)
         (("1" (propax))
          ("2"
           (skosimp)
           (expand "o")
           (inst - "finite_enumeration(X!1)(n!1)"))))
        ("2" (skosimp) (assert))))
      ("2"
       (assert)
       (lemma "limit_order"
        ("s1"
         "lambda (n:nat):0"
         "l1"
         "0"
         "s2"
         "series(f!1 o denumerable_enumeration(X!1))"))
       (typepred "f!1")
       (expand "convergent?")
       (lemma "absconvergent_series_is_convergent")
       (inst - "f!1 o denumerable_enumeration(X!1)")
       (hide -2)
       (expand "convergent?")
       (skosimp)
       (inst - "l!1")
       (replace -1)
       (split)
       (("1" (rewrite "limit_def" - :dir rl) (assert))
        ("2"
         (hide-all-but 1)
         (expand "convergence")
         (skosimp)
         (inst + "0")
         (skosimp)
         (expand "abs")
         (assert))
        ("3"
         (hide-all-but (-2 1))
         (skosimp)
         (case "forall (n:nat): (f!1 o denumerable_enumeration(X!1))(n) >= 0")
         (("1"
           (hide -2)
           (name-replace "FF" "f!1 o denumerable_enumeration(X!1)")
           (expand "series")
           (lemma "sigma_ge_0" ("low" "0" "high" "n!1" "F" "FF"))
           (assert)
           (skosimp)
           (inst - "n!2"))
          ("2"
           (skosimp)
           (expand "o")
           (inst - "denumerable_enumeration(X!1)(n!2)"))))))))))


proof_type: f_proof
decl_type: formula
library: sigma_set
theory: sigma_countable
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "sigma")
   (typepred "X!1")
   (expand "nonempty_countable?")
   (flatten)
   (expand "nonempty?")
   (assert)
   (case-replace "is_finite(X!1)")
   (("1"
     (lemma "sigma_gt_0[below[card(X!1)]]"
      ("low"
       "0"
       "high"
       "card(X!1) - 1"
       "F"
       "f!1 o finite_enumeration(X!1)"))
     (("1"
       (assert)
       (lemma "nonempty_card[T]" ("S" "X!1"))
       (expand "nonempty?")
       (assert)
       (skosimp)
       (expand "o" 1)
       (inst - "finite_enumeration(X!1)(n!1)"))
      ("2" (skosimp) (assert))))
    ("2"
     (assert)
     (typepred "f!1")
     (expand "convergent?")
     (lemma "absconvergent_series_is_convergent")
     (inst - "f!1 o denumerable_enumeration(X!1)")
     (hide -2 -3)
     (expand "convergent?")
     (skosimp)
     (case "forall (n:nat): (f!1 o denumerable_enumeration(X!1))(n)>0")
     (("1"
       (name-replace "FF" "f!1 o denumerable_enumeration(X!1)")
       (hide -3 1 2)
       (lemma "limit_order"
        ("s1"
         "lambda (n:nat): FF(0)"
         "l1"
         "FF(0)"
         "s2"
         "series(FF)"
         "l2"
         "l!1"))
       (replace -3)
       (split -1)
       (("1" (rewrite "limit_def" - :dir rl) (inst - "0") (assert))
        ("2"
         (hide-all-but 1)
         (expand "convergence")
         (expand "abs")
         (propax))
        ("3"
         (skosimp)
         (expand "series")
         (hide -2 2)
         (lemma "sigma_split" ("low" "0" "z" "0" "high" "n!1" "F" "FF"))
         (assert)
         (expand "sigma" -1 2)
         (case-replace "n!1=0")
         (("1" (expand "sigma") (assert))
          ("2"
           (lemma "sigma.sigma_ge_0")
           (lemma "sigma.sigma_ge_0" ("low" "1" "high" "n!1" "F" "FF"))
           (split -1)
           (("1" (assert)) ("2" (skosimp) (inst -3 "n!2") (assert))))))))
      ("2"
       (hide-all-but (-2 1))
       (skosimp)
       (expand "o")
       (inst - "denumerable_enumeration(X!1)(n!1)"))))))


proof_type: f_proof
decl_type: formula
library: sigma_set
theory: sigma_countable
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "sigma_ge_0" ("X" "X!1" "f" "abs(f!1)-f!1"))
   (("1"
     (split -1)
     (("1"
       (lemma "sigma_diff" ("X" "X!1" "f" "abs(f!1)" "g" "f!1"))
       (replace -1)
       (hide -1)
       (lemma "sigma_ge_0" ("X" "X!1" "f" "abs(f!1)+f!1"))
       (("1"
         (split -1)
         (("1"
           (lemma "sigma_plus" ("X" "X!1" "f" "abs(f!1)" "g" "f!1"))
           (replace -1)
           (hide -1)
           (name-replace "SigA" "sigma(X!1, abs(f!1))")
           (name-replace "Sig" "sigma(X!1, f!1)")
           (grind))
          ("2" (hide -1 2) (grind))))
        ("2"
         (typepred "f!1")
         (lemma "convergent_abs" ("X" "X!1" "g" "f!1"))
         (assert)
         (lemma "convergent_plus" ("X" "X!1" "f" "abs(f!1)" "g" "f!1"))
         (assert))))
      ("2" (skosimp) (hide 2) (grind))))
    ("2"
     (hide 2)
     (typepred "f!1")
     (lemma "convergent_abs" ("X" "X!1" "g" "f!1"))
     (assert)
     (lemma "convergent_diff" ("X" "X!1" "f" "abs(f!1)" "g" "f!1"))
     (assert))))


proof_type: f_proof
decl_type: formula
library: sigma_set
theory: sigma_countable
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "sigma")
   (case-replace "empty?(X!1)")
   (assert)
   (case-replace "is_finite(X!1)")
   (("1"
     (lemma "sigma_eq[below[card(X!1)]]"
      ("low"
       "0"
       "high"
       "card(X!1) - 1"
       "F"
       "f!1 o finite_enumeration(X!1)"
       "G"
       "g!1 o finite_enumeration(X!1)"))
     (("1"
       (split -1)
       (("1" (propax))
        ("2"
         (skosimp)
         (expand "o")
         (inst - "finite_enumeration(X!1)(n!1)"))))
      ("2" (skosimp) (assert))))
    ("2"
     (assert)
     (case-replace
      "f!1 o denumerable_enumeration(X!1) =g!1 o denumerable_enumeration(X!1)")
     (apply-extensionality :hide? t)
     (expand "o")
     (inst - "denumerable_enumeration(X!1)(x!1)"))))


proof_type: f_proof
decl_type: formula
library: sigma_set
theory: sigma_countable
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "sigma_ge_0" ("X" "X!1" "f" "g!1-f!1"))
   (("1"
     (split -1)
     (("1" (lemma "sigma_diff" ("X" "X!1" "f" "g!1" "g" "f!1")) (assert))
      ("2" (skosimp) (inst - "t!1") (expand "-") (assert))))
    ("2"
     (lemma "convergent_diff" ("X" "X!1" "f" "g!1" "g" "f!1"))
     (assert))))


proof_type: f_proof
decl_type: formula
library: sigma_set
theory: sigma_countable
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "sigma_gt_0" ("X" "X!1" "f" "g!1-f!1"))
   (("1"
     (split)
     (("1" (lemma "sigma_diff" ("X" "X!1" "f" "g!1" "g" "f!1")) (assert))
      ("2" (skosimp) (expand "-") (inst - "t!1") (assert))))
    ("2"
     (lemma "convergent_diff" ("X" "X!1" "f" "g!1" "g" "f!1"))
     (assert))))


proof_type: f_proof
decl_type: formula
library: sigma_set
theory: sigma_countable
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (typepred "f!1")
   (typepred "phi!1")
   (expand "o" 1)
   (expand "extend" 1)
   (expand "sigma")
   (case-replace "empty?(X!1)")
   (assert)
   (case-replace "is_finite(X!1)")
   (("1"
     (lemma "sigma_bijection[below[card(X!1)]]")
     (("1"
       (lemma "nonempty_card[T]" ("S" "X!1"))
       (expand "nonempty?" -1)
       (inst - "_" "card(X!1) - 1" "0")
       (("1"
         (assert)
         (lemma "finite_enumeration_bij" ("X" "X!1"))
         (lemma "finite_enumeration_image" ("X" "X!1"))
         (name-replace "PHI" "finite_enumeration(X!1)")
         (inst - "f!1 o PHI")
         (expand "o" 2 1)
         (case "forall (n:below[card(X!1)]): sigma[subrange_T[below[card(X!1)]](0, card(X!1) - 1)]
                           (0, n,
                            restrict
                                [below[card(X!1)],
                                 subrange_T[below[card(X!1)]](0, card(X!1) - 1), real]
                                (f!1 o PHI)) = sigma[below[card(X!1)]](0, n, f!1 o PHI)")
         (("1"
           (inst - "card(X!1) - 1")
           (replace -1)
           (hide -1)
           (name-replace "RHS"
            "sigma[below[card(X!1)]](0, card(X!1) - 1, f!1 o PHI)")
           (lemma "bij_inv_is_bij[below[card(X!1)], (X!1)]" ("f" "PHI"))
           (("1"
             (assert)
             (lemma "composition_bijective[below[card(X!1)],(X!1),(X!1)]"
              ("f1" "PHI" "f2" "phi!1"))
             (lemma
              "composition_bijective[below[card(X!1)],(X!1),below[card(X!1)]]"
              ("f1"
               "phi!1 o PHI"
               "f2"
               "inverse[below[card(X!1)], (X!1)](PHI)"))
             (("1"
               (expand "o" -1)
               (case "exists (phi:
                                     (bijective?
                                          [subrange_T[below[card(X!1)]](0, card(X!1) - 1),
                                           subrange_T[below[card(X!1)]](0, card(X!1) - 1)])): forall (n:subrange_T[below[card(X!1)]](0, card(X!1) - 1)): PHI(phi(n))= phi!1(PHI(n))")
               (("1"
                 (skosimp)
                 (inst -8 "phi!2")
                 (case "forall (n:below[card(X!1)]): sigma[subrange_T[below[card(X!1)]](0, card(X!1) - 1)]
                                  (0,n, f!1 o PHI o phi!2)=sigma[below[card(X!1)]]
                                 (0,n,
                                  LAMBDA (x: below[card(X!1)]): f!1(phi!1(PHI(x))))")
                 (("1" (inst - "card(X!1) - 1") (replace -1) (assert))
                  ("2"
                   (hide-all-but (-1 1 2 -7))
                   (induct "n")
                   (("1"
                     (expand "sigma")
                     (expand "sigma")
                     (expand "o")
                     (inst - "0")
                     (assert))
                    ("2"
                     (skosimp*)
                     (expand "sigma" 1)
                     (replace -2)
                     (assert)
                     (expand "o" 1)
                     (inst - "1+jb!1")
                     (assert))
                    ("3" (hide-all-but 1) (grind))
                    ("4" (hide-all-but 1) (grind))))))
                ("2"
                 (hide -7 3)
                 (inst +
                  "lambda (n:subrange_T[below[card(X!1)]](0, card(X!1) - 1)): inverse[below[card(X!1)], (X!1)](PHI)(phi!1(PHI(n)))")
                 (("1"
                   (skosimp)
                   (typepred "n!1")
                   (lemma "comp_inverse_right[below[card(X!1)], (X!1)]"
                    ("f" "PHI" "y" "phi!1(PHI(n!1))"))
                   (propax))
                  ("2"
                   (hide-all-but (-1 1))
                   (expand "bijective?")
                   (flatten)
                   (split)
                   (("1"
                     (hide -2)
                     (expand "injective?")
                     (skosimp*)
                     (typepred "x1!1")
                     (typepred "x2!1")
                     (inst - "x1!1" "x2!1")
                     (assert))
                    ("2"
                     (hide -1)
                     (expand "surjective?")
                     (skosimp)
                     (typepred "y!1")
                     (inst - "y!1")
                     (skosimp)
                     (typepred "x!1")
                     (inst + "x!1"))))
                  ("3" (skosimp) (assert)) ("4" (skosimp) (inst + "0"))
                  ("5" (hide-all-but 1) (grind))))
                ("3" (hide-all-but 1) (grind))))
              ("2" (propax))))
            ("2" (inst + "0"))))
          ("2"
           (hide -4 3)
           (induct "n")
           (("1"
             (expand "sigma")
             (expand "sigma")
             (expand "restrict")
             (propax))
            ("2"
             (skosimp*)
             (expand "sigma" 1)
             (replace -2)
             (assert)
             (expand "restrict")
             (propax))
            ("3" (hide-all-but 1) (grind))
            ("4" (hide-all-but 1) (grind))))
          ("3" (hide-all-but 1) (grind)) ("4" (hide-all-but 1) (grind))))
        ("2" (assert)) ("3" (assert))))
      ("2" (skosimp) (typepred "y!1") (typepred "x!1") (assert))))
    ("2"
     (expand "convergent?")
     (assert)
     (expand "o")
     (expand "absconvergent?")
     (lemma "denumerable_enumeration_bij" ("X" "X!1"))
     (("1"
       (name-replace "PHI" "denumerable_enumeration(X!1)")
       (lemma "bij_inv_is_bij[nat, (X!1)]" ("f" "PHI"))
       (assert)
       (lemma "abs_series_bij_limit"
        ("a"
         "LAMBDA (x: nat): f!1(PHI(x))"
         "phi"
         "lambda n: inverse(PHI)(phi!1(PHI(n)))"))
       (("1"
         (assert)
         (expand "o" -1)
         (case-replace
          "(LAMBDA (x_1: nat):
                                f!1(PHI(inverse(PHI)(phi!1(PHI(x_1))))))=(LAMBDA (x: nat): f!1(phi!1(PHI(x))))")
         (("1" (assert))
          ("2"
           (hide -1 4)
           (apply-extensionality :hide? t)
           (lemma "comp_inverse_right[nat, (X!1)]"
            ("f" "PHI" "y" "phi!1(PHI(x!1))"))
           (replace -1)
           (propax))))
        ("2"
         (hide-all-but (-1 -3 -2 1 3))
         (lemma "composition_bijective[nat,(X!1),(X!1)]"
          ("f1" "PHI" "f2" "phi!1"))
         (lemma "composition_bijective[nat,(X!1),nat]"
          ("f1" "phi!1 o PHI" "f2" "inverse[nat, (X!1)](PHI)"))
         (("1" (expand "o") (propax)) ("2" (propax))))))
      ("2" (rewrite "countably_infinite_def"))))))


proof_type: f_proof
decl_type: formula
library: sigma_set
theory: sigma_countable
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (case "forall (f:[T->nnreal],X: countable_set[T]): convergent?(X)(f) => sigma(X, f) =
                   sup({nnx | EXISTS (F:finite_set[T]): subset?(F, X) AND nnx = sigma(F, f)})")
   (("1"
     (skosimp*)
     (inst - "lambda t: if X!1(t) then f!1(t) else 0 endif" "X!1")
     (split -1)
     (("1"
       (lemma "sigma_eq"
        ("X"
         "X!1"
         "f"
         "LAMBDA t: IF X!1(t) THEN f!1(t) ELSE 0 ENDIF"
         "g"
         "f!1"))
       (("1"
         (split -1)
         (("1"
           (replace -1)
           (hide -1)
           (replace -1 1)
           (hide -1)
           (lemma "extensionality_postulate"
            ("f"
             "{nnx |
                          EXISTS (F:finite_set[T]):
                            subset?(F, X!1) AND
                             nnx =
                              sigma(F, LAMBDA t: IF X!1(t) THEN f!1(t) ELSE 0 ENDIF)}"
             "g"
             "{nnx | EXISTS (F:finite_set[T]): subset?(F, X!1) AND nnx = sigma(F, f!1)}"))
           (("1"
             (flatten)
             (hide -2)
             (split -1)
             (("1" (replace -1) (propax))
              ("2"
               (hide 2)
               (skosimp)
               (case-replace
                "EXISTS (F:finite_set[T]): subset?(F, X!1) AND x!1 = sigma(F, f!1)")
               (("1"
                 (skosimp)
                 (inst + "F!1")
                 (assert)
                 (lemma "sigma_eq"
                  ("X"
                   "F!1"
                   "f"
                   "f!1"
                   "g"
                   "LAMBDA t: IF X!1(t) THEN f!1(t) ELSE 0 ENDIF"))
                 (("1"
                   (split -1)
                   (("1" (assert))
                    ("2"
                     (hide 2 -2)
                     (skosimp)
                     (typepred "t!1")
                     (inst - "t!1")
                     (assert)
                     (expand "subset?")
                     (inst - "t!1")
                     (expand "member")
                     (assert))))
                  ("2" (expand "convergent?") (propax))))
                ("2"
                 (replace 1 2)
                 (assert)
                 (skosimp)
                 (inst + "F!1")
                 (assert)
                 (lemma "sigma_eq"
                  ("X"
                   "F!1"
                   "f"
                   "f!1"
                   "g"
                   "LAMBDA t: IF X!1(t) THEN f!1(t) ELSE 0 ENDIF"))
                 (("1"
                   (split -1)
                   (("1" (assert))
                    ("2"
                     (hide-all-but (1 -3 -1))
                     (skosimp)
                     (inst - "t!1")
                     (expand "subset?")
                     (inst - "t!1")
                     (assert)
                     (expand "member")
                     (assert))))
                  ("2" (expand "convergent?") (propax))))))))
            ("2" (skosimp) (expand "convergent?") (propax))
            ("3" (skosimp) (expand "convergent?") (propax))))
          ("2" (skosimp) (typepred "t!1") (assert))))
        ("2"
         (hide-all-but 1)
         (typepred "f!1")
         (expand "convergent?")
         (flatten)
         (assert)
         (lemma "denumerable_enumeration_image" ("X" "X!1"))
         (name-replace "PHI" "denumerable_enumeration(X!1)")
         (lemma "extensionality_postulate"
          ("f"
           "image(PHI, fullset[nat])"
           "g"
           "restrict[T, (X!1), boolean](X!1)"))
         (replace -1 -2 rl)
         (hide -1)
         (expand "restrict")
         (case-replace
          "(LAMBDA t: IF X!1(t) THEN f!1(t) ELSE 0 ENDIF) o PHI = f!1 o PHI")
         (hide -2 3)
         (apply-extensionality 1 :hide? t)
         (expand "o" 1)
         (propax))))
      ("2"
       (hide 2)
       (typepred "f!1")
       (expand "convergent?")
       (flatten)
       (assert)
       (lemma "denumerable_enumeration_image" ("X" "X!1"))
       (name-replace "PHI" "denumerable_enumeration(X!1)")
       (lemma "extensionality_postulate"
        ("f"
         "image(PHI, fullset[nat])"
         "g"
         "restrict[T, (X!1), boolean](X!1)"))
       (replace -1 -2 rl)
       (hide -1)
       (expand "restrict")
       (case-replace
        "(LAMBDA t: IF X!1(t) THEN f!1(t) ELSE 0 ENDIF) o PHI=f!1 o PHI")
       (hide -2 3)
       (apply-extensionality :hide? t)
       (expand "o" 1)
       (propax))))
    ("2"
     (hide 2)
     (skosimp)
     (case "nonempty?({nnx | EXISTS (F:finite_set[T]): subset?(F, X!1) AND nnx = sigma(F, f!1)})")
     (("1"
       (case "above_bounded[nnreal]
                        ({nnx | EXISTS (F:finite_set[T]): subset?[T](F, X!1) AND nnx = sigma[T](F, f!1)})")
       (("1"
         (typepred
          "sup({nnx | EXISTS (F:finite_set[T]): subset?(F, X!1) AND nnx = sigma(F, f!1)})")
         (("1"
           (name-replace "SUP"
            "sup({nnx | EXISTS (F:finite_set[T]): subset?(F, X!1) AND nnx = sigma(F, f!1)})")
           (expand "least_upper_bound")
           (expand "upper_bound")
           (flatten)
           (case "SUP<=sigma(X!1, f!1)")
           (("1"
             (hide -3)
             (case "SUP<sigma(X!1, f!1)")
             (("1"
               (hide -2 1)
               (expand "sigma" -1)
               (case-replace "empty?(X!1)")
               (("1"
                 (assert)
                 (inst - "0")
                 (inst + "emptyset[T]")
                 (rewrite "sigma_empty")
                 (hide-all-but 1)
                 (grind))
                ("2"
                 (replace 1)
                 (case-replace "is_finite(X!1)")
                 (("1"
                   (inst - "sigma(X!1,f!1)")
                   (("1" (assert) (expand "sigma" -3) (assert))
                    ("2"
                     (lemma "sigma_ge_0" ("X" "X!1" "f" "f!1"))
                     (("1"
                       (split -1)
                       (("1"
                         (assert)
                         (inst + "X!1")
                         (hide-all-but 1)
                         (expand "subset?")
                         (skosimp))
                        ("2" (skosimp) (assert))))
                      ("2" (propax))))))
                  ("2"
                   (assert)
                   (lemma "increasing_bounded_convergence"
                    ("v1" "series(f!1 o denumerable_enumeration(X!1))"))
                   (("1"
                     (split -1)
                     (("1"
                       (lemma "convergence_sequences.limit_def"
                        ("v"
                         "series(f!1 o denumerable_enumeration(X!1))"
                         "l"
                         "sup(series(f!1 o denumerable_enumeration(X!1)))"))
                       (("1"
                         (assert)
                         (expand "o" -1 1)
                         (expand "o" -3)
                         (replace -1)
                         (expand "sup")
                         (name "LUB"
                               "lub(Im(series(f!1 o denumerable_enumeration(X!1))))")
                         (replace -1)
                         (inst-cp - "0")
                         (("1"
                           (expand "Im")
                           (case "nonempty?({z:real |
                                              EXISTS (x: nat):
                                                z = series(f!1 o denumerable_enumeration(X!1))(x)})")
                           (("1"
                             (case "bounded_above?({z: real |
                                                            EXISTS (x: nat):
                                                              z =
                                                               series(o[nat, T, nnreal]
                                                                          (f!1,
                                                                           denumerable_enumeration[T](X!1)))
                                                                     (x)})")
                             (("1"
                               (typepred
                                "lub({z: real |
                                                         EXISTS (x: nat):
                                                           z =
                                                            series(o[nat, T, nnreal]
                                                                       (f!1,
                                                                        denumerable_enumeration[T](X!1)))
                                                                  (x)})")
                               (("1"
                                 (replace -4)
                                 (hide -2 -3)
                                 (hide -2)
                                 (expand "least_upper_bound?")
                                 (flatten)
                                 (expand "upper_bound?")
                                 (inst -2 "SUP")
                                 (assert)
                                 (skosimp)
                                 (typepred "s!1")
                                 (skosimp)
                                 (case "SUP<s!1")
                                 (("1"
                                   (hide 1)
                                   (inst -7 "s!1")
                                   (("1" (assert))
                                    ("2"
                                     (assert)
                                     (expand "o" -2)
                                     (expand "series" -2)
                                     (name
                                      "FF"
                                      "{t | exists n: n <= x!1 & t = denumerable_enumeration[T](X!1)(n)}")
                                     (case "is_finite[T](FF)")
                                     (("1"
                                       (inst + "FF")
                                       (split 1)
                                       (("1"
                                         (expand "subset?")
                                         (hide-all-but 1)
                                         (expand "FF")
                                         (expand "member")
                                         (skosimp*)
                                         (assert))
                                        ("2"
                                         (replace -4)
                                         (expand "sigma" 1 2)
                                         (assert)
                                         (hide -3 -4 -5 -10 -11)
                                         (case-replace "empty?(FF)")
                                         (("1"
                                           (expand "empty?" -1)
                                           (expand "FF" -1)
                                           (expand "member")
                                           (inst
                                            -
                                            "denumerable_enumeration[T](X!1)(0)")
                                           (inst + "0")
                                           (assert))
                                          ("2"
                                           (assert)
                                           (lemma
                                            "denumerable_enumeration_bij"
                                            ("X" "X!1"))
                                           (lemma
                                            "finite_enumeration_bij"
                                            ("X" "FF"))
                                           (name-replace
                                            "PHI"
                                            "denumerable_enumeration[T](X!1)")
                                           (name-replace
                                            "PSI"
                                            "finite_enumeration[T](FF)")
                                           (lemma
                                            "bij_inv_is_bij[nat, (X!1)]"
                                            ("f" "PHI"))
                                           (lemma
                                            "bij_inv_is_bij[below[card(FF)], (FF)]"
                                            ("f" "PSI"))
                                           (("1"
                                             (assert)
                                             (case "x!1=card(FF)-1")
                                             (("1"
                                               (replace -1)
                                               (hide -8 -9 -10 -11 -12)
                                               (lemma
                                                "nonempty_card[T]"
                                                ("S" "FF"))
                                               (expand "nonempty?" -1)
                                               (lemma
                                                "sigma_bijection[below[card(FF)]]")
                                               (("1"
                                                 (inst
                                                  -
                                                  "_"
                                                  "card(FF) - 1"
                                                  "0")
                                                 (("1"
                                                   (assert)
                                                   (expand "o" 2)
                                                   (inst
                                                    -
                                                    "LAMBDA (x: below[card(FF)]): f!1(PSI(x))")
                                                   (expand "restrict")
                                                   (case
                                                    "forall (n:below[card(FF)]): sigma[subrange_T[below[card(FF)]](0, card(FF) - 1)]
                                                                (0, n,
                                                                 LAMBDA (s: subrange_T[below[card(FF)]](0, card(FF) - 1)):
                                                                   f!1(PSI(s)))=sigma[below[card(FF)]]
                                                               (0, n, LAMBDA (x: below[card(FF)]): f!1(PSI(x)))")
                                                   (("1"
                                                     (inst
                                                      -
                                                      "card(FF)-1")
                                                     (replace -1)
                                                     (name-replace
                                                      "RHS"
                                                      "sigma[below[card(FF)]]
                                                                 (0, card(FF) - 1, LAMBDA (x: below[card(FF)]): f!1(PSI(x)))")
                                                     (hide -1)
                                                     (expand "o" -1)
                                                     (case
                                                      "bijective?
                                                                           [subrange_T[below[card(FF)]](0, card(FF) - 1),
                                                                            subrange_T[below[card(FF)]](0, card(FF) - 1)](lambda (n:subrange_T[below[card(FF)]](0, card(FF) - 1)): inverse(PSI)(PHI(n)))")
                                                     (("1"
                                                       (inst
                                                        -
                                                        "LAMBDA (n: subrange_T[below[card(FF)]](0, card(FF) - 1)):
                                                                     inverse(PSI)(PHI(n))")
                                                       (("1"
                                                         (hide -1)
                                                         (replace -1)
                                                         (hide -1)
                                                         (case
                                                          "forall (n:below[card(FF)]): sigma(0, n, LAMBDA (x: nat): f!1(PHI(x))) =
                                                                 sigma[subrange_T[below[card(FF)]](0, card(FF) - 1)]
                                                                     (0, n,
                                                                      LAMBDA (x_1: subrange_T[below[card(FF)]](0, card(FF) - 1)):
                                                                        f!1(PSI(inverse(PSI)(PHI(x_1)))))")
                                                         (("1"
                                                           (inst
                                                            -
                                                            "card(FF)-1"))
                                                          ("2"
                                                           (hide 3)
                                                           (hide 2)
                                                           (induct "n")
                                                           (("1"
                                                             (expand
                                                              "sigma")
                                                             (expand
                                                              "sigma")
                                                             (lemma
                                                              "comp_inverse_right[below[card[T](FF)], (FF)]"
                                                              ("f"
                                                               "PSI"
                                                               "y"
                                                               "PHI(0)"))
                                                             (assert))
                                                            ("2"
                                                             (skosimp*)
                                                             (expand
                                                              "sigma"
                                                              1)
                                                             (replace
                                                              -2
                                                              1
                                                              rl)
                                                             (assert)
                                                             (lemma
                                                              "comp_inverse_right[below[card[T](FF)], (FF)]"
                                                              ("f"
                                                               "PSI"
                                                               "y"
                                                               "PHI(1+jb!1)"))
                                                             (assert))
                                                            ("3"
                                                             (hide-all-but
                                                              1)
                                                             (grind))
                                                            ("4"
                                                             (expand
                                                              "PHI")
                                                             (skosimp)
                                                             (inst
                                                              +
                                                              "0"))
                                                            ("5"
                                                             (skosimp)
                                                             (replace
                                                              -8
                                                              1
                                                              rl)
                                                             (assert)
                                                             (inst
                                                              +
                                                              "x!2")
                                                             (assert))
                                                            ("6"
                                                             (skosimp)
                                                             (assert)
                                                             (skosimp)
                                                             (assert))))
                                                          ("3"
                                                           (assert)
                                                           (hide-all-but
                                                            1)
                                                           (grind))
                                                          ("4"
                                                           (skosimp*)
                                                           (assert)
                                                           (replace
                                                            -8
                                                            *
                                                            rl)
                                                           (assert)
                                                           (inst + "x!2")
                                                           (assert))))
                                                        ("2"
                                                         (skosimp)
                                                         (assert))
                                                        ("3"
                                                         (skosimp)
                                                         (inst + "0"))
                                                        ("4"
                                                         (skosimp)
                                                         (replace
                                                          -9
                                                          1
                                                          rl)
                                                         (assert)
                                                         (inst + "n!1")
                                                         (assert))
                                                        ("5"
                                                         (hide-all-but 1)
                                                         (grind))))
                                                      ("2"
                                                       (hide -1 3)
                                                       (case
                                                        "bijective?[below[card[T](FF)], (FF)](lambda (n:below[card(FF)]): PHI(n))")
                                                       (("1"
                                                         (lemma
                                                          "composition_bijective[below[card[T](FF)], (FF),below[card[T](FF)]]"
                                                          ("f1"
                                                           "LAMBDA (n: below[card(FF)]): PHI(n)"
                                                           "f2"
                                                           "inverse[below[card[T](FF)], (FF)](PSI)"))
                                                         (("1"
                                                           (expand
                                                            "o"
                                                            -1)
                                                           (hide-all-but
                                                            (-1
                                                             -10
                                                             -9
                                                             1
                                                             -3))
                                                           (expand
                                                            "bijective?")
                                                           (flatten)
                                                           (split)
                                                           (("1"
                                                             (hide -2)
                                                             (expand
                                                              "injective?")
                                                             (skosimp)
                                                             (typepred
                                                              "x1!1")
                                                             (typepred
                                                              "x2!1")
                                                             (inst
                                                              -
                                                              "x1!1"
                                                              "x2!1")
                                                             (assert))
                                                            ("2"
                                                             (hide -1)
                                                             (expand
                                                              "surjective?")
                                                             (skosimp)
                                                             (typepred
                                                              "y!1")
                                                             (inst
                                                              -
                                                              "y!1")
                                                             (skosimp)
                                                             (typepred
                                                              "x!2")
                                                             (inst
                                                              +
                                                              "x!2"))))
                                                          ("2"
                                                           (propax))))
                                                        ("2"
                                                         (hide-all-but
                                                          (-8 1 -6))
                                                         (expand
                                                          "bijective?")
                                                         (flatten)
                                                         (split)
                                                         (("1"
                                                           (expand
                                                            "injective?")
                                                           (skosimp)
                                                           (inst
                                                            -
                                                            "x1!1"
                                                            "x2!1")
                                                           (assert))
                                                          ("2"
                                                           (expand
                                                            "surjective?")
                                                           (skosimp)
                                                           (typepred
                                                            "y!1")
                                                           (replace
                                                            -4
                                                            -1
                                                            rl)
                                                           (assert)
                                                           (skosimp)
                                                           (inst + "n!1")
                                                           (("1"
                                                             (assert))
                                                            ("2"
                                                             (assert))))))
                                                        ("3"
                                                         (skosimp)
                                                         (replace
                                                          -8
                                                          1
                                                          rl)
                                                         (assert)
                                                         (inst + "n!1")
                                                         (assert))))
                                                      ("3"
                                                       (skosimp)
                                                       (assert))
                                                      ("4"
                                                       (skosimp)
                                                       (inst + "0"))
                                                      ("5"
                                                       (skosimp)
                                                       (replace -9 1 rl)
                                                       (assert)
                                                       (inst + "n!1")
                                                       (assert))))
                                                    ("2"
                                                     (hide-all-but
                                                      (-2 1 2))
                                                     (induct "n")
                                                     (("1"
                                                       (expand "sigma")
                                                       (expand "sigma")
                                                       (propax))
                                                      ("2"
                                                       (skosimp*)
                                                       (expand "sigma" 1)
                                                       (propax))
                                                      ("3"
                                                       (skosimp*)
                                                       (assert))
                                                      ("4"
                                                       (skosimp*)
                                                       (assert))))
                                                    ("3"
                                                     (hide-all-but 1)
                                                     (grind))
                                                    ("4"
                                                     (hide-all-but 1)
                                                     (grind))))
                                                  ("2" (assert))
                                                  ("3" (assert))))
                                                ("2"
                                                 (hide-all-but (-1 1))
                                                 (grind))))
                                              ("2"
                                               (hide -7 -8 -9 -10 -11 3)
                                               (lemma
                                                "card_bij_inv[T]"
                                                ("S" "FF" "N" "x!1+1"))
                                               (assert)
                                               (hide 2)
                                               (inst
                                                +
                                                "lambda (n:below[1 + x!1]): PHI(n)")
                                               (("1"
                                                 (hide-all-but
                                                  (-4 -6 -5 1 2))
                                                 (expand "bijective?")
                                                 (flatten)
                                                 (split)
                                                 (("1"
                                                   (expand "injective?")
                                                   (skosimp)
                                                   (inst - "x1!1" "x2!1")
                                                   (assert))
                                                  ("2"
                                                   (hide -1)
                                                   (expand "surjective?")
                                                   (skosimp)
                                                   (typepred "y!1")
                                                   (replace -4 -1 rl)
                                                   (assert)
                                                   (skosimp)
                                                   (inst + "n!1")
                                                   (("1" (assert))
                                                    ("2" (assert))))))
                                                ("2"
                                                 (skosimp)
                                                 (replace -6 1 rl)
                                                 (assert)
                                                 (inst + "n!1")
                                                 (assert))))))
                                            ("2"
                                             (inst + "0")
                                             (lemma
                                              "nonempty_card[T]"
                                              ("S" "FF"))
                                             (assert)
                                             (expand "nonempty?" 1)
                                             (propax))))))))
                                      ("2"
                                       (hide-all-but (1 3 4))
                                       (expand "FF")
                                       (rewrite
                                        "is_finite_surj"
                                        1
                                        :dir
                                        rl)
                                       (("1"
                                         (lemma
                                          "denumerable_enumeration_bij"
                                          ("X" "X!1"))
                                         (("1"
                                           (inst
                                            +
                                            "x!1+1"
                                            "lambda (n:below[(x!1+1)]): denumerable_enumeration[T](X!1)(n)")
                                           (("1"
                                             (expand "bijective?")
                                             (flatten)
                                             (expand "surjective?")
                                             (skosimp)
                                             (typepred "y!1")
                                             (skosimp)
                                             (inst + "n!1")
                                             (("1" (assert))
                                              ("2" (assert))))
                                            ("2"
                                             (skosimp)
                                             (inst + "n!1")
                                             (assert))))
                                          ("2"
                                           (rewrite
                                            "countably_infinite_def"))))
                                        ("2"
                                         (skosimp)
                                         (rewrite
                                          "countably_infinite_def"))))))))
                                  ("2" (assert))))
                                ("2" (assert))))
                              ("2"
                               (expand "bounded_above?" 1)
                               (inst + "LUB")
                               (expand "upper_bound?" 1)
                               (skosimp)
                               (typepred "s!1")
                               (skolem - ("n!1"))
                               (replace -1)
                               (hide -1)
                               (lemma "convergence_nonneg"
                                ("nna"
                                 "f!1 o denumerable_enumeration(X!1)"
                                 "nnx"
                                 "LUB"))
                               (("1" (assert) (inst - "n!1"))
                                ("2" (assert))))
                              ("3" (propax))))
                            ("2"
                             (expand "nonempty?")
                             (expand "empty?" -1)
                             (expand "member")
                             (inst -
                              "series(f!1 o denumerable_enumeration(X!1))(0)")
                             (inst + "0"))))
                          ("2"
                           (inst + "emptyset[T]")
                           (rewrite "sigma_empty" 1)
                           (hide-all-but 1)
                           (grind))))
                        ("2"
                         (expand "convergent?")
                         (lemma "absconvergent_series_is_convergent"
                          ("x" "f!1 o denumerable_enumeration(X!1)"))
                         (("1"
                           (inst +
                            "sup(series(f!1 o denumerable_enumeration(X!1)))"))
                          ("2" (expand "o ") (propax))))))
                      ("2"
                       (hide-all-but (1 2 -5))
                       (expand "increasing?")
                       (skosimp)
                       (expand "series")
                       (lemma "sigma_split[nat]"
                        ("low"
                         "0"
                         "high"
                         "y!1"
                         "z"
                         "x!1"
                         "F"
                         "f!1 o denumerable_enumeration(X!1)"))
                       (assert)
                       (replace -1)
                       (assert))))
                    ("2"
                     (expand "bounded_above?")
                     (inst +
                      "convergence_sequences.limit(series(f!1 o denumerable_enumeration(X!1)))")
                     (("1"
                       (skolem + ("n!1"))
                       (lemma "limit_nonneg"
                        ("nna"
                         "series(f!1 o denumerable_enumeration(X!1))"))
                       (("1"
                         (expand "convergent?")
                         (lemma "absconvergent_series_is_convergent"
                          ("x" "f!1 o denumerable_enumeration(X!1)"))
                         (("1"
                           (assert)
                           (lemma "convergence_nonneg"
                            ("nna"
                             "f!1 o denumerable_enumeration(X!1)"
                             "nnx"
                             "convergence_sequences.limit(series(f!1 o denumerable_enumeration(X!1)))"))
                           (("1"
                             (split -1)
                             (("1" (inst - "n!1"))
                              ("2"
                               (rewrite
                                "convergence_sequences.limit_lemma" 1))))
                            ("2"
                             (expand "convergent?")
                             (replace -1 -2)
                             (propax))))
                          ("2" (expand "o") (propax))))
                        ("2"
                         (hide-all-but (1 3))
                         (skolem + ("n!2"))
                         (lemma "sigma.sigma_ge_0")
                         (expand "series")
                         (inst -
                          "o[nat, T, nnreal](f!1, denumerable_enumeration[T](X!1))"
                          "n!2" "0")
                         (split -1)
                         (("1" (propax))
                          ("2"
                           (hide 2)
                           (skosimp)
                           (expand "o")
                           (assert))))))
                      ("2"
                       (expand "convergent?")
                       (lemma "absconvergent_series_is_convergent"
                        ("x" "f!1 o denumerable_enumeration(X!1)"))
                       (("1" (expand "convergent?") (propax))
                        ("2" (expand "o ") (propax))))))))))))
              ("2" (assert))))
            ("2"
             (inst -2 "sigma(X!1, f!1)")
             (assert)
             (skosimp)
             (typepred "z!1")
             (skosimp)
             (replace -3)
             (hide-all-but (-2 2 -7))
             (lemma "sigma_subset" ("X" "F!1" "Y" "X!1" "f" "f!1"))
             (assert)
             (lemma "convergent_difference"
              ("X" "X!1" "Y" "F!1" "g" "f!1"))
             (assert)
             (lemma "sigma_ge_0" ("X" "difference(X!1, F!1)" "f" "f!1"))
             (split -1)
             (("1" (assert)) ("2" (skosimp) (assert))))))
          ("2" (assert))))
        ("2"
         (hide 2)
         (expand "above_bounded")
         (inst + "sigma(X!1,f!1)")
         (expand "upper_bound")
         (skosimp)
         (typepred "z!1")
         (skosimp)
         (lemma "sigma_subset" ("X" "F!1" "Y" "X!1" "f" "f!1"))
         (assert)
         (lemma "convergent_difference" ("X" "X!1" "Y" "F!1" "g" "f!1"))
         (assert)
         (lemma "sigma_ge_0" ("X" "difference(X!1, F!1)" "f" "f!1"))
         (split -1)
         (("1" (assert)) ("2" (skosimp) (assert))))))
      ("2"
       (hide-all-but 1)
       (expand "nonempty?")
       (expand "empty?")
       (inst - "0")
       (expand "member")
       (inst + "emptyset[T]")
       (rewrite "sigma_empty")
       (grind))
      ("3" (hide-all-but 1) (skosimp) (expand "convergent?") (propax))))
    ("3"
     (hide 2)
     (skosimp)
     (split 1)
     (("1"
       (expand "nonempty?")
       (expand "empty?")
       (inst - "0")
       (expand "member")
       (inst + "emptyset[T]")
       (rewrite "sigma_empty")
       (hide -1)
       (grind))
      ("2"
       (expand "above_bounded")
       (inst + "sigma(X!1,f!1)")
       (expand "upper_bound")
       (skosimp)
       (typepred "z!1")
       (skosimp)
       (lemma "sigma_subset" ("X" "F!1" "Y" "X!1" "f" "f!1"))
       (assert)
       (replace -4)
       (lemma "convergent_difference" ("X" "X!1" "Y" "F!1" "g" "f!1"))
       (assert)
       (lemma "sigma_ge_0" ("X" "difference(X!1, F!1)" "f" "f!1"))
       (split -1)
       (("1" (assert)) ("2" (skosimp) (assert))))))
    ("4"
     (hide 2)
     (skosimp*)
     (lemma "convergent_subset" ("X" "F!1" "Y" "X!1" "g" "f!1"))
     (assert))))


proof_type: f_proof
decl_type: formula
library: sigma_set
theory: sigma_countable
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (case "union[T]({t | X!1(t) & f!1(t) >= 0}, {t | X!1(t) & f!1(t) < 0})=X!1")
   (("1"
     (lemma "convergent_subset"
      ("X" "{t | X!1(t) & f!1(t) >= 0}" "Y" "X!1" "g" "f!1"))
     (("1"
       (case-replace "subset?({t | X!1(t) & f!1(t) >= 0}, X!1)")
       (("1"
         (lemma "convergent_subset"
          ("X" "{t | X!1(t) & f!1(t) < 0}" "Y" "X!1" "g" "f!1"))
         (("1"
           (case-replace "subset?({t | X!1(t) & f!1(t) < 0}, X!1)")
           (("1"
             (assert)
             (lemma "sigma_disjoint_union"
              ("X"
               "{t | X!1(t) & f!1(t) >= 0}"
               "Y"
               "{t | X!1(t) & f!1(t) < 0}"
               "f"
               "f!1"))
             (case-replace
              "disjoint?({t | X!1(t) & f!1(t) >= 0}, {t | X!1(t) & f!1(t) < 0})")
             (("1"
               (replace -7)
               (lemma "sigma_nn_def"
                ("f" "f!1" "X" "{t | X!1(t) & f!1(t) >= 0}"))
               (split -1)
               (("1"
                 (case-replace
                  "{nnx |
                                EXISTS (F:finite_set[T]):
                                  subset?(F, {t | X!1(t) & f!1(t) >= 0}) AND
                                   nnx = sigma(F, f!1)}={nnx |
                                 EXISTS (F:finite_set[T]):
                                   subset?(F, X!1) AND
                                    (FORALL t: F(t) => f!1(t) >= 0) AND nnx = sigma(F, f!1)}")
                 (("1"
                   (hide -1)
                   (replace -1 1 rl)
                   (replace -3 1)
                   (assert)
                   (hide -1 -3)
                   (lemma "convergent_opp"
                    ("X" "{t | X!1(t) & f!1(t) < 0}" "f" "f!1"))
                   (assert)
                   (lemma "sigma_opp"
                    ("f" "f!1" "X" "{t | X!1(t) & f!1(t) < 0}"))
                   (lemma "sigma_nn_def"
                    ("f" "-f!1" "X" "{t | X!1(t) & f!1(t) <= 0}"))
                   (("1"
                     (split -1)
                     (("1"
                       (case "union({t | X!1(t) & f!1(t) < 0},{t | X!1(t) & f!1(t) = 0}) = {t | X!1(t) & f!1(t) <= 0}")
                       (("1"
                         (lemma "sigma_disjoint_union"
                          ("X"
                           "{t | X!1(t) & f!1(t) < 0}"
                           "Y"
                           "{t | X!1(t) & f!1(t) = 0}"
                           "f"
                           "-f!1"))
                         (("1"
                           (replace -2)
                           (split -1)
                           (("1"
                             (lemma "sigma_eq"
                              ("X"
                               "{t | X!1(t) & f!1(t) = 0}"
                               "f"
                               "-f!1"
                               "g"
                               "LAMBDA t: 0"))
                             (("1"
                               (split -1)
                               (("1"
                                 (rewrite "sigma_zero" -1)
                                 (replace -1)
                                 (hide -1)
                                 (replace -1)
                                 (hide -2)
                                 (hide -1)
                                 (rewrite "sigma_opp" -1)
                                 (case
                                  "forall (S:sup_set[nnreal]): sup(S) = -inf(image[nnreal,npreal](lambda (x:nnreal): -x,S))")
                                 (("1"
                                   (inst
                                    -
                                    "{nnx |
                                                  EXISTS (F:finite_set[T]):
                                                    subset?(F, {t | X!1(t) & f!1(t) <= 0}) AND
                                                     nnx = sigma(F, -f!1)}")
                                   (("1"
                                     (replace -1)
                                     (case-replace
                                      "image[nnreal, npreal]
                                                      (LAMBDA (x: nnreal): -x,
                                                       {nnx |
                                                          EXISTS (F:finite_set[T]):
                                                            subset?(F, {t | X!1(t) & f!1(t) <= 0}) AND
                                                             nnx = sigma(F, -f!1)})={npx |
                                                    EXISTS (F:finite_set[T]):
                                                      subset?(F, X!1) AND
                                                       (FORALL t: F(t) => f!1(t) <= 0) AND npx = sigma(F, f!1)}")
                                     (("1" (assert))
                                      ("2"
                                       (hide -1 -2 2)
                                       (apply-extensionality :hide? t)
                                       (("1"
                                         (expand "image")
                                         (case-replace
                                          "EXISTS (F:finite_set[T]):
                                                    subset?(F, X!1) AND
                                                     (FORALL t: F(t) => f!1(t) <= 0) AND x!1 = sigma(F, f!1)")
                                         (("1"
                                           (skosimp)
                                           (inst + "-x!1")
                                           (("1" (assert))
                                            ("2"
                                             (inst + "F!1")
                                             (rewrite "sigma_opp")
                                             (assert)
                                             (hide-all-but (-1 -2 1))
                                             (expand "subset?")
                                             (skosimp)
                                             (expand "member")
                                             (inst - "x!2")
                                             (inst - "x!2")
                                             (assert)
                                             (assert))))
                                          ("2"
                                           (replace 1 2)
                                           (assert)
                                           (skosimp)
                                           (typepred "x!2")
                                           (skosimp)
                                           (inst + "F!1")
                                           (split)
                                           (("1"
                                             (hide-all-but (-2 1))
                                             (expand "subset?")
                                             (skosimp)
                                             (inst - "x!3")
                                             (expand "member")
                                             (assert))
                                            ("2"
                                             (skosimp)
                                             (expand "subset?" -3)
                                             (inst - "t!1")
                                             (expand "member")
                                             (assert))
                                            ("3"
                                             (assert)
                                             (rewrite "sigma_opp")
                                             (assert))))
                                          ("3"
                                           (hide 2)
                                           (skosimp)
                                           (lemma
                                            "convergent_subset"
                                            ("X"
                                             "F!1"
                                             "Y"
                                             "X!1"
                                             "g"
                                             "f!1"))
                                           (assert))))
                                        ("2"
                                         (skosimp)
                                         (lemma
                                          "convergent_subset"
                                          ("X"
                                           "F!1"
                                           "Y"
                                           "X!1"
                                           "g"
                                           "f!1"))
                                         (assert))
                                        ("3"
                                         (skosimp)
                                         (expand "convergent?")
                                         (propax))))
                                      ("3"
                                       (skosimp)
                                       (lemma
                                        "convergent_subset"
                                        ("X" "F!1" "Y" "X!1" "g" "f!1"))
                                       (assert))
                                      ("4"
                                       (skosimp)
                                       (expand "convergent?")
                                       (propax))))
                                    ("2"
                                     (hide 2)
                                     (split)
                                     (("1"
                                       (expand "nonempty?")
                                       (expand "empty?")
                                       (inst - "0")
                                       (expand "member")
                                       (inst + "emptyset[T]")
                                       (rewrite "sigma_empty")
                                       (hide-all-but 1)
                                       (grind))
                                      ("2"
                                       (hide -1)
                                       (expand "above_bounded")
                                       (inst
                                        +
                                        "sigma[T]({t | X!1(t) & f!1(t) <= 0}, -f!1)")
                                       (("1"
                                         (expand "upper_bound")
                                         (skosimp)
                                         (typepred "z!1")
                                         (skosimp)
                                         (lemma
                                          "sigma_subset"
                                          ("X"
                                           "F!1"
                                           "Y"
                                           "{t | X!1(t) & f!1(t) <= 0}"
                                           "f"
                                           "-f!1"))
                                         (assert)
                                         (lemma
                                          "convergent_subset"
                                          ("X"
                                           "difference({t | X!1(t) & f!1(t) <= 0}, F!1)"
                                           "Y"
                                           "{t | X!1(t) & f!1(t) <= 0}"
                                           "g"
                                           "-f!1"))
                                         (assert)
                                         (split -1)
                                         (("1"
                                           (lemma
                                            "sigma_ge_0"
                                            ("X"
                                             "difference({t | X!1(t) & f!1(t) <= 0}, F!1)"
                                             "f"
                                             "-f!1"))
                                           (split -1)
                                           (("1" (assert))
                                            ("2"
                                             (skosimp)
                                             (typepred "t!1")
                                             (expand "difference")
                                             (expand "member")
                                             (expand "-")
                                             (assert))))
                                          ("2" (hide-all-but 1) (grind))
                                          ("3"
                                           (lemma
                                            "convergent_subset"
                                            ("X"
                                             "{t | X!1(t) & f!1(t) <= 0}"
                                             "Y"
                                             "X!1"
                                             "g"
                                             "-f!1"))
                                           (rewrite "convergent_opp")
                                           (assert)
                                           (hide-all-but 1)
                                           (grind))))
                                        ("2"
                                         (lemma
                                          "convergent_subset"
                                          ("X"
                                           "{t | X!1(t) & f!1(t) <= 0}"
                                           "Y"
                                           "X!1"
                                           "g"
                                           "-f!1"))
                                         (rewrite "convergent_opp")
                                         (assert)
                                         (hide-all-but 1)
                                         (grind))
                                        ("3"
                                         (lemma
                                          "countable_subset[T]"
                                          ("S"
                                           "{t | X!1(t) & f!1(t) <= 0}"
                                           "Count"
                                           "X!1"))
                                         (split)
                                         (("1" (propax))
                                          ("2"
                                           (hide-all-but 1)
                                           (grind))))))))
                                    ("3"
                                     (skosimp)
                                     (lemma
                                      "convergent_subset"
                                      ("X" "F!1" "Y" "X!1" "g" "-f!1"))
                                     (rewrite "convergent_opp")
                                     (assert)
                                     (hide-all-but (-1 1))
                                     (expand "subset?")
                                     (expand "member")
                                     (skosimp)
                                     (inst - "x!1")
                                     (assert))))
                                  ("2"
                                   (hide-all-but 1)
                                   (skosimp)
                                   (typepred "sup(S!1)")
                                   (typepred
                                    "inf(image[nnreal, npreal](LAMBDA (x: nnreal): -x, S!1))")
                                   (name-replace
                                    "INF"
                                    "inf(image[nnreal, npreal](LAMBDA (x: nnreal): -x, S!1))")
                                   (name-replace "SUP" "sup(S!1)")
                                   (expand "greatest_lower_bound")
                                   (expand "least_upper_bound")
                                   (flatten)
                                   (expand "lower_bound")
                                   (expand "upper_bound")
                                   (inst -2 "-SUP")
                                   (assert)
                                   (inst -4 "-INF")
                                   (assert)
                                   (split -4)
                                   (("1"
                                     (assert)
                                     (skosimp)
                                     (typepred "z!1")
                                     (expand "image")
                                     (skosimp)
                                     (inst -5 "x!1")
                                     (assert))
                                    ("2"
                                     (skosimp)
                                     (typepred "z!1")
                                     (inst -3 "-z!1")
                                     (("1" (assert))
                                      ("2"
                                       (expand "image")
                                       (inst + "z!1"))))))
                                  ("3"
                                   (skosimp)
                                   (typepred "S!1")
                                   (hide-all-but (-1 -2 1))
                                   (split)
                                   (("1"
                                     (expand "nonempty?")
                                     (expand "empty?")
                                     (skosimp)
                                     (expand "member")
                                     (expand "image")
                                     (inst - "-x!1")
                                     (inst + "x!1"))
                                    ("2"
                                     (expand "image")
                                     (expand "below_bounded")
                                     (expand "above_bounded")
                                     (skosimp)
                                     (inst + "-n!1")
                                     (expand "upper_bound")
                                     (expand "lower_bound")
                                     (skosimp)
                                     (typepred "z!1")
                                     (skosimp)
                                     (inst - "x!1")
                                     (assert))))))
                                ("2"
                                 (skosimp)
                                 (expand "-")
                                 (typepred "t!1")
                                 (assert))))
                              ("2" (rewrite "convergent_zero"))))
                            ("2" (hide-all-but 1) (grind))))
                          ("2"
                           (replace -1)
                           (lemma "convergent_subset"
                            ("X"
                             "{t | X!1(t) & f!1(t) <= 0}"
                             "Y"
                             "X!1"
                             "g"
                             "-f!1"))
                           (assert)
                           (split 1)
                           (("1" (hide-all-but 1) (grind))
                            ("2" (assert) (rewrite "convergent_opp"))))
                          ("3"
                           (lemma "countable_subset[T]"
                            ("S"
                             "{t | X!1(t) & f!1(t) = 0}"
                             "Count"
                             "X!1"))
                           (split -1)
                           (("1" (propax))
                            ("2" (hide-all-but 1) (grind))))))
                        ("2"
                         (hide-all-but 1)
                         (grind)
                         (apply-extensionality :hide? t)
                         (grind))))
                      ("2" (hide -1 2) (skosimp) (expand "-") (assert))))
                    ("2"
                     (lemma "convergent_subset"
                      ("X"
                       "{t | X!1(t) & f!1(t) <= 0}"
                       "Y"
                       "X!1"
                       "g"
                       "-f!1"))
                     (("1"
                       (split -1)
                       (("1" (propax)) ("2" (hide-all-but 1) (grind))
                        ("3"
                         (lemma "convergent_opp" ("X" "X!1" "f" "f!1"))
                         (assert))))
                      ("2"
                       (lemma "countable_subset[T]"
                        ("S" "{t | X!1(t) & f!1(t) <= 0}" "Count" "X!1"))
                       (split -1)
                       (("1" (propax)) ("2" (hide-all-but 1) (grind))))))
                    ("3"
                     (lemma "countable_subset[T]"
                      ("S" "{t | X!1(t) & f!1(t) <= 0}" "Count" "X!1"))
                     (split -1)
                     (("1" (propax)) ("2" (hide-all-but 1) (grind))))))
                  ("2"
                   (hide 2)
                   (apply-extensionality :hide? t)
                   (("1"
                     (hide-all-but 1)
                     (case-replace
                      "EXISTS (F:finite_set[T]):
                               subset?(F, {t | X!1(t) & f!1(t) >= 0}) AND x!1 = sigma(F, f!1)")
                     (("1"
                       (skosimp)
                       (inst + "F!1")
                       (assert)
                       (hide -2)
                       (expand "subset?")
                       (expand "member")
                       (split)
                       (("1" (skosimp) (inst - "x!2") (assert))
                        ("2" (skosimp) (inst - "t!1") (assert))))
                      ("2"
                       (replace 1 2)
                       (assert)
                       (skosimp)
                       (inst + "F!1")
                       (assert)
                       (expand "subset?")
                       (skosimp)
                       (expand "member")
                       (inst - "x!2")
                       (inst - "x!2")
                       (assert)
                       (assert))
                      ("3"
                       (hide 2)
                       (skosimp)
                       (expand "convergent?")
                       (propax))))
                    ("2" (skosimp) (expand "convergent?") (propax))
                    ("3"
                     (skosimp)
                     (lemma "finite_countable" ("x" "F!1"))
                     (lemma "convergent_subset"
                      ("X" "F!1" "Y" "X!1" "g" "f!1"))
                     (assert)
                     (hide-all-but (-2 1))
                     (expand "subset?")
                     (expand "member")
                     (skosimp)
                     (inst - "x!1")
                     (assert))))
                  ("3" (skosimp) (expand "convergent?") (propax))
                  ("4"
                   (skosimp)
                   (lemma "finite_countable" ("x" "F!1"))
                   (hide-all-but (1 -2))
                   (lemma "convergent_subset"
                    ("X" "F!1" "Y" "X!1" "g" "f!1"))
                   (assert)
                   (hide 2)
                   (expand "subset?")
                   (expand "member")
                   (skosimp)
                   (inst - "x!1")
                   (assert))))
                ("2" (hide-all-but 1) (skosimp))))
              ("2" (hide-all-but 1) (grind))))
            ("2" (hide-all-but 1) (grind))))
          ("2"
           (lemma "countable_subset"
            ("S" "{t | X!1(t) & f!1(t) < 0}" "Count" "X!1"))
           (assert)
           (hide-all-but 1)
           (grind))))
        ("2" (hide-all-but 1) (grind))))
      ("2"
       (lemma "countable_subset"
        ("S" "{t | X!1(t) & f!1(t) >= 0}" "Count" "X!1"))
       (assert)
       (hide-all-but 1)
       (grind))))
    ("2" (hide 2) (apply-extensionality :hide? t) (grind))))


proof_type: t_proof
decl_type: tcc
library: sigma_set
theory: sigma_countable
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "nonempty_card" ("S" "X!1"))
   (("1" (expand "nonempty?") (assert)) ("2" (propax))))


proof_type: t_proof
decl_type: tcc
library: sigma_set
theory: sigma_countable
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "f!1")
   (expand "convergent?")
   (assert)
   (expand "o")
   (name-replace "FF"
    "LAMBDA (x: nat): f!1(denumerable_enumeration(X!1)(x))")
   (("1"
     (expand "absconvergent?")
     (hide 1 2)
     (lemma "absconvergent_series_is_convergent" ("x" "FF"))
     (("1" (expand "convergent?") (propax))
      ("2" (expand "absconvergent?") (propax))))
    ("2" (assert) (typepred "X!1") (rewrite "countably_infinite_def"))))


proof_type: t_proof
decl_type: tcc
library: sigma_set
theory: sigma_countable
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (assert)
   (typepred "n!1")
   (replace -2)
   (assert)
   (typepred "F!1")
   (lemma "nonempty_card" ("S" "F!1"))
   (expand "nonempty?")
   (propax))


proof_type: t_proof
decl_type: tcc
library: sigma_set
theory: sigma_countable
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "f!1")
   (expand "convergent?")
   (typepred "X!1")
   (rewrite "countably_infinite_def")
   (flatten)
   (assert)
   (lemma "absconvergent_series_is_convergent"
    ("x"
     "(o[nat, T, real]
                                    (f!1, denumerable_enumeration[T](X!1)))"))
   (assert)
   (expand "convergent?")
   (propax))


proof_type: t_proof
decl_type: tcc
library: sigma_set
theory: sigma_countable
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (typepred "f!1")
   (lemma "convergent_subset")
   (inst - "X!1" "union(X!1, Y!1)" "f!1")
   (split)
   (("1" (propax)) ("2" (hide-all-but 1) (grind)) ("3" (propax))))


proof_type: t_proof
decl_type: tcc
library: sigma_set
theory: sigma_countable
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (lemma "sigma_disjoint_union_TCC1" ("X" "Y!1" "Y" "X!1" "f" "f!1"))
   (("1"
     (assert)
     (hide 2)
     (expand "disjoint?")
     (rewrite "intersection_commutative"))
    ("2" (typepred "f!1") (hide -2 2) (rewrite "union_commutative"))))


