# Proofs

proof_type: t_proof
decl_type: tcc
library: Bernstein
theory: bernstein_minmax
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description:
  [mmoscato] I took the original proof and replaced every (expand "list2array") with these strategies: (then (auto-rewrite "list2array_sound")(assert)) when the function list2array was fully instantiated, and  (then (auto-rewrite "list2array_sound_pi")(assert)) when it wasn't. 

script:
  (""
   (case "FORALL (ff:[real->real],zz:nat,ll:list[real]): length(ll) = length(setnth(ll,zz,ff))")
   (("1"
     (label "setnthlength" -1)
     (hide "setnthlength")
     (case "FORALL (c1,c2:real,aa1,aa2:real): aa1=aa2 IMPLIES c1*aa1*c2 = c1*aa2*c2")
     (("1"
       (label "reallems" -1)
       (hide "reallems")
       (skosimp*)
       (lemma "translist_polylist_id")
       (inst?)
       (replaces -2 :dir rl)
       (lemma "sound_id")
       (inst -1 "bsdegmono!1" "bp!1" "bspoly!1" "cf!1" "intendpts!1"
        "nvars!1" "combine_lr(v!1, bslrleft!1, bslrright!1)" "terms!1")
       (("1"
         (split -1)
         (("1"
           (replaces -1 :dir rl)
           (expand "combine_lr")
           (case "NOT sound?(bp!1, bsdegmono!1, nvars!1, terms!1, cf!1, intendpts!1)
                                                                                                                                                                    (combine(outminmax_translate(v!1, LAMBDA (x: real): x / 2)
                                                                                                                                                                                                (bslrleft!1),
                                                                                                                                                                             outminmax_translate(v!1, LAMBDA (x: real): (1 + x) / 2)
                                                                                                                                                                                                (bslrright!1)))")
           (("1"
             (label "depth" 2)
             (hide-all-but (1 -))
             (case "NOT EXISTS (nmm1,nmm2:Outminmax): (bslrleft!1=
                                                                                                                                                                                                                    (v1!1
                                                                                                                                                                                                                     (LAMBDA
                                                                                                                                                                                                                      (k: nat):
                                                                                                                                                                                                                      Bern_split_left_mono
                                                                                                                                                                                                                      (bp!1(k), bsdegmono!1)(v!1),
                                                                                                                                                                                                                      bsdegmono!1,
                                                                                                                                                                                                                      nvars!1,
                                                                                                                                                                                                                      terms!1,
                                                                                                                                                                                                                      cf!1,
                                                                                                                                                                                                                      depth!1,
                                                                                                                                                                                                                      level1!1,
                                                                                                                                                                                                                      localexit!1,
                                                                                                                                                                                                                      globalexit!1,
                                                                                                                                                                                                                      intendpts!1
                                                                                                                                                                                                                      WITH [v!1`2 := true],
                                                                                                                                                                                                                      varselect!1,
                                                                                                                                                                                                                      nmm1)) AND bslrright!1 = (v1!1
                                                                                                                                                                                                                     (LAMBDA
                                                                                                                                                                                                                      (k: nat):
                                                                                                                                                                                                                      Bern_split_right_mono
                                                                                                                                                                                                                      (bp!1(k), bsdegmono!1)(v!1),
                                                                                                                                                                                                                      bsdegmono!1,
                                                                                                                                                                                                                      nvars!1,
                                                                                                                                                                                                                      terms!1,
                                                                                                                                                                                                                      cf!1,
                                                                                                                                                                                                                      depth!1,
                                                                                                                                                                                                                      level1!1,
                                                                                                                                                                                                                      localexit!1,
                                                                                                                                                                                                                      globalexit!1,
                                                                                                                                                                                                                      intendpts!1
                                                                                                                                                                                                                      WITH [v!1`1 := true],
                                                                                                                                                                                                                      varselect!1,
                                                                                                                                                                                                                      nmm2)))")
             (("1"
               (hide 2)
               (case "NOT varsel!1`1")
               (("1"
                 (assert)
                 (assert)
                 (inst + "newmm2!1" "newmm1!1")
                 (ground))
                ("2"
                 (assert)
                 (assert)
                 (inst + "newmm1!1" "newmm2!1")
                 (ground))))
              ("2"
               (skosimp*)
               (label "bslrleftname2" -1)
               (replace -1 +)
               (hide -1)
               (label "bslrrightname2" -1)
               (replace -1 +)
               (hide -1)
               (label "finalone" 1)
               (hide "finalone")
               (hide -1)
               (label "minmax" -1)
               (hide -1)
               (label "varsel" -1)
               (hide -1)
               (label "v" -1)
               (hide -1)
               (label "spleft" -1)
               (hide -1)
               (label "spright" -1)
               (hide -1)
               (label "ipleft" -1)
               (hide -1)
               (label "ipright" -1)
               (hide -1)
               (label "LR2" -1)
               (hide -1)
               (label "LR1" -1)
               (hide -1)
               (label "LR1intendpts" -1)
               (hide -1)
               (label "LR2intendpts" -1)
               (hide -1)
               (label "combinethis" -1)
               (hide -1)
               (label "newmm1" -1)
               (hide -1)
               (label "level" -1)
               (hide -1)
               (label "bslr1" -1)
               (hide -1)
               (label "newmm2" -1)
               (hide -1)
               (label "bslr2" -1)
               (hide -1)
               (label "bslrleft" -1)
               (hide -1)
               (label "bslrright" -1)
               (hide -1)
               (reveal "finalone")
               (case "length_eq?(nvars!1)(outminmax_translate(v!1, LAMBDA (x: real): x / 2)
                                                                                                                                                                               ((v1!1
                                                                                                                                                                                 (LAMBDA
                                                                                                                                                                                  (k: nat):
                                                                                                                                                                                  Bern_split_left_mono
                                                                                                                                                                                  (bp!1(k), bsdegmono!1)(v!1),
                                                                                                                                                                                  bsdegmono!1,
                                                                                                                                                                                  nvars!1,
                                                                                                                                                                                  terms!1,
                                                                                                                                                                                  cf!1,
                                                                                                                                                                                  depth!1,
                                                                                                                                                                                  level1!1,
                                                                                                                                                                                  localexit!1,
                                                                                                                                                                                  globalexit!1,
                                                                                                                                                                                  intendpts!1
                                                                                                                                                                                  WITH [v!1`2 := true],
                                                                                                                                                                                  varselect!1,
                                                                                                                                                                                  nmm1!1)))) AND length_eq?(nvars!1)(outminmax_translate(v!1, LAMBDA (x: real): (1 + x) / 2)
                                                                                                                                                                               ((v1!1
                                                                                                                                                                                 (LAMBDA
                                                                                                                                                                                  (k: nat):
                                                                                                                                                                                  Bern_split_right_mono
                                                                                                                                                                                  (bp!1(k), bsdegmono!1)(v!1),
                                                                                                                                                                                  bsdegmono!1,
                                                                                                                                                                                  nvars!1,
                                                                                                                                                                                  terms!1,
                                                                                                                                                                                  cf!1,
                                                                                                                                                                                  depth!1,
                                                                                                                                                                                  level1!1,
                                                                                                                                                                                  localexit!1,
                                                                                                                                                                                  globalexit!1,
                                                                                                                                                                                  intendpts!1
                                                                                                                                                                                  WITH [v!1`1 := true],
                                                                                                                                                                                  varselect!1,
                                                                                                                                                                                  nmm2!1))))")
               (("1"
                 (label "lengthlems" -1)
                 (flatten)
                 (rewrite "combine_sound")
                 (("1"
                   (hide "lengthlems")
                   (hide 2)
                   (inst + "LAMBDA (XYZ:Vars): XYZ(v!1)<=1/2")
                   (("1"
                     (skosimp*)
                     (split)
                     (("1"
                       (flatten)
                       (name "rr1"
                             "v1!1(LAMBDA (k: nat):
                                                                                                                                                                                                                                                                                                    Bern_split_left_mono(bp!1(k), bsdegmono!1)
                                                                                                                                                                                                                                                                                                                        (v!1),
                                                                                                                                                                                                                                                                                                  bsdegmono!1, nvars!1, terms!1, cf!1,
                                                                                                                                                                                                                                                                                                  depth!1, level1!1, localexit!1,
                                                                                                                                                                                                                                                                                                  globalexit!1,
                                                                                                                                                                                                                                                                                                  intendpts!1
                                                                                                                                                                                                                                                                                                    WITH [v!1`2 := true],
                                                                                                                                                                                                                                                                                                  varselect!1, nmm1!1)")
                       (replace -1)
                       (hide -1)
                       (expand "outminmax_translate")
                       (assert)
                       (typepred "rr1")
                       (expand "sound?")
                       (flatten)
                       (hide (-2 -3))
                       (expand "forall_X_between")
                       (inst - "X!1 WITH [v!1:=2*X!1(v!1)]")
                       (("1"
                         (case "unitbox?(nvars!1)(X!1 WITH [v!1 := 2 * X!1(v!1)])")
                         (("1"
                           (assert)
                           (case "multibs_eval(LAMBDA (k: nat):
                                                                                                                                                                                                                                                                                                                        Bern_split_left_mono(bp!1(k), bsdegmono!1)(v!1),
                                                                                                                                                                                                                                                                                                                      bsdegmono!1, cf!1, nvars!1, terms!1)
                                                                                                                                                                                                                                                                                                                     (X!1 WITH [v!1 := 2 * X!1(v!1)])=multibs_eval(bp!1, bsdegmono!1, cf!1, nvars!1, terms!1)(X!1)")
                           (("1" (ground))
                            ("2"
                             (hide (-2 2))
                             (lemma "Bern_eval_left_def")
                             (inst?)
                             (("1" (inst - "X!1") (assert))
                              ("2" (reveal "v") (assert))))))
                          ("2"
                           (hide (-1 -2 2))
                           (typepred "X!1")
                           (expand "unitbox?")
                           (skosimp*)
                           (inst - "j!1")
                           (lift-if)
                           (ground))))
                        ("2" (reveal "v") (assert))))
                      ("2"
                       (flatten)
                       (name "rr2"
                             "v1!1(LAMBDA (k: nat):
                                                                                                                                                                                                                                                                                                    Bern_split_right_mono(bp!1(k),
                                                                                                                                                                                                                                                                                                                          bsdegmono!1)
                                                                                                                                                                                                                                                                                                                         (v!1),
                                                                                                                                                                                                                                                                                                  bsdegmono!1, nvars!1, terms!1, cf!1,
                                                                                                                                                                                                                                                                                                  depth!1, level1!1, localexit!1,
                                                                                                                                                                                                                                                                                                  globalexit!1,
                                                                                                                                                                                                                                                                                                  intendpts!1
                                                                                                                                                                                                                                                                                                    WITH [v!1`1 := true],
                                                                                                                                                                                                                                                                                                  varselect!1, nmm2!1)")
                       (replace -1)
                       (hide -1)
                       (expand "outminmax_translate")
                       (assert)
                       (typepred "rr2")
                       (expand "sound?")
                       (flatten)
                       (hide (-2 -3))
                       (expand "forall_X_between")
                       (inst - "X!1 WITH [v!1:=2*X!1(v!1)-1]")
                       (("1"
                         (case "unitbox?(nvars!1)(X!1 WITH [v!1 := 2 * X!1(v!1) - 1])")
                         (("1"
                           (assert)
                           (hide 1)
                           (case "multibs_eval(LAMBDA (k: nat):
                                                                                                                                                                                                                                                                                                                        Bern_split_right_mono(bp!1(k), bsdegmono!1)(v!1),
                                                                                                                                                                                                                                                                                                                      bsdegmono!1, cf!1, nvars!1, terms!1)
                                                                                                                                                                                                                                                                                                                     (X!1 WITH [v!1 := 2 * X!1(v!1) - 1])=multibs_eval(bp!1, bsdegmono!1, cf!1, nvars!1, terms!1)(X!1)")
                           (("1" (ground))
                            ("2"
                             (hide (-2 2))
                             (lemma "Bern_eval_right_def")
                             (inst?)
                             (("1" (inst - "X!1") (assert))
                              ("2" (reveal "v") (assert))))))
                          ("2"
                           (hide (3 -))
                           (typepred "X!1")
                           (expand "unitbox?")
                           (skosimp*)
                           (inst - "j!1")
                           (grind))))
                        ("2" (reveal "v") (assert))))))
                    ("2" (reveal "v") (assert))))
                  ("2"
                   (hide 2)
                   (hide "lengthlems")
                   (name "rr1"
                         "v1!1
                                                                                                                                                                                                                                                                          (LAMBDA
                                                                                                                                                                                                                                                                           (k: nat):
                                                                                                                                                                                                                                                                           Bern_split_left_mono
                                                                                                                                                                                                                                                                           (bp!1(k), bsdegmono!1)(v!1),
                                                                                                                                                                                                                                                                           bsdegmono!1,
                                                                                                                                                                                                                                                                           nvars!1,
                                                                                                                                                                                                                                                                           terms!1,
                                                                                                                                                                                                                                                                           cf!1,
                                                                                                                                                                                                                                                                           depth!1,
                                                                                                                                                                                                                                                                           level1!1,
                                                                                                                                                                                                                                                                           localexit!1,
                                                                                                                                                                                                                                                                           globalexit!1,
                                                                                                                                                                                                                                                                           intendpts!1
                                                                                                                                                                                                                                                                           WITH [v!1`2 := true],
                                                                                                                                                                                                                                                                           varselect!1,
                                                                                                                                                                                                                                                                           nmm1!1)")
                   (replace -1)
                   (hide -1)
                   (expand "unit_box_lb?")
                   (expand "interval_between?")
                   (flatten)
                   (case "cons?(rr1`lb_var)")
                   (("1"
                     (split +)
                     (("1"
                       (expand "outminmax_translate" +)
                       (lift-if)
                       (typepred "rr1")
                       (expand "sound?")
                       (flatten)
                       (hide (-1 -3))
                       (expand "length_eq?")
                       (expand "unit_box_lb?")
                       (expand "interval_between?")
                       (assert)
                       (flatten)
                       (reveal "v")
                       (assert))
                      ("2"
                       (skosimp*)
                       (typepred "rr1")
                       (expand "sound?")
                       (flatten)
                       (hide (-1 -3))
                       (expand "length_eq?")
                       (expand "unit_box_lb?")
                       (expand "interval_between?")
                       (assert)
                       (flatten)
                       (inst - "iup!1")
                       (flatten)
                       (expand "outminmax_translate")
                       (auto-rewrite "list2array_sound")
                       (assert)
                       (typepred
                        "setnth(rr1`lb_var, v!1, LAMBDA (x: real): x / 2)")
                       (replace -8)
                       (inst - "iup!1")
                       (assert)
                       (split +)
                       (("1" (flatten) (lift-if) (ground))
                        ("2" (flatten) (lift-if) (ground))
                        ("3" (flatten) (lift-if) (ground))
                        ("4" (flatten) (lift-if) (ground))))
                      ("3"
                       (typepred "rr1")
                       (expand "sound?")
                       (flatten)
                       (hide (-1 -3))
                       (expand "length_eq?")
                       (expand "unit_box_lb?")
                       (expand "interval_between?")
                       (assert)
                       (flatten)
                       (hide -2)
                       (expand "outminmax_translate")
                       (auto-rewrite "list2array_sound_pi")
                       (assert)
                       (assert)
                       (typepred
                        "setnth(rr1`lb_var, v!1, LAMBDA (x: real): x / 2)")
                       (replace -2)
                       (replace -6)
                       (name "XYZ"
                             "(LAMBDA (i: nat):
                                                                                                                                                                                                                                                                                                           IF i < nvars!1
                                                                                                                                                                                                                                                                                                             THEN nth(setnth(rr1`lb_var,
                                                                                                                                                                                                                                                                                                                             v!1,
                                                                                                                                                                                                                                                                                                                             LAMBDA (x: real): x / 2),
                                                                                                                                                                                                                                                                                                                      i)
                                                                                                                                                                                                                                                                                                           ELSE 0
                                                                                                                                                                                                                                                                                                           ENDIF)")
                       (("1"
                         (case "(XYZ WITH [v!1:=2*XYZ(v!1)]) = (LAMBDA (i: nat):
                                                                                                                                                                                                                                                                                                                               IF i < nvars!1 THEN nth(rr1`lb_var, i) ELSE 0 ENDIF)")
                         (("1"
                           (replace -2)
                           (replace -1 :dir rl)
                           (reveal "v")
                           (assert)
                           (case "multibs_eval(LAMBDA (k: nat):
                                                                                                                                                                                                                                                                                                                                                   Bern_split_left_mono(bp!1(k), bsdegmono!1)(v!1),
                                                                                                                                                                                                                                                                                                                                                 bsdegmono!1, cf!1, nvars!1, terms!1)
                                                                                                                                                                                                                                                                                                                                                ((XYZ WITH [v!1 := 2 * XYZ(v!1)])) = multibs_eval(bp!1, bsdegmono!1, cf!1, nvars!1, terms!1)(XYZ)")
                           (("1" (assert))
                            ("2"
                             (hide-all-but 1)
                             (lemma "Bern_eval_left_def")
                             (inst?)
                             (inst - "XYZ")
                             (assert))))
                          ("2"
                           (hide-all-but 1)
                           (decompose-equality)
                           (("1"
                             (lift-if)
                             (expand "XYZ")
                             (typepred
                              "setnth(rr1`lb_var, v!1, LAMBDA (x: real): x / 2)")
                             (inst - "x!1")
                             (("1" (lift-if) (ground) (lift-if) (ground))
                              ("2" (assert))))
                            ("2" (skosimp*) (assert))
                            ("3" (reveal "v") (assert))))
                          ("3" (skosimp*) (assert))))
                        ("2" (skosimp*) (assert))
                        ("3"
                         (skosimp*)
                         (assert)
                         (reveal "v")
                         (assert))))))
                    ("2" (hide 2) (grind))))
                  ("3"
                   (hide "lengthlems")
                   (hide 2)
                   (name "rr2"
                         "v1!1(LAMBDA
                                                                                                                                                                                                                                                      (k: nat):
                                                                                                                                                                                                                                                      Bern_split_left_mono
                                                                                                                                                                                                                                                      (bp!1(k), bsdegmono!1)(v!1),
                                                                                                                                                                                                                                                      bsdegmono!1,
                                                                                                                                                                                                                                                      nvars!1,
                                                                                                                                                                                                                                                      terms!1,
                                                                                                                                                                                                                                                      cf!1,
                                                                                                                                                                                                                                                      depth!1,
                                                                                                                                                                                                                                                      level1!1,
                                                                                                                                                                                                                                                      localexit!1,
                                                                                                                                                                                                                                                      globalexit!1,
                                                                                                                                                                                                                                                      intendpts!1
                                                                                                                                                                                                                                                      WITH [v!1`2 := true],
                                                                                                                                                                                                                                                      varselect!1,
                                                                                                                                                                                                                                                      nmm1!1)")
                   (replace -1)
                   (hide -1)
                   (expand "unit_box_ub?")
                   (expand "interval_between?")
                   (flatten)
                   (case "cons?(rr2`ub_var)")
                   (("1"
                     (split +)
                     (("1"
                       (expand "outminmax_translate" +)
                       (lift-if)
                       (typepred "rr2")
                       (expand "sound?")
                       (flatten)
                       (hide (-1 -2))
                       (expand "length_eq?")
                       (expand "unit_box_ub?")
                       (expand "interval_between?")
                       (assert)
                       (flatten)
                       (reveal "v")
                       (assert))
                      ("2"
                       (skosimp*)
                       (typepred "rr2")
                       (expand "sound?")
                       (flatten)
                       (hide (-1 -2))
                       (expand "length_eq?")
                       (expand "unit_box_ub?")
                       (expand "interval_between?")
                       (assert)
                       (flatten)
                       (inst - "iup!1")
                       (flatten)
                       (expand "outminmax_translate")
                       (auto-rewrite "list2array_sound")
                       (assert)
                       (typepred
                        "setnth(rr2`ub_var, v!1, LAMBDA (x: real): x / 2)")
                       (inst - "iup!1")
                       (assert)
                       (split +)
                       (("1" (flatten) (lift-if) (ground))
                        ("2" (flatten) (lift-if) (ground))
                        ("3" (flatten) (lift-if) (ground))
                        ("4" (flatten) (lift-if) (ground))))
                      ("3"
                       (typepred "rr2")
                       (expand "sound?")
                       (flatten)
                       (hide (-1 -2))
                       (expand "length_eq?")
                       (expand "unit_box_ub?")
                       (expand "interval_between?")
                       (assert)
                       (flatten)
                       (hide -2)
                       (expand "outminmax_translate")
                       (auto-rewrite "list2array_sound_pi")
                       (assert)
                       (assert)
                       (typepred
                        "setnth(rr2`ub_var, v!1, LAMBDA (x: real): x / 2)")
                       (replace -2)
                       (reveal "v")
                       (assert)
                       (replace -8)
                       (name "XYZ"
                             "(LAMBDA (i: nat):
                                                                                                                                                                                                                                                                                                           IF i < nvars!1
                                                                                                                                                                                                                                                                                                             THEN nth(setnth(rr2`ub_var,
                                                                                                                                                                                                                                                                                                                             v!1,
                                                                                                                                                                                                                                                                                                                             LAMBDA (x: real): x / 2),
                                                                                                                                                                                                                                                                                                                      i)
                                                                                                                                                                                                                                                                                                           ELSE 0
                                                                                                                                                                                                                                                                                                           ENDIF)")
                       (("1"
                         (case "(XYZ WITH [v!1:=2*XYZ(v!1)]) = (LAMBDA (i: nat):
                                                                                                                                                                                                                                                                                                                               IF i < nvars!1 THEN nth(rr2`ub_var, i) ELSE 0 ENDIF)")
                         (("1"
                           (replace -2)
                           (replace -1 :dir rl)
                           (case "multibs_eval(LAMBDA (k: nat):
                                                                                                                                                                                                                                                                                                                                                   Bern_split_left_mono(bp!1(k), bsdegmono!1)(v!1),
                                                                                                                                                                                                                                                                                                                                                 bsdegmono!1, cf!1, nvars!1, terms!1)
                                                                                                                                                                                                                                                                                                                                                ((XYZ WITH [v!1 := 2 * XYZ(v!1)])) = multibs_eval(bp!1, bsdegmono!1, cf!1, nvars!1, terms!1)(XYZ)")
                           (("1" (assert))
                            ("2"
                             (hide-all-but 1)
                             (lemma "Bern_eval_left_def")
                             (inst?)
                             (inst - "XYZ")
                             (assert))))
                          ("2"
                           (hide-all-but 1)
                           (decompose-equality)
                           (("1"
                             (lift-if)
                             (expand "XYZ")
                             (typepred
                              "setnth(rr2`ub_var, v!1, LAMBDA (x: real): x / 2)")
                             (inst - "x!1")
                             (("1" (lift-if) (ground)) ("2" (assert))))
                            ("2" (skosimp*) (assert))))
                          ("3" (skosimp*) (assert))))
                        ("2" (skosimp*) (assert))))))
                    ("2"
                     (hide 2)
                     (expand "outminmax_translate")
                     (grind))))
                  ("4"
                   (hide 2)
                   (hide "lengthlems")
                   (name "rr1"
                         "v1!1(LAMBDA
                                                                                                                                                                                                                                 (k: nat):
                                                                                                                                                                                                                                 Bern_split_right_mono
                                                                                                                                                                                                                                 (bp!1(k), bsdegmono!1)(v!1),
                                                                                                                                                                                                                                 bsdegmono!1,
                                                                                                                                                                                                                                 nvars!1,
                                                                                                                                                                                                                                 terms!1,
                                                                                                                                                                                                                                 cf!1,
                                                                                                                                                                                                                                 depth!1,
                                                                                                                                                                                                                                 level1!1,
                                                                                                                                                                                                                                 localexit!1,
                                                                                                                                                                                                                                 globalexit!1,
                                                                                                                                                                                                                                 intendpts!1
                                                                                                                                                                                                                                 WITH [v!1`1 := true],                                                                                                                                                                                             varselect!1,
                                                                                                                                                                                                                                 nmm2!1)")
                   (replace -1)
                   (hide -1)
                   (expand "unit_box_lb?")
                   (expand "interval_between?")
                   (flatten)
                   (case "cons?(rr1`lb_var)")
                   (("1"
                     (split +)
                     (("1"
                       (expand "outminmax_translate" +)
                       (lift-if)
                       (typepred "rr1")
                       (expand "sound?")
                       (flatten)
                       (hide (-1 -3))
                       (expand "length_eq?")
                       (expand "unit_box_lb?")
                       (expand "interval_between?")
                       (assert)
                       (flatten)
                       (reveal "v")
                       (assert))
                      ("2"
                       (skosimp*)
                       (typepred "rr1")
                       (expand "sound?")
                       (flatten)
                       (hide (-1 -3))
                       (expand "length_eq?")
                       (expand "unit_box_lb?")
                       (expand "interval_between?")
                       (assert)
                       (flatten)
                       (inst - "iup!1")
                       (flatten)
                       (expand "outminmax_translate")
                       (auto-rewrite "list2array_sound")
                       (assert)
                       (typepred
                        "setnth(rr1`lb_var, v!1, LAMBDA (x: real): (1 + x) / 2)")
                       (replace -8)
                       (inst - "iup!1")
                       (assert)
                       (split +)
                       (("1" (flatten) (lift-if) (ground))
                        ("2" (flatten) (lift-if) (ground))
                        ("3" (flatten) (lift-if) (ground))
                        ("4" (flatten) (lift-if) (ground))))
                      ("3"
                       (typepred "rr1")
                       (expand "sound?")
                       (flatten)
                       (hide (-1 -3))
                       (expand "length_eq?")
                       (expand "unit_box_lb?")
                       (expand "interval_between?")
                       (assert)
                       (flatten)
                       (hide -2)
                       (expand "outminmax_translate")
                       (auto-rewrite "list2array_sound_pi")
                       (assert)
                       (assert)
                       (typepred
                        "setnth(rr1`lb_var, v!1, LAMBDA (x: real): (1 + x) / 2)")
                       (replace -2)
                       (replace -7)
                       (reveal "v")
                       (assert)
                       (hide "v")
                       (hide -3)
                       (replace -5)
                       (name "XYZ"
                             "(LAMBDA (i: nat):
                                                                                                                                                                                                                                                                                                           IF i < nvars!1
                                                                                                                                                                                                                                                                                                             THEN nth(setnth(rr1`lb_var,
                                                                                                                                                                                                                                                                                                                             v!1,
                                                                                                                                                                                                                                                                                                                             LAMBDA (x: real): (1 + x) / 2),
                                                                                                                                                                                                                                                                                                                      i)
                                                                                                                                                                                                                                                                                                           ELSE 0
                                                                                                                                                                                                                                                                                                           ENDIF)")
                       (("1"
                         (case "(XYZ WITH [v!1:=2*XYZ(v!1)-1]) = (LAMBDA (i: nat):
                                                                                                                                                                                                                                                                                                                               IF i < nvars!1 THEN nth(rr1`lb_var, i) ELSE 0 ENDIF)")
                         (("1"
                           (replace -2)
                           (replace -1 :dir rl)
                           (case "multibs_eval(LAMBDA (k: nat):
                                                                                                                                                                                                                                                                                                                                                   Bern_split_right_mono(bp!1(k), bsdegmono!1)(v!1),
                                                                                                                                                                                                                                                                                                                                                 bsdegmono!1, cf!1, nvars!1, terms!1)
                                                                                                                                                                                                                                                                                                                                                ((XYZ WITH [v!1 := 2 * XYZ(v!1)-1])) = multibs_eval(bp!1, bsdegmono!1, cf!1, nvars!1, terms!1)(XYZ)")
                           (("1" (assert))
                            ("2"
                             (hide-all-but 1)
                             (lemma "Bern_eval_right_def")
                             (inst?)
                             (inst - "XYZ")
                             (assert))))
                          ("2"
                           (hide-all-but 1)
                           (decompose-equality)
                           (("1"
                             (lift-if)
                             (expand "XYZ")
                             (typepred
                              "setnth(rr1`lb_var, v!1, LAMBDA (x: real): (1 + x) / 2)")
                             (inst - "x!1")
                             (("1" (lift-if) (ground)) ("2" (assert))))
                            ("2" (skosimp*) (assert))))
                          ("3" (skosimp*) (assert))))
                        ("2" (skosimp*) (assert))))))
                    ("2" (hide 2) (grind))))
                  ("5"
                   (hide "lengthlems")
                   (hide 2)
                   (name "rr2"
                         "v1!1
                                                                                                                                                                                                                                (LAMBDA
                                                                                                                                                                                                                                 (k: nat):
                                                                                                                                                                                                                                 Bern_split_right_mono
                                                                                                                                                                                                                                 (bp!1(k), bsdegmono!1)(v!1),
                                                                                                                                                                                                                                 bsdegmono!1,
                                                                                                                                                                                                                                 nvars!1,
                                                                                                                                                                                                                                 terms!1,
                                                                                                                                                                                                                                 cf!1,
                                                                                                                                                                                                                                 depth!1,
                                                                                                                                                                                                                                 level1!1,
                                                                                                                                                                                                                                 localexit!1,
                                                                                                                                                                                                                                 globalexit!1,
                                                                                                                                                                                                                                 intendpts!1
                                                                                                                                                                                                                                 WITH [v!1`1 := true],
                                                                                                                                                                                                                                 varselect!1,
                                                                                                                                                                                                                                 nmm2!1)")
                   (replace -1)
                   (hide -1)
                   (expand "unit_box_ub?")
                   (expand "interval_between?")
                   (flatten)
                   (case "cons?(rr2`ub_var)")
                   (("1"
                     (split +)
                     (("1"
                       (expand "outminmax_translate" +)
                       (lift-if)
                       (typepred "rr2")
                       (expand "sound?")
                       (flatten)
                       (hide (-1 -2))
                       (expand "length_eq?")
                       (expand "unit_box_ub?")
                       (expand "interval_between?")
                       (assert)
                       (flatten)
                       (reveal "v")
                       (assert))
                      ("2"
                       (skosimp*)
                       (typepred "rr2")
                       (expand "sound?")
                       (flatten)
                       (hide (-1 -2))
                       (expand "length_eq?")
                       (expand "unit_box_ub?")
                       (expand "interval_between?")
                       (assert)
                       (flatten)
                       (inst - "iup!1")
                       (flatten)
                       (expand "outminmax_translate")
                       (auto-rewrite "list2array_sound")
                       (assert)
                       (typepred
                        "setnth(rr2`ub_var, v!1, LAMBDA (x: real): (1 + x) / 2)")
                       (inst - "iup!1")
                       (assert)
                       (split +)
                       (("1" (flatten) (lift-if) (ground))
                        ("2" (flatten) (lift-if) (ground))
                        ("3" (flatten) (lift-if) (ground))
                        ("4" (flatten) (lift-if) (ground))))
                      ("3"
                       (typepred "rr2")
                       (expand "sound?")
                       (flatten)
                       (hide (-1 -2))
                       (expand "length_eq?")
                       (expand "unit_box_ub?")
                       (expand "interval_between?")
                       (assert)
                       (flatten)
                       (hide -2)
                       (expand "outminmax_translate")
                       (auto-rewrite "list2array_sound_pi")
                       (assert)
                       (assert)
                       (typepred
                        "setnth(rr2`ub_var, v!1, LAMBDA (x: real): (1 + x) / 2)")
                       (replace -2)
                       (hide -3)
                       (replace -5)
                       (replace -6)
                       (reveal "v")
                       (assert)
                       (hide "v")
                       (name "XYZ"
                             "(LAMBDA (i: nat):
                                                                                                                                                                                                                                                                                                           IF i < nvars!1
                                                                                                                                                                                                                                                                                                             THEN nth(setnth(rr2`ub_var,
                                                                                                                                                                                                                                                                                                                             v!1,
                                                                                                                                                                                                                                                                                                                             LAMBDA (x: real): (1 + x) / 2),
                                                                                                                                                                                                                                                                                                                      i)
                                                                                                                                                                                                                                                                                                           ELSE 0
                                                                                                                                                                                                                                                                                                           ENDIF)")
                       (("1"
                         (case "(XYZ WITH [v!1:=2*XYZ(v!1)-1]) = (LAMBDA (i: nat):
                                                                                                                                                                                                                                                                                                                               IF i < nvars!1 THEN nth(rr2`ub_var, i) ELSE 0 ENDIF)")
                         (("1"
                           (replace -2)
                           (replace -1 :dir rl)
                           (case "multibs_eval(LAMBDA (k: nat):
                                                                                                                                                                                                                                                                                                                                                   Bern_split_right_mono(bp!1(k), bsdegmono!1)(v!1),
                                                                                                                                                                                                                                                                                                                                                 bsdegmono!1, cf!1, nvars!1, terms!1)
                                                                                                                                                                                                                                                                                                                                                ((XYZ WITH [v!1 := 2 * XYZ(v!1)-1])) = multibs_eval(bp!1, bsdegmono!1, cf!1, nvars!1, terms!1)(XYZ)")
                           (("1" (assert))
                            ("2"
                             (hide-all-but 1)
                             (lemma "Bern_eval_right_def")
                             (inst?)
                             (inst - "XYZ")
                             (assert))))
                          ("2"
                           (hide-all-but 1)
                           (decompose-equality)
                           (("1"
                             (lift-if)
                             (expand "XYZ")
                             (typepred
                              "setnth(rr2`ub_var, v!1, LAMBDA (x: real): (1 + x) / 2)")
                             (inst - "x!1")
                             (("1" (lift-if) (ground)) ("2" (assert))))
                            ("2" (skosimp*) (assert))))
                          ("3" (skosimp*) (assert))))
                        ("2" (skosimp*) (assert))))))
                    ("2"
                     (hide 2)
                     (expand "outminmax_translate")
                     (grind))))))
                ("2"
                 (hide 2)
                 (name "llj"
                       "v1!1
                                                                                                                                                                                            (LAMBDA
                                                                                                                                                                                             (k: nat):
                                                                                                                                                                                             Bern_split_right_mono
                                                                                                                                                                                             (bp!1(k), bsdegmono!1)(v!1),
                                                                                                                                                                                             bsdegmono!1,
                                                                                                                                                                                             nvars!1,
                                                                                                                                                                                             terms!1,
                                                                                                                                                                                             cf!1,
                                                                                                                                                                                             depth!1,
                                                                                                                                                                                             level1!1,
                                                                                                                                                                                             localexit!1,
                                                                                                                                                                                             globalexit!1,
                                                                                                                                                                                             intendpts!1
                                                                                                                                                                                             WITH [v!1`1 := true],
                                                                                                                                                                                             varselect!1,
                                                                                                                                                                                             nmm2!1)")
                 (replace -1)
                 (hide -1)
                 (name "lli"
                       "v1!1
                                                                                                                                                                                           (LAMBDA
                                                                                                                                                                                            (k: nat):
                                                                                                                                                                                            Bern_split_left_mono
                                                                                                                                                                                            (bp!1(k), bsdegmono!1)(v!1),
                                                                                                                                                                                            bsdegmono!1,
                                                                                                                                                                                            nvars!1,
                                                                                                                                                                                            terms!1,
                                                                                                                                                                                            cf!1,
                                                                                                                                                                                            depth!1,
                                                                                                                                                                                            level1!1,
                                                                                                                                                                                            localexit!1,
                                                                                                                                                                                            globalexit!1,
                                                                                                                                                                                            intendpts!1
                                                                                                                                                                                            WITH [v!1`2 := true],
                                                                                                                                                                                            varselect!1,
                                                                                                                                                                                            nmm1!1)")
                 (replace -1)
                 (hide -)
                 (typepred "llj")
                 (typepred "lli")
                 (expand "sound?")
                 (flatten)
                 (hide (-1 -2 -3 -5 -6 -7))
                 (split +)
                 (("1"
                   (hide -2)
                   (expand "length_eq?")
                   (expand "outminmax_translate")
                   (lift-if)
                   (ground)
                   (("1" (grind)) ("2" (grind)) ("3" (grind))
                    ("4" (grind))))
                  ("2"
                   (hide -1)
                   (expand "length_eq?")
                   (expand "outminmax_translate")
                   (lift-if)
                   (ground)
                   (("1" (grind)) ("2" (grind)) ("3" (grind))
                    ("4" (grind))))))
                ("3"
                 (hide 2)
                 (flatten)
                 (reveal "level" "depth")
                 (assert))
                ("4" (hide 2) (flatten) (reveal "v") (assert))))
              ("3" (hide 2) (skosimp) (assert))
              ("4" (hide 2) (skosimp) (reveal "level" "depth") (assert))
              ("5" (hide 2) (skosimp) (assert)) ("6" (assert))
              ("7" (reveal "level" "depth") (assert))))
            ("2"
             (hide-all-but (-1 6))
             (expand "sound?")
             (flatten)
             (assert)
             (expand "unit_box_lb?")
             (expand "interval_between?")
             (expand "unit_box_ub?")
             (expand "interval_between?")
             (expand "length_eq?")
             (ground))
            ("3" (assert))))
          ("2" (propax))))
        ("2" (assert))))
      ("2" (hide 2) (grind-reals))))
    ("2"
     (hide 2)
     (skosimp)
     (typepred "setnth(ll!1, zz!1, ff!1)")
     (assert))))


proof_type: f_proof
decl_type: formula
library: Bernstein
theory: multi_polynomial
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (label "boundedpointsexclusive" -2)
   (hide "boundedpointsexclusive")
   (skoletin 1)
   (("1"
     (label "pconstname" -1)
     (hide "pconstname")
     (label "altb" -1)
     (hide "altb")
     (assert)
     (expand "multipoly_eval")
     (rewrite "sigma_scal" :dir rl)
     (rewrite "sigma_restrict_eq")
     (hide 2)
     (decompose-equality)
     (expand "restrict")
     (lift-if)
     (ground)
     (name "ii" "x!1")
     (replace -1)
     (case "polyproduct_eval(multipoly_translate(mpoly,
                                                                                               polydegmono,
                                                                                               nvars,
                                                                                               boundedpts)
                                                                                              (Avars, Bvars)
                                                                                              (ii),
                                                                           polydegmono, nvars)
                                                                          (X)
                                                          =
                                                          pconst *
                                                             polyproduct_eval(mpoly(ii), polydegmono, nvars)
                                                                             (denormalize_lambda(nvars,
                                                                                                 X,
                                                                                                 boundedpts)
                                                                                                (Avars, Bvars))")
     (("1" (assert))
      ("2"
       (hide 3)
       (expand "polyproduct_eval")
       (expand "pconst")
       (rewrite "product_prod")
       (("1"
         (rewrite "product_restrict_eq")
         (("1"
           (hide 2)
           (decompose-equality)
           (("1"
             (name "pj" "x!2")
             (replace -1)
             (expand "restrict")
             (assert)
             (lift-if)
             (split +)
             (("1" (propax))
              ("2"
               (flatten)
               (assert)
               (lift-if)
               (split +)
               (("1"
                 (flatten)
                 (case "boundedpts(pj)`1 AND NOT boundedpts(pj)`2")
                 (("1"
                   (flatten)
                   (hide 2)
                   (expand "denormalize_lambda")
                   (assert)
                   (inst - "pj")
                   (assert)
                   (assert)
                   (expand "multipoly_translate")
                   (expand "polyprod_translate")
                   (lemma "poly_translate_inf_pos_def")
                   (inst?)
                   (assert))
                  ("2"
                   (case "boundedpts(pj)`2 AND NOT boundedpts(pj)`1")
                   (("1"
                     (hide 1)
                     (hide 1)
                     (flatten)
                     (inst - "pj")
                     (assert)
                     (expand "denormalize_lambda")
                     (expand "multipoly_translate")
                     (expand "polyprod_translate")
                     (lemma "poly_translate_inf_neg_def")
                     (inst?)
                     (assert))
                    ("2"
                     (reveal "boundedpointsexclusive")
                     (expand "bounded_points_exclusive?")
                     (inst - "pj")
                     (ground))))))
                ("2"
                 (flatten)
                 (assert)
                 (expand "denormalize_lambda")
                 (expand "multipoly_translate")
                 (expand "polyprod_translate")
                 (lemma "poly_translate_id")
                 (inst?)
                 (("1"
                   (inst -
                    "Avars(pj) + Bvars(pj) * X(pj) - Avars(pj) * X(pj)")
                   (assert)
                   (case "((Bvars(pj) * X(pj) - Avars(pj) * X(pj)) /
                                                                   (Bvars(pj) - Avars(pj))) = X(pj)")
                   (("1" (assert)) ("2" (cross-mult 1))))
                  ("2"
                   (reveal "altb")
                   (expand "lt_below?")
                   (inst - "pj")
                   (assert))))))))
            ("2" (skosimp*) (assert))))
          ("2" (hide 2) (skosimp*) (assert))))
        ("2" (hide 2) (skosimp*) (assert))))))
    ("2" (hide 2) (skosimp*) (assert))))


proof_type: f_proof
decl_type: formula
library: Bernstein
theory: multi_polynomial
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (label "altb" -1)
   (label "boundedpointsexclusive" -3)
   (hide "boundedpointsexclusive")
   (skoletin 1)
   (("1"
     (label "pconstname" -1)
     (hide "pconstname")
     (expand "multipoly_eval")
     (rewrite "sigma_scal" :dir rl)
     (rewrite "sigma_restrict_eq")
     (hide 2)
     (decompose-equality)
     (expand "restrict")
     (lift-if)
     (ground)
     (name "ii" "x!1")
     (replace -1)
     (case "pconst *
                                                                 polyproduct_eval(multipoly_translate(mpoly,
                                                                                                      polydegmono,
                                                                                                      nvars,
                                                                                                      boundedpts)
                                                                                                     (Avars, Bvars)
                                                                                                     (ii),
                                                                                  polydegmono, nvars)
                                                                                 (normalize_lambda(nvars, X, boundedpts)
                                                                                                  (Avars, Bvars))
                                                               = polyproduct_eval(mpoly(ii), polydegmono, nvars)(X)")
     (("1" (assert))
      ("2"
       (hide 3)
       (expand "polyproduct_eval")
       (expand "pconst")
       (rewrite "product_prod")
       (("1"
         (rewrite "product_restrict_eq")
         (("1"
           (hide 2)
           (decompose-equality)
           (("1"
             (name "pj" "x!2")
             (replace -1)
             (expand "restrict")
             (assert)
             (lift-if)
             (split +)
             (("1" (propax))
              ("2"
               (flatten)
               (assert)
               (split +)
               (("1"
                 (flatten)
                 (expand "normalize_lambda")
                 (assert)
                 (inst - "pj")
                 (flatten)
                 (assert)
                 (assert)
                 (expand "multipoly_translate")
                 (expand "polyprod_translate")
                 (lemma "poly_translate_inf_pos_def_rev")
                 (inst?)
                 (assert))
                ("2"
                 (flatten)
                 (split 2)
                 (("1"
                   (flatten)
                   (inst - "pj")
                   (flatten)
                   (assert)
                   (expand "normalize_lambda")
                   (expand "multipoly_translate")
                   (expand "polyprod_translate")
                   (lemma "poly_translate_inf_neg_def_rev")
                   (inst?)
                   (assert))
                  ("2"
                   (flatten)
                   (case "boundedpts(pj)`1 AND boundedpts(pj)`2")
                   (("1"
                     (flatten)
                     (assert)
                     (hide 1)
                     (hide 2)
                     (expand "normalize_lambda")
                     (inst - "pj")
                     (flatten)
                     (assert)
                     (assert)
                     (expand "multipoly_translate")
                     (expand "polyprod_translate")
                     (lemma "poly_translate_id")
                     (inst?)
                     (("1" (assert))
                      ("2" (expand "lt_below?") (inst - "pj") (assert))))
                    ("2"
                     (reveal "boundedpointsexclusive")
                     (expand "bounded_points_exclusive?")
                     (inst - "pj")
                     (ground))))))))))
            ("2" (skosimp*) (assert)) ("3" (skosimp*) (assert))))
          ("2" (skosimp*) (assert)) ("3" (skosimp*) (assert))))
        ("2" (skosimp*) (assert)) ("3" (skosimp*) (assert))))))
    ("2" (skosimp*) (assert)) ("3" (skosimp*) (assert))))


proof_type: f_proof
decl_type: formula
library: Bernstein
theory: multi_polynomial
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "multipoly_translate_normalize")
   (inst?)
   (assert)
   (split -)
   (("1"
     (case "product(0, nvars - 1,
                                  LAMBDA (i: nat):
                                    IF (boundedpts(i)`1 AND NOT boundedpts(i)`2)
                                      THEN (1 + X(i) - Avars(i)) ^ polydegmono(i)
                                    ELSIF (boundedpts(i)`2 AND NOT boundedpts(i)`1)
                                      THEN (1 + Bvars(i) - X(i)) ^ polydegmono(i)
                                    ELSE 1
                                    ENDIF) = 1")
     (("1" (assert))
      ("2"
       (hide (-1 2))
       (case "FORALL (pz:nat,F:[nat->real]): (FORALL (iz:upto(pz)): F(iz)=1) IMPLIES product(0,pz,F) = 1")
       (("1"
         (inst?)
         (("1"
           (assert)
           (hide 2)
           (skosimp*)
           (expand "bounded_points_true?")
           (inst - "iz!1")
           (ground))
          ("2" (skosimp*) (assert)) ("3" (skosimp*) (assert))))
        ("2"
         (hide-all-but 1)
         (induct "pz")
         (("1" (skeep) (expand "product") (expand "product") (inst?))
          ("2"
           (skeep)
           (skeep)
           (inst - "F")
           (expand "product" +)
           (split -)
           (("1" (inst - "1+j") (assert))
            ("2" (skosimp*) (inst - "iz!1"))))))))
      ("3" (skosimp*) (assert)) ("4" (skosimp*) (assert))))
    ("2"
     (hide 2)
     (expand "lt_below?")
     (skosimp*)
     (expand "boxbetween?")
     (expand "interval_between?")
     (expand "bounded_points_true?")
     (inst - "j!1")
     (inst - "j!1")
     (ground))
    ("3"
     (hide 2)
     (expand "boxbetween?")
     (expand "interval_between?")
     (skosimp*)
     (inst - "ii!1")
     (ground))
    ("4"
     (hide-all-but (-2 1))
     (expand "bounded_points_exclusive?")
     (skosimp*)
     (expand "bounded_points_true?")
     (inst?)
     (ground))))


proof_type: f_proof
decl_type: formula
library: Bernstein
theory: multi_polynomial
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (skeep)
   (ground)
   (("1"
     (skeep)
     (lemma "multipoly_translate_normalize")
     (inst?)
     (inst - "X")
     (assert)
     (split -)
     (("1"
       (name "cc"
             "product(0, nvars - 1,
                                                                                  LAMBDA (i: nat):
                                                                                    IF (boundedpts(i)`1 AND NOT boundedpts(i)`2)
                                                                                      THEN (1 + X(i) - Avars(i)) ^ polydegmono(i)
                                                                                    ELSIF (boundedpts(i)`2 AND NOT boundedpts(i)`1)
                                                                                      THEN (1 + Bvars(i) - X(i)) ^ polydegmono(i)
                                                                                    ELSE 1
                                                                                    ENDIF)")
       (("1"
         (replace -1)
         (case "cc > 0")
         (("1"
           (replace -3 :dir rl)
           (hide -2)
           (hide -2)
           (lemma "relreal_scal")
           (inst - "rel"
            "multipoly_eval(multipoly_translate(mpoly,
                                                                                                            polydegmono,
                                                                                                            nvars,
                                                                                                            boundedpts)
                                                                                                           (Avars, Bvars),
                                                                                        polydegmono, cf, nvars, terms)
                                                                                       (normalize_lambda(nvars, X, boundedpts)
                                                                                                        (Avars, Bvars))"
            "0" "cc")
           (("1"
             (assert)
             (hide 2)
             (inst?)
             (assert)
             (hide 1)
             (expand "boxbetween?" +)
             (expand "interval_between?")
             (skosimp*)
             (expand "lt_below?")
             (inst - "j!1")
             (expand "boxbetween?")
             (expand "interval_between?")
             (inst - "j!1")
             (flatten)
             (split +)
             (("1"
               (flatten)
               (assert)
               (expand "interval_endpoints_inf_trans")
               (assert)
               (split -1)
               (("1"
                 (flatten)
                 (expand "normalize_lambda")
                 (assert)
                 (lift-if 1)
                 (split 1)
                 (("1" (flatten) (cross-mult 3)) ("2" (ground))))
                ("2" (propax))))
              ("2"
               (flatten)
               (expand "interval_endpoints_inf_trans")
               (assert)
               (split 1)
               (("1"
                 (flatten)
                 (expand "normalize_lambda")
                 (assert)
                 (lift-if +)
                 (split +)
                 (("1" (flatten) (cross-mult 3)) ("2" (ground))))
                ("2"
                 (case "boundedpts(j!1)`1")
                 (("1"
                   (assert)
                   (expand "normalize_lambda")
                   (lift-if +)
                   (split +)
                   (("1" (flatten) (cross-mult 2) (assert) (ground))
                    ("2" (ground))))
                  ("2"
                   (assert)
                   (expand "normalize_lambda")
                   (lift-if +)
                   (split +)
                   (("1"
                     (split +)
                     (("1" (flatten) (cross-mult 2) (assert) (ground))
                      ("2" (ground))))
                    ("2" (propax))))))))
              ("3"
               (flatten)
               (expand "interval_endpoints_inf_trans")
               (assert)
               (split -)
               (("1"
                 (flatten)
                 (assert)
                 (expand "normalize_lambda")
                 (lift-if +)
                 (split +)
                 (("1" (flatten) (cross-mult 2)) ("2" (ground))))
                ("2"
                 (flatten)
                 (split -1)
                 (("1"
                   (flatten)
                   (assert)
                   (expand "normalize_lambda")
                   (cross-mult 2))
                  ("2"
                   (flatten)
                   (assert)
                   (expand "normalize_lambda")
                   (cross-mult 3))))))
              ("4"
               (flatten)
               (expand "interval_endpoints_inf_trans")
               (split +)
               (("1"
                 (flatten)
                 (assert)
                 (expand "normalize_lambda")
                 (lift-if +)
                 (split +)
                 (("1" (flatten) (cross-mult 2)) ("2" (ground))))
                ("2"
                 (flatten)
                 (assert)
                 (split 2)
                 (("1"
                   (flatten)
                   (assert)
                   (expand "normalize_lambda")
                   (cross-mult 3))
                  ("2"
                   (flatten)
                   (assert)
                   (expand "normalize_lambda")
                   (cross-mult 4))))))))
            ("2" (assert))))
          ("2"
           (hide -2)
           (hide -2)
           (hide 2)
           (hide -1)
           (expand "cc" +)
           (rewrite "product_gt_0")
           (hide 2)
           (skosimp*)
           (assert)
           (lift-if +)
           (split +)
           (("1"
             (flatten)
             (expand "^" 2)
             (assert)
             (typepred "polydegmono(n!1)")
             (assert)
             (lemma "posreal_expt")
             (inst?)
             (expand "boxbetween?")
             (expand "interval_between?")
             (inst - "n!1")
             (ground))
            ("2"
             (flatten)
             (assert)
             (ground)
             (("1"
               (expand "^")
               (lemma "posreal_expt")
               (inst?)
               (expand "boxbetween?")
               (expand "interval_between?")
               (inst - "n!1")
               (ground))
              ("2"
               (expand "^")
               (lemma "posreal_expt")
               (inst?)
               (expand "boxbetween?")
               (expand "interval_between?")
               (inst - "n!1")
               (ground))))))))
        ("2" (skosimp*) (assert)) ("3" (skosimp*) (assert))))
      ("2"
       (hide -1)
       (hide 2)
       (skosimp*)
       (expand "bounded_points_exclusive?")
       (inst - "ii!1")
       (expand "boxbetween?")
       (expand "interval_between?")
       (inst - "ii!1")
       (assert)
       (flatten)
       (split +)
       (("1" (flatten) (assert)) ("2" (flatten) (assert))))))
    ("2"
     (skeep)
     (lemma "multipoly_translate_denormalize")
     (inst?)
     (assert)
     (split -)
     (("1"
       (name "cc"
             "product(0, nvars - 1,
                                                  LAMBDA (i: nat):
                                                    IF (NOT (boundedpts(i)`1 AND boundedpts(i)`2))
                                                      THEN X(i) ^ polydegmono(i)
                                                    ELSE 1
                                                    ENDIF)")
       (("1"
         (replace -1)
         (case "cc > 0")
         (("1"
           (hide -2)
           (replace -2)
           (hide -2)
           (lemma "relreal_scal")
           (inst - "rel"
            "multipoly_eval(mpoly, polydegmono, cf, nvars, terms)
                                                         (denormalize_lambda(nvars,
                                                                             X,
                                                                             boundedpts)
                                                                            (Avars, Bvars))"
            "0" "cc")
           (("1"
             (assert)
             (hide 2)
             (inst?)
             (assert)
             (hide 1)
             (expand "boxbetween?" +)
             (expand "interval_between?")
             (skosimp*)
             (expand "boxbetween?")
             (expand "interval_between?")
             (inst - "j!1")
             (flatten)
             (assert)
             (split +)
             (("1" (flatten) (expand "lt_below?") (inst?))
              ("2" (expand "bounded_points_exclusive?") (inst - "j!1"))
              ("3"
               (flatten)
               (assert)
               (split +)
               (("1"
                 (flatten)
                 (expand "denormalize_lambda")
                 (lift-if +)
                 (split +)
                 (("1"
                   (flatten)
                   (assert)
                   (expand "interval_endpoints_inf_trans")
                   (assert)
                   (expand "lt_below?")
                   (inst - "j!1")
                   (mult-by -7 "X(j!1)")
                   (assert))
                  ("2"
                   (flatten)
                   (split +)
                   (("1"
                     (flatten)
                     (cross-mult 2)
                     (assert)
                     (split +)
                     (("1"
                       (flatten)
                       (expand "interval_endpoints_inf_trans")
                       (ground))
                      ("2" (assert))))
                    ("2"
                     (flatten)
                     (assert)
                     (expand "interval_endpoints_inf_trans")
                     (propax))))))
                ("2"
                 (flatten)
                 (assert)
                 (expand "denormalize_lambda")
                 (assert)
                 (lift-if)
                 (split +)
                 (("1"
                   (flatten)
                   (expand "interval_endpoints_inf_trans")
                   (assert)
                   (expand "lt_below?")
                   (inst - "j!1")
                   (mult-by -6 "X(j!1)")
                   (assert))
                  ("2"
                   (flatten)
                   (split +)
                   (("1"
                     (flatten)
                     (cross-mult 2)
                     (assert)
                     (split +)
                     (("1"
                       (flatten)
                       (expand "interval_endpoints_inf_trans")
                       (assert))
                      ("2" (assert))))
                    ("2"
                     (flatten)
                     (assert)
                     (expand "interval_endpoints_inf_trans")
                     (propax))))))))
              ("4"
               (flatten)
               (split +)
               (("1"
                 (flatten)
                 (expand "denormalize_lambda")
                 (assert)
                 (lift-if)
                 (split +)
                 (("1"
                   (flatten)
                   (expand "interval_endpoints_inf_trans")
                   (assert)
                   (expand "lt_below?")
                   (inst - "j!1")
                   (mult-by -7 "1-X(j!1)")
                   (assert))
                  ("2"
                   (flatten)
                   (assert)
                   (split +)
                   (("1"
                     (flatten)
                     (cross-mult 2)
                     (assert)
                     (split +)
                     (("1"
                       (flatten)
                       (expand "interval_endpoints_inf_trans")
                       (assert))
                      ("2" (assert))))
                    ("2"
                     (flatten)
                     (assert)
                     (expand "interval_endpoints_inf_trans")
                     (propax))))))
                ("2"
                 (flatten)
                 (expand "denormalize_lambda")
                 (assert)
                 (lift-if +)
                 (split +)
                 (("1"
                   (flatten)
                   (assert)
                   (expand "interval_endpoints_inf_trans")
                   (expand "lt_below?")
                   (inst -6 "j!1")
                   (mult-by -6 "1-X(j!1)")
                   (assert))
                  ("2"
                   (flatten)
                   (assert)
                   (split +)
                   (("1"
                     (flatten)
                     (cross-mult 2)
                     (assert)
                     (split +)
                     (("1"
                       (flatten)
                       (expand "interval_endpoints_inf_trans")
                       (assert))
                      ("2" (assert))))
                    ("2"
                     (flatten)
                     (assert)
                     (expand "interval_endpoints_inf_trans")
                     (propax))))))))))
            ("2" (assert))))
          ("2"
           (hide 2)
           (hide -1)
           (hide -1)
           (hide -1)
           (expand "cc" +)
           (rewrite "product_gt_0")
           (hide 2)
           (skosimp*)
           (lift-if +)
           (split +)
           (("1"
             (flatten)
             (expand "^")
             (typepred "polydegmono(n!1)")
             (assert)
             (lemma "posreal_expt")
             (inst?)
             (expand "boxbetween?")
             (expand "interval_between?")
             (inst - "n!1")
             (flatten)
             (expand "interval_endpoints_inf_trans")
             (lift-if)
             (ground))
            ("2" (ground))))))
        ("2" (skosimp*) (assert))))
      ("2"
       (hide 2)
       (hide -1)
       (skosimp*)
       (expand "boxbetween?")
       (expand "interval_between?")
       (inst - "ii!1")
       (flatten)
       (expand "interval_endpoints_inf_trans")
       (lift-if)
       (ground))))))


proof_type: f_proof
decl_type: formula
library: Bernstein
theory: multi_polynomial
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (decompose-equality)
   (expand "multipoly_eval")
   (rewrite "sigma_eq")
   (hide 2)
   (skeep)
   (case "polyproduct_eval(mpoly(n), polydegmono, nvars)(x!1) =
                 polyproduct_eval(multipoly_zero_above(mpoly, polydegmono)(n),
                                  polydegmono, nvars)
                                 (x!1)")
   (("1" (assert))
    ("2"
     (hide 2)
     (expand "polyproduct_eval")
     (rewrite "product_eq")
     (hide 2)
     (skeep)
     (expand "polynomial")
     (rewrite "sigma_eq")
     (hide 2)
     (skosimp*)
     (expand "multipoly_zero_above")
     (propax))))


proof_type: f_proof
decl_type: formula
library: Bernstein
theory: multi_polynomial
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (case "FORALL (aa,bb,cc,dd:real): aa=cc AND bb=dd IMPLIES aa+bb = cc+dd")
   (("1"
     (label "addlem" -1)
     (hide "addlem")
     (skeep)
     (expand "multipoly_eval")
     (lemma "sigma_split")
     (inst -
      "LAMBDA (i: nat):
                                 multipoly_add_coeff(cf1, cf2, terms1, terms2)(i) *
                                  polyproduct_eval(multipoly_add(multipoly_zero_above
                                                                 (mpoly1, polydegmono1),
                                                                 multipoly_zero_above
                                                                 (mpoly2, polydegmono2),
                                                                 terms1,
                                                                 terms2)
                                                                (i),
                                                   mono_max(polydegmono1, polydegmono2),
                                                   nvars)
                                                  (X)"
      "terms1-1+terms2" "0" "terms1-1")
     (assert)
     (replace -1)
     (hide -1)
     (reveal "addlem")
     (rewrite "addlem")
     (("1"
       (hide (-1 2))
       (rewrite "sigma_eq")
       (hide 2)
       (skeep)
       (typepred "n")
       (expand "multipoly_add_coeff")
       (expand "multipoly_add")
       (case "polyproduct_eval(mpoly1(n), polydegmono1, nvars)(X) =
                                           polyproduct_eval(multipoly_zero_above(mpoly1, polydegmono1)(n),
                                                            mono_max(polydegmono1, polydegmono2), nvars)
                                                           (X)")
       (("1" (assert))
        ("2"
         (hide 2)
         (expand "polyproduct_eval")
         (rewrite "product_eq")
         (hide 2)
         (skosimp*)
         (expand "polynomial")
         (lemma "sigma_split")
         (name "AA"
               "sigma(0, polydegmono1(n!1),
                                                                  LAMBDA (i: nat):
                                                                    mpoly1(n)(n!1)(i) * (IF i = 0 THEN 1 ELSE X(n!1) ^ i ENDIF))")
         (replace -1)
         (hide -1)
         (inst?)
         (inst - "polydegmono1(n!1)")
         (assert)
         (split -)
         (("1"
           (replace -1)
           (hide -1)
           (case "sigma(1 + polydegmono1(n!1),
                                                             mono_max(polydegmono1, polydegmono2)(n!1),
                                                             LAMBDA (i: nat):
                                                               multipoly_zero_above(mpoly1, polydegmono1)(n)(n!1)(i) *
                                                                (IF i = 0 THEN 1 ELSE X(n!1) ^ i ENDIF))=0")
           (("1"
             (replace -1)
             (assert)
             (hide -1)
             (expand "AA")
             (rewrite "sigma_eq")
             (hide 2)
             (skosimp*)
             (expand "multipoly_zero_above")
             (propax))
            ("2"
             (hide 2)
             (rewrite "sigma_restrict_eq_0")
             (hide 2)
             (skosimp*)
             (expand "multipoly_zero_above")
             (assert))))
          ("2" (assert)) ("3" (hide-all-but 1) (grind))))))
      ("2"
       (hide 2)
       (rewrite "sigma_shift_fun_eq")
       (hide 2)
       (skolem 1 "nn")
       (expand "multipoly_add_coeff")
       (expand "multipoly_add")
       (case "polyproduct_eval(mpoly2(nn), polydegmono2, nvars)(X) =
                                polyproduct_eval(multipoly_zero_above(mpoly2, polydegmono2)(nn),
                                                 mono_max(polydegmono1, polydegmono2), nvars)
                                                (X)")
       (("1" (assert))
        ("2"
         (hide 2)
         (expand "polyproduct_eval")
         (rewrite "product_eq")
         (hide 2)
         (skosimp*)
         (expand "polynomial")
         (name "AA"
               "sigma(0, polydegmono2(n!1),
                           LAMBDA (i: nat):
                             mpoly2(nn)(n!1)(i) * (IF i = 0 THEN 1 ELSE X(n!1) ^ i ENDIF))")
         (replace -1)
         (hide -1)
         (lemma "sigma_split")
         (inst?)
         (inst - "polydegmono2(n!1)")
         (assert)
         (split -)
         (("1"
           (replace -1)
           (hide -1)
           (case "sigma(1 + polydegmono2(n!1),
                               mono_max(polydegmono1, polydegmono2)(n!1),
                               LAMBDA (i: nat):
                                 multipoly_zero_above(mpoly2, polydegmono2)(nn)(n!1)(i) *
                                  (IF i = 0 THEN 1 ELSE X(n!1) ^ i ENDIF))=0")
           (("1"
             (replace -1)
             (hide -1)
             (assert)
             (expand "AA")
             (rewrite "sigma_eq")
             (hide 2)
             (skosimp*)
             (expand "multipoly_zero_above")
             (propax))
            ("2"
             (hide 2)
             (rewrite "sigma_restrict_eq_0")
             (hide 2)
             (skosimp*)
             (expand "multipoly_zero_above")
             (assert))))
          ("2" (assert)) ("3" (hide-all-but 1) (grind))))))))
    ("2" (hide-all-but 1) (grind))))


proof_type: f_proof
decl_type: formula
library: Bernstein
theory: multi_polynomial
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (decompose-equality)
   (expand "multipoly_eval")
   (expand "*" + 1)
   (rewrite "sigma_scal" :dir rl)
   (expand "multipoly_scalar_coeff")
   (assert))


proof_type: f_proof
decl_type: formula
library: Bernstein
theory: multi_polynomial
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "multipoly_scalar_def")
   (inst - "-1" "cf2" "mpoly2" "nvars" "polydegmono2" "terms2")
   (case "multipoly_eval(mpoly1, polydegmono1, cf1, nvars, terms1)(X) + multipoly_eval(mpoly2, polydegmono2,
                               multipoly_scalar_coeff(-1, cf2), nvars, terms2)(X)
                =
                multipoly_eval(multipoly_add(multipoly_zero_above
                                             (mpoly1, polydegmono1),
                                             multipoly_zero_above
                                             (mpoly2, polydegmono2),
                                             terms1,
                                             terms2),
                               mono_max(polydegmono1, polydegmono2),
                               multipoly_add_coeff(cf1,
                                                   multipoly_scalar_coeff(-1, cf2),
                                                   terms1,
                                                   terms2),
                               nvars, terms1 + terms2)
                              (X)")
   (("1" (assert) (replace -2 :dir rl) (expand "*") (propax))
    ("2" (hide 2) (rewrite "multipoly_add_def"))))


proof_type: f_proof
decl_type: formula
library: Bernstein
theory: multi_polynomial
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "polyproduct_eval")
   (rewrite "product_prod")
   (rewrite "product_eq")
   (hide 2)
   (skolem 1 "vv")
   (expand "polyproduct_product")
   (expand "mono_sum")
   (name "aa" "pprod1(vv)")
   (replace -1)
   (name "bb" "pprod2(vv)")
   (replace -1)
   (name "nn" "polydegmono1(vv)")
   (replace -1)
   (name "mm" "polydegmono2(vv)")
   (replace -1)
   (hide -)
   (case "FORALL (mmm:nat): polynomial(LAMBDA (d: nat):
                                   IF d <= nn + mmm
                                     THEN sigma(0, d,
                                                LAMBDA (i: nat):
                                                  (IF i <= nn THEN aa(i) ELSE 0 ENDIF) *
                                                   (IF i<=d AND d - i <= mmm
                                                    THEN bb(d - i)
                                                    ELSE 0
                                                    ENDIF))
                                   ELSE 0
                                   ENDIF,
                                 nn + mmm)
                                (X(vv))
                       = polynomial(aa, nn)(X(vv)) * polynomial(bb, mmm)(X(vv))")
   (("1" (inst?))
    ("2"
     (hide 2)
     (induct "mmm")
     (("1"
       (assert)
       (expand "polynomial")
       (expand "sigma" + 4)
       (expand "sigma" + 4)
       (rewrite "sigma_scal" :dir rl)
       (rewrite "sigma_eq")
       (("1"
         (hide 2)
         (skolem 1 "tt")
         (lemma "sigma_eq_one_arg")
         (inst?)
         (("1"
           (inst - "tt")
           (assert)
           (split -)
           (("1" (replace -1) (hide -) (lift-if) (ground))
            ("2" (skosimp*))))
          ("2" (skosimp*) (assert))))
        ("2" (skosimp*) (assert))))
      ("2"
       (assert)
       (skolem 1 "mmm")
       (flatten)
       (expand "polynomial" + 3)
       (expand "sigma" + 2)
       (expand "polynomial" - 2)
       (expand "polynomial" - 2)
       (expand "polynomial" + 2)
       (replace -1 :dir rl)
       (hide -1)
       (expand "polynomial")
       (rewrite "sigma_scal" :dir rl)
       (lemma "sigma_shift_fun_eq")
       (inst -
        "LAMBDA (i_1: nat):
                        (aa(i_1) * bb(1 + mmm) * X(vv) ^ (1 + mmm)) *
                         (IF i_1 = 0 THEN 1 ELSE X(vv) ^ i_1 ENDIF)"
        "LAMBDA (ii:nat): IF ii<1+mmm THEN 0 ELSE (aa(ii-mmm-1) * bb(1 + mmm) * X(vv) ^ (1 + mmm)) *
                         (IF ii-mmm-1 = 0 THEN 1 ELSE X(vv) ^ (ii-mmm-1) ENDIF) ENDIF"
        "nn" "1+mmm+nn" "0" "1+mmm")
       (("1"
         (assert)
         (replace -1)
         (hide -1)
         (expand "sigma" + 5)
         (expand "sigma" + 1)
         (case "NOT sigma(0, 1 + mmm + nn,
                            LAMBDA (i: nat):
                              (IF i <= nn THEN aa(i) ELSE 0 ENDIF) *
                               (IF i <= 1 + mmm + nn AND 1 - i + mmm + nn <= 1 + mmm
                                  THEN bb(1 - i + mmm + nn)
                                ELSE 0
                                ENDIF))
                       * X(vv) ^ (1 + mmm + nn) = (aa(nn) * bb(1 + mmm) * X(vv) ^ (1 + mmm)) *
                        (IF nn = 0 THEN 1 ELSE X(vv) ^ nn ENDIF)")
         (("1"
           (hide 2)
           (lemma "sigma_eq_one_arg")
           (inst?)
           (("1"
             (inst - "nn")
             (assert)
             (replace -1)
             (hide -1)
             (lift-if)
             (ground)
             (lemma "expt_plus")
             (inst?)
             (("1" (assert))
              ("2"
               (assert)
               (flatten)
               (replace -1)
               (expand "^")
               (expand "expt")
               (propax))))
            ("2" (hide 2) (skosimp*) (assert))))
          ("2"
           (replace -1)
           (assert)
           (hide -)
           (case "NOT sigma(1 + mmm, mmm + nn,
                               LAMBDA (ii: nat):
                                 IF ii < 1 + mmm THEN 0
                                 ELSE (aa(ii - 1 - mmm) * bb(1 + mmm) * X(vv) ^ (1 + mmm)) *
                                       (IF ii - 1 - mmm = 0 THEN 1
                                        ELSE X(vv) ^ (ii - 1 - mmm)
                                        ENDIF)
                                 ENDIF) = sigma(0, mmm + nn,
                               LAMBDA (ii: nat):
                                 IF ii < 1 + mmm THEN 0
                                 ELSE (aa(ii - 1 - mmm) * bb(1 + mmm) * X(vv) ^ (1 + mmm)) *
                                       (IF ii - 1 - mmm = 0 THEN 1
                                        ELSE X(vv) ^ (ii - 1 - mmm)
                                        ENDIF)
                                 ENDIF)")
           (("1"
             (hide 2)
             (lemma "sigma_split")
             (inst -
              "LAMBDA (ii: nat):
                             IF ii < 1 + mmm THEN 0
                             ELSE (aa(ii - 1 - mmm) * bb(1 + mmm) * X(vv) ^ (1 + mmm)) *
                                   (IF ii - 1 - mmm = 0 THEN 1
                                    ELSE X(vv) ^ (ii - 1 - mmm)
                                    ENDIF)
                             ENDIF"
              "mmm+nn" "0" "mmm")
             (("1"
               (assert)
               (replace -1)
               (hide -1)
               (assert)
               (rewrite "sigma_restrict_eq_0"))
              ("2" (hide 2) (skosimp*) (assert))
              ("3" (skosimp*) (assert))))
            ("2"
             (replace -1)
             (hide -1)
             (rewrite "sigma_sum")
             (("1"
               (rewrite "sigma_eq")
               (("1"
                 (hide 2)
                 (skolem 1 "q")
                 (lift-if)
                 (ground)
                 (lift-if)
                 (ground)
                 (("1"
                   (case "q = mmm+1")
                   (("1"
                     (replace -1)
                     (assert)
                     (hide -1)
                     (hide -1)
                     (hide 2)
                     (hide 2)
                     (lemma "sigma_split")
                     (inst -
                      "LAMBDA (i: nat):
                                    (IF i <= nn THEN aa(i) ELSE 0 ENDIF) *
                                     (IF i <= 1 + mmm THEN bb(1 - i + mmm) ELSE 0 ENDIF)"
                      "1+mmm" "0" "0")
                     (("1"
                       (assert)
                       (replace -1)
                       (hide -1)
                       (expand "sigma" + 1)
                       (expand "sigma" + 1)
                       (lemma "sigma_split")
                       (inst -
                        "LAMBDA (i: nat):
                                       (IF i <= nn THEN aa(i) ELSE 0 ENDIF) *
                                        (IF i <= 1 + mmm AND 1 - i + mmm <= mmm
                                           THEN bb(1 - i + mmm)
                                         ELSE 0
                                         ENDIF)"
                        "1+mmm" "0" "0")
                       (("1"
                         (assert)
                         (replace -1)
                         (hide -1)
                         (expand "sigma" + 2)
                         (expand "sigma" + 2)
                         (rewrite "sigma_const_restrict_eq")
                         (("1"
                           (hide 2)
                           (decompose-equality)
                           (("1" (expand "restrict") (propax))
                            ("2" (skosimp*) (assert))
                            ("3" (skosimp*) (assert))))
                          ("2" (skosimp*) (assert))
                          ("3" (skosimp*) (assert))))
                        ("2" (skosimp*) (assert))))
                      ("2" (skosimp*) (assert))))
                    ("2" (assert))))
                  ("2"
                   (typepred "q")
                   (case "NOT q>1+mmm")
                   (("1" (assert))
                    ("2"
                     (hide -2)
                     (hide 1)
                     (hide 2)
                     (hide 2)
                     (case "sigma(0, q,
                                       LAMBDA (i: nat):
                                         (IF i <= nn THEN aa(i) ELSE 0 ENDIF) *
                                          (IF i <= q AND q - i <= 1 + mmm THEN bb(q - i)
                                           ELSE 0
                                           ENDIF)) = sigma(0, q,
                                       LAMBDA (i: nat):
                                         (IF i <= nn THEN aa(i) ELSE 0 ENDIF) *
                                          (IF i <= q AND q - i <= mmm THEN bb(q - i)
                                           ELSE 0
                                           ENDIF)) + aa(-1-mmm+q)*bb(1+mmm)")
                     (("1"
                       (replace -1)
                       (assert)
                       (assert)
                       (lemma "expt_plus")
                       (inst - "1+mmm" "q-1-mmm" "X(vv)")
                       (("1" (assert))
                        ("2"
                         (flatten)
                         (replace -1)
                         (hide -1)
                         (hide -1)
                         (expand "^")
                         (expand "expt")
                         (propax))))
                      ("2"
                       (hide 2)
                       (lemma "sigma_sum")
                       (inst -
                        "LAMBDA (i: nat):
                                       (IF i <= nn THEN aa(i) ELSE 0 ENDIF) *
                                        (IF i <= q AND q - i <= mmm THEN bb(q - i) ELSE 0 ENDIF)"
                        "LAMBDA (i:nat): IF i = q-1-mmm THEN aa(i)*bb(q-i) ELSE 0 ENDIF"
                        "q" "0")
                       (("1"
                         (assert)
                         (case "sigma(0, q,
                                            LAMBDA (i: nat):
                                              IF i = -1 - mmm + q THEN aa(i) * bb(q - i) ELSE 0 ENDIF) = aa(-1 - mmm + q) * bb(1 + mmm)")
                         (("1"
                           (replace -1)
                           (hide -1)
                           (replace -1)
                           (hide -1)
                           (rewrite "sigma_eq")
                           (hide 2)
                           (skosimp*)
                           (lift-if)
                           (ground)
                           (lift-if)
                           (ground)
                           (lift-if)
                           (ground))
                          ("2"
                           (hide 2)
                           (hide -1)
                           (lemma "sigma_eq_one_arg")
                           (inst?)
                           (("1" (inst - "q-1-mmm") (assert))
                            ("2" (skosimp*) (assert))))
                          ("3" (skosimp*) (assert))))
                        ("2" (skosimp*) (assert))
                        ("3" (skosimp*) (assert))))
                      ("3" (skosimp*) (assert))
                      ("4" (skosimp*) (assert))))))))
                ("2" (skosimp*) (assert)) ("3" (skosimp*) (assert))))
              ("2" (skosimp*) (assert))))
            ("3" (skosimp*) (assert)) ("4" (skosimp*) (assert))))
          ("3" (skosimp*) (assert))))
        ("2" (skosimp*) (assert)) ("3" (skosimp*) (assert))))
      ("3" (skosimp*) (assert))))
    ("3" (skosimp*) (assert))))


proof_type: f_proof
decl_type: formula
library: Bernstein
theory: multi_polynomial
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (case "FORALL (X, cf1, cf2: Coeff, mpoly1, mpoly2: MultiPolynomial,
                                            nvars: posnat, polydegmono1, polydegmono2: DegreeMono,
                                            terms1:posnat,jj: nat):
                                      multipoly_eval(mpoly1, polydegmono1, cf1, nvars, terms1)(X) *
                                       multipoly_eval(mpoly2, polydegmono2, cf2, nvars, jj+1)(X)
                                       =
                                       multipoly_eval(multipoly_product(mpoly1,
                                                                        mpoly2,
                                                                        polydegmono1,
                                                                        polydegmono2,
                                                                        terms1,
                                                                        jj+1,
                                                                        jj),
                                                      mono_sum(polydegmono1, polydegmono2),
                                                      multipoly_product_coeff(cf1,
                                                                              cf2,
                                                                              terms1,
                                                                              jj+1,
                                                                              jj),
                                                      nvars, terms1*(jj+1))
                                                     (X)")
   (("1" (skeep) (inst?) (assert))
    ("2"
     (hide 2)
     (induct "jj")
     (("1"
       (skeep)
       (assert)
       (expand "multipoly_eval" + 2)
       (expand "sigma" + 1)
       (expand "sigma" + 1)
       (expand "multipoly_eval")
       (rewrite "sigma_scal" :dir rl)
       (expand "multipoly_product_coeff")
       (rewrite "sigma_eq")
       (hide 2)
       (skolem 1 "dd")
       (expand "multipoly_product")
       (lemma "polyproduct_product_def")
       (inst?)
       (assert))
      ("2"
       (skolem 1 "dd")
       (flatten)
       (skeep)
       (inst - "X" "cf1" "cf2" "mpoly1" "mpoly2" "nvars" "polydegmono1"
        "polydegmono2" "terms1")
       (assert)
       (expand "multipoly_eval" + 2)
       (expand "sigma" + 1)
       (expand "multipoly_eval" - 2)
       (replace -1)
       (hide -1)
       (expand "multipoly_eval")
       (lemma "sigma_split")
       (inst -
        "LAMBDA (i: nat):
                       multipoly_product_coeff(cf1, cf2, terms1, 2 + dd, 1 + dd)(i)
                        *
                        polyproduct_eval(multipoly_product(mpoly1,
                                                           mpoly2,
                                                           polydegmono1,
                                                           polydegmono2,
                                                           terms1,
                                                           2 + dd,
                                                           1 + dd)
                                                          (i),
                                         mono_sum(polydegmono1, polydegmono2),
                                         nvars)
                                        (X)"
        "dd * terms1 - 1 + 2 * terms1" "0" "dd * terms1 - 1 + terms1")
       (assert)
       (replace -1)
       (case "sigma(dd * terms1 + terms1, dd * terms1 - 1 + 2 * terms1,
                           LAMBDA (i: nat):
                             multipoly_product_coeff(cf1, cf2, terms1, 2 + dd, 1 + dd)
                                                    (i)
                              *
                              polyproduct_eval(multipoly_product(mpoly1,
                                                                 mpoly2,
                                                                 polydegmono1,
                                                                 polydegmono2,
                                                                 terms1,
                                                                 2 + dd,
                                                                 1 + dd)
                                                                (i),
                                               mono_sum(polydegmono1, polydegmono2),
                                               nvars)
                                              (X)) = polyproduct_eval(mpoly2(1 + dd), polydegmono2, nvars)(X) *
                     cf2(1 + dd)
                     *
                     sigma(0, terms1 - 1,
                           LAMBDA (i: nat):
                             cf1(i) *
                              polyproduct_eval(mpoly1(i), polydegmono1, nvars)(X))")
       (("1"
         (replace -1)
         (assert)
         (hide -)
         (rewrite "sigma_eq")
         (hide 2)
         (skolem 1 "tt")
         (typepred "tt")
         (case "FORALL (ar,br,cr,dr:real): ar=cr AND br=dr IMPLIES ar*br=cr*dr")
         (("1"
           (rewrite -1)
           (("1"
             (hide 2)
             (hide -1)
             (case "FORALL (jjj:nat,ttt:nat): jjj<1+dd AND ttt<(jjj+1)*terms1 IMPLIES multipoly_product_coeff(cf1, cf2, terms1, 1 + dd, jjj)(ttt) =
                          multipoly_product_coeff(cf1, cf2, terms1, 2 + dd, 1 + jjj)(ttt)")
             (("1" (inst?) (assert))
              ("2"
               (hide-all-but 1)
               (induct "jjj")
               (("1"
                 (skeep)
                 (expand "multipoly_product_coeff" + 2)
                 (lift-if)
                 (ground)
                 (expand "multipoly_product_coeff")
                 (propax))
                ("2"
                 (skosimp*)
                 (assert)
                 (expand "multipoly_product_coeff" + 2)
                 (inst - "ttt!1")
                 (assert)
                 (splash -1)
                 (("1"
                   (replace -1 :dir rl)
                   (hide -1)
                   (expand "multipoly_product_coeff" + 1)
                   (assert))
                  ("2"
                   (assert)
                   (expand "multipoly_product_coeff")
                   (propax))))))))
            ("2"
             (hide 2)
             (hide -1)
             (expand "polyproduct_eval")
             (rewrite "product_eq")
             (hide 2)
             (skolem 1 "vv")
             (case "multipoly_product(mpoly1, mpoly2, polydegmono1,
                                                      polydegmono2, terms1, 1 + dd, dd)
                                                     (tt)(vv)=multipoly_product(mpoly1,
                                                       mpoly2,
                                                       polydegmono1,
                                                       polydegmono2,
                                                       terms1,
                                                       2 + dd,
                                                       1 + dd)
                                                      (tt)(vv)")
             (("1" (assert))
              ("2"
               (hide 2)
               (case "FORALL (jjj:nat,ttt:nat): jjj<1+dd AND ttt<(jjj+1)*terms1 IMPLIES multipoly_product(mpoly1, mpoly2, polydegmono1, polydegmono2, terms1,
                                             1 + dd, jjj)
                                            (ttt)(vv)
                            =
                            multipoly_product(mpoly1, mpoly2, polydegmono1, polydegmono2,
                                              terms1, 2 + dd, 1 + jjj)
                                             (ttt)(vv)")
               (("1" (inst?) (assert))
                ("2"
                 (hide 2)
                 (induct "jjj")
                 (("1"
                   (skeep)
                   (expand "multipoly_product")
                   (assert)
                   (expand "multipoly_product")
                   (propax))
                  ("2"
                   (skosimp*)
                   (assert)
                   (expand "multipoly_product" + 2)
                   (inst - "ttt!1")
                   (assert)
                   (splash -1)
                   (("1"
                     (replace -1 :dir rl)
                     (hide -1)
                     (expand "multipoly_product" + 1)
                     (assert))
                    ("2" (expand "multipoly_product") (assert))))))))))))
          ("2" (hide 2) (grind))))
        ("2"
         (hide 2)
         (hide -1)
         (rewrite "sigma_scal" :dir rl)
         (rewrite "sigma_shift_fun_eq")
         (hide 2)
         (skolem 1 "iii")
         (expand "multipoly_product_coeff")
         (expand "multipoly_product")
         (lemma "polyproduct_product_def")
         (inst?)
         (assert))))))))


proof_type: f_proof
decl_type: formula
library: Bernstein
theory: multi_polynomial
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (lemma "multipoly_product_def")
   (skeep)
   (inst - "X" "cf" "cf" "mpoly" "mpoly" "nvars" "polydegmono"
    "polydegmono" "terms" "terms")
   (expand "sq" +)
   (replace -1)
   (hide -)
   (expand "multipoly_sq")
   (expand "const_degmono")
   (expand "mono_sum")
   (expand "multipoly_sq_coeff")
   (case "multipoly_product_coeff(cf,
                                                             cf,
                                                             terms,
                                                             terms,
                                                             terms - 1)=(LAMBDA (i: nat):
                                        multipoly_product_coeff(cf,
                                                                cf,
                                                                terms,
                                                                terms,
                                                                terms - 1)
                                                               (i))")
   (("1"
     (assert)
     (case "multipoly_product(mpoly,
                                                           mpoly,
                                                           polydegmono,
                                                           polydegmono,
                                                           terms,
                                                           terms,
                                                           terms - 1) = LAMBDA (i: nat):
                                            multipoly_product(mpoly,
                                                              mpoly,
                                                              polydegmono,
                                                              polydegmono,
                                                              terms,
                                                              terms,
                                                              terms - 1)
                                                             (i)")
     (("1" (assert)) ("2" (hide-all-but 1) (decompose-equality))))
    ("2" (hide-all-but 1) (decompose-equality))))


proof_type: f_proof
decl_type: formula
library: Bernstein
theory: poly2bernstein
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "multipoly_eval")
   (expand "multibs_eval")
   (decompose-equality)
   (rewrite "sigma_restrict_eq")
   (hide 2)
   (decompose-equality)
   (expand "restrict")
   (lift-if)
   (ground)
   (case "polyproduct_eval(mpoly(x!2), polydegmono, nvars)(x!1) =
                        bsproduct_eval(bs_convert_poly(mpoly,
                                                       polydegmono,
                                                       bsdegmono,
                                                       nvars,
                                                       terms)
                                                      (x!2),
                                       bsdegmono, nvars)
                                      (x!1)")
   (("1" (assert))
    ("2"
     (hide 3)
     (expand "polyproduct_eval")
     (expand "bsproduct_eval")
     (rewrite "product_restrict_eq")
     (("1"
       (hide 2)
       (decompose-equality)
       (("1"
         (expand "restrict")
         (lift-if)
         (ground)
         (lemma "Bernstein_equivalence")
         (inst?)
         (expand "Bern_poly")
         (expand "Bernstein_polynomial")
         (inst - "bsdegmono(x!3)")
         (assert)
         (split -)
         (("1"
           (replace -1)
           (assert)
           (expand "bs_convert_poly")
           (expand "bs_convert_mono")
           (propax))
          ("2"
           (hide 3)
           (expand "le_below_mono?")
           (inst - "x!3")
           (assert))))
        ("2" (skosimp*) (assert)) ("3" (skosimp*) (assert))))
      ("2" (skosimp*) (assert)) ("3" (skosimp*) (assert))))))


proof_type: f_proof
decl_type: formula
library: Bernstein
theory: poly_minmax
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "sound_poly?")
   (label "altb" -2)
   (assert)
   (hide (-2 -3))
   (split -)
   (("1"
     (flatten)
     (expand "sound_poly_fin?")
     (flatten)
     (hide (-3 -4))
     (expand "forall_X_poly_between")
     (case "EXISTS (ABv:Vars): boxbetween?(nvars)(Avars, Bvars, intendpts, boundedpts)(ABv)")
     (("1"
       (skeep -1)
       (inst - "ABv")
       (assert)
       (expand "lb_le_ub?")
       (ground))
      ("2"
       (name "ABvv" "LAMBDA (i:nat): (Avars(i) + Bvars(i))/2")
       (case "FORALL (ij:nat): ij<nvars IMPLIES Avars(ij) < ABvv(ij) AND ABvv(ij) < Bvars(ij)")
       (("1"
         (inst + "ABvv")
         (hide -4)
         (expand "boxbetween?")
         (expand "interval_between?")
         (skosimp*)
         (inst - "j!1")
         (expand "bounded_points_true?")
         (inst - "j!1")
         (ground))
        ("2"
         (hide 2)
         (hide -3)
         (skosimp*)
         (reveal "altb")
         (expand "lt_below?")
         (inst - "ij!1")
         (expand "ABvv" +)
         (ground))))))
    ("2"
     (flatten)
     (expand "sound_poly_inf?")
     (inst - ">")
     (expand "lb_le_ub?")
     (assert))))


proof_type: t_proof
decl_type: tcc
library: Bernstein
theory: poly_minmax
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (case "FORALL (AXYZ:Vars): boxbetween?(nvars!1)(zeroes, ones, infintendpts!1, boundedpts_true)(AXYZ) IMPLIES EXISTS (cr: posreal):
                                                                                                                          cr *
                                                                                                                           multipoly_eval(multipoly_translate(mpoly!1,
                                                                                                                                                              polydegmono!1,
                                                                                                                                                              nvars!1,
                                                                                                                                                              boundedpts!1)
                                                                                                                                                             (Avars!1, Bvars!1),
                                                                                                                                          polydegmono!1, cf!1, nvars!1, terms!1)
                                                                                                                                         (AXYZ)
                                                                                                                           =
                                                                                                                           multibs_eval(bspoly!1, polydegmono!1, cf!1, nvars!1, terms!1)(AXYZ)")
   (("1"
     (label "AXYZlem" -1)
     (hide "AXYZlem")
     (case "FORALL (ll:list[real]): length(ll)=nvars!1 AND (FORALL (ii:below(nvars!1)): (NOT (boundedpts!1(ii)`1 AND boundedpts!1(ii)`2)) IMPLIES nth(ll,ii)>0) IMPLIES (EXISTS (ccrr:posreal): (bounded_points_true?(nvars!1)(boundedpts!1) IMPLIES ccrr=1) AND
                                                                                                                                                                                                          ( ccrr*multipoly_eval(multipoly_translate(mpoly!1,
                                                                                                                                                                                                                                                    polydegmono!1,
                                                                                                                                                                                                                                                    nvars!1,
                                                                                                                                                                                                                                                    boundedpts!1)
                                                                                                                                                                                                                                                   (Avars!1, Bvars!1),
                                                                                                                                                                                                                                polydegmono!1, cf!1, nvars!1, terms!1)
                                                                                                                                                                                                                               (list2array(0)(ll))
                                                                                                                                                                                                                  =
                                                                                                                                                                                                                  multipoly_eval(mpoly!1, polydegmono!1, cf!1, nvars!1, terms!1)
                                                                                                                                                                                                                                (list2array(0)
                                                                                                                                                                                                                                           (denormalize_listreal(ll)
                                                                                                                                                                                                                                                                (Avars!1,
                                                                                                                                                                                                                                                                 Bvars!1,
                                                                                                                                                                                                                                                                 boundedpts!1)))))")
     (("1"
       (label "mlem" -1)
       (hide "mlem")
       (label "mpolytrname" -1)
       (hide -1)
       (label "bspolyname" -1)
       (hide -1)
       (label "infintendptsname" -1)
       (hide -1)
       (label "bsminmaxname" -1)
       (hide -1)
       (typepred "bs_minmax!1")
       (expand "sound_poly?")
       (flatten)
       (expand "sound?")
       (flatten)
       (case "bounded_points_true?(nvars!1)(boundedpts!1)")
       (("1"
         (case "NOT FORALL (iijj:below(nvars!1)): infintendpts!1(iijj) = intendpts!1(iijj)")
         (("1"
           (hide-all-but (1 -))
           (skosimp*)
           (expand "bounded_points_true?")
           (inst - "iijj!1")
           (flatten)
           (reveal "infintendptsname")
           (replace "infintendptsname" +)
           (hide "infintendptsname")
           (expand "interval_endpoints_inf_trans")
           (assert))
          ("2"
           (label "infdef" -1)
           (hide "infdef")
           (assert)
           (hide 2)
           (expand "sound_poly_fin?")
           (split +)
           (("1"
             (hide (-3 -4))
             (expand "forall_X_poly_between")
             (skosimp*)
             (reveal "bspolyname")
             (replace "bspolyname")
             (hide "bspolyname")
             (lemma "bs_convert_poly_def")
             (inst - "polydegmono!1" "cf!1" "mpolytr!1" "nvars!1"
              "polydegmono!1" "terms!1")
             (split -)
             (("1"
               (expand "forall_X_between")
               (replace -1 :dir rl)
               (hide -1)
               (reveal "mpolytrname")
               (replace "mpolytrname")
               (hide "mpolytrname")
               (lemma "multipoly_translate_bounded_def")
               (inst?)
               (inst - "X!1" "intendpts!1")
               (assert)
               (inst -
                "normalize_lambda(nvars!1, X!1, boundedpts!1)
                                                                                                                                                                                                                                                                                                                                                                                                                   (Avars!1, Bvars!1)")
               (replace -1)
               (split -4)
               (("1" (ground))
                ("2"
                 (hide 2)
                 (case "normalize_lambda(nvars!1, X!1, boundedpts!1)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (Avars!1, Bvars!1) = (LAMBDA (i: nat):
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        IF i < nvars!1 THEN
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (X!1(i) - Avars!1(i)) /
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       (Bvars!1(i) - Avars!1(i))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        ELSE 0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        ENDIF)")
                 (("1"
                   (replace -1)
                   (hide -1)
                   (hide -1)
                   (expand "boxbetween?")
                   (expand "interval_between?")
                   (expand "unitbox?")
                   (skosimp*)
                   (inst - "j!1")
                   (expand "bounded_points_true?")
                   (inst - "j!1")
                   (flatten)
                   (assert)
                   (case "Avars!1(j!1) <= X!1(j!1) AND X!1(j!1) <= Bvars!1(j!1)")
                   (("1"
                     (flatten)
                     (split +)
                     (("1" (cross-mult 1) (assert))
                      ("2" (cross-mult 1) (assert))))
                    ("2" (ground))))
                  ("2"
                   (hide 2)
                   (hide -1)
                   (decompose-equality)
                   (("1"
                     (expand "bounded_points_true?")
                     (inst - "x!1")
                     (("1"
                       (flatten)
                       (expand "normalize_lambda")
                       (assert)
                       (expand "boxbetween?")
                       (expand "interval_between?")
                       (inst - "x!1")
                       (("1" (assert) (lift-if) (ground))
                        ("2" (assert))))
                      ("2"
                       (assert)
                       (expand "normalize_lambda")
                       (propax))))
                    ("2"
                     (skosimp*)
                     (expand "boxbetween?")
                     (expand "interval_between?")
                     (inst - "i!1")
                     (expand "bounded_points_true?")
                     (inst - "i!1")
                     (flatten)
                     (assert))))
                  ("3"
                   (hide (-1 2))
                   (skosimp*)
                   (expand "lt_below?")
                   (inst - "i!1")
                   (assert))))))
              ("2" (hide-all-but 1) (grind))))
            ("2"
             (hide (-2 -4))
             (expand "box_poly_lb?")
             (expand "unit_box_lb?")
             (expand "interval_between?")
             (flatten)
             (assert)
             (case "cons?(bs_minmax!1`lb_var)")
             (("1"
               (assert)
               (flatten)
               (case "NOT length(denormalize_listreal(bs_minmax!1`lb_var)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (Avars!1, Bvars!1, boundedpts!1))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    = nvars!1")
               (("1" (hide 2) (assert))
                ("2"
                 (assert)
                 (split +)
                 (("1"
                   (skosimp*)
                   (expand "bounded_points_true?")
                   (inst - "iup!1")
                   (flatten)
                   (assert)
                   (inst - "iup!1")
                   (flatten)
                   (expand "lt_below?")
                   (inst - "iup!1")
                   (assert)
                   (expand "denormalize_listreal")
                   (typepred
                    "denormalize_listreal_rec(bs_minmax!1`lb_var,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 length(bs_minmax!1`lb_var),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 Avars!1,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 Bvars!1,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 boundedpts!1)")
                   (inst - "iup!1")
                   (assert)
                   (hide (-1 -2))
                   (rewrite "list2array_sound")
                   (rewrite "list2array_sound")
                   (replace -1)
                   (hide -1)
                   (case "LET ccd=Bvars!1(iup!1)-Avars!1(iup!1) IN (IF intendpts!1(iup!1)`1 THEN 0 <= ccd*nth(bs_minmax!1`lb_var, iup!1)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        ELSE 0 < ccd*nth(bs_minmax!1`lb_var, iup!1)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        ENDIF) AND (IF intendpts!1(iup!1)`2 THEN ccd*nth(bs_minmax!1`lb_var, iup!1) <= ccd
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        ELSE ccd*nth(bs_minmax!1`lb_var, iup!1) < ccd
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        ENDIF)")
                   (("1" (hide (-8 -9)) (assert) (lift-if) (ground))
                    ("2"
                     (hide 2)
                     (reveal "infdef")
                     (inst - "iup!1")
                     (replace "infdef")
                     (hide "infdef")
                     (assert)
                     (split +)
                     (("1"
                       (flatten)
                       (assert)
                       (mult-by -8 "Bvars!1(iup!1)-Avars!1(iup!1)")
                       (assert))
                      ("2"
                       (flatten)
                       (assert)
                       (mult-by -7 "Bvars!1(iup!1)-Avars!1(iup!1)")
                       (assert))
                      ("3"
                       (flatten)
                       (assert)
                       (mult-by -9 "Bvars!1(iup!1)-Avars!1(iup!1)")
                       (assert))
                      ("4"
                       (flatten)
                       (assert)
                       (mult-by -8 "Bvars!1(iup!1)-Avars!1(iup!1)")
                       (assert))))))
                  ("2"
                   (hide -6)
                   (case "multibs_eval(bspoly!1, polydegmono!1, cf!1, nvars!1, terms!1)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (list2array(0)(bs_minmax!1`lb_var))=multipoly_eval(mpoly!1, polydegmono!1, cf!1, nvars!1, terms!1)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (list2array(0)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               (denormalize_listreal(bs_minmax!1`lb_var)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (Avars!1,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     Bvars!1,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     boundedpts!1)))")
                   (("1" (assert))
                    ("2"
                     (hide 2)
                     (reveal "bspolyname")
                     (replace "bspolyname")
                     (hide "bspolyname")
                     (lemma "bs_convert_poly_def")
                     (inst - "polydegmono!1" "cf!1" "mpolytr!1" "nvars!1"
                      "polydegmono!1" "terms!1")
                     (split -1)
                     (("1"
                       (replace -1 :dir rl)
                       (hide -1)
                       (reveal "mpolytrname")
                       (replace "mpolytrname")
                       (hide "mpolytrname")
                       (reveal "mlem")
                       (inst?)
                       (assert)
                       (split -)
                       (("1" (skosimp*) (assert))
                        ("2"
                         (expand "bounded_points_true?")
                         (skosimp*)
                         (inst - "ii!1"))))
                      ("2" (hide-all-but 1) (grind))))))))))
              ("2" (hide-all-but (-1 1)) (grind))))
            ("3"
             (expand "box_poly_ub?")
             (expand "interval_between?")
             (hide (-2 -3))
             (flatten)
             (expand "unit_box_ub?")
             (expand "interval_between?")
             (case "cons?(bs_minmax!1`ub_var)")
             (("1"
               (assert)
               (flatten)
               (case "NOT length(denormalize_listreal(bs_minmax!1`ub_var)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (Avars!1, Bvars!1, boundedpts!1))
                                                                                                                                                                                                                                                                                                                                                                                                                                                      = nvars!1")
               (("1" (hide 2) (assert))
                ("2"
                 (assert)
                 (split +)
                 (("1"
                   (skosimp*)
                   (expand "bounded_points_true?")
                   (inst - "iup!1")
                   (flatten)
                   (assert)
                   (inst - "iup!1")
                   (flatten)
                   (expand "lt_below?")
                   (inst - "iup!1")
                   (assert)
                   (expand "denormalize_listreal")
                   (typepred
                    "denormalize_listreal_rec(bs_minmax!1`ub_var,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 length(bs_minmax!1`ub_var),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 Avars!1,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 Bvars!1,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 boundedpts!1)")
                   (inst - "iup!1")
                   (assert)
                   (hide (-1 -2))
                   (rewrite "list2array_sound")
                   (rewrite "list2array_sound")
                   (replace -1)
                   (hide -1)
                   (case "LET ccd=Bvars!1(iup!1)-Avars!1(iup!1) IN (IF intendpts!1(iup!1)`1 THEN 0 <= ccd*nth(bs_minmax!1`ub_var, iup!1)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        ELSE 0 < ccd*nth(bs_minmax!1`ub_var, iup!1)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        ENDIF) AND (IF intendpts!1(iup!1)`2 THEN ccd*nth(bs_minmax!1`ub_var, iup!1) <= ccd
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        ELSE ccd*nth(bs_minmax!1`ub_var, iup!1) < ccd
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        ENDIF)")
                   (("1" (hide (-8 -9)) (assert) (lift-if) (ground))
                    ("2"
                     (hide 2)
                     (reveal "infdef")
                     (inst - "iup!1")
                     (replace "infdef")
                     (hide "infdef")
                     (assert)
                     (split +)
                     (("1"
                       (flatten)
                       (assert)
                       (mult-by -8 "Bvars!1(iup!1)-Avars!1(iup!1)")
                       (assert))
                      ("2"
                       (flatten)
                       (assert)
                       (mult-by -7 "Bvars!1(iup!1)-Avars!1(iup!1)")
                       (assert))
                      ("3"
                       (flatten)
                       (assert)
                       (mult-by -9 "Bvars!1(iup!1)-Avars!1(iup!1)")
                       (assert))
                      ("4"
                       (flatten)
                       (assert)
                       (mult-by -8 "Bvars!1(iup!1)-Avars!1(iup!1)")
                       (assert))))))
                  ("2"
                   (hide -6)
                   (case "multibs_eval(bspoly!1, polydegmono!1, cf!1, nvars!1, terms!1)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (list2array(0)(bs_minmax!1`ub_var))=multipoly_eval(mpoly!1, polydegmono!1, cf!1, nvars!1, terms!1)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (list2array(0)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               (denormalize_listreal(bs_minmax!1`ub_var)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (Avars!1,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     Bvars!1,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     boundedpts!1)))")
                   (("1" (assert))
                    ("2"
                     (hide 2)
                     (reveal "bspolyname")
                     (replace "bspolyname")
                     (hide "bspolyname")
                     (lemma "bs_convert_poly_def")
                     (inst - "polydegmono!1" "cf!1" "mpolytr!1" "nvars!1"
                      "polydegmono!1" "terms!1")
                     (split -1)
                     (("1"
                       (replace -1 :dir rl)
                       (hide -1)
                       (reveal "mpolytrname")
                       (replace "mpolytrname")
                       (hide "mpolytrname")
                       (reveal "mlem")
                       (inst?)
                       (assert)
                       (split -)
                       (("1" (skosimp*) (assert))
                        ("2"
                         (skosimp*)
                         (expand "bounded_points_true?")
                         (inst - "ii!1"))))
                      ("2" (hide-all-but 1) (grind))))))))))
              ("2" (hide-all-but (-1 1)) (grind))))
            ("4"
             (expand "length_eq?")
             (flatten)
             (assert)
             (case "NOT (cons?(bs_minmax!1`lb_var) OR cons?(bs_minmax!1`ub_var))")
             (("1" (hide-all-but (-1 1)) (flatten) (grind))
              ("2" (replace -1) (hide-all-but (-7 1)) (grind))))))))
        ("2"
         (assert)
         (hide 2)
         (expand "sound_poly_inf?")
         (skosimp*)
         (case "NOT ((relreal!1(bs_minmax!1`lb_min, 0) AND
                                                                                                                                    relreal!1(bs_minmax!1`ub_max, 0)
                                                                                                                                    IMPLIES
                                                                                                                                    forall_X_poly_rel(relreal!1, 0)
                                                                                                                                                     (mpoly!1, polydegmono!1, cf!1, nvars!1,
                                                                                                                                                      terms!1, Avars!1, Bvars!1, intendpts!1,
                                                                                                                                                      boundedpts!1)) AND bs_minmax!1`lb_min <= bs_minmax!1`ub_max)")
         (("1"
           (hide 3)
           (case "FORALL (XY:Vars): boxbetween?(nvars!1)
                                                                                                                                                                (Avars!1, Bvars!1, intendpts!1, boundedpts!1)(XY) IMPLIES (EXISTS (c:posreal): let ryztr = multipoly_eval(mpoly!1, polydegmono!1, cf!1, nvars!1,
                                                                                                                                                                                                                                                                                                                                                                            terms!1)
                                                                                                                                                                                                                                                                                                                                                                           (XY) IN bs_minmax!1`lb_min <= c*ryztr AND c*ryztr <= bs_minmax!1`ub_max)")
           (("1"
             (split +)
             (("1"
               (flatten)
               (expand "forall_X_poly_rel")
               (skosimp*)
               (inst - "X!1")
               (assert)
               (hide-all-but (-1 -2 -4 1))
               (skosimp*)
               (typepred "relreal!1")
               (expand "realorder?")
               (grind :exclude "multipoly_eval")
               (("1" (mult-by 1 "c!1") (assert))
                ("2" (mult-by 1 "c!1") (assert))
                ("3" (mult-by 1 "c!1") (assert))
                ("4" (mult-by 1 "c!1") (assert))))
              ("2"
               (case "EXISTS (XY: Vars):
                                                                                                                                                                                     boxbetween?(nvars!1)(Avars!1, Bvars!1, intendpts!1, boundedpts!1)
                                                                                                                                                                                                (XY)")
               (("1"
                 (skosimp*)
                 (inst - "XY!1")
                 (assert)
                 (skosimp*)
                 (assert))
                ("2"
                 (hide -1)
                 (name "ABv"
                       "LAMBDA (i:nat): (Avars!1(i) + Bvars!1(i))/2")
                 (case "FORALL (ij:nat): ij<nvars!1 IMPLIES Avars!1(ij) < ABv(ij) AND ABv(ij) < Bvars!1(ij)")
                 (("1"
                   (inst + "ABv")
                   (expand "boxbetween?")
                   (expand "interval_between?")
                   (skosimp*)
                   (inst - "j!1")
                   (expand "bounded_points_exclusive?")
                   (inst - "j!1")
                   (ground))
                  ("2"
                   (hide 2)
                   (expand "ABv" +)
                   (skosimp*)
                   (expand "lt_below?")
                   (inst - "ij!1")
                   (assert))))))))
            ("2"
             (hide 2)
             (reveal "bspolyname")
             (replace "bspolyname")
             (hide "bspolyname")
             (lemma "bs_convert_poly_def")
             (inst - "polydegmono!1" "cf!1" "mpolytr!1" "nvars!1"
              "polydegmono!1" "terms!1")
             (split -)
             (("1"
               (expand "forall_X_between")
               (skosimp*)
               (replace -1 :dir rl)
               (hide -1)
               (reveal "mpolytrname")
               (replace "mpolytrname")
               (hide "mpolytrname")
               (lemma "multipoly_translate_normalize")
               (inst?)
               (inst - "XY!1")
               (split -)
               (("1"
                 (skoletin -1 :old? t)
                 (case "pconst>0")
                 (("1"
                   (hide -2)
                   (inst + "1/pconst")
                   (("1"
                     (assert)
                     (replace -2 :dir rl)
                     (hide -2)
                     (inst?)
                     (split -)
                     (("1"
                       (flatten)
                       (split +)
                       (("1"
                         (cross-mult 1)
                         (mult-by -1 "pconst")
                         (assert))
                        ("2"
                         (cross-mult 1)
                         (mult-by -2 "pconst")
                         (assert))))
                      ("2"
                       (hide 2)
                       (lemma "normalize_lambda_unitbox")
                       (inst?)
                       (assert))))
                    ("2"
                     (case "1/pconst>0")
                     (("1" (assert)) ("2" (cross-mult 1))
                      ("3" (assert))))
                    ("3" (assert))))
                  ("2"
                   (hide 2)
                   (replace -1)
                   (hide (-1 -2 -4))
                   (rewrite "product_gt_0")
                   (("1"
                     (hide 2)
                     (skosimp*)
                     (lift-if)
                     (ground)
                     (("1"
                       (rewrite "expt_pos")
                       (expand "boxbetween?")
                       (expand "interval_between?")
                       (inst - "n!1")
                       (ground))
                      ("2"
                       (rewrite "expt_pos")
                       (expand "boxbetween?")
                       (expand "interval_between?")
                       (inst - "n!1")
                       (ground))
                      ("3"
                       (rewrite "expt_pos")
                       (expand "boxbetween?")
                       (expand "interval_between?")
                       (inst - "n!1")
                       (ground))))
                    ("2" (hide 2) (skosimp*) (assert))
                    ("3" (hide 2) (skosimp*) (assert))))))
                ("2" (propax))
                ("3"
                 (hide 2)
                 (hide -2)
                 (expand "boxbetween?")
                 (expand "interval_between?")
                 (skosimp*)
                 (inst - "ii!1")
                 (ground))
                ("4" (propax))))
              ("2" (hide-all-but 1) (grind))))))
          ("2"
           (flatten)
           (assert)
           (replace -1)
           (assert)
           (hide (-1 -2))
           (split +)
           (("1"
             (hide (-1 -3))
             (expand "unit_box_lb?")
             (expand "interval_between?")
             (expand "inf_box_poly_lb?")
             (expand "interval_between?")
             (flatten)
             (case "cons?(bs_minmax!1`lb_var)")
             (("1"
               (assert)
               (flatten)
               (assert)
               (case "(relreal!1(bs_minmax!1`lb_max, 0) IFF
                                                                                                          relreal!1(multipoly_eval(mpoly!1, polydegmono!1, cf!1, nvars!1,
                                                                                                                                   terms!1)
                                                                                                                                  (list2array(0)
                                                                                                                                             (denormalize_listreal
                                                                                                                                              (bs_minmax!1`lb_var)
                                                                                                                                              (Avars!1,
                                                                                                                                               Bvars!1,
                                                                                                                                               boundedpts!1))),
                                                                                                                    0))")
               (("1"
                 (replace -1 :dir rl)
                 (assert)
                 (hide -1)
                 (skosimp*)
                 (expand "bounded_points_exclusive?")
                 (inst - "iup!1")
                 (inst - "iup!1")
                 (expand "lt_below?")
                 (inst - "iup!1")
                 (flatten)
                 (assert)
                 (expand "denormalize_listreal")
                 (typepred
                  "denormalize_listreal_rec(bs_minmax!1`lb_var,
                                                                                                                                                                                                                                                                                                                           length(bs_minmax!1`lb_var),
                                                                                                                                                                                                                                                                                                                           Avars!1,
                                                                                                                                                                                                                                                                                                                           Bvars!1,
                                                                                                                                                                                                                                                                                                                           boundedpts!1)")
                 (inst - "iup!1")
                 (rewrite "list2array_sound")
                 (rewrite "list2array_sound")
                 (replace -3 +)
                 (hide (-1 -2 -3))
                 (assert)
                 (reveal "infintendptsname")
                 (replace -1)
                 (hide -1)
                 (case "LET cyz = Bvars!1(iup!1)-Avars!1(iup!1) IN (IF interval_endpoints_inf_trans(Avars!1,
                                                                                                                                                                                                                                                                                                                                                                                           Bvars!1,
                                                                                                                                                                                                                                                                                                                                                                                           intendpts!1,
                                                                                                                                                                                                                                                                                                                                                                                           boundedpts!1)
                                                                                                                                                                                                                                                                                                                                                                                          (iup!1)`1
                                                                                                                                                                                                                                                                                                                                                             THEN 0 <= cyz*nth(bs_minmax!1`lb_var, iup!1)
                                                                                                                                                                                                                                                                                                                                                           ELSE 0 < cyz*nth(bs_minmax!1`lb_var, iup!1)
                                                                                                                                                                                                                                                                                                                                                           ENDIF) AND (IF interval_endpoints_inf_trans(Avars!1,
                                                                                                                                                                                                                                                                                                                                                                                           Bvars!1,
                                                                                                                                                                                                                                                                                                                                                                                           intendpts!1,
                                                                                                                                                                                                                                                                                                                                                                                           boundedpts!1)
                                                                                                                                                                                                                                                                                                                                                                                          (iup!1)`2
                                                                                                                                                                                                                                                                                                                                                             THEN cyz*nth(bs_minmax!1`lb_var, iup!1) <= cyz
                                                                                                                                                                                                                                                                                                                                                           ELSE cyz*nth(bs_minmax!1`lb_var, iup!1) < cyz
                                                                                                                                                                                                                                                                                                                                                           ENDIF)")
                 (("1"
                   (expand "interval_endpoints_inf_trans")
                   (assert)
                   (lift-if)
                   (lift-if)
                   (ground)
                   (("1" (cross-mult 4)) ("2" (cross-mult 6))
                    ("3" (cross-mult 4)) ("4" (cross-mult 6))))
                  ("2"
                   (hide 2)
                   (assert)
                   (split +)
                   (("1"
                     (flatten)
                     (assert)
                     (mult-by -5 "Bvars!1(iup!1)-Avars!1(iup!1)")
                     (assert))
                    ("2"
                     (flatten)
                     (assert)
                     (mult-by -4 "Bvars!1(iup!1)-Avars!1(iup!1)")
                     (assert))
                    ("3"
                     (flatten)
                     (assert)
                     (mult-by -6 "Bvars!1(iup!1)-Avars!1(iup!1)")
                     (assert))
                    ("4"
                     (flatten)
                     (assert)
                     (mult-by -5 "Bvars!1(iup!1)-Avars!1(iup!1)")
                     (assert))))))
                ("2"
                 (hide 2)
                 (reveal "AXYZlem")
                 (reveal "mlem")
                 (inst -1 "bs_minmax!1`lb_var")
                 (assert)
                 (split -1)
                 (("1"
                   (skosimp*)
                   (replace -1 :dir rl)
                   (hide -1)
                   (inst - "list2array(0)(bs_minmax!1`lb_var)")
                   (split -)
                   (("1"
                     (skosimp*)
                     (replace -1 :dir rl)
                     (replace -6 :dir rl)
                     (hide-all-but 1)
                     (name-replace "kjkjdsadf"
                      "multipoly_eval(multipoly_translate(mpoly!1,
                                                                                                                                                            polydegmono!1,
                                                                                                                                                            nvars!1,
                                                                                                                                                            boundedpts!1)
                                                                                                                                                           (Avars!1, Bvars!1),
                                                                                                                                        polydegmono!1, cf!1, nvars!1, terms!1)
                                                                                                                                       (list2array(0)(bs_minmax!1`lb_var))")
                     (case "FORALL (ordsdf:(realorder?),rr1:real,ccg1,ccg2:posreal): ordsdf(ccg1*rr1,0) IMPLIES ordsdf(ccg2*rr1,0)")
                     (("1"
                       (inst-cp - "relreal!1" "kjkjdsadf" "cr!1"
                        "ccrr!1")
                       (inst - "relreal!1" "kjkjdsadf" "ccrr!1" "cr!1")
                       (ground))
                      ("2"
                       (hide 2)
                       (case "FORALL (ordsdf:(realorder?),rr1:real,ccg2:posreal): ordsdf(rr1,0) IMPLIES ordsdf(ccg2*rr1,0)")
                       (("1"
                         (skeep)
                         (inst - "ordsdf" "ccg1*rr1" "ccg2/ccg1")
                         (assert))
                        ("2"
                         (hide 2)
                         (skeep)
                         (typepred "ordsdf")
                         (expand "realorder?")
                         (split -)
                         (("1" (replace -1) (mult-by -2 "ccg2") (assert))
                          ("2" (replace -1) (mult-by -2 "ccg2") (assert))
                          ("3" (replace -1) (mult-by -2 "ccg2") (assert))
                          ("4"
                           (replace -1)
                           (mult-by -2 "ccg2")
                           (assert))))))))
                    ("2"
                     (hide 2)
                     (expand "boxbetween?")
                     (expand "interval_between?")
                     (propax))))
                  ("2"
                   (hide 2)
                   (hide "AXYZlem")
                   (reveal "infintendptsname")
                   (replace -1)
                   (hide -1)
                   (skosimp*)
                   (inst - "ii!1")
                   (expand "interval_endpoints_inf_trans")
                   (expand "bounded_points_exclusive?")
                   (inst - "ii!1")
                   (lift-if)
                   (lift-if)
                   (rewrite "list2array_sound")
                   (ground))))))
              ("2" (replace 1) (hide 2) (hide-all-but (-1 1)) (grind))))
            ("2"
             (hide (-1 -2))
             (expand "unit_box_ub?")
             (expand "interval_between?")
             (expand "inf_box_poly_ub?")
             (expand "interval_between?")
             (flatten)
             (case "cons?(bs_minmax!1`ub_var)")
             (("1"
               (assert)
               (flatten)
               (assert)
               (case "(relreal!1(bs_minmax!1`ub_min, 0) IFF
                                                                                                                                                                   relreal!1(multipoly_eval(mpoly!1, polydegmono!1, cf!1, nvars!1,
                                                                                                                                                                                            terms!1)
                                                                                                                                                                                           (list2array(0)
                                                                                                                                                                                                      (denormalize_listreal
                                                                                                                                                                                                       (bs_minmax!1`ub_var)
                                                                                                                                                                                                       (Avars!1,
                                                                                                                                                                                                        Bvars!1,
                                                                                                                                                                                                        boundedpts!1))),
                                                                                                                                                                             0))")
               (("1"
                 (assert)
                 (replace -1 :dir rl)
                 (assert)
                 (hide -1)
                 (skosimp*)
                 (expand "bounded_points_exclusive?")
                 (inst - "iup!1")
                 (inst - "iup!1")
                 (expand "lt_below?")
                 (inst - "iup!1")
                 (flatten)
                 (assert)
                 (expand "denormalize_listreal")
                 (typepred
                  "denormalize_listreal_rec(bs_minmax!1`ub_var,
                                                                                                                                                                                                                                                                                                                           length(bs_minmax!1`ub_var),
                                                                                                                                                                                                                                                                                                                           Avars!1,
                                                                                                                                                                                                                                                                                                                           Bvars!1,
                                                                                                                                                                                                                                                                                                                           boundedpts!1)")
                 (inst - "iup!1")
                 (rewrite "list2array_sound")
                 (rewrite "list2array_sound")
                 (replace -3 +)
                 (hide (-1 -2 -3))
                 (assert)
                 (reveal "infintendptsname")
                 (replace -1)
                 (hide -1)
                 (case "LET cyz = Bvars!1(iup!1)-Avars!1(iup!1) IN (IF interval_endpoints_inf_trans(Avars!1,
                                                                                                                                                                                                                                                                                                                                                                                           Bvars!1,
                                                                                                                                                                                                                                                                                                                                                                                           intendpts!1,
                                                                                                                                                                                                                                                                                                                                                                                           boundedpts!1)
                                                                                                                                                                                                                                                                                                                                                                                          (iup!1)`1
                                                                                                                                                                                                                                                                                                                                                             THEN 0 <= cyz*nth(bs_minmax!1`ub_var, iup!1)
                                                                                                                                                                                                                                                                                                                                                           ELSE 0 < cyz*nth(bs_minmax!1`ub_var, iup!1)
                                                                                                                                                                                                                                                                                                                                                           ENDIF) AND (IF interval_endpoints_inf_trans(Avars!1,
                                                                                                                                                                                                                                                                                                                                                                                           Bvars!1,
                                                                                                                                                                                                                                                                                                                                                                                           intendpts!1,
                                                                                                                                                                                                                                                                                                                                                                                           boundedpts!1)
                                                                                                                                                                                                                                                                                                                                                                                          (iup!1)`2
                                                                                                                                                                                                                                                                                                                                                             THEN cyz*nth(bs_minmax!1`ub_var, iup!1) <= cyz
                                                                                                                                                                                                                                                                                                                                                           ELSE cyz*nth(bs_minmax!1`ub_var, iup!1) < cyz
                                                                                                                                                                                                                                                                                                                                                           ENDIF)")
                 (("1"
                   (expand "interval_endpoints_inf_trans")
                   (assert)
                   (lift-if)
                   (lift-if)
                   (ground)
                   (("1" (cross-mult 4)) ("2" (cross-mult 6))
                    ("3" (cross-mult 4)) ("4" (cross-mult 6))))
                  ("2"
                   (hide 2)
                   (assert)
                   (split +)
                   (("1"
                     (flatten)
                     (assert)
                     (mult-by -5 "Bvars!1(iup!1)-Avars!1(iup!1)")
                     (assert))
                    ("2"
                     (flatten)
                     (assert)
                     (mult-by -4 "Bvars!1(iup!1)-Avars!1(iup!1)")
                     (assert))
                    ("3"
                     (flatten)
                     (assert)
                     (mult-by -6 "Bvars!1(iup!1)-Avars!1(iup!1)")
                     (assert))
                    ("4"
                     (flatten)
                     (assert)
                     (mult-by -5 "Bvars!1(iup!1)-Avars!1(iup!1)")
                     (assert))))))
                ("2"
                 (hide 2)
                 (reveal "AXYZlem")
                 (reveal "mlem")
                 (inst - "bs_minmax!1`ub_var")
                 (assert)
                 (split -)
                 (("1"
                   (skosimp*)
                   (replace -1 :dir rl)
                   (hide -1)
                   (inst - "list2array(0)(bs_minmax!1`ub_var)")
                   (split -)
                   (("1"
                     (skosimp*)
                     (replace -1 :dir rl)
                     (replace -6 :dir rl)
                     (hide-all-but 1)
                     (name-replace "kjkjdsadf"
                      "multipoly_eval(multipoly_translate(mpoly!1,
                                                                                                                                                                                                                       polydegmono!1,
                                                                                                                                                                                                                       nvars!1,
                                                                                                                                                                                                                       boundedpts!1)
                                                                                                                                                                                                                      (Avars!1, Bvars!1),
                                                                                                                                                                                                   polydegmono!1, cf!1, nvars!1, terms!1)
                                                                                                                                                                                                  (list2array(0)(bs_minmax!1`ub_var))")
                     (case "FORALL (ordsdf:(realorder?),rr1:real,ccg1,ccg2:posreal): ordsdf(ccg1*rr1,0) IMPLIES ordsdf(ccg2*rr1,0)")
                     (("1"
                       (inst-cp - "relreal!1" "kjkjdsadf" "cr!1"
                        "ccrr!1")
                       (inst - "relreal!1" "kjkjdsadf" "ccrr!1" "cr!1")
                       (ground))
                      ("2"
                       (hide 2)
                       (case "FORALL (ordsdf:(realorder?),rr1:real,ccg2:posreal): ordsdf(rr1,0) IMPLIES ordsdf(ccg2*rr1,0)")
                       (("1"
                         (skeep)
                         (inst - "ordsdf" "ccg1*rr1" "ccg2/ccg1")
                         (assert))
                        ("2"
                         (hide 2)
                         (skeep)
                         (typepred "ordsdf")
                         (expand "realorder?")
                         (split -)
                         (("1" (replace -1) (mult-by -2 "ccg2") (assert))
                          ("2" (replace -1) (mult-by -2 "ccg2") (assert))
                          ("3" (replace -1) (mult-by -2 "ccg2") (assert))
                          ("4"
                           (replace -1)
                           (mult-by -2 "ccg2")
                           (assert))))))))
                    ("2"
                     (hide 2)
                     (expand "boxbetween?")
                     (expand "interval_between?")
                     (propax))))
                  ("2"
                   (hide 2)
                   (hide "AXYZlem")
                   (skosimp*)
                   (expand "bounded_points_exclusive?")
                   (expand "lt_below?")
                   (inst - "ii!1")
                   (inst - "ii!1")
                   (inst - "ii!1")
                   (reveal "infintendptsname")
                   (replace -1)
                   (hide -1)
                   (expand "interval_endpoints_inf_trans")
                   (rewrite "list2array_sound")
                   (lift-if)
                   (lift-if)
                   (ground))))))
              ("2" (hide 2) (hide-all-but (-1 1)) (grind))))
            ("3"
             (expand "length_eq?")
             (flatten)
             (split -5)
             (("1" (hide-all-but (-1 1)) (grind))
              ("2" (hide-all-but (-1 1)) (grind))))))))))
      ("2"
       (expand "sound_poly?")
       (flatten)
       (assert)
       (hide-all-but (-5 -6 1))
       (skeep)
       (lemma "multipoly_translate_denormalize")
       (inst?)
       (split -)
       (("1"
         (skoletin -1 :old? t)
         (case "pconst>0")
         (("1"
           (inst + "1/pconst")
           (("1"
             (split +)
             (("1"
               (flatten)
               (case "pconst=1")
               (("1" (assert))
                ("2"
                 (hide 2)
                 (replace -3)
                 (case "FORALL (iijj:nat,F:[nat->real]): (FORALL (rrzz:nat): rrzz<=iijj IMPLIES F(rrzz)=1) IMPLIES product(0,iijj,F)=1")
                 (("1"
                   (rewrite -1)
                   (("1"
                     (hide 2)
                     (skosimp*)
                     (expand "bounded_points_true?")
                     (inst -3 "rrzz!1")
                     (("1" (flatten) (assert)) ("2" (assert))))
                    ("2" (hide-all-but 1) (skosimp*) (assert))))
                  ("2"
                   (hide-all-but 1)
                   (induct "iijj")
                   (("1"
                     (skeep)
                     (inst - "0")
                     (expand "product")
                     (expand "product")
                     (assert))
                    ("2"
                     (skeep)
                     (skeep)
                     (inst - "F")
                     (expand "product" +)
                     (split -1)
                     (("1" (inst - "1+j") (assert))
                      ("2"
                       (hide 2)
                       (skeep)
                       (inst - "rrzz")
                       (assert))))))))))
              ("2"
               (replace -3)
               (case "denormalize_lambda(nvars!1,
                                                                                                                                                                                                                                                                                 list2array(0)(ll),
                                                                                                                                                                                                                                                                                 boundedpts!1)
                                                                                                                                                                                                                                                                                (Avars!1, Bvars!1)=list2array(0)
                                                                                                                                                                                                                                                                      (denormalize_listreal(ll)
                                                                                                                                                                                                                                                                                           (Avars!1,
                                                                                                                                                                                                                                                                                            Bvars!1,
                                                                                                                                                                                                                                                                                            boundedpts!1))")
               (("1" (assert))
                ("2"
                 (hide (-1 -2 -3 2))
                 (decompose-equality)
                 (expand "denormalize_listreal")
                 (typepred
                  "denormalize_listreal_rec(ll,
                                                                                                                                                                                                                                               length(ll),
                                                                                                                                                                                                                                               Avars!1,
                                                                                                                                                                                                                                               Bvars!1,
                                                                                                                                                                                                                                               boundedpts!1)")
                 (replace -4)
                 (rewrite "list2array_sound")
                 (replace -2)
                 (case "x!1<nvars!1")
                 (("1"
                   (assert)
                   (inst - "x!1")
                   (replace -4)
                   (hide (-2 -3 -4))
                   (expand "denormalize_lambda")
                   (rewrite "list2array_sound")
                   (lift-if)
                   (ground))
                  ("2"
                   (assert)
                   (expand "denormalize_lambda")
                   (propax))))))))
            ("2"
             (case "1/pconst>0")
             (("1" (assert)) ("2" (cross-mult 1)) ("3" (assert))))
            ("3" (assert))))
          ("2"
           (hide (-2 2))
           (replaces -1)
           (rewrite "product_gt_0")
           (("1"
             (hide 2)
             (skosimp*)
             (lift-if)
             (split +)
             (("1"
               (flatten)
               (inst - "n!1")
               (assert)
               (replace 1)
               (rewrite "list2array_sound")
               (hide 1)
               (rewrite "expt_pos"))
              ("2" (assert))))
            ("2" (hide-all-but 1) (skosimp*) (assert))))))
        ("2" (propax)) ("3" (propax))
        ("4"
         (hide 2)
         (skosimp*)
         (inst - "ii!1")
         (rewrite "list2array_sound")
         (ground))))
      ("3" (hide-all-but 1) (skosimp*) (assert))))
    ("2"
     (replace -2)
     (replace -1)
     (hide-all-but 1)
     (lemma "bs_convert_poly_def")
     (inst?)
     (split -)
     (("1"
       (replace -1 :dir rl)
       (hide -1)
       (skosimp*)
       (inst + "1")
       (assert))
      ("2" (hide-all-but 1) (grind))))))


proof_type: f_proof
decl_type: formula
library: Bernstein
theory: strat_util
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "multipoly_minmax")
   (typepred
    "multipolynomial_minmax(mp`mpoly,
                                                       mp`mdeg,
                                                       mv`numvars,
                                                       mp`terms,
                                                       mp`mcoeff,
                                                       mv`vars_lb,
                                                       mv`vars_ub,
                                                       depth,
                                                       eps_localexit(precision),
                                                       false_globalexit,
                                                       mv`iepts,
                                                       LAMBDA (i: nat): (TRUE, TRUE),
                                                       varselect)")
   (name-replace "SPF"
    "multipolynomial_minmax(mp`mpoly,
                                                       mp`mdeg,
                                                       mv`numvars,
                                                       mp`terms,
                                                       mp`mcoeff,
                                                       mv`vars_lb,
                                                       mv`vars_ub,
                                                       depth,
                                                       eps_localexit(precision),
                                                       false_globalexit,
                                                       mv`iepts,
                                                       LAMBDA (i: nat): (TRUE, TRUE),
                                                       varselect)")
   (expand "sound_poly?")
   (assert)
   (split -1)
   (("1" (flatten) (hide-all-but 1) (grind))
    ("2" (hide-all-but 1) (grind))))


proof_type: f_proof
decl_type: formula
library: Bernstein
theory: strat_util
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "multipoly_strategy" :assert? none)
   (beta)
   (name-replace "mm"
    "multipolynomial_minmax(mpr`mpoly,
                                                                 mpr`mdeg,
                                                                 mv`numvars,
                                                                 mpr`terms,
                                                                 mpr`mcoeff,
                                                                 mv`vars_lb,
                                                                 mv`vars_ub,
                                                                 depth,
                                                                 rel_localexit(mpr`rel),
                                                                 rel_globalexit(mpr`rel,depth,true),
                                                                 mv`iepts,
                                                                 mv`bdpts,
                                                                 varselect)")
   (lift-if)
   (assert)
   (split -3)
   (("1"
     (typepred "mm")
     (expand "rel_localexit")
     (lemma "sound_poly_lb_le_ub")
     (inst?)
     (assert)
     (label "lbleub" -1)
     (hide "lbleub")
     (expand "sound_poly?")
     (split -1)
     (("1"
       (flatten)
       (expand "sound_poly_fin?")
       (flatten)
       (expand "forall_X_poly_interval")
       (expand "forall_X_poly_between")
       (skeep)
       (inst? -)
       (assert)
       (flatten)
       (name-replace "meval"
        "multipoly_eval(mpr`mpoly, mpr`mdeg, mpr`mcoeff, mv`numvars,
                                                                                        mpr`terms)
                                                                                       (X)")
       (hide-all-but (-2 -3 -7 1))
       (typepred "mpr`rel")
       (expand "realorder?")
       (grind))
      ("2"
       (flatten)
       (expand "sound_poly_inf?")
       (inst? -1)
       (flatten)
       (hide -2 -3)
       (typepred "mpr`rel")
       (expand "realorder?")
       (split -2)
       (("1"
         (expand "forall_X_poly_interval")
         (expand "forall_X_poly_rel")
         (propax))
        ("2"
         (reveal "lbleub")
         (expand "lb_le_ub?")
         (hide-all-but (-1 -2 -4 -5 1))
         (grind))
        ("3"
         (reveal "lbleub")
         (expand "lb_le_ub?")
         (hide-all-but (-1 -2 -4 -5 1))
         (grind))))))
    ("2" (propax))))


proof_type: f_proof
decl_type: formula
library: Bernstein
theory: strat_util
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "multipoly_strategy" :assert? none)
   (beta)
   (name-replace "mm"
    "multipolynomial_minmax
                                                                  (mpr`mpoly,
                                                                   mpr`mdeg,
                                                                   mv`numvars,
                                                                   mpr`terms,
                                                                   mpr`mcoeff,
                                                                   mv`vars_lb,
                                                                   mv`vars_ub,
                                                                   depth,
                                                                   rel_localexit(mpr`rel),
                                                                   rel_globalexit
                                                                   (mpr`rel, depth, FALSE),
                                                                   mv`iepts,
                                                                   mv`bdpts,
                                                                   varselect)")
   (lift-if)
   (assert)
   (ground)
   (expand "forall_X_poly_interval")
   (expand "rel_counterex")
   (ground)
   (("1"
     (inst - "list2array(0)(mm`ub_var)")
     (split -)
     (("1"
       (typepred "mm")
       (expand "sound_poly?")
       (split -)
       (("1"
         (flatten)
         (expand "sound_poly_fin?")
         (flatten)
         (expand "box_poly_ub?")
         (ground))
        ("2"
         (flatten)
         (expand "sound_poly_inf?")
         (inst - "mpr`rel")
         (flatten)
         (expand "inf_box_poly_ub?")
         (ground))))
      ("2"
       (typepred "mm")
       (expand "sound_poly?")
       (expand "sound_poly_fin?")
       (expand "sound_poly_inf?")
       (expand "boxbetween?")
       (expand "box_poly_ub?")
       (expand "inf_box_poly_ub?")
       (ground)
       (inst - "<")
       (ground))))
    ("2"
     (inst - "list2array(0)(mm`lb_var)")
     (split -)
     (("1"
       (typepred "mm")
       (expand "sound_poly?")
       (split -)
       (("1"
         (flatten)
         (expand "sound_poly_fin?")
         (flatten)
         (expand "box_poly_lb?")
         (ground))
        ("2"
         (flatten)
         (expand "sound_poly_inf?")
         (inst - "mpr`rel")
         (flatten)
         (expand "inf_box_poly_lb?")
         (ground))))
      ("2"
       (typepred "mm")
       (expand "sound_poly?")
       (expand "sound_poly_fin?")
       (expand "sound_poly_inf?")
       (expand "boxbetween?")
       (expand "box_poly_lb?")
       (expand "inf_box_poly_lb?")
       (ground)
       (inst - ">")
       (ground))))))


proof_type: f_proof
decl_type: formula
library: Bernstein
theory: strat_util
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "multipoly_strategy" :assert? none)
   (beta)
   (name-replace "mm"
    "multipolynomial_minmax
                                                                                (mpr`mpoly,
                                                                                 mpr`mdeg,
                                                                                 mv`numvars,
                                                                                 mpr`terms,
                                                                                 mpr`mcoeff,
                                                                                 mv`vars_lb,
                                                                                 mv`vars_ub,
                                                                                 depth,
                                                                                 rel_localexit(mpr`rel),
                                                                                 rel_globalexit
                                                                                 (mpr`rel, depth, FALSE),
                                                                                 mv`iepts,
                                                                                 mv`bdpts,
                                                                                 varselect)")
   (flatten)
   (lift-if)
   (ground)
   (("1"
     (expand "rel_counterex")
     (flatten)
     (typepred "mm")
     (expand "sound_poly?")
     (split -)
     (("1"
       (flatten)
       (expand "sound_poly_fin?")
       (flatten)
       (expand "box_poly_ub?")
       (ground))
      ("2"
       (flatten)
       (expand "sound_poly_inf?")
       (inst - "mpr`rel")
       (flatten)
       (expand "inf_box_poly_ub?")
       (ground))))
    ("2"
     (typepred "mm")
     (expand "sound_poly?")
     (expand "sound_poly_fin?")
     (expand "sound_poly_inf?")
     (expand "boxbetween?")
     (expand "box_poly_ub?")
     (expand "inf_box_poly_ub?")
     (expand "rel_counterex")
     (ground)
     (inst - "<")
     (ground))
    ("3"
     (expand "rel_counterex")
     (flatten)
     (typepred "mm")
     (expand "sound_poly?")
     (split -)
     (("1"
       (flatten)
       (expand "sound_poly_fin?")
       (flatten)
       (expand "box_poly_lb?")
       (ground))
      ("2"
       (flatten)
       (expand "sound_poly_inf?")
       (inst - "mpr`rel")
       (flatten)
       (expand "inf_box_poly_lb?")
       (ground))))
    ("4"
     (typepred "mm")
     (expand "sound_poly?")
     (expand "sound_poly_fin?")
     (expand "sound_poly_inf?")
     (expand "boxbetween?")
     (expand "box_poly_lb?")
     (expand "inf_box_poly_lb?")
     (expand "rel_counterex")
     (ground)
     (inst - ">")
     (ground))))


proof_type: t_proof
decl_type: tcc
library: Bernstein
theory: boxes
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (typepred "mp`rel")
   (expand "realorder?")
   (flatten)
   (split -1)
   (("1" (decompose-equality 4) (grind))
    ("2" (decompose-equality 3) (grind))
    ("3" (decompose-equality 2) (grind))
    ("4" (decompose-equality 1) (grind))))


proof_type: f_proof
decl_type: formula
library: Bernstein
theory: multi_polylist
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "ml")
   (("1" (grind))
    ("2"
     (skolem 1 ("rr" "ll"))
     (flatten)
     (expand "max" +)
     (expand "maxnum")
     (assert))))


proof_type: f_proof
decl_type: formula
library: Bernstein
theory: multi_polylist
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (case "FORALL (ml1, ml2: MonoList,r1,r2:real):
                 cdr(max(cons(r1,ml1), cons(r2,ml2))) = max(cdr(cons(r1,ml1)), cdr(cons(r2,ml2)))")
   (("1"
     (skeep)
     (inst - "cdr(ml1)" "cdr(ml2)" "car(ml1)" "car(ml2)")
     (assert)
     (case "FORALL (l:list[nat]): (NOT null?(l)) IMPLIES l = cons(car(l),cdr(l))")
     (("1" (rewrite -1 :dir rl) (rewrite -1 :dir rl))
      ("2" (hide-all-but 1) (skeep) (decompose-equality 2))
      ("3" (assert) (hide-all-but 1) (grind))))
    ("2" (hide 2) (assert) (expand "max" + 1) (propax)) ("3" (grind))
    ("4" (grind)) ("5" (grind))))


proof_type: f_proof
decl_type: formula
library: Bernstein
theory: multi_polylist
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "ml1")
   (("1" (grind) (expand "max" +) (lift-if) (ground))
    ("2"
     (skolem 1 ("r" "l"))
     (flatten)
     (skeep)
     (expand "max" +)
     (lift-if)
     (ground)
     (case "maxnum(r,car(ml2)) = maxnum(car(ml2),r)")
     (("1" (replace -1) (inst - "cdr(ml2)") (assert))
      ("2" (expand "maxnum" 1) (lift-if) (lift-if) (lift-if) (ground))))))


proof_type: f_proof
decl_type: formula
library: Bernstein
theory: multi_polylist
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "ml")
   (("1" (grind))
    ("2"
     (skolem 1 ("r" "l"))
     (flatten)
     (skeep)
     (expand "max" + 4)
     (lift-if)
     (ground)
     (("1" (expand "max" + 2) (propax))
      ("2"
       (expand "max" + 1)
       (assert)
       (lift-if)
       (ground)
       (("1" (grind))
        ("2"
         (expand "max" 2 1)
         (assert)
         (lift-if)
         (split)
         (("1" (grind))
          ("2"
           (flatten)
           (expand "max" + 3)
           (lift-if)
           (assert)
           (lemma "max_cdr")
           (inst - "ml1" "ml2")
           (assert)
           (replaces -1)
           (inst - "cdr(ml1)" "cdr(ml2)")
           (replace -1)
           (expand "maxnum")
           (lift-if)
           (lift-if)
           (lift-if)
           (lift-if)
           (lift-if)
           (lift-if)
           (assert))))))))))


proof_type: f_proof
decl_type: formula
library: Bernstein
theory: multi_polylist
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "mpl")
   (("1" (grind))
    ("2"
     (skolem 1 ("T" "L"))
     (flatten)
     (skeep)
     (inst - "xvar")
     (expand "meval" +)
     (lemma "sigma_split")
     (expand "length" + 1)
     (assert)
     (invoke (inst - "%1" _ _ _) (! 1 2 3))
     (inst?)
     (inst - "0")
     (assert)
     (replaces -1)
     (expand "sigma" + 1)
     (expand "sigma" + 1)
     (assert)
     (expand "length" + 1)
     (expand "nth" + 3)
     (expand "nth" + 3)
     (replaces -1)
     (case "FORALL (k:nat): sigma(0, k,
                       LAMBDA (i: nat):
                         IF i < length(L)
                           THEN nth(L, i)`1 * monolist_eval(nth(L, i)`2)(xvar)
                         ELSE 0
                         ENDIF)
                  =
                  sigma(1, k+1,
                        LAMBDA (i: nat):
                          IF i < length(cons(T, L))
                            THEN nth(cons(T, L), i)`1 *
                                  monolist_eval(nth(cons(T, L), i)`2)(xvar)
                          ELSE 0
                          ENDIF)")
     (("1" (inst - "length(L)-1") (("1" (assert)) ("2" (assert))))
      ("2"
       (hide 2)
       (induct "k")
       (("1"
         (assert)
         (expand "sigma")
         (expand "sigma")
         (assert)
         (lift-if)
         (lift-if)
         (lift-if)
         (ground)
         (("1" (grind)) ("2" (grind)) ("3" (grind))))
        ("2"
         (skolem 1 "k")
         (flatten)
         (assert)
         (expand "sigma" +)
         (replaces -1 :dir rl)
         (assert)
         (lift-if)
         (lift-if)
         (lift-if)
         (grind))))))
    ("3" (hide 2) (skosimp*) (inst + "10") (assert))))


proof_type: f_proof
decl_type: formula
library: Bernstein
theory: multi_polylist
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "mpl")
   (("1" (grind))
    ("2"
     (skolem 1 ("rp" "lmp"))
     (flatten)
     (skeep)
     (case "i = 0")
     (("1"
       (assert)
       (replaces -1)
       (expand "degree" -2)
       (lift-if)
       (expand "nth" 1)
       (ground)
       (("1" (hide -2) (expand "max" -1) (lift-if) (ground))
        ("2" (expand "max" -1) (propax))))
      ("2"
       (split -1)
       (("1"
         (inst - "i-1")
         (("1"
           (assert)
           (split -1)
           (("1" (expand "nth" +) (propax))
            ("2" (expand "length" -2) (assert))))
          ("2" (assert))))
        ("2"
         (assert)
         (expand "degree" -1)
         (lift-if)
         (ground)
         (("1" (expand "degree" 1) (propax))
          ("2" (expand "max" -1) (lift-if) (ground))))))))))


proof_type: f_proof
decl_type: formula
library: Bernstein
theory: multi_polylist
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (case "null?(mpl)")
   (("1"
     (expand "meval" + 1)
     (assert)
     (expand "multipoly_to_mpoly" + 4)
     (assert)
     (case "length(mpl)=0")
     (("1"
       (assert)
       (expand "multipoly_to_mpoly" + 3)
       (expand "multipoly_eval")
       (expand "sigma")
       (expand "sigma")
       (propax))
      ("2" (hide 2) (grind))))
    ("2"
     (case "length(mpl)=0")
     (("1" (hide 2) (grind))
      ("2"
       (rewrite "meval_sigma")
       (expand "multipoly_eval" + 1)
       (expand "multipoly_to_mpoly" + 1)
       (assert)
       (rewrite "sigma_eq")
       (hide 4)
       (skolem 1 "t")
       (case "monolist_eval(nth(mpl, t)`2)(xvar) =
                                                                     polyproduct_eval(multipoly_to_mpoly(mpl)`mpoly(t),
                                                                                      multipoly_to_mpoly(mpl)`mdeg,
                                                                                      max(length(degree(mpl)), 1))
                                                                                     (xvar)")
       (("1" (expand "multipoly_to_mpoly" + 1) (assert))
        ("2"
         (hide 2)
         (rewrite "monolist_eval_prod")
         (expand "polyproduct_eval")
         (expand "multipoly_to_mpoly" + 2)
         (case "length(degree(mpl))=0")
         (("1"
           (case "degree(mpl) = null")
           (("1"
             (replace -1)
             (assert)
             (expand "max")
             (expand "list2array" + 1)
             (expand "multipoly_to_mpoly" + 1)
             (assert)
             (expand "product" + 2)
             (expand "product" + 2)
             (lemma "degree_zero")
             (inst?)
             (assert)
             (inst - "t")
             (assert)
             (expand "length" + 1)
             (expand "product" +)
             (expand "multipoly_to_poly" + 1)
             (expand "polynomial")
             (expand "sigma")
             (expand "sigma")
             (propax))
            ("2" (hide 2) (grind :exclude "degree"))))
          ("2"
           (expand "max")
           (assert)
           (case "null?(degree(mpl))")
           (("1" (hide 2) (grind :exclude "degree"))
            ("2"
             (invoke (name "AA" "%1") (! 3 1))
             (("1"
               (replaces -1)
               (lemma "product_split[nat]")
               (inst?)
               (expand "AA")
               (inst - "length(nth(mpl, t)`2) - 1")
               (assert)
               (split -1)
               (("1"
                 (case "FORALL (k:nat): product(length(nth(mpl, t)`2), k,
                                                                                 LAMBDA (i: nat):
                                                                                   polynomial(multipoly_to_mpoly(mpl)`mpoly(t)(i),
                                                                                              list2array[nat](0)(degree(mpl))(i))
                                                                                             (xvar(i))) = 1")
                 (("1"
                   (inst?)
                   (assert)
                   (replaces -1)
                   (assert)
                   (replaces -1)
                   (rewrite "product_eq")
                   (("1"
                     (hide 4)
                     (skeep)
                     (expand "multipoly_to_mpoly")
                     (expand "polynomial")
                     (lemma "sigma_eq_one_arg")
                     (inst?)
                     (inst - "nth(nth(mpl, t)`2, n)")
                     (assert)
                     (split -)
                     (("1"
                       (replaces -1)
                       (expand "multipoly_to_poly")
                       (lift-if)
                       (assert)
                       (ground)
                       (replaces -1)
                       (hide-all-but 1)
                       (grind))
                      ("2"
                       (lemma "list2array_sound[nat]")
                       (inst?)
                       (assert)
                       (replaces -1)
                       (lift-if)
                       (ground)
                       (("1"
                         (typepred "degree(mpl)")
                         (assert)
                         (hide -1)
                         (inst - "t")
                         (flatten)
                         (assert)
                         (typepred "max(nth(mpl, t)`2, degree(mpl))")
                         (inst - "n")
                         (assert)
                         (lift-if)
                         (ground)
                         (typepred "n")
                         (hide-all-but (-2 -3))
                         (grind :exclude "nth"))
                        ("2"
                         (typepred "n")
                         (typepred "degree(mpl)")
                         (assert)
                         (inst - "t")
                         (assert))))
                      ("3"
                       (hide 2)
                       (skosimp*)
                       (typepred "i!1")
                       (lift-if)
                       (assert)
                       (ground)
                       (("1"
                         (replaces -1)
                         (assert)
                         (expand "multipoly_to_poly")
                         (lift-if)
                         (ground)
                         (typepred "n")
                         (grind))
                        ("2" (expand "multipoly_to_poly") (assert))))
                      ("4"
                       (hide 2)
                       (skosimp*)
                       (ground)
                       (expand "multipoly_to_poly")
                       (assert))))
                    ("2" (hide 4) (skeep) (assert))))
                  ("2"
                   (hide 4)
                   (hide -1)
                   (assert)
                   (skeep)
                   (rewrite "product_1")
                   (hide 2)
                   (skeep)
                   (typepred "n")
                   (expand "multipoly_to_mpoly")
                   (expand "multipoly_to_poly")
                   (expand "polynomial")
                   (lemma "sigma_eq_one_arg")
                   (inst?)
                   (inst - "0")
                   (assert)
                   (hide 2)
                   (skosimp*))))
                ("2"
                 (assert)
                 (typepred "degree(mpl)")
                 (hide -1)
                 (assert)
                 (inst - "t")
                 (assert))))
              ("2" (hide 4) (assert) (skeep) (assert))))))))))))))


proof_type: f_proof
decl_type: formula
library: Bernstein
theory: multi_polylist
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
script:
  (""
   (induct "i")
   (("1"
     (skeep)
     (expand "mpmonom")
     (expand "meval")
     (expand "meval")
     (expand "varmono")
     (expand "monolist_eval")
     (expand "monolist_eval_rec")
     (expand "monolist_eval_rec")
     (assert))
    ("2"
     (skeep*)
     (inst - "c" "n" "LAMBDA(i:nat):xvar(i+1)")
     (expand "mpmonom")
     (expand "varmono" +)
     (expand "meval" +)
     (expand "meval" + 1)
     (expand "meval" -)
     (expand "meval" - 1)
     (expand "monolist_eval" +)
     (expand "monolist_eval_rec")
     (expand "^" + 1)
     (expand "expt")
     (expand "monolist_eval")
     (typepred
      "monolist_eval_rec(varmono(j, n), 1, 0)(LAMBDA (i: nat): xvar(1 + i))")
     (typepred "monolist_eval_rec(varmono(j, n), 1, 1)(xvar)")
     (assert))))


proof_type: f_proof
decl_type: formula
library: Bernstein
theory: multi_polylist
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (typepred "mpsum(mpl1,mpl2)")
   (assert)
   (decompose-equality -)
   (inst - "xvar")
   (expand "+")
   (propax))


proof_type: f_proof
decl_type: formula
library: Bernstein
theory: multi_polylist
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "mpl")
   (("1" (grind))
    ("2"
     (skolem 1 ("X" "L"))
     (flatten)
     (skeep)
     (expand "mpscal" +)
     (expand "meval" +)
     (inst?)
     (assert))))


proof_type: f_proof
decl_type: formula
library: Bernstein
theory: multi_polylist
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "n")
   (("1" (skeep) (grind))
    ("2"
     (skolem 1 "n")
     (flatten)
     (assert)
     (skeep)
     (expand "mppow" +)
     (lift-if)
     (assert)
     (ground)
     (("1"
       (replaces -1)
       (assert)
       (expand "^" +)
       (expand "expt" +)
       (expand "expt" +)
       (propax))
      ("2"
       (typepred "mpprod(mpl, mppow(mpl, n))")
       (rewrite -1)
       (hide -1)
       (inst?)
       (replaces -1)
       (expand "^")
       (expand "expt" + 2)
       (propax))))))


proof_type: f_proof
decl_type: formula
library: Bernstein
theory: multi_polylist
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "mpminus")
   (lemma "multipolylist_sum")
   (inst?)
   (replaces -1)
   (lemma "multipolylist_neg")
   (expand "mpneg")
   (inst?)
   (assert))


proof_type: t_proof
decl_type: tcc
library: Bernstein
theory: multi_polylist
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (split)
   (("1"
     (expand "length" + 1)
     (assert)
     (expand "length" + 2)
     (expand "length" + 3)
     (typepred "v(cdr[nat](ml1), cdr[nat](ml2))")
     (replaces -2)
     (expand "maxnum" +)
     (lift-if)
     (ground))
    ("2"
     (skeep)
     (expand "nth" + 1)
     (lift-if)
     (lift-if)
     (lift-if)
     (assert)
     (ground)
     (("1" (grind)) ("2" (grind)) ("3" (grind))
      ("4"
       (expand "length" -2)
       (typepred "v(cdr[nat](ml1), cdr[nat](ml2))")
       (inst - "i-1")
       (assert)
       (lift-if)
       (ground)
       (("1" (grind)) ("2" (grind)) ("3" (grind)) ("4" (grind))
        ("5" (grind))))
      ("5"
       (expand "length" -2)
       (typepred "v(cdr[nat](ml1), cdr[nat](ml2))")
       (inst - "i-1")
       (assert)
       (lift-if)
       (grind))
      ("6"
       (expand "length" -1)
       (typepred "v(cdr[nat](ml1), cdr[nat](ml2))")
       (inst - "i-1")
       (assert)
       (grind))))))


proof_type: t_proof
decl_type: tcc
library: Bernstein
theory: multi_polylist
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (typepred "v(cdr[nat](ml), c * xvar(i) ^ car[nat](ml), i + 1)(xvar)")
   (case "0 < length[nat](ml)")
   (("1"
     (rewrite "product_first" 2)
     (("1"
       (assert)
       (expand "nth" 2 1)
       (case "product(0, length(cdr[nat](ml)) - 1,
                             LAMBDA (k: nat):
                               IF k < length(cdr[nat](ml))
                                 THEN xvar(1 + k + i) ^ nth(cdr[nat](ml), k)
                               ELSE 1
                               ENDIF) = product(1, length[nat](ml) - 1,
                               LAMBDA (k: nat):
                                 IF k < length[nat](ml)
                                   THEN xvar(k + i) ^ nth[nat](ml, k)
                                 ELSE 1
                                 ENDIF)")
       (("1" (assert))
        ("2"
         (hide-all-but (-1 1 2))
         (expand "length" 1 3)
         (expand "length" 1 4)
         (lemma "product_shift_T[nat]")
         (inst -1 _ "length(cdr[nat](ml)) - 1" "0" "1")
         (assert)
         (inst?)
         (("1"
           (expand "nth" -1 2)
           (case-replace
            "(LAMBDA (i_1: nat):
                             IF 1 + i_1 < 1 + length[nat](cdr(ml))
                               THEN xvar(1 + i_1 + i) ^ nth(cdr(ml), i_1)
                             ELSE 1
                             ENDIF) = (LAMBDA (k: nat):
                            IF k < length(cdr[nat](ml))
                              THEN xvar(1 + k + i) ^ nth(cdr[nat](ml), k)
                            ELSE 1
                            ENDIF)")
           (("1" (assert))
            ("2"
             (hide-all-but 1)
             (decompose-equality)
             (("1" (grind)) ("2" (grind)) ("3" (grind)) ("4" (grind))))
            ("3" (hide-all-but 1) (grind))
            ("4" (hide-all-but 1) (grind))))
          ("2" (hide-all-but 1) (grind)) ("3" (hide-all-but 1) (grind))))
        ("3" (hide-all-but 1) (grind)) ("4" (hide-all-but 1) (grind))))
      ("2" (hide-all-but 1) (grind))))
    ("2" (hide-all-but (1 2)) (grind))))


proof_type: t_proof
decl_type: tcc
library: Bernstein
theory: multi_polylist
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
script:
  (""
   (skeep*)
   (typepred "v(cdr[nat](ml1), cdr[nat](ml2))")
   (hide -1)
   (inst -1 "LAMBDA(i:nat):xvar(i+1)")
   (expand "monolist_eval")
   (expand "monolist_eval_rec" + 1)
   (typepred
    "monolist_eval_rec(v(cdr[nat](ml1), cdr[nat](ml2)),
                              1 * xvar(0) ^ (car[nat](ml1) + car[nat](ml2)), 1)
                             (xvar)")
   (replaces -1)
   (expand "monolist_eval_rec" +)
   (assert)
   (typepred
    "monolist_eval_rec(cdr(ml1), 1 * xvar(0) ^ car(ml1), 1)(xvar)")
   (replaces -1)
   (typepred
    "monolist_eval_rec(cdr(ml2), 1 * xvar(0) ^ car(ml2), 1)(xvar)")
   (replaces -1)
   (case "FORALL (x:real,j,k:nat): x^(j+k) = x^j*x^k")
   (("1"
     (inst?)
     (replaces -1)
     (typepred
      "monolist_eval_rec(cdr[nat](ml1), 1, 0)(LAMBDA (i: nat): xvar(1 + i))")
     (typepred
      "monolist_eval_rec(cdr[nat](ml2), 1, 0)(LAMBDA (i: nat): xvar(1 + i))")
     (replaces (-1 -2) :dir rl)
     (typepred
      "monolist_eval_rec(v(cdr[nat](ml1), cdr[nat](ml2)), 1, 0)
                             (LAMBDA (i: nat): xvar(1 + i))")
     (assert))
    ("2"
     (hide-all-but 1)
     (lemma "expt_plus")
     (case "FORALL (j,k:nat): 0^(j+k) = 0^j*0^k")
     (("1"
       (skeep)
       (case "x = 0")
       (("1" (inst - "j" "k") (assert))
        ("2" (inst - "j" "k" "x") (assert))))
      ("2"
       (hide-all-but 1)
       (skeep)
       (case "k = 0")
       (("1" (replaces -1) (grind)) ("2" (grind))))))))


proof_type: t_proof
decl_type: tcc
library: Bernstein
theory: multi_polylist
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (skeep)
   (split)
   (("1"
     (typepred "i")
     (case "NOT i = 0")
     (("1" (grind))
      ("2" (replaces -1) (expand "nth") (rewrite "max_id"))))
    ("2"
     (typepred "i")
     (case "NOT i = 0")
     (("1" (grind)) ("2" (replaces -1) (expand "nth") (assert))))))


proof_type: t_proof
decl_type: tcc
library: Bernstein
theory: multi_polylist
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (skeep)
   (typepred "v(cdr[[real, MonoList]](mpl))")
   (("1"
     (hide -1)
     (assert)
     (split)
     (("1"
       (case "i = 0")
       (("1"
         (replaces -1)
         (expand "nth" +)
         (assert)
         (case "FORALL (l1,l2:list[nat]): max(l1,l2) = max(l1,max(l1,l2))")
         (("1" (inst?))
          ("2"
           (hide-all-but 1)
           (induct "l1")
           (("1" (grind))
            ("2"
             (skolem 1 ("r" "l"))
             (flatten)
             (skeep)
             (expand "max" +)
             (assert)
             (lift-if)
             (lift-if)
             (lift-if)
             (ground)
             (("1" (expand "maxnum" +) (rewrite "max_id" +))
              ("2"
               (case "maxnum(r, maxnum(r, car(l2))) = maxnum(r,car(l2))")
               (("1" (replace -1) (assert) (inst - "cdr(l2)") (assert))
                ("2" (hide-all-but 1) (grind))))))))))
        ("2"
         (assert)
         (name "V" "v(cdr[[real, MonoList]](mpl))")
         (replace -1)
         (inst - "i-1")
         (("1"
           (expand "nth" +)
           (flatten)
           (assert)
           (rewrite "max_assoc" +)
           (lemma "max_sym")
           (inst - "nth(cdr(mpl), i - 1)`2"
            "car[[real, MonoList]](mpl)`2")
           (replace -1)
           (rewrite "max_assoc" + :dir rl)
           (lemma "max_sym")
           (assert))
          ("2" (assert) (typepred "i") (expand "length" -1) (assert))))))
      ("2"
       (assert)
       (typepred
        "max(car[[real, MonoList]](mpl)`2,
                       v(cdr[[real, MonoList]](mpl)))")
       (replace -2)
       (assert)
       (case "i = 0")
       (("1" (replaces -1) (expand "nth" 1) (assert))
        ("2"
         (inst -4 "i-1")
         (("1" (expand "nth" 2) (assert))
          ("2"
           (assert)
           (typepred "i")
           (expand "length" -1)
           (assert))))))))
    ("2" (expand "length" 1 2) (assert))))


proof_type: t_proof
decl_type: tcc
library: Bernstein
theory: multi_polylist
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (skeep)
   (assert)
   (hide 3)
   (typepred
    "v(null[[real, MonoList]], cdr[[real, MonoList]](swiped),
                  cons[[real, MonoList]]((thiscoeff, mono), ans),
                  car[[real, MonoList]](swiped)`2,
                  car[[real, MonoList]](swiped)`1)")
   (rewrite -1)
   (hide -1)
   (expand "meval" + 3)
   (expand "meval" + 2)
   (expand "meval" + 3)
   (expand "meval" + 2)
   (propax))


proof_type: t_proof
decl_type: tcc
library: Bernstein
theory: multi_polylist
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (skeep)
   (typepred
    "v(null[[real, MonoList]], cdr[[real, MonoList]](swiped), ans,
                  car[[real, MonoList]](swiped)`2,
                  car[[real, MonoList]](swiped)`1)")
   (rewrite -1)
   (hide -1)
   (expand "meval" + 3)
   (assert)
   (hide 3)
   (expand "meval" + 3)
   (flatten)
   (replaces -2)
   (assert)
   (expand "meval" + 2)
   (propax))


proof_type: t_proof
decl_type: tcc
library: Bernstein
theory: multi_polylist
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (skeep)
   (typepred
    "v(swiped, cdr[[real, MonoList]](toswipe), ans, mono,
                  car[[real, MonoList]](toswipe)`1 + thiscoeff)")
   (rewrite -1)
   (hide -1)
   (assert)
   (hide (2 3 4))
   (assert)
   (both-sides - "monolist_eval(mono)(xvar) * thiscoeff" 2)
   (assert)
   (case "NOT meval(toswipe)(xvar) - monolist_eval(mono)(xvar) * thiscoeff +
                 thiscoeff * monolist_eval(mono)(xvar) = meval(toswipe)(xvar)")
   (("1" (assert)) ("2" (replaces -1) (expand "meval" + 2) (assert))))


proof_type: t_proof
decl_type: tcc
library: Bernstein
theory: multi_polylist
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (skeep)
   (typepred
    "v(cons[[real, MonoList]]
                      (car[[real, MonoList]](toswipe), swiped),
                  cdr[[real, MonoList]](toswipe), ans, mono, thiscoeff)")
   (rewrite -1)
   (hide -1)
   (assert)
   (hide (3 4 5))
   (expand "meval" + 2)
   (expand "meval" + 2)
   (propax))


proof_type: t_proof
decl_type: tcc
library: Bernstein
theory: multi_polylist
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (assert)
   (typepred
    "mp_simp_rec(null[[real, MonoList]], mpl,
                             null[[real, MonoList]],
                             car[[real, MonoList]](mpl)`2, 0)")
   (decompose-equality +)
   (inst - "x!1")
   (replaces -1)
   (expand "meval" + 3)
   (propax))


proof_type: t_proof
decl_type: tcc
library: Bernstein
theory: multi_polylist
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (case "FORALL (mpl1: MultiPolyList, mpl2: MultiPolyList):
                        meval(append[[real, MonoList]](mpl1, mpl2)) =
                         (+[[nat->real]])(meval(mpl1), meval(mpl2))")
   (("1"
     (skeep)
     (insteep -1)
     (typepred "mp_simp(append[[real, MonoList]](mpl1, mpl2))")
     (assert))
    ("2"
     (hide 2)
     (induct "mpl1")
     (("1"
       (expand "+")
       (skeep)
       (decompose-equality +)
       (expand "append")
       (expand "meval")
       (propax))
      ("2"
       (skolem 1 ("X" "L"))
       (flatten)
       (skeep)
       (expand "append" +)
       (expand "meval" + 1)
       (decompose-equality +)
       (inst - "mpl2")
       (decompose-equality -)
       (inst - "x!1")
       (expand "+")
       (expand "meval" + 2)
       (propax))))))


proof_type: t_proof
decl_type: tcc
library: Bernstein
theory: multi_polylist
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (skeep)
   (expand "meval" + 1)
   (expand "meval" + 1)
   (expand "meval")
   (assert)
   (typepred
    "monosum(car[[real, MonoList]](mpl1)`2,
                                  car[[real, MonoList]](mpl2)`2)")
   (hide -1)
   (rewrite -1)
   (assert)
   (hide -1)
   (expand "meval" +)
   (propax))


proof_type: t_proof
decl_type: tcc
library: Bernstein
theory: multi_polylist
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (skeep)
   (assert)
   (expand "+")
   (typepred
    "mpsum(v(mpl1, cdr[[real, MonoList]](mpl2)),
                      v(mpl1, (: car[[real, MonoList]](mpl2) :)))")
   (replaces -1)
   (assert)
   (expand "+")
   (assert)
   (typepred "v(mpl1, cdr[[real, MonoList]](mpl2))")
   (rewrite -1)
   (hide -1)
   (assert)
   (typepred "v(mpl1, (: car[[real, MonoList]](mpl2) :))")
   (rewrite -1)
   (hide -1)
   (assert)
   (expand "meval" + 4)
   (assert)
   (case "meval(cdr[[real, MonoList]](mpl2))(xvar) +
                meval((: :))(xvar)
                +
                 monolist_eval(car[[real, MonoList]](mpl2)`2)(xvar)
                 * car[[real, MonoList]](mpl2)`1
                = meval(mpl2)(xvar)")
   (("1" (assert))
    ("2" (hide 5) (expand "meval" + 2) (expand "meval" + 2) (assert))))


proof_type: t_proof
decl_type: tcc
library: Bernstein
theory: multi_polylist
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (skeep)
   (expand "+")
   (typepred
    "mpsum(v(cdr[[real, MonoList]](mpl1), mpl2),
                      v((: car[[real, MonoList]](mpl1) :), mpl2))")
   (replace -1)
   (hide -1)
   (expand "+")
   (typepred "v(cdr[[real, MonoList]](mpl1), mpl2)")
   (rewrite -1)
   (hide -1)
   (typepred "v((: car[[real, MonoList]](mpl1) :), mpl2)")
   (rewrite -1)
   (hide -1)
   (assert)
   (hide 2)
   (expand "meval" + 3)
   (expand "meval" + 4)
   (assert)
   (expand "meval" + 4)
   (propax))


proof_type: t_proof
decl_type: tcc
library: Bernstein
theory: multi_polylist
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (skeep)
   (typepred "mp_simp(mpprod_rec(mpl1, mpl2))")
   (replaces -1 :dir rl)
   (typepred "mpprod_rec(mpl1, mpl2)")
   (rewrite -1))


proof_type: j_proof
decl_type: tcc
library: ACCoRD
theory: fseqs_aux_vertical
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "vs_fseq?")
   (skeep)
   (lemma "sort_fseq_lem")
   (inst - "vsb")
   (flatten)
   (expand "permutation?")
   (skosimp*)
   (expand "bijective?")
   (flatten)
   (expand "surjective?")
   (inst - "i")
   (skosimp*)
   (inst - "x!1")
   (assert)
   (typepred "vsb")
   (expand "vs_fseq?")
   (replace -3)
   (inst - "x!1")
   (flatten)
   (assert))


proof_type: j_proof
decl_type: tcc
library: ACCoRD
theory: fseqs_aux_2D
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skeep)
   (expand "trk_fseq?")
   (skeep)
   (lemma "sort_fseq_lem")
   (inst - "trkb")
   (flatten)
   (expand "permutation?")
   (skosimp*)
   (expand "bijective?")
   (flatten)
   (expand "surjective?")
   (inst - "i")
   (skosimp*)
   (inst - "x!1")
   (typepred "trkb")
   (expand "trk_fseq?")
   (inst - "x!1")
   (flatten)
   (assert))


proof_type: j_proof
decl_type: tcc
library: ACCoRD
theory: fseqs_aux_2D
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "gs_fseq?")
   (skeep)
   (lemma "sort_fseq_lem")
   (inst - "gsb")
   (flatten)
   (expand "permutation?")
   (skosimp*)
   (expand "bijective?")
   (flatten)
   (expand "surjective?")
   (inst - "i")
   (skosimp*)
   (inst - "x!1")
   (assert)
   (typepred "gsb")
   (expand "gs_fseq?")
   (replace -3)
   (inst - "x!1")
   (flatten)
   (assert))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: definitions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "horizontal_tca")
   (case "sqv(v) = 0")
   (("1" (rewrite "sqv_eq_0") (replaces -1) (assert))
    ("2" (cross-mult 2) (assert))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: definitions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (split)
   (("1" (flatten) (rewrite "horizontal_tca_gt_0"))
    ("2" (flatten) (expand "horizontal_tca") (cross-mult -1) (assert))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: definitions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (split)
   (("1" (flatten) (rewrite "horizontal_tca_lt_0"))
    ("2" (flatten) (expand "horizontal_tca") (cross-mult -1) (assert))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: definitions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "horizontal_sq_dtca")
   (rewrite "sqv_add")
   (rewrite "sqv_scal")
   (expand "horizontal_tca")
   (rewrite "sq_div")
   (rewrite "sq_neg")
   (case-replace
    "sq((s * nzv)) / sq(sqv(nzv)) * sqv(nzv) = sq(s*nzv)/sqv(nzv)")
   (("1"
     (hide -1)
     (case-replace
      " 2 * (-(s * nzv) / sqv(nzv) * (s * nzv)) = -2*sq(s*nzv)/sqv(nzv)")
     (("1"
       (hide -1)
       (case-replace
        " sqv(s) + sq(s * nzv) / sqv(nzv) + -2 * sq(s * nzv) / sqv(nzv) = sqv(s) - sq(s*nzv)/sqv(nzv)")
       (("1" (hide -1) (cross-mult 1) (rewrite "sq_det") (assert))
        ("2" (hide-all-but 1) (assert))))
      ("2" (hide-all-but 1) (expand "sq" 1) (assert))))
    ("2" (hide-all-but 1) (expand "sq" 1 2) (assert))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: definitions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (rewrite "horizontal_sq_dtca_eq")
   (lemma "quad_min")
   (inst -1 "sqv(nzv)" "2*(s*nzv)" "sqv(s)")
   (case-replace
    "-(2 * (s * nzv)) / (2 * sqv(nzv)) = horizontal_tca(s,nzv)")
   (("1"
     (hide -1)
     (beta)
     (split -1)
     (("1"
       (expand "is_minimum?")
       (inst -1 "t")
       (expand "quadratic")
       (rewrite "sqv_add")
       (rewrite "sqv_add")
       (rewrite "sqv_scal")
       (rewrite "sqv_scal")
       (assert))
      ("2" (hide 2) (lemma "v_neq_zero") (inst?) (assert))))
    ("2" (hide-all-but 1) (expand "horizontal_tca") (assert))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: definitions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (skoletin 1)
   (skeep)
   (name "aa" "sqv(nzv)")
   (case "aa = 0")
   (("1" (assert))
    ("2"
     (name "bb" "2*(s*nzv)")
     (name "cc" "sqv(s)")
     (name "ff" "quadratic(aa,bb,cc)")
     (case "(tr1 < tr2 IFF ff(tr1) > ff(tr2))")
     (("1"
       (hide-all-but (-1 2))
       (replaces -1)
       (expand "ff")
       (expand "aa")
       (expand "bb")
       (expand "cc")
       (grind))
      ("2"
       (hide 3)
       (lemma "quad_min_mono_dec")
       (case "htca = -bb/(2*aa)")
       (("1"
         (inst - "aa" "bb" "cc" "tr1" "tr2")
         (assert)
         (split +)
         (("1" (flatten) (assert) (replace -2 :dir rl) (propax))
          ("2"
           (flatten)
           (assert)
           (lemma "quad_min_mono_dec")
           (inst - "aa" "bb" "cc" "tr2" "tr1")
           (assert)
           (replace -2 :dir rl)
           (propax))))
        ("2"
         (cross-mult 1)
         (expand "htca" 1)
         (expand "horizontal_tca")
         (cross-mult 1)
         (hide-all-but 1)
         (expand "aa")
         (expand "bb")
         (grind))))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: definitions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (skoletin 1)
   (skeep)
   (name "aa" "sqv(nzv)")
   (case "aa = 0")
   (("1" (assert))
    ("2"
     (name "bb" "2*(s*nzv)")
     (name "cc" "sqv(s)")
     (name "ff" "quadratic(aa,bb,cc)")
     (case "(tr1 > tr2 IFF ff(tr1) > ff(tr2))")
     (("1"
       (hide-all-but (-1 2))
       (replaces -1)
       (expand "ff")
       (expand "aa")
       (expand "bb")
       (expand "cc")
       (grind))
      ("2"
       (hide 3)
       (lemma "quad_min_mono_inc")
       (case "htca = -bb/(2*aa)")
       (("1"
         (inst - "aa" "bb" "cc" "tr1" "tr2")
         (assert)
         (split +)
         (("1" (flatten) (assert) (replace -2 :dir rl) (propax))
          ("2"
           (flatten)
           (assert)
           (lemma "quad_min_mono_inc")
           (inst - "aa" "bb" "cc" "tr2" "tr1")
           (assert)
           (replace -2 :dir rl)
           (propax))))
        ("2"
         (cross-mult 1)
         (expand "htca" 1)
         (expand "horizontal_tca")
         (cross-mult 1)
         (hide-all-but 1)
         (expand "aa")
         (expand "bb")
         (grind))))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: definitions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "le?")
   (case-replace "vo1 - vi - (vo - vi) = vo1-vo")
   (("1"
     (case-replace "vo2 - vi - (vo - vi) = vo2-vo")
     (("1" (assert)) ("2" (hide 2) (grind))))
    ("2" (hide 2) (grind))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: definitions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (split)
   (("1"
     (flatten)
     (inst 1 "(w*Vdir(nzs,v))/sqv(nzs)")
     (expand "W0")
     (case-replace
      "(j / sqv(nzs)) * nzs + (w * Vdir(nzs, v)) / sqv(nzs) * Vdir(nzs, v) = (1/sqv(nzs))*(j*nzs + (w * Vdir(nzs, v))*Vdir(nzs,v))")
     (("1"
       (hide -1)
       (rewrite "scal_div_mult_right")
       (replaces -1 :dir rl)
       (grind))
      ("2" (hide-all-but 1) (grind :exclude ("sqv" "Vdir")))))
    ("2" (flatten) (skeep -1) (replaces -1) (rewrite "W_dot"))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: definitions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand* "W0" "Vdir")
   (rewrite "dot_scal_left")
   (rewrite "dot_perpR_eq_0")
   (assert))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: definitions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (both-sides-f 1 "sq")
   (("1"
     (rewrite "sq_norm")
     (rewrite "sq_norm")
     (rewrite "sqv_add")
     (rewrite "sqv_add")
     (rewrite "sqv_scal")
     (rewrite "sqv_scal")
     (case "sq(t1) * sqv(W0(nzs, j)) >=  sq(t2) * sqv(W0(nzs, j))")
     (("1"
       (case "2 * (t1 * (nzs * W0(nzs, j))) >=  2 * (t2 * (nzs * W0(nzs, j)))")
       (("1" (assert))
        ("2"
         (hide-all-but (-2 -3 1))
         (grind-reals)
         (mult-by -1 "nzs * W0(nzs, j)")
         (hide-all-but (-2 1))
         (expand "W0")
         (rewrite "dot_scal_right")
         (rewrite "sqv" :dir rl)
         (assert))))
      ("2" (hide 2) (grind-reals) (rewrite "sq_ge"))))
    ("2" (rewrite "sq_ge"))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: definitions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "dot_nneg_divergent")
   (inst?)
   (assert)
   (split +)
   (("1" (propax))
    ("2"
     (hide -1)
     (flatten)
     (expand "divergent?")
     (name "taus" "-(s*nzv)/sqv(nzv)")
     (inst - "taus")
     (("1"
       (assert)
       (expand "dist")
       (case "sqv(s) >= sqv(s+taus*nzv)")
       (("1"
         (hide -2)
         (lemma "sq_dist_norm")
         (inst-cp -1 "s" "zero")
         (inst - "s+taus*nzv" "zero")
         (replace -1)
         (replace -2)
         (hide -1)
         (hide -1)
         (rewrite "sqrt_sq")
         (rewrite "sqrt_sq")
         (lemma "sqrt_ge")
         (inst?)
         (assert)
         (rewrite "sqrt_sqv_norm")
         (rewrite "sqrt_sqv_norm")
         (assert))
        ("2"
         (assert)
         (hide -2)
         (name "a" "sqv(nzv)")
         (name "b" "2*s*nzv")
         (name "c" "sqv(s)")
         (lemma "quad_min")
         (inst - "a" "b" "c")
         (assert)
         (case "a > 0")
         (("1"
           (assert)
           (expand "is_minimum?")
           (inst - "0")
           (case "-b/(2*a) = taus")
           (("1"
             (replace -1)
             (hide-all-but (-3 1))
             (expand "a")
             (expand "b")
             (expand "c")
             (grind))
            ("2" (assert))))
          ("2" (assert))))))
      ("2"
       (case "taus>0")
       (("1" (assert))
        ("2" (expand "taus" 1) (cross-mult 1) (assert))))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: definitions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "gs_only?")
   (split)
   (("1"
     (flatten)
     (skeep -1)
     (inst 1 "1/l")
     (lemma "scal_cross")
     (inst -1 "l" "vo2" "vo1")
     (assert))
    ("2"
     (flatten)
     (skeep -1)
     (inst 1 "1/l")
     (lemma "scal_cross")
     (inst -1 "l" "vo1" "vo2")
     (assert))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: definitions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "gs_only?" -)
   (skosimp*)
   (replaces -)
   (rewrite "scal_assoc")
   (rewrite "gs_only_scal"))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: definitions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (split)
   (("1"
     (flatten)
     (expand "gs_only?")
     (skeep -)
     (expand "^")
     (inst 1 "l*norm(nzv)")
     (assert))
    ("2"
     (flatten)
     (skeep -1)
     (expand "^")
     (replaces -1)
     (rewrite "scal_assoc")
     (rewrite "gs_only_scal"))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: definitions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (split)
   (("1" (flatten) (expand "gs_only?") (skeep -1) (assert))
    ("2" (flatten) (replaces -1) (rewrite "gs_only_id"))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: definitions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "trk_only?")
   (ground)
   (("1" (rewrite "norm_eq_0")) ("2" (replaces -1) (assert))))


proof_type: j_proof
decl_type: tcc
library: ACCoRD
theory: definitions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (case "nzs*W0(nzs, nzj) = 0")
   (("1" (hide -2) (rewrite "W0_dot") (assert))
    ("2" (replaces -1) (assert))))


proof_type: j_proof
decl_type: tcc
library: ACCoRD
theory: definitions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep :preds? t)
   (hide -1)
   (case "nzs*(W0(nzs,nzj) + k * Vdir(nzs, v)) = 0")
   (("1"
     (hide -2)
     (rewrite "dot_add_right")
     (rewrite "Vdir_perp")
     (assert)
     (rewrite "W0_dot"))
    ("2" (replaces -1) (assert))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: track
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skeep)
   (expand "track")
   (rewrite "sin_atan2")
   (("1"
     (lift-if)
     (ground)
     (("1"
       (field 1)
       (both-sides-f 1 "sq")
       (("1"
         (rewrite "sq_norm")
         (rewrite "sqv_sos")
         (expand "sos")
         (replaces -2)
         (assert))
        ("2" (rewrite "sq_eq"))))
      ("2"
       (field 2)
       (neg-formula 2)
       (both-sides-f 2 "sq")
       (("1"
         (rewrite "sq_norm")
         (rewrite "sq_neg")
         (rewrite "sqv_sos")
         (expand "sos")
         (replaces -1)
         (assert))
        ("2" (rewrite "sq_eq"))))
      ("3"
       (field)
       (cancel-by 1 "v`x")
       (both-sides-f 2 "sq")
       (("1"
         (rewrite "sq_norm")
         (rewrite "sq_times")
         (rewrite "sq_div")
         (real-props)
         (rewrite "sqv_sos")
         (expand "sos")
         (propax))
        ("2" (rewrite "sq_eq") (mult-cases 1))))
      ("4"
       (field 2)
       (cancel-by 2 "v`x")
       (neg-formula 3)
       (both-sides-f 3 "sq")
       (("1"
         (rewrite "sq_norm")
         (rewrite "sq_neg")
         (rewrite "sq_times")
         (rewrite "sq_div")
         (real-props)
         (rewrite "sqv_sos")
         (expand "sos")
         (propax))
        ("2"
         (rewrite "sq_eq")
         (neg-formula 1 :auto-step (grind-reals)))))))
    ("2" (hide 2) (typepred "v") (flatten) (decompose-equality 1))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: track
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skeep)
   (expand "track")
   (rewrite "cos_atan2")
   (("1"
     (lift-if)
     (split)
     (("1" (flatten) (assert))
      ("2"
       (flatten)
       (split 2)
       (("1"
         (flatten)
         (field 1)
         (both-sides-f 1 "sq")
         (("1"
           (rewrite "sq_norm")
           (rewrite "sq_times")
           (rewrite "sq_div")
           (real-props)
           (rewrite "sqv_sos")
           (expand "sos")
           (propax))
          ("2" (rewrite "sq_eq") (mult-cases 1))))
        ("2"
         (flatten)
         (field 2)
         (neg-formula 2)
         (both-sides-f 2 "sq")
         (("1"
           (rewrite "sq_norm")
           (rewrite "sq_neg")
           (rewrite "sq_times")
           (rewrite "sq_div")
           (real-props)
           (rewrite "sqv_sos")
           (expand "sos")
           (propax))
          ("2"
           (rewrite "sq_eq")
           (neg-formula 1 :auto-step (grind-reals)))))))))
    ("2" (hide 2) (typepred "v") (flatten) (decompose-equality 1))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: track
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skeep)
   (expand "trkgs2vect")
   (expand "norm")
   (rewrite "sqv_scal")
   (sq-simp)
   (rewrite "sqv_sos")
   (expand "sos")
   (lemma "sin2_cos2")
   (inst?)
   (replaces -1)
   (assert))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: track
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skeep)
   (expand "trkgs2vect")
   (expand "track")
   (expand "*")
   (lemma "atan2_cancel_pos")
   (inst -1 "gsp" "cos(trk)" "sin(trk)")
   (split -1)
   (("1"
     (replaces -1)
     (lemma "atan2_cos_sin")
     (inst -1 "to2pi(trk)")
     (rewrite "cos_id_to2pi")
     (rewrite "sin_id_to2pi"))
    ("2"
     (hide 2)
     (flatten)
     (lemma "sin2_cos2")
     (inst? -1)
     (replaces (-2 -3))
     (assert))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: track
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skeep)
   (expand "trkgs2vect")
   (expand "*")
   (rewrite "sin_track")
   (rewrite "cos_track")
   (decompose-equality 1))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: track
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
script:
  (""
   (skeep)
   (skoletin* 1)
   (case-replace
    "det(nvo,s) = norm(nvo)*norm(s)*sin(track(nvo)-track(s))")
   (("1"
     (hide -1)
     (case-replace
      "norm(nvo) * norm(s) * sin(track(nvo) - track(s)) > det(vi, s) IFF
                               sin(track(nvo) - track(s)) > det(vi, s) / (norm(nvo)*norm(s))")
     (("1"
       (hide -1)
       (both-sides-f -3 "sin")
       (rewrite "sin_asin")
       (replaces -1 :dir rl)
       (lemma "sin_gt_to2pi")
       (inst -1 "track(nvo)-track(s)" "psi")
       (assert)
       (replaces -1)
       (case-replace
        "psi < to2pi(track(nvo) + pi / 2 - track(s)) - pi / 2 AND
                                              to2pi(track(nvo) + pi / 2 - track(s)) - pi / 2 < pi - psi IFF 0 < to2pi(track(nvo) - track(s) - psi) AND
                                              to2pi(track(nvo) - track(s) - psi) < pi - 2*psi")
       (("1" (hide -1) (replaces (-1 -2 -3)) (assert))
        ("2"
         (hide 2)
         (case "to2pi(track(nvo) + pi / 2 - track(s)) - pi / 2 - psi < 0")
         (("1"
           (case "psi < to2pi(track(nvo) + pi / 2 - track(s)) - pi / 2")
           (("1" (hide 1) (assert))
            ("2"
             (case "to2pi(track(nvo) - track(s) - psi) < pi - 2 * psi")
             (("1"
               (hide 1 2)
               (lemma "to2pi_neg")
               (inst -1
                "to2pi(track(nvo) + pi / 2 - track(s)) - pi / 2 - psi")
               (assert)
               (lemma "to2pi_to2pi")
               (inst -1 "track(nvo) + pi / 2 - track(s)" "-pi/2 - psi")
               (replaces -1)
               (assert))
              ("2" (assert))))))
          ("2"
           (case-replace
            "psi < to2pi(track(nvo) + pi / 2 - track(s)) - pi / 2 AND
                                                                     to2pi(track(nvo) + pi / 2 - track(s)) - pi / 2 < pi - psi IFF 0 < to2pi(track(nvo) + pi / 2 - track(s)) - pi / 2 - psi AND  to2pi(track(nvo) + pi / 2 - track(s)) - pi / 2 - psi < pi - 2*psi")
           (("1"
             (hide -1)
             (lemma "to2pi_id")
             (inst -1
              "to2pi(track(nvo) + pi / 2 - track(s)) - pi / 2 - psi")
             (("1"
               (lemma "to2pi_to2pi")
               (inst -1 "track(nvo) + pi / 2 - track(s)" "-pi/2 - psi")
               (replaces -1)
               (ground))
              ("2" (hide 3) (ground))))
            ("2" (hide-all-but 1) (ground))))))))
      ("2"
       (assert)
       (hide-all-but 1)
       (grind-reals)
       (("1" (mult-by 1 "(norm(nvo) * norm(s))") (assert))
        ("2" (mult-by -1 "(norm(nvo) * norm(s))") (assert))))))
    ("2"
     (hide-all-but 1)
     (lemma "trkgs2vect_id")
     (inst-cp -1 "nvo")
     (inst -1 "s")
     (expand "trkgs2vect")
     (rewrite "sin_minus")
     (name-replace "ts" "track(s)")
     (name-replace "tnvo" "track(nvo)")
     (expand "det")
     (name-replace "nnvo" "norm(nvo)")
     (name-replace "ns" "norm(s)")
     (replaces (-1 -2) :dir rl)
     (expand "*")
     (propax))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: track
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skeep)
   (skoletin* 1)
   (case-replace
    "det(nvo,s) = norm(nvo)*norm(s)*sin(track(nvo)-track(s))")
   (("1"
     (hide -1)
     (case-replace
      "norm(nvo) * norm(s) * sin(track(nvo) - track(s)) >= det(vi, s) IFF
                               sin(track(nvo) - track(s)) >= det(vi, s) / (norm(nvo)*norm(s))")
     (("1"
       (hide -1)
       (both-sides-f -3 "sin")
       (rewrite "sin_asin")
       (replaces -1 :dir rl)
       (lemma "sin_ge_to2pi")
       (inst -1 "track(nvo)-track(s)" "psi")
       (assert)
       (replaces -1)
       (case-replace
        "psi <= to2pi(track(nvo) + pi / 2 - track(s)) - pi / 2 AND
                                              to2pi(track(nvo) + pi / 2 - track(s)) - pi / 2 <= pi - psi IFF 0 <= to2pi(track(nvo) - track(s) - psi) AND
                                              to2pi(track(nvo) - track(s) - psi) <= pi - 2*psi")
       (("1" (hide -1) (replaces (-1 -2 -3)) (assert))
        ("2"
         (hide 2)
         (case "to2pi(track(nvo) + pi / 2 - track(s)) - pi / 2 - psi < 0")
         (("1"
           (case "psi <= to2pi(track(nvo) + pi / 2 - track(s)) - pi / 2")
           (("1" (hide 1) (assert))
            ("2"
             (case "to2pi(track(nvo) - track(s) - psi) <= pi - 2 * psi")
             (("1"
               (hide 1 2)
               (lemma "to2pi_neg")
               (inst -1
                "to2pi(track(nvo) + pi / 2 - track(s)) - pi / 2 - psi")
               (assert)
               (lemma "to2pi_to2pi")
               (inst -1 "track(nvo) + pi / 2 - track(s)" "-pi/2 - psi")
               (replaces -1)
               (assert))
              ("2" (assert))))))
          ("2"
           (case-replace
            "psi <= to2pi(track(nvo) + pi / 2 - track(s)) - pi / 2 AND
                                                                     to2pi(track(nvo) + pi / 2 - track(s)) - pi / 2 <= pi - psi IFF 0 <= to2pi(track(nvo) + pi / 2 - track(s)) - pi / 2 - psi AND  to2pi(track(nvo) + pi / 2 - track(s)) - pi / 2 - psi <= pi - 2*psi")
           (("1"
             (hide -1)
             (lemma "to2pi_id")
             (inst -1
              "to2pi(track(nvo) + pi / 2 - track(s)) - pi / 2 - psi")
             (("1"
               (lemma "to2pi_to2pi")
               (inst -1 "track(nvo) + pi / 2 - track(s)" "-pi/2 - psi")
               (replaces -1)
               (ground))
              ("2" (hide 3) (ground))))
            ("2" (hide-all-but 1) (ground))))))))
      ("2" (hide-all-but 1) (grind-reals))))
    ("2"
     (hide-all-but 1)
     (lemma "trkgs2vect_id")
     (inst-cp -1 "nvo")
     (inst -1 "s")
     (expand "trkgs2vect")
     (rewrite "sin_minus")
     (name-replace "ts" "track(s)")
     (name-replace "tnvo" "track(nvo)")
     (expand "det")
     (name-replace "nnvo" "norm(nvo)")
     (name-replace "ns" "norm(s)")
     (replaces (-1 -2) :dir rl)
     (expand "*")
     (propax))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: track
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skeep)
   (skoletin* 1)
   (case-replace "nvo*s = norm(nvo)*norm(s)*cos(track(nvo)-track(s))")
   (("1"
     (hide -1)
     (case-replace
      "norm(nvo) * norm(s) * cos(track(nvo) - track(s)) > 0 IFF cos(track(nvo) - track(s)) > 0")
     (("1"
       (hide -1)
       (lemma "cos_pos_to2pi")
       (inst?)
       (replaces -1)
       (case-replace
        "-pi / 2 < to2pi(track(nvo) - track(s) + pi / 2) - pi / 2 AND
                                               to2pi(track(nvo) - track(s) + pi / 2) - pi / 2 < pi / 2 IFF -pi / 2 - psi < to2pi(track(nvo) - track(s) + pi / 2) - pi / 2 - psi AND
                                               to2pi(track(nvo) - track(s) + pi / 2) - pi / 2 - psi < pi/2 - psi")
       (("1"
         (hide -1)
         (case "to2pi(track(nvo) - track(s) + pi / 2) - pi / 2 - psi >= 0")
         (("1"
           (lemma "to2pi_id")
           (inst -1
            "to2pi(track(nvo) - track(s) + pi / 2) - pi / 2 - psi")
           (("1"
             (replaces -1 :dir rl)
             (lemma "to2pi_to2pi")
             (inst -1 "track(nvo) - track(s) + pi / 2" "-pi/2 - psi")
             (replaces -1)
             (assert)
             (real-props)
             (lemma "ordered_eps_1")
             (inst?)
             (assert)
             (replaces -5 :dir rl)
             (replaces -1)
             (replaces -3)
             (assert)
             (replaces -3 :dir rl)
             (name-replace "xx" "to2pi(track(nvo) - phi - psi)")
             (hide -3)
             (replaces -2)
             (split)
             (("1" (flatten) (assert)) ("2" (flatten) (assert))))
            ("2" (assert))))
          ("2"
           (case "beta <= 3*pi/2 - psi")
           (("1"
             (lemma "to2pi_neg")
             (inst -1 "to2pi(track(nvo) + pi / 2 - phi) - pi / 2 - psi")
             (assert)
             (lemma "to2pi_to2pi")
             (inst -1 "track(nvo) + pi / 2 - phi" "-pi/2 -psi")
             (replaces -1)
             (assert)
             (real-props)
             (flatten)
             (lemma "ordered_eps_1")
             (inst?)
             (assert))
            ("2" (assert))))))
        ("2" (hide-all-but 1) (ground))))
      ("2"
       (hide-all-but 1)
       (typepred "nvo")
       (flatten)
       (typepred "s")
       (flatten)
       (ground)
       (("1" (mult-cases -1) (mult-cases -1))
        ("2" (mult-cases 1) (mult-cases 1))))))
    ("2"
     (hide-all-but 1)
     (rewrite "cos_minus")
     (rewrite "cos_track")
     (rewrite "cos_track")
     (rewrite "sin_track")
     (rewrite "sin_track")
     (grind))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: track
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skeep)
   (skoletin* 1)
   (case-replace "nvo*s = norm(nvo)*norm(s)*cos(track(nvo)-track(s))")
   (("1"
     (hide -1)
     (case-replace
      "norm(nvo) * norm(s) * cos(track(nvo) - track(s)) >= 0 IFF cos(track(nvo) - track(s)) >= 0")
     (("1"
       (hide -1)
       (lemma "cos_nneg_to2pi")
       (inst?)
       (replaces -1)
       (case-replace
        "-pi / 2 <= to2pi(track(nvo) - track(s) + pi / 2) - pi / 2 AND
                                               to2pi(track(nvo) - track(s) + pi / 2) - pi / 2 <= pi / 2 IFF -pi / 2 - psi <= to2pi(track(nvo) - track(s) + pi / 2) - pi / 2 - psi AND
                                               to2pi(track(nvo) - track(s) + pi / 2) - pi / 2 - psi <= pi/2 - psi")
       (("1"
         (hide -1)
         (case "to2pi(track(nvo) - track(s) + pi / 2) - pi / 2 - psi >= 0")
         (("1"
           (lemma "to2pi_id")
           (inst -1
            "to2pi(track(nvo) - track(s) + pi / 2) - pi / 2 - psi")
           (("1"
             (replaces -1 :dir rl)
             (lemma "to2pi_to2pi")
             (inst -1 "track(nvo) - track(s) + pi / 2" "-pi/2 - psi")
             (replaces -1)
             (assert)
             (real-props)
             (lemma "ordered_eps_1")
             (inst?)
             (assert)
             (replaces -5 :dir rl)
             (replaces -1)
             (replaces -3)
             (assert)
             (replaces -3 :dir rl)
             (name-replace "xx" "to2pi(track(nvo) - phi - psi)")
             (hide -3)
             (replaces -2)
             (ground))
            ("2" (assert))))
          ("2"
           (case "beta <= 3*pi/2 - psi")
           (("1"
             (lemma "to2pi_neg")
             (inst -1 "to2pi(track(nvo) + pi / 2 - phi) - pi / 2 - psi")
             (assert)
             (lemma "to2pi_to2pi")
             (inst -1 "track(nvo) + pi / 2 - phi" "-pi/2 -psi")
             (replaces -1)
             (assert)
             (real-props)
             (lemma "ordered_eps_1")
             (inst?)
             (assert))
            ("2" (assert))))))
        ("2" (hide-all-but 1) (ground))))
      ("2"
       (hide-all-but 1)
       (typepred "nvo")
       (flatten)
       (typepred "s")
       (flatten)
       (ground)
       (("1" (mult-cases -1) (mult-cases -1))
        ("2" (mult-cases 1) (mult-cases 1))))))
    ("2"
     (hide-all-but 1)
     (rewrite "cos_minus")
     (rewrite "cos_track")
     (rewrite "cos_track")
     (rewrite "sin_track")
     (rewrite "sin_track")
     (grind))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: track
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skeep)
   (skoletin* 1)
   (lemma "ordered_eps_1")
   (inst?)
   (assert)
   (lemma "ordered_eps_1_dot_ge_0")
   (inst -1 "nvo" "s" "vi")
   (ground))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: track
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skeep)
   (skoletin* 1)
   (lemma "ordered_eps_1")
   (inst?)
   (assert)
   (lemma "ordered_eps_1_dot_gt_0")
   (inst -1 "nvo" "s" "vi")
   (ground))


proof_type: t_proof
decl_type: tcc
library: ACCoRD
theory: track
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skeep)
   (use "scal_eq_zero")
   (assert)
   (hide -2)
   (lemma "sqv_eq_0")
   (inst?)
   (assert)
   (hide -2)
   (rewrite "sqv_sos")
   (expand "sos")
   (use "sin2_cos2")
   (assert))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: bands_util
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "gs_only?")
   (skosimp*)
   (replace -1)
   (expand "gs")
   (rewrite "norm_scal")
   (expand "abs")
   (expand "gs2v2")
   (expand "^")
   (assert))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: bands_util
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skeep)
   (expand "trk2v3")
   (expand "trkgs2vect")
   (expand "vect2")
   (expand "norm")
   (expand "sqv")
   (expand "*")
   (lemma sq_sqrt)
   (inst - "vo3`x*vo3`x+vo3`y*vo3`y")
   (expand "sq")
   (assert)
   (name z "sqrt(vo3`x * vo3`x + vo3`y * vo3`y)")
   (replace -1)
   (lemma cos_minus)
   (inst - trk trk)
   (assert)
   (lemma cos_0)
   (replace -1)
   (assert))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: bands_util
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skeep)
   (lemma vect2_trk2v3)
   (inst?)
   (replace -1)
   (hide -1)
   (expand "trk2v2")
   (assert))


proof_type: t_proof
decl_type: tcc
library: ACCoRD
theory: bands_util
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skeep)
   (expand "trk_only?")
   (expand "trkgs2vect")
   (expand "norm")
   (expand "sqv")
   (expand "*")
   (lemma cos_minus)
   (inst?)
   (assert)
   (lemma cos_0)
   (replace -2)
   (assert))


proof_type: j_proof
decl_type: tcc
library: ACCoRD
theory: bands_util
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skeep)
   (typepred "trk2v2(vo2)(trk)")
   (expand "trk_only?")
   (typepred vo2)
   (flatten)
   (replaces -2)
   (assert))


proof_type: j_proof
decl_type: tcc
library: ACCoRD
theory: bands_util
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "gs_only?")
   (inst 1 "gsp/norm(vo2)")
   (assert)
   (expand "gs2v2")
   (expand "^")
   (assert))


proof_type: t_proof
decl_type: tcc
library: ACCoRD
theory: bands_util
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skeep)
   (expand "trkgs2vect")
   (expand "trk_only?")
   (expand "vect2")
   (expand "norm")
   (expand "sqv")
   (expand "*")
   (lemma cos_minus)
   (inst?)
   (assert)
   (lemma cos_0)
   (assert))


proof_type: j_proof
decl_type: tcc
library: ACCoRD
theory: bands_util
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "gs2v3")
   (expand "gs2v2")
   (expand "^")
   (expand "gs_only?")
   (inst + "gsp/norm(vect2(vo3))")
   (assert))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: util
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (split)
   (("1"
     (flatten)
     (expand "eq")
     (flatten)
     (mult-cases -1)
     (("1"
       (case-replace "sq(a) = sq(-a)")
       (("1"
         (case-replace "sq(e) = sq(-e)")
         (("1"
           (hide (-1 -2))
           (case "sqrt(sq(-a)*b) = sqrt(sq(-e))")
           (("1" (rewrite "sqrt_times") (assert)) ("2" (replaces -3))))
          ("2" (rewrite "sq_neg"))))
        ("2" (rewrite "sq_neg"))))
      ("2"
       (case "sqrt(sq(a)*b) = sqrt(sq(e))")
       (("1" (rewrite "sqrt_times") (assert)) ("2" (replaces -3))))))
    ("2"
     (flatten)
     (expand "eq")
     (copy -1)
     (both-sides-f -1 "sq")
     (rewrite "sq_times")
     (assert)
     (hide -1)
     (replaces -1 :dir rl)
     (grind-reals))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: util
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "gt")
   (case "a>=0")
   (("1"
     (assert)
     (split 1)
     (("1"
       (flatten)
       (mult-by -2 "sqrt(b)")
       (case "e < 0")
       (("1" (assert))
        ("2"
         (assert)
         (real-props)
         (both-sides-f 2 "sq")
         (("1" (rewrite "sq_times")) ("2" (rewrite "sq_gt"))))))
      ("2"
       (flatten)
       (both-sides-f -1 "sq")
       (("1" (rewrite "sq_times")) ("2" (rewrite "sq_gt"))))))
    ("2"
     (assert)
     (split)
     (("1"
       (flatten)
       (neg-formula 1)
       (both-sides-f 1 "sq")
       (("1" (sq-simp) (assert)) ("2" (rewrite "sq_gt"))))
      ("2"
       (flatten)
       (case "e < 0")
       (("1"
         (assert)
         (neg-formula -2)
         (both-sides-f -2 "sq")
         (("1" (sq-simp) (assert))
          ("2" (rewrite "sq_gt") (neg-formula 1) (grind-reals))))
        ("2" (hide 2) (mult-by 2 "sqrt(b)") (real-props))))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: util
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "gt")
   (rewrite "lt_correct_1")
   (rewrite "lt_correct_1")
   (rewrite "gt_correct_1")
   (lemma "gt_correct_1")
   (inst -1 "a" "b" "c*sqrt(d) + e")
   (replaces -1 :dir rl)
   (expand "gt")
   (rewrite "sq_plus")
   (rewrite "sq_times")
   (ground))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal_dist_convexity
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "horiz_dist_scaf")
   (expand "sqv")
   (lemma "quad_convex")
   (inst - "sqv(v)" "2*(s*v)" "sqv(s) - sq(D)")
   (grind))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal_dist_convexity
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "horiz_dist_scaf")
   (expand "sqv")
   (lemma "quad_strictly_convex")
   (inst - "sqv(v)" "2*(s*v)" "sqv(s) - sq(D)")
   (("1" (grind))
    ("2" (lemma "vectors_2D.sqv_eq_0") (inst - "v") (assert))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "horizontal_conflict?")
   (skosimp*)
   (case "nnt!1 = 0 and nnt!2 = 0")
   (("1" (flatten) (inst + "0") (assert) (replace -1) (assert))
    ("2"
     (name "tt" "nnt!2/(nnt!1 + nnt!2)")
     (("1"
       (label "ttname" -1)
       (case "0<=tt AND tt<=1")
       (("1"
         (flatten)
         (name "newt" "(nnt!1*nnt!2)/(nnt!1 + nnt!2)")
         (label "newtname" -1)
         (case "tt*nnt!1 = newt AND (1-tt)*nnt!2 = newt")
         (("1"
           (flatten)
           (label "newttt" -1)
           (label "newtomtt" -2)
           (inst + "newt")
           (("1"
             (name "VV" "s + nnt!1 * v")
             (label "vvname" -1)
             (name "WW" "s + nnt!2 * w")
             (label "wwname" -1)
             (name "VVt" "s+nnt!1*v")
             (label "vvtname" -1)
             (name "WWt" "s+nnt!2*w")
             (label "wwtname" -1)
             (replace "wwname")
             (replace "vvname")
             (lemma "horiz_dist_convex_scaf")
             (inst - "VVt" "WWt-VVt")
             (case "s + newt * (v + w) = tt*VV+(1-tt)*WW")
             (("1"
               (label "vectfin" -1)
               (replace "vectfin")
               (assert)
               (lemma "convex_wtd_av_lt")
               (inst - "0"
                "LAMBDA (ttt: real): horiz_dist_scaf(VVt)(ttt, WWt - VVt)"
                "0" "1")
               (assert)
               (expand "horiz_dist_scaf" -1 1)
               (expand "horiz_dist_scaf" -1 1)
               (assert)
               (case "VVt = VV AND VVt+(WWt-VVt) = WW")
               (("1"
                 (flatten)
                 (assert)
                 (inst - "tt")
                 (assert)
                 (expand "horiz_dist_scaf")
                 (case-replace
                  "VVt + (1 - tt) * (WWt - VVt) = tt * VV + (1 - tt) * WW")
                 (("1" (assert)) ("2" (hide-all-but (-1 -2 1)) (grind))))
                ("2"
                 (hide-all-but ("vvtname" "vvname" "wwtname" "wwname" 1))
                 (replace "wwtname" + rl)
                 (replace "vvtname" + rl)
                 (replace "vvname" + rl)
                 (replace "wwname" + rl)
                 (hide-all-but 1)
                 (grind))))
              ("2"
               (replace "vvname" + rl)
               (replace "wwname" + rl)
               (assert)
               (hide (2 3 4 5))
               (hide-all-but ("newttt" "newtomtt" 1))
               (grind))))
            ("2"
             (lemma "nnreal_div_posreal_is_nnreal")
             (inst - "(nnt!1*nnt!2)" "nnt!1 + nnt!2")
             (("1" (replace "newtname") (propax)) ("2" (assert))))))
          ("2"
           (replace "newtname" + rl)
           (replace "ttname" + rl)
           (hide-all-but (1 2))
           (split 1)
           (("1" (field)) ("2" (field))))))
        ("2"
         (lemma "nnreal_div_posreal_is_nnreal")
         (inst - "nnt!2" "nnt!1 + nnt!2")
         (("1"
           (replace "ttname")
           (assert)
           (replace "ttname" + rl)
           (cross-mult 1)
           (assert))
          ("2" (assert))))))
      ("2" (assert))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "horizontal_conflict?")
   (skeep -1)
   (inst? 1)
   (rewrite "sqv_add")
   (rewrite "sqv_add")
   (rewrite "sqv_scal")
   (rewrite "sqv_scal")
   (rewrite "neg_dot_neg"))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (split)
   (("1"
     (flatten)
     (lemma "horizontal_conflict_neg")
     (inst -1 "s" "v")
     (assert))
    ("2"
     (flatten)
     (lemma "horizontal_conflict_neg")
     (inst -1 "-s" "-v")
     (assert))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "horizontal_conflict?")
   (split 1)
   (("1" (flatten) (skeep -1) (inst 1 "nnt/pt") (assert))
    ("2" (flatten) (skeep -1) (rewrite "scal_assoc") (inst? 1))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "horizontal_conflict_ever?")
   (split 1)
   (("1" (flatten) (skeep -1) (inst 1 "t/nzk") (assert))
    ("2" (flatten) (skeep -1) (rewrite "scal_assoc") (inst? 1))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "Delta")
   (rewrite "sqv_scal")
   (rewrite "det_scal_right")
   (rewrite "sq_times")
   (assert))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (case "v/=zero")
   (("1"
     (assert)
     (hide -2)
     (lemma "Delta_discr2b")
     (inst?)
     (assert)
     (replaces -1)
     (rewrite "discr2b_discr_gt_0")
     (expand "horizontal_conflict_ever?")
     (skeep -2)
     (lemma "a_gt_0_discr_gt_0")
     (inst?)
     (inst -1 "t")
     (assert)
     (rewrite "sqv_add")
     (rewrite "sqv_scal")
     (assert)
     (lemma "v_neq_zero")
     (inst?)
     (assert))
    ("2" (assert) (lemma "ground_speed") (inst?) (assert))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "Delta")
   (expand "det")
   (replace -1 + rl)
   (lemma "cauchy_schwarz")
   (inst - "s" "perpR(v)")
   (lemma "sqv_perpR")
   (inst - "v")
   (replace -1)
   (hide -1)
   (case-replace "s`x * v`y - s`y * v`x = s*perpR(v)")
   (("1"
     (hide -1)
     (lemma "parallel_dot_1")
     (expand "^")
     (assert)
     (case "not (s = zero or v = zero)")
     (("1"
       (flatten)
       (inst - "s" "perpR(v)")
       (("1"
         (rewrite "abs_mult")
         (rewrite "abs_mult")
         (lemma "posreal_div_posreal_is_posreal")
         (inst-cp - "1" "norm(s)")
         (("1"
           (inst - "1" "norm(perpR(v))")
           (("1"
             (expand "abs" -3 2)
             (assert)
             (expand "abs" -3 2)
             (assert)
             (case "abs((s * perpR(v))) = norm(s)*norm(perpR(v))")
             (("1"
               (assert)
               (expand "parallel?")
               (skosimp*)
               (hide-all-but (-4 3))
               (grind))
              ("2"
               (case "sq(abs((s * perpR(v)))) = sq(norm(s) * norm(perpR(v)))")
               (("1" (lemma "sq_eq") (inst?) (assert))
                ("2"
                 (rewrite "sq_times")
                 (rewrite "sq_abs")
                 (assert)
                 (case "forall (w: Vect2): sq(norm(w)) = sqv(w)")
                 (("1"
                   (inst-cp - "s")
                   (inst - "perpR(v)")
                   (replace -1)
                   (replace -2)
                   (lemma "sqv_perpR")
                   (inst - "v")
                   (assert))
                  ("2"
                   (skeep)
                   (lemma "sqrt_sqv_norm")
                   (inst - "w")
                   (case "sq(sqrt(sqv(w))) = sq(norm(w))")
                   (("1" (lemma "sq_sqrt") (inst - "sqv(w)") (ground))
                    ("2" (assert))))))))))
            ("2"
             (typepred "norm(perpR(v))")
             (lemma "norm_eq_0")
             (inst?)
             (assert)
             (hide-all-but (-1 3))
             (expand "perpR")
             (expand "zero")
             (flatten)
             (neg-formula -2)
             (grind)
             (apply-extensionality))))
          ("2" (lemma "norm_eq_0") (inst?) (assert))))
        ("2"
         (hide-all-but (1 3))
         (expand "perpR")
         (expand "zero")
         (flatten)
         (apply-extensionality))
        ("3" (assert))))
      ("2" (hide-all-but (-1 1)) (grind))))
    ("2" (hide-all-but 1) (grind))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (";;; Proof Delta_ge_0-1 for formula horizontal.Delta_ge_0"
   ";;; developed with shostak decision procedures"
   (skeep)
   (lemma "Delta_discr2b")
   (inst - "nzv" "s")
   (assert)
   (replace -1)
   (hide -1)
   (lemma "discr2b_discr")
   (inst - "sqv(nzv)" "s * nzv" "sqv(s) - sq(D)")
   (replace -1)
   (hide -1)
   (prop)
   (("1"
     (mult-by -1 "4")
     (assert)
     (lemma "solvable_quadratic")
     (inst - "sqv(nzv)" "2 * (s * nzv)" "sqv(s) - sq(D)")
     (assert)
     (skosimp*)
     (inst + "x!1")
     (hide -2)
     (grind))
    ("2"
     (lemma "discr_ge_0")
     (skosimp*)
     (inst - "sqv(nzv)" "2 * (s * nzv)" "sqv(s) - sq(D)" "t!1")
     (assert)
     (hide 2)
     (grind))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (prop)
   (("1"
     (lemma "Delta_ge_0")
     (inst?)
     (assert)
     (skosimp*)
     (inst + "t!1")
     (assert))
    ("2"
     (skosimp*)
     (case "sqv(s + t!1*nzv) < sq(D)")
     (("1"
       (lemma "Delta_gt_0")
       (inst?)
       (assert)
       (expand "horizontal_conflict_ever?")
       (inst + "t!1"))
      ("2"
       (assert)
       (lemma "Delta_ge_0")
       (inst?)
       (assert)
       (inst + "t!1")
       (assert))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (label "onDs" -2)
   (lemma "Delta_gt_0")
   (inst - "s" "nzv")
   (assert)
   (expand "horizontal_conflict_ever?")
   (case "t = horizontal_tca(s,nzv)")
   (("1" (assert) (replaces -1) (hide-all-but 2) (grind) (field))
    ("2"
     (assert)
     (hide 3)
     (name "tca2" "horizontal_tca(s,nzv)")
     (inst + "tca2")
     (assert)
     (name "aa" "sqv(nzv)")
     (name "bb" "2*(s*nzv)")
     (name "cc" "sqv(s)")
     (name "ff" "quadratic(aa,bb,cc)")
     (lemma "quad_min_mono_inc")
     (lemma "sqv_eq_0")
     (inst - "nzv")
     (flatten)
     (hide -2)
     (split -)
     (("1" (assert))
      ("2"
       (case "NOT aa > 0")
       (("1" (assert))
        ("2"
         (assert)
         (inst - "aa" "bb" "cc" "t" "tca2")
         (case "tca2 = -bb/(2*aa)")
         (("1"
           (assert)
           (replace -1 :dir rl)
           (assert)
           (lemma "quad_min_mono_dec")
           (inst - "aa" "bb" "cc" "t" "tca2")
           (assert)
           (replace -2 :dir rl)
           (assert)
           (case "ff(t) = sq(D)")
           (("1"
             (ground)
             (("1"
               (hide-all-but (-1 -2 -3 +))
               (hide 2)
               (expand "ff")
               (expand "aa")
               (expand "bb")
               (expand "cc")
               (grind))
              ("2"
               (hide-all-but (-1 -2 -3 +))
               (hide -3)
               (expand "ff")
               (hide 3)
               (expand "aa")
               (expand "bb")
               (expand "cc")
               (grind))
              ("3"
               (expand "aa")
               (expand "bb")
               (hide-all-but (-1 -2 +))
               (hide 3)
               (expand "ff")
               (expand "aa")
               (expand "bb")
               (expand "cc")
               (grind))))
            ("2"
             (hide-all-but ("onDs" 1))
             (expand "ff")
             (expand "aa")
             (expand "bb")
             (expand "cc")
             (grind))))
          ("2"
           (cross-mult 1)
           (expand "tca2" 1)
           (expand "horizontal_tca" 1)
           (cross-mult 1))))))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep :preds? t)
   (lemma "horizontal_conflict_ever")
   (inst? -1)
   (assert)
   (lemma "Delta_gt_0")
   (inst?)
   (assert)
   (lemma "Delta_gt_0_nzv")
   (inst?)
   (assert)
   (lemma "Delta_discr2b")
   (inst?)
   (beta)
   (replaces -1)
   (rewrite "discr2b_discr_gt_0")
   (expand "horizontal_conflict?")
   (skeep -5)
   (rewrite "sqv_add")
   (rewrite "sqv_scal")
   (name-replace "a" "sqv(v)")
   (name-replace "b" "sp*v")
   (lemma "quadratic_lt_0")
   (inst?)
   (inst -1 "nnt")
   (assert)
   (flatten)
   (hide -7)
   (move-terms -6 r 1)
   (name-replace "c" "sqv(sp) - sq(D)")
   (case "b=0")
   (("1" (lemma "roots_eq_0") (inst?) (assert))
    ("2"
     (lemma "root_gt_0")
     (inst -1 "a" "2*b" "c" "1")
     (assert)
     (rewrite "sign_eq_1")
     (case "c=0")
     (("1" (assert) (mult-by 3 "2*a") (assert))
      ("2"
       (assert)
       (case "a * c > 0")
       (("1" (assert) (mult-by -3 "2*b") (assert))
        ("2" (mult-cases 1))))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (skoletin 1 :postfix "t")
   (expand "Theta_D")
   (rewrite "sqv_add")
   (rewrite "sqv_scal")
   (move-terms 1 l 2)
   (lemma "Delta_discr2b")
   (inst?)
   (skoletin* -1 :old? t)
   (replaces -2)
   (lemma "quad2b_eq_0")
   (inst?)
   (inst -1 "tt")
   (expand "quadratic")
   (assert)
   (assert)
   (inst 1 "eps")
   (assert))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "Theta_D")
   (lemma "Delta_discr2b")
   (inst?)
   (assert)
   (lemma "quad2b_eq_0")
   (inst?)
   (expand "quadratic")
   (rewrite "sqv_add")
   (rewrite "sqv_scal")
   (ground))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "Theta_D_unique_eps")
   (inst?)
   (assert)
   (replaces -1)
   (ground)
   (("1" (skeep -1 :preds? t) (ground)) ("2" (inst? 1)) ("3" (inst? 1))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "Theta_D")
   (rewrite "neg_dot_neg")
   (rewrite "sqv_neg")
   (rewrite "sqv_neg"))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "Theta_D")
   (expand "root2b")
   (expand "discr2b")
   (lemma "dot_comm")
   (label "dc" -1)
   (inst-cp -1 "s" "nzk*nzv")
   (replace -2)
   (label "cdlem" -1)
   (lemma "sq_times")
   (label "sqt" -1)
   (inst-cp -1 "nzk" "nzv*s")
   (label "sqtlem" -1)
   (inst "cdlem" "s" "nzv")
   (lemma "dot_assoc")
   (label "assoc" -1)
   (inst - "nzk" "nzv" "s")
   (replace -1 + rl)
   (replace "sqt")
   (replace "cdlem" + rl)
   (rewrite "sqv_scal")
   (case-replace
    "sq(nzk) * sq(s * nzv) + sq(D) * (sq(nzk) * sqv(nzv)) -
                     sq(nzk) * sqv(nzv) * sqv(s) = sq(nzk)*(sq(s*nzv)+sq(D)*sqv(nzv)-sqv(nzv)*sqv(s))")
   (("1"
     (lemma "sqrt_times")
     (inst - "sq(nzk)" "sq(s*nzv)+sq(D)*sqv(nzv)-sqv(nzv)*sqv(s)")
     (("1"
       (replace -1)
       (case "forall (x: nzreal): sqrt(sq(x)) = sign(x)*x")
       (("1"
         (label "sqrtlem" -1)
         (inst - "nzk")
         (replace -1)
         (hide-all-but 1)
         (cross-mult 1)
         (grind))
        ("2"
         (hide-all-but 1)
         (skeep)
         (expand "sign")
         (lift-if)
         (lemma "sqrt_sq")
         (split)
         (("1" (flatten) (inst - "x") (assert))
          ("2" (flatten) (inst - "-x") (assert))))))
      ("2"
       (hide 2)
       (lemma "Delta_discr2b")
       (inst?)
       (assert)
       (expand "discr2b")
       (assert))))
    ("2" (hide-all-but 1) (grind))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "Theta_D")
   (expand "root2b")
   (expand "discr2b")
   (lemma "sqv_neg")
   (inst - "nzv")
   (replace -1)
   (hide -1)
   (case-replace "sq(s* -nzv) = sq(s*nzv)")
   (("1"
     (case-replace "-(s* -nzv) = s*nzv")
     (("1" (assert)) ("2" (hide-all-but 1) (grind))))
    ("2" (hide-all-but 1) (grind))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "Theta_D")
   (lemma "Delta_discr2b")
   (inst?)
   (assert)
   (replaces -1)
   (rewrite "root2b_root")
   (rewrite "root2b_root")
   (rewrite "discr2b_discr_ge_0")
   (lemma "root_le")
   (inst?)
   (assert)
   (rewrite "sign_eq_1"))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "Theta_D")
   (lemma "Delta_gt_0_nzv")
   (inst?)
   (assert)
   (lemma "Delta_discr2b")
   (inst?)
   (assert)
   (replaces -1)
   (rewrite "root2b_root")
   (rewrite "root2b_root")
   (rewrite "discr2b_discr_gt_0")
   (lemma "root_lt")
   (inst?)
   (assert)
   (rewrite "sign_eq_1"))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "Theta_D")
   (lemma "Delta_discr2b")
   (inst?)
   (assert)
   (replaces -1)
   (rewrite "root2b_root")
   (rewrite "root2b_root")
   (rewrite "discr2b_discr_eq_0")
   (rewrite "discr2b_discr_ge_0")
   (lemma "root_eq")
   (inst?)
   (ground))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "Theta_D")
   (lemma "Delta_discr2b")
   (inst?)
   (assert)
   (replaces -1)
   (rewrite "root2b_root")
   (rewrite "discr2b_discr_ge_0")
   (lemma "root_eq_0")
   (inst?)
   (assert)
   (rewrite "sign_eq_neg1"))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep :preds? t)
   (expand "Theta_D")
   (lemma "Delta_discr2b")
   (inst?)
   (skoletin* -1 :old? t)
   (replaces -2)
   (rewrite "root2b_root")
   (rewrite "discr2b_discr_ge_0")
   (lemma "roots_ge_0")
   (inst -1 "a" "2*b" "c" "-1")
   (assert)
   (real-props 1))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep :preds? t)
   (expand "Theta_D")
   (lemma "Delta_discr2b")
   (inst?)
   (skoletin* -1 :old? t)
   (replaces -2)
   (rewrite "root2b_root")
   (rewrite "discr2b_discr_ge_0")
   (lemma "root_neq_0")
   (inst -1 "a" "2*b" "c" "eps")
   (assert))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (split)
   (("1"
     (flatten)
     (lemma "horizontal_conflict_ever")
     (inst?)
     (assert)
     (lemma "Delta_gt_0")
     (inst?)
     (assert)
     (lemma "sdotv_lt_0 ")
     (inst?)
     (("1" (assert)) ("2" (flatten) (assert))))
    ("2"
     (flatten)
     (expand "horizontal_conflict?")
     (split -2)
     (("1" (inst 1 "0") (assert))
      ("2"
       (name "tt1" "Theta_D(s,nzv,-1)")
       (("1"
         (case "tt1 >= 0")
         (("1"
           (name "tt2" "Theta_D(s,nzv,1)")
           (lemma "Theta_D_on_D")
           (inst-cp -1 "1" "nzv" "s")
           (assert)
           (inst -1 "-1" "nzv" "s")
           (assert)
           (lemma "Theta_D_lt")
           (inst?)
           (assert)
           (lemma "t1_lt_t2_lt_D")
           (inst -1 "s" "nzv" _ "tt1" "tt2" "sq(D)")
           (assert)
           (inst -1 "(tt1+tt2)/2")
           (assert)
           (inst? 1)
           (assert))
          ("2"
           (inst 2 "0")
           (lemma "Theta_D_ge_0")
           (inst?)
           (("1" (assert)) ("2" (assert))))))
        ("2" (assert))))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (case "v /= zero")
   (("1"
     (flatten)
     (lemma "horizontal_conflict")
     (inst - "v" "s")
     (("1"
       (replace -1)
       (hide -1)
       (ground)
       (("1"
         (expand "Delta")
         (case "s*v /= 0")
         (("1" (assert))
          ("2"
           (hide 2)
           (flatten)
           (hide -2)
           (lemma "parallel_det_0")
           (inst - "s" "perpR(v)")
           (("1"
             (case "det(s,perpR(v)) = 0")
             (("1"
               (assert)
               (hide -1)
               (expand "parallel?")
               (skosimp*)
               (replace -1 -)
               (hide-all-but (-3 -4))
               (grind))
              ("2" (hide-all-but (-2 1)) (grind))))
            ("2"
             (hide-all-but (1 2))
             (flatten)
             (expand "zero")
             (expand "perpR")
             (flatten)
             (decompose-equality))
            ("3" (flatten) (replace -1) (expand "sqv") (assert))))))
        ("2"
         (expand "Delta")
         (case "sq(D) * sqv(v) - sq(det(s, v)) >= 0")
         (("1"
           (assert)
           (case "sq(D) * sqv(v) - sq(det(s, v)) /= 0")
           (("1" (assert))
            ("2"
             (hide 2)
             (hide -1)
             (flatten)
             (lemma "parallel_dot_1")
             (inst - "s" "perpR(v)")
             (("1"
               (ground)
               (("1"
                 (expand "parallel?")
                 (skosimp*)
                 (replace -1)
                 (grind))
                ("2"
                 (hide 2)
                 (rewrite "det_perpR")
                 (expand "^")
                 (lemma "sq_eq")
                 (inst?)
                 (assert)
                 (hide 2)
                 (rewrite "sq_times")
                 (rewrite "sq_times")
                 (rewrite "sq_div")
                 (("1"
                   (rewrite "sq_div")
                   (("1"
                     (cross-mult 1)
                     (lemma "sq_norm")
                     (inst-cp - "perpR(v)")
                     (inst - "s")
                     (replace -1)
                     (hide -1)
                     (replace -1)
                     (hide -1)
                     (rewrite "sqv_perpR")
                     (assert))
                    ("2"
                     (lemma "norm_eq_0")
                     (inst?)
                     (assert)
                     (replace -1)
                     (assert))))
                  ("2"
                   (lemma "norm_eq_0")
                   (inst?)
                   (assert)
                   (hide-all-but (-1 3))
                   (expand "zero")
                   (expand "perpR")
                   (flatten)
                   (decompose-equality))))))
              ("2"
               (flatten)
               (hide-all-but (-1 1))
               (expand "zero")
               (expand "perpR")
               (flatten)
               (decompose-equality))
              ("3" (flatten) (replace -1) (assert))))))
          ("2"
           (replace -2 + rl)
           (lemma "cauchy_schwarz")
           (inst - "s" "perpR(v)")
           (rewrite "det_perpR")
           (rewrite "sqv_perpR")
           (assert))))))
      ("2" (assert))))
    ("2"
     (flatten)
     (expand "horizontal_conflict?")
     (replace -1)
     (assert))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (case-replace "v=zero")
   (("1" (assert))
    ("2"
     (lemma "sqv_eq_0")
     (inst -1 "v")
     (assert)
     (rewrite "sqv_add")
     (rewrite "sqv_add")
     (rewrite "sqv_scal")
     (rewrite "sqv_scal")
     (lemma "quad_min_mono_dec")
     (inst -1 "sqv(v)" "2*(s*v)" "-sq(D)" "t1" "t2")
     (assert)
     (expand "quadratic")
     (cross-mult 1)
     (rewrite "dot_add_left")
     (rewrite "sqv" :dir rl)
     (assert))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "horizontal_tca")
   (name-replace "tt1" "max(0,-(s*nzv)/sqv(nzv))" :hide? nil)
   (flatten)
   (case "tt1 < t2")
   (("1"
     (assert)
     (lemma "quad_min_mono_inc")
     (inst -1 "sqv(nzv)" "2*(s*nzv)" "-sq(D)" "t2" "tt1")
     (assert)
     (expand "quadratic")
     (rewrite "sqv_add")
     (rewrite "sqv_add")
     (rewrite "sqv_scal")
     (rewrite "sqv_scal")
     (assert))
    ("2"
     (hide 3)
     (replaces -1 :dir rl)
     (rewrite "max_lt")
     (assert)
     (cross-mult 1)
     (rewrite "dot_add_left")
     (rewrite "sqv" :dir rl)
     (assert))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "Theta_D_on_D")
   (inst -1 "-1" "nzv" "s")
   (assert)
   (lemma "Theta_D_on_D")
   (inst -1 "1" "nzv" "s")
   (assert)
   (split)
   (("1"
     (flatten)
     (lemma "t1_lt_t2_lt_D")
     (inst?)
     (inst -1 "Theta_D(s,nzv,-1)" "Theta_D(s,nzv,1)")
     (assert))
    ("2"
     (flatten)
     (lemma "lt_D_t1_lt_t2")
     (inst -1 "s" "nzv" "t" "Theta_D(s,nzv,-1)" "Theta_D(s,nzv,1)"
      "sq(D)")
     (assert)
     (assert)
     (split -1)
     (("1" (flatten) (assert))
      ("2"
       (hide -2 -3 2)
       (lemma "Theta_D_lt")
       (inst?)
       (assert)
       (hide 2)
       (lemma "Delta_gt_0")
       (inst?)
       (assert)
       (expand "horizontal_conflict_ever?")
       (inst? 1))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (case "Delta(s!1,nzv!1) = 0")
   (("1"
     (lemma "Theta_D_Delta_eq_0")
     (inst?)
     (assert)
     (lemma "horizontal_los_inside_Theta")
     (inst - "nzv!1" "s!1" "t!1")
     (assert)
     (lemma "Theta_D_unique")
     (inst - "nzv!1" "s!1" "t!1")
     (assert)
     (ground))
    ("2"
     (lemma "horizontal_los_inside_Theta")
     (inst - "nzv!1" "s!1" "t!1")
     (lemma "Theta_D_unique")
     (inst - "nzv!1" "s!1" "t!1")
     (lemma "Theta_D_lt")
     (inst - "s!1" "nzv!1")
     (ground))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "horizontal_los_inside_Theta")
   (inst?)
   (assert)
   (lemma "Theta_D_unique")
   (inst?)
   (assert)
   (lemma "horizontal_sep_outside_Theta")
   (inst?)
   (assert)
   (name-replace "AA" "Theta_D(s,nzv,-1)")
   (name-replace "BB" "Theta_D(s,nzv,1)")
   (name-replace "CC" "sqv(s+t*nzv)")
   (name-replace "SQD" "sq(D)")
   (hide -4)
   (grind))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "horizontal_conflict")
   (inst?)
   (assert)
   (flatten)
   (lemma "Theta_D_neq_0")
   (inst?)
   (assert)
   (flatten)
   (lemma "Theta_D_ge_0")
   (inst?)
   (assert))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (use "Delta_gt_0_nzv")
   (assert)
   (flatten)
   (case "sqv(v) > 0")
   (("1"
     (split)
     (("1"
       (flatten)
       (lemma "horizontal_conflict")
       (inst?)
       (assert)
       (replaces -1 :dir rl)
       (expand "horizontal_conflict?")
       (skeep -1)
       (lemma "horizontal_los_inside_Theta")
       (inst?)
       (assert))
      ("2"
       (flatten)
       (expand "Theta_D")
       (lemma "Delta_discr2b")
       (inst?)
       (beta)
       (expand "root2b")
       (replaces -1)
       (cross-mult -1)
       (real-props)
       (move-terms -1 l 2)
       (real-props)
       (lemma "sqrt_gt")
       (inst -1 "discr2b(sqv(v), s * v, sqv(s) - sq(D))" "sq(s*v)")
       (assert)
       (hide (-2 -4))
       (expand "discr2b")
       (move-terms -1 l 1)
       (assert)
       (mult-by 1 "sqv(v)")
       (assert))))
    ("2" (lemma "sqv_eq_0") (inst?) (assert))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (beta)
   (flatten)
   (use "Delta_gt_0_nzv")
   (assert)
   (flatten)
   (case "sqv(v) > 0")
   (("1"
     (expand "Theta_D")
     (expand "root2b")
     (lemma "Delta_discr2b")
     (inst?)
     (assert)
     (replaces -1 :dir rl)
     (name-replace "dd" "Delta(s,v)")
     (split)
     (("1"
       (flatten)
       (cross-mult 1)
       (case "s * v + sqv(v) * t >= 0")
       (("1" (assert))
        ("2"
         (assert)
         (case "-sqrt(dd) < s * v + sqv(v) * t")
         (("1" (assert))
          ("2"
           (hide 3)
           (name-replace "aa" "s * v + sqv(v) * t")
           (neg-formula 1)
           (both-sides-f 1 "sq")
           (("1" (sq-simp)) ("2" (rewrite "sq_lt"))))))))
      ("2"
       (flatten)
       (cross-mult -1)
       (case "-sqrt(dd) < s * v + sqv(v) * t")
       (("1"
         (hide -2)
         (name-replace "aa" "s * v + sqv(v) * t")
         (neg-formula -1)
         (both-sides-f -1 "sq")
         (("1" (sq-simp)) ("2" (rewrite "sq_lt"))))
        ("2" (assert))))))
    ("2" (lemma "sqv_eq_0") (inst?) (assert))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "horizontal_conflict")
   (inst?)
   (assert)
   (flatten)
   (expand "horizontal_conflict?")
   (skeep -3)
   (inst 1 "nnt-t")
   (("1" (rewrite "add_assoc" :dir rl) (rewrite "scal_add_left" :dir rl))
    ("2" (lemma "horizontal_los_inside_Theta") (inst?) (assert))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "horizontal_conflict")
   (inst?)
   (assert)
   (flatten)
   (expand "horizontal_conflict?" -5)
   (skeep -5)
   (lemma "horizontal_los_inside_Theta")
   (inst -1 "nzv" "s" "t+nnt")
   (split -1)
   (("1" (rewrite "scal_add_left") (rewrite "add_assoc") (assert))
    ("2" (assert))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (rewrite "dot_add_left")
   (rewrite "sqv" :dir rl)
   (expand "Theta_D")
   (lemma "Delta_discr2b")
   (inst?)
   (("1"
     (beta)
     (expand "root2b")
     (replaces -1 :dir rl)
     (field)
     (hide-all-but 1)
     (typepred "eps")
     (assert))
    ("2" (lemma "Delta_gt_0_nzv") (inst?) (assert))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "horizontal_tca_entry_exit")
   (inst?)
   (assert)
   (flatten)
   (lemma "horizontal_los_inside_Theta")
   (inst?)
   (assert))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (rewrite "Delta_ge_0")
   (skeep)
   (lemma "horizontal_tca_min")
   (inst?)
   (rewrite "horizontal_sq_dtca_eq")
   (assert))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "horizontal_tca_entry_exit")
   (inst?)
   (assert)
   (flatten)
   (lemma "Theta_D_ge_0")
   (inst?)
   (assert))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (split)
   (("1"
     (flatten)
     (expand "horizontal_conflict?")
     (skosimp*)
     (lemma "horizontal_los_inside_Theta")
     (inst - "v" "s" "nnt!1")
     (assert))
    ("2"
     (flatten)
     (case "Theta_D(s,v,-1) < 0")
     (("1"
       (expand "horizontal_conflict?")
       (inst + "0")
       (lemma "horizontal_los_inside_Theta")
       (inst - "v" "s" "0")
       (assert))
      ("2"
       (lemma "horizontal_tca_entry_exit")
       (inst - "v" "s")
       (assert)
       (flatten)
       (expand "horizontal_conflict?")
       (inst + "horizontal_tca(s,v)")
       (("1"
         (lemma "horizontal_los_inside_Theta")
         (inst - "v" "s" "horizontal_tca(s,v)")
         (assert))
        ("2" (assert))))
      ("3" (assert))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (skeep)
   (expand "circle_solution_2D?")
   (flatten)
   (lemma "horizontal_entry_le")
   (inst -1 "s" "tt" "t" "v")
   (assert))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "circle_solution_2D?")
   (lemma "Theta_D_on_D")
   (inst?)
   (("1"
     (split)
     (("1" (assert) (lemma "Theta_D_horizontal_dir") (inst?) (assert))
      ("2" (assert))))
    ("2" (assert) (flatten) (lemma "Delta_gt_0_nzv") (inst?) (assert))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "Delta_ge_0")
   (inst?)
   (assert)
   (expand "circle_solution_2D?")
   (flatten)
   (inst 1 "t"))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "circle_solution_2D_Delta_ge_0")
   (inst?)
   (assert)
   (expand "circle_solution_2D?")
   (flatten)
   (lemma "Theta_D_unique_eps")
   (inst - "nzv" "s" "t")
   (assert)
   (skosimp*)
   (case "eps!1 = dir")
   (("1" (assert))
    ("2"
     (lemma "Theta_D_horizontal_dir")
     (inst - "eps!1" "s" "nzv")
     (assert)
     (replace -2 - rl)
     (case "((s + t * nzv) * nzv) = 0")
     (("1"
       (lemma "horizontal_tca_los")
       (inst - "nzv" "s")
       (split -1)
       (("1"
         (lemma "sdotv_lt_0")
         (inst-cp -1 "s+t*nzv" "nzv")
         (inst -1 "s+t*nzv" "-nzv")
         (case-replace "(s+t*nzv)*-nzv = 0")
         (("1"
           (assert)
           (expand "horizontal_conflict?")
           (case "t >= horizontal_tca(s,nzv)")
           (("1"
             (inst + "t-horizontal_tca(s,nzv)")
             (("1"
               (hide 2)
               (case-replace
                "s + t * nzv + (t - horizontal_tca(s, nzv)) * -nzv = s + horizontal_tca(s, nzv) * nzv")
               (name "tz" "horizontal_tca(s,nzv)")
               (replace -1)
               (hide-all-but 1)
               (grind))
              ("2"
               (inst + "horizontal_tca(s,nzv) - t")
               (("1" (assert)) ("2" (assert))))))
            ("2"
             (hide 2)
             (inst + "horizontal_tca(s,nzv) - t")
             (("1"
               (case-replace
                "s + t * nzv + (horizontal_tca(s, nzv) - t) * nzv = s + horizontal_tca(s, nzv) * nzv")
               (name "tz" "horizontal_tca(s,nzv)")
               (replace -1)
               (hide-all-but 1)
               (grind))
              ("2" (assert))))))
          ("2" (hide-all-but (-4 1)) (grind))))
        ("2"
         (lemma "Theta_D_Delta_eq_0")
         (inst - "nzv" "s")
         (assert)
         (case "(eps!1 = 1 and dir = -1) OR (eps!1 = -1 and dir = 1)")
         (("1"
           (split -1)
           (("1" (flatten) (assert)) ("2" (flatten) (assert))))
          ("2"
           (flatten)
           (typepred "eps!1")
           (typepred "dir")
           (ground))))))
      ("2"
       (case "(s + t * nzv) * nzv > 0")
       (("1"
         (lemma "pos_times_le")
         (inst - "eps!1" "(s + t * nzv) * nzv")
         (assert)
         (lemma "pos_times_le")
         (inst - "dir" "(s + t * nzv) * nzv")
         (assert)
         (typepred "dir")
         (typepred "eps!1")
         (assert))
        ("2"
         (lemma "neg_times_le")
         (inst - "-dir" "(s + t * nzv) * nzv")
         (assert)
         (lemma "neg_times_le")
         (inst - "-eps!1" "(s + t * nzv) * nzv")
         (assert)
         (typepred "eps!1")
         (typepred "dir")
         (assert))))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "circle_solution_2D_Theta_D")
   (inst?)
   (assert)
   (lemma "horizontal_sep_outside_Theta")
   (skosimp*)
   (inst?)
   (assert)
   (lemma "Delta_ge_0")
   (inst?)
   (assert)
   (inst + "t")
   (expand "circle_solution_2D?")
   (assert))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
script:
  (""
   (skeep)
   (skoletin 1)
   (flatten)
   (cross-mult 2)
   (("1"
     (lemma "Theta_D_unique_eps")
     (inst - "v" "s" "Theta_D(s,v,eps)")
     (("1"
       (assert)
       (flatten)
       (hide -1)
       (split -1)
       (("1"
         (name "td" "Theta_D(s,v,eps)")
         (replace -1)
         (hide -1)
         (hide -3)
         (grind))
        ("2" (inst 1 "eps"))))
      ("2" (assert))))
    ("2" (assert))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
script:
  (""
   (skeep)
   (expand "sqv")
   (rewrite "dot_add_left")
   (rewrite "dot_add_left")
   (case "pt * (v * (s + pt * v)) =
                       pr * (w * (s + pt * v))")
   (("1"
     (hide -2)
     (name "const34" "v * (s + pt * v)")
     (replace -1)
     (name "const35" "w * (s + pt * v)")
     (replace -1)
     (hide -1)
     (hide -1)
     (expand "sign")
     (lift-if)
     (lift-if)
     (ground)
     (("1"
       (div-by -2 "pr")
       (lemma "nnreal_times_nnreal_is_nnreal")
       (inst - "pt/pr" "const34")
       (assert))
      ("2"
       (lift-if)
       (ground)
       (div-by -2 "pt")
       (lemma "nnreal_times_nnreal_is_nnreal")
       (inst - "pr/pt" "const35")
       (assert))))
    ("2" (assert))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "Delta_gt_0_nzv")
   (inst?)
   (assert)
   (name "pp" "s + Theta_D(s, v, dir) * v")
   (label "ppname" -1)
   (replace -1)
   (case "sqv(pp) = sq(D)")
   (("1"
     (label "onD" -1)
     (expand "horizontal_conflict?")
     (skosimp*)
     (case "s*pp = sq(D)")
     (("1"
       (label "spponD" -1)
       (case "(s + nnt!1*v)*pp = sq(D)")
       (("1"
         (lemma "cauchy_schwarz")
         (inst?)
         (replace -2)
         (replace "onD")
         (expand "sq" -1 1)
         (div-by -1 "sq(D)")
         (assert))
        ("2"
         (expand "sqv" "onD")
         (name-replace "TD" "Theta_D(s,v,dir)")
         (case "v*pp = 0")
         (("1" (hide-all-but (-1 -2 1)) (grind))
          ("2"
           (case-replace "pp*pp = (s+TD*v)*pp")
           (("1"
             (hide -1)
             (rewrite "dot_add_left" "onD")
             (replace -1)
             (move-terms -2 l 1)
             (assert))
            ("2" (assert))))))))
      ("2" (rewrite "dot_add_left") (assert))))
    ("2" (lemma "Theta_D_on_D") (inst?) (assert))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "horizontal_conflict?" -1)
   (skosimp*)
   (label "underD" -1)
   (case "nnt!1 /= 0")
   (("1"
     (flatten)
     (name "delta" "D - norm(ss + nnt!1 * vv)")
     (label "deltaname" -1)
     (inst + "delta/(2*nnt!1)")
     (("1"
       (skeep 2)
       (expand "horizontal_conflict?")
       (inst + "nnt!1")
       (case "norm(ss + nnt!1 * (vv + ww)) < D")
       (("1"
         (lemma "sq_lt")
         (inst?)
         (assert)
         (lemma "vectors_2D.sqrt_sqv_norm")
         (inst?)
         (hide-all-but (-2 2))
         (name "cv2" "ss + nnt!1*(vv+ww)")
         (replace -1)
         (case "sq(norm(cv2)) = sqv(cv2)")
         (("1" (assert))
          ("2"
           (hide-all-but 1)
           (expand "sqv")
           (expand "norm")
           (expand "sqv")
           (rewrite "sq_sqrt")
           (typepred "sqv(cv2)")
           (expand "sqv")
           (propax))))
        ("2"
         (hide 3)
         (lemma "vectors_2D.norm_add_le")
         (inst - "ss + nnt!1*vv" "nnt!1*ww")
         (assert)
         (case "ss + nnt!1 * vv + nnt!1 * ww = ss + nnt!1 * (vv + ww)")
         (("1"
           (case "norm(nnt!1 * ww) + norm(ss + nnt!1 * vv) < D")
           (("1" (assert))
            ("2"
             (hide 2)
             (hide -2)
             (hide -1)
             (rewrite "norm_scal")
             (case "abs(nnt!1) = nnt!1")
             (("1"
               (replace -1)
               (case "nnt!1*norm(ww) < delta")
               (("1" (assert))
                ("2" (hide 2) (div-by 1 "nnt!1") (assert))))
              ("2" (expand "abs") (propax))))))
          ("2" (hide-all-but 1) (grind))))))
      ("2"
       (case "delta /( 2*nnt!1) > 0")
       (("1" (assert))
        ("2"
         (cross-mult 1)
         (assert)
         (case "norm(ss+nnt!1*vv) < D")
         (("1" (assert))
          ("2"
           (hide (2 3))
           (lemma "sq_lt")
           (inst?)
           (assert)
           (case "sq(norm(ss+nnt!1*vv)) = sqv(ss+nnt!1*vv)")
           (("1" (assert))
            ("2"
             (hide-all-but 1)
             (expand "norm")
             (rewrite "sq_sqrt"))))))
        ("3" (assert))))
      ("3" (assert))))
    ("2"
     (flatten)
     (replace -1)
     (inst + "1")
     (skosimp*)
     (expand "horizontal_conflict?")
     (inst + "nnt!1")
     (replace -1)
     (assert))))


proof_type: t_proof
decl_type: tcc
library: ACCoRD
theory: horizontal
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "Delta_scal")
   (inst - "s" "nzk" "nzv")
   (lemma nnreal_times_nnreal_is_nnreal)
   (inst - "sq(nzk)" "Delta(s,nzv)")
   (assert))


proof_type: t_proof
decl_type: tcc
library: ACCoRD
theory: horizontal
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "Delta_ge_0_2")
   (inst?)
   (assert)
   (expand "horizontal_conflict?")
   (skosimp*)
   (inst + "nnt!1")
   (assert))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: predicate_coordination_2D
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (case "FORALL (C, Crit1, Crit2: Criter):
                                                           symmetric_2D?(C) IMPLIES (coordinated_2D?(Crit1, Crit2, C) IMPLIES coordinated_2D?(Crit2, Crit1, C))")
   (("1"
     (skeep)
     (inst-cp - "C" "Crit1" "Crit2")
     (inst - "C" "Crit2" "Crit1")
     (ground))
    ("2"
     (hide 2)
     (skeep)
     (expand "coordinated_2D?")
     (skeep)
     (inst - "vi" "vo" "nvi" "nvo" "-s")
     (assert)
     (expand "symmetric_2D?")
     (copy -1)
     (inst - "s" "vo-vi" "nvo-nvi")
     (case "-(vo-vi) = vi-vo AND -(nvo-nvi) = nvi-nvo")
     (("1" (ground) (inst - "s" "vo-vi" "vo-vi") (ground))
      ("2" (hide-all-but 1) (grind))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: predicate_coordination_2D
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (ground)
   (expand "coordinated_2D?")
   (skeep)
   (expand "crit_symmetric_2D?")
   (inst - "vo-vi" "s" "vo-nvi")
   (case "-(vo-vi) = vi-vo")
   (("1"
     (replace -1)
     (hide -1)
     (case "-(vo-nvi) = nvi-vo")
     (("1"
       (replace -1)
       (hide -1)
       (assert)
       (name "AA" "vo-vi")
       (name "BB" "nvo-vi")
       (name "CC" "vo-nvi")
       (case-replace "nvo-nvi = CC+BB-AA")
       (("1"
         (hide -1)
         (replace -1)
         (replace -2)
         (replace -3)
         (expand "sum_closed_2D?")
         (inst - "s" "AA" "CC+BB-AA" "AA")
         (assert)
         (expand "sum_independent_2D?")
         (inst - "AA" "s" "CC" "BB")
         (assert))
        ("2" (hide-all-but (-1 -2 -3 1)) (grind))))
      ("2" (hide-all-but 1) (grind))))
    ("2" (hide-all-but 1) (grind))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: predicate_coordination_2D
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (label "Clem" -4)
   (hide "Clem")
   (label "Cindep" -4)
   (hide "Cindep")
   (label "symmetric" -1)
   (label "length" -2)
   (label "coord" -3)
   (label "sumindep" 1)
   (expand "sum_independent_2D?")
   (skeep)
   (label "vnv" -4)
   (label "vnw" -5)
   (label "Cv" -6)
   (hide "Cv")
   (label "Cnvnw" -6)
   (case "v /= zero")
   (("1"
     (flatten)
     (reveal "Clem")
     (expand "open_2D?")
     (inst - "s" "v" "nv+nw")
     (assert)
     (skosimp*)
     (case "norm(v) > 0")
     (("1"
       (case "(epsilon!1/(2*norm(v))) > 0")
       (("1"
         (name "const1" "(epsilon!1/(2*norm(v)))")
         (label "constname" -1)
         (replace -1)
         (label "const1pos" -2)
         (hide "const1pos")
         (inst "Clem" "-const1*v")
         (split "Clem")
         (("1"
           (copy "length")
           (hide "length")
           (copy -1)
           (expand "crit_independent_of_length_2D?")
           (inst -1 "v" "s" "nv" "const1")
           (("1"
             (inst -2 "v" "s" "nw" "const1")
             (("1"
               (assert)
               (label "cvnv" -1)
               (label "cvnw" -2)
               (name "newv" "const1*v")
               (label "newvname" -1)
               (name "vo1" "vectors_2D.zero")
               (label "voname" -1)
               (name "vi1" "-newv")
               (label "viname" -1)
               (name "nvo1" "nv-newv")
               (label "nvoname" -1)
               (name "nvi1" "-nw")
               (label "nviname" -1)
               (case "nvo1 - vi1 = nv")
               (("1"
                 (label "nvovi" -1)
                 (case "vo1-nvi1 = nw")
                 (("1"
                   (label "vonvi" -1)
                   (case "vo1-vi1 = newv")
                   (("1"
                     (label "vovi" -1)
                     (case "nvo1-nvi1 = nv+nw-newv")
                     (("1"
                       (label "nvonvi" -1)
                       (replace "newvname")
                       (expand "coordinated_2D?")
                       (inst - "vo1" "vi1" "nvo1" "nvi1" "s")
                       (assert)
                       (expand "crit_symmetric_2D?")
                       (inst - "newv" "s" "vo1-nvi1")
                       (case "-(vo1-nvi1) = nvi1-vo1")
                       (("1"
                         (case "vi1-vo1 = -newv")
                         (("1"
                           (assert)
                           (hide -1)
                           (hide -1)
                           (case "nvo1-nvi1 = nv + nw + -const1 * v")
                           (("1"
                             (assert)
                             (replace "vovi")
                             (replace "newvname" :dir rl)
                             (replace -1 :dir rl)
                             (reveal "Cindep")
                             (reveal "Cv")
                             (expand "independent_of_length_2D?")
                             (inst-cp - "s" "v" "v" "const1" "const1")
                             (("1"
                               (assert)
                               (inst - "s" "v" "nvo1-nvi1" "1" "const1")
                               (("1" (assert))
                                ("2" (reveal "const1pos") (assert))))
                              ("2" (reveal "const1pos") (assert))))
                            ("2"
                             (replace "nvonvi")
                             (replace "newvname" :dir rl)
                             (hide-all-but 1)
                             (grind))))
                          ("2"
                           (replace "vovi")
                           (hide-all-but ("vovi" 1))
                           (grind))))
                        ("2" (hide-all-but 1) (grind))))
                      ("2"
                       (replace "nvoname" :dir rl)
                       (replace "nviname" :dir rl)
                       (hide-all-but 1)
                       (grind))))
                    ("2"
                     (replace "voname" :dir rl)
                     (replace "viname" :dir rl)
                     (assert))))
                  ("2"
                   (replace "voname" :dir rl)
                   (replace "nviname" :dir rl)
                   (assert))))
                ("2"
                 (replace "nvoname" :dir rl)
                 (replace "viname" :dir rl)
                 (hide-all-but 1)
                 (grind)
                 (decompose-equality))))
              ("2" (reveal "const1pos") (assert))))
            ("2" (reveal "const1pos") (assert))))
          ("2"
           (rewrite "norm_scal")
           (reveal "const1pos")
           (expand "abs")
           (assert))))
        ("2" (cross-mult 1) (assert)) ("3" (assert))))
      ("2" (lemma "vectors_2D.norm_eq_0") (inst - "v") (assert))))
    ("2"
     (reveal "Cv")
     (flatten)
     (replace -2)
     (expand "crit_symmetric_2D?")
     (inst - "zero " "s" "nv")
     (assert)
     (expand "coordinated_2D?")
     (inst - "zero" "zero" "nw" "-nv" "s")
     (assert)
     (case "nw - - nv = nv + nw")
     (("1" (assert)) ("2" (hide-all-but 1) (grind))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: predicate_coordination_2D
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (ground)
   (expand "coordinated_2D?")
   (skeep)
   (expand "crit_antisymmetric_2D?")
   (inst - "vo-vi" "s" "vo-nvi" "eps")
   (case "-(vo-vi) = vi-vo")
   (("1"
     (replace -1)
     (hide -1)
     (case "-(vo-nvi) = nvi-vo")
     (("1"
       (replace -1)
       (hide -1)
       (assert)
       (name "AA" "vo-vi")
       (name "BB" "nvo-vi")
       (name "CC" "vo-nvi")
       (case-replace "nvo-nvi = CC+BB-AA")
       (("1"
         (hide -1)
         (replace -1)
         (replace -2)
         (replace -3)
         (expand "sum_closed_2D?")
         (inst - "s" "AA" "CC+BB-AA" "AA")
         (assert)
         (expand "sum_independent_2D?")
         (inst - "AA" "s" "CC" "BB")
         (assert))
        ("2" (hide-all-but (-1 -2 -3 1)) (grind))))
      ("2" (hide-all-but 1) (grind))))
    ("2" (hide-all-but 1) (grind))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: predicate_coordination_2D
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (label "Clem" -4)
   (hide "Clem")
   (label "Cindep" -4)
   (hide "Cindep")
   (label "symmetric" -1)
   (label "length" -2)
   (label "coord" -3)
   (label "sumindep" 1)
   (expand "sum_independent_2D?")
   (skeep)
   (label "vnv" -4)
   (label "vnw" -5)
   (label "Cv" -6)
   (hide "Cv")
   (label "Cnvnw" -6)
   (case "v /= zero")
   (("1"
     (flatten)
     (reveal "Clem")
     (expand "open_2D?")
     (inst - "s" "v" "nv+nw")
     (assert)
     (skosimp*)
     (case "norm(v) > 0")
     (("1"
       (case "(epsilon!1/(2*norm(v))) > 0")
       (("1"
         (name "const1" "(epsilon!1/(2*norm(v)))")
         (label "constname" -1)
         (replace -1)
         (label "const1pos" -2)
         (hide "const1pos")
         (inst "Clem" "-const1*v")
         (split "Clem")
         (("1"
           (expand "crit_independent_of_length_2D?")
           (copy "length")
           (hide "length")
           (copy -1)
           (inst -1 "v" "s" "nv" "const1")
           (("1"
             (inst -2 "v" "s" "nw" "const1")
             (("1"
               (assert)
               (label "cvnv" -1)
               (label "cvnw" -2)
               (name "newv" "const1*v")
               (label "newvname" -1)
               (name "vo1" "vectors_2D.zero")
               (label "voname" -1)
               (name "vi1" "-newv")
               (label "viname" -1)
               (name "nvo1" "nv-newv")
               (label "nvoname" -1)
               (name "nvi1" "-nw")
               (label "nviname" -1)
               (case "nvo1 - vi1 = nv")
               (("1"
                 (label "nvovi" -1)
                 (case "vo1-nvi1 = nw")
                 (("1"
                   (label "vonvi" -1)
                   (case "vo1-vi1 = newv")
                   (("1"
                     (label "vovi" -1)
                     (case "nvo1-nvi1 = nv+nw-newv")
                     (("1"
                       (label "nvonvi" -1)
                       (expand "coordinated_2D?")
                       (replace "newvname")
                       (inst - "vo1" "vi1" "nvo1" "nvi1" "s")
                       (assert)
                       (expand "crit_antisymmetric_2D?")
                       (inst - "newv" "s" "vo1-nvi1" "eps")
                       (case "-(vo1-nvi1) = nvi1-vo1")
                       (("1"
                         (case "vi1-vo1 = -newv")
                         (("1"
                           (assert)
                           (hide -1)
                           (hide -1)
                           (case "nvo1-nvi1 = nv + nw + -const1 * v")
                           (("1"
                             (assert)
                             (replace "vovi")
                             (replace "newvname" :dir rl)
                             (replace -1 :dir rl)
                             (reveal "Cindep")
                             (reveal "Cv")
                             (expand "independent_of_length_2D?")
                             (inst-cp - "s" "v" "v" "const1" "const1")
                             (("1"
                               (assert)
                               (inst - "s" "v" "nvo1-nvi1" "1" "const1")
                               (("1" (assert))
                                ("2" (reveal "const1pos") (assert))))
                              ("2" (reveal "const1pos") (assert))))
                            ("2"
                             (replace "nvonvi")
                             (replace "newvname" :dir rl)
                             (hide-all-but 1)
                             (grind))))
                          ("2"
                           (replace "vovi")
                           (hide-all-but ("vovi" 1))
                           (grind))))
                        ("2" (hide-all-but 1) (grind))))
                      ("2"
                       (replace "nvoname" :dir rl)
                       (replace "nviname" :dir rl)
                       (hide-all-but 1)
                       (grind))))
                    ("2"
                     (replace "voname" :dir rl)
                     (replace "viname" :dir rl)
                     (assert))))
                  ("2"
                   (replace "voname" :dir rl)
                   (replace "nviname" :dir rl)
                   (assert))))
                ("2"
                 (replace "nvoname" :dir rl)
                 (replace "viname" :dir rl)
                 (hide-all-but 1)
                 (grind)
                 (decompose-equality))))
              ("2" (reveal "const1pos") (assert))))
            ("2" (reveal "const1pos") (assert))))
          ("2"
           (rewrite "norm_scal")
           (reveal "const1pos")
           (expand "abs")
           (assert))))
        ("2" (cross-mult 1) (assert)) ("3" (assert))))
      ("2" (lemma "vectors_2D.norm_eq_0") (inst - "v") (assert))))
    ("2"
     (reveal "Cv")
     (flatten)
     (replace -2)
     (expand "crit_antisymmetric_2D?")
     (inst - "zero " "s" "nv" "eps")
     (assert)
     (expand "coordinated_2D?")
     (inst - "zero" "zero" "nw" "-nv" "s")
     (assert)
     (case "nw - - nv = nv + nw")
     (("1" (assert)) ("2" (hide-all-but 1) (grind))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: predicate_coordination_2D
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "subset?")
   (skeep)
   (expand "member")
   (expand "deriv")
   (expand "crit_sum_closed_2D?")
   (inst - "s" "v" "x" "-l*v")
   (grind))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: predicate_coordination_2D
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "coordinated_2D?")
   (skeep)
   (expand "deriv")
   (assert)
   (expand "crit_symmetric_2D?")
   (inst - "vo-vi" "s" "vo-nvi-l2*(vo-vi)")
   (case "-(vo - nvi - l2 * (vo - vi)) /= nvi - vo - l2 * (vi - vo)")
   (("1" (hide-all-but -1) (grind))
    ("2"
     (flatten)
     (assert)
     (replace -1)
     (case "-(vo-vi) = vi-vo")
     (("1"
       (assert)
       (hide -4)
       (expand "sum_independent_2D?")
       (inst - "vo-vi" "s" "nvo - vi - l1 * (vo - vi)"
        "vo - nvi - l2 * (vo - vi)")
       (assert)
       (case "nvo - vi - l1 * (vo - vi) + (vo - nvi - l2 * (vo - vi)) /= (nvo-nvi) + (1-(l1+l2))*(vo-vi)")
       (("1" (flatten) (hide-all-but 1) (grind))
        ("2" (flatten) (replace -1) (hide -1) (replace -3) (assert))))
      ("2" (hide-all-but 1) (grind))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: predicate_coordination_2D
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "deriv_coordinated_2D")
   (inst - "C" "Crit" "1" "0")
   (assert)
   (rewrite "deriv_0_2D"))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: predicate_coordination_2D
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "coordinated_2D?" +)
   (skeep)
   (expand "Comb")
   (ground)
   (("1"
     (lemma "sum_indep_coordinated_2D")
     (inst - "C" "Crit1")
     (assert)
     (expand "coordinated_2D?")
     (inst - "vo" "vi" "nvo" "nvi" "s")
     (assert))
    ("2"
     (lemma "deriv_coordinated_1")
     (inst - "C" "Crit1")
     (split -)
     (("1"
       (expand "coordinated_2D?")
       (inst - "vi" "vo" "nvi" "nvo" "-s")
       (assert)
       (expand "symmetric_2D?")
       (inst-cp - "s" "vo-vi" "vo-vi")
       (inst - "s" "vo-vi" "nvo-nvi")
       (assert)
       (case "-(vo-vi) = vi-vo AND -(nvo-nvi) = nvi-nvo")
       (("1" (flatten) (assert)) ("2" (hide-all-but 1) (grind))))
      ("2" (propax)) ("3" (propax))))
    ("3"
     (lemma "deriv_coordinated_1")
     (inst - "C" "Crit1")
     (assert)
     (expand "coordinated_2D?")
     (inst - "vo" "vi" "nvo" "nvi" "s")
     (assert))
    ("4"
     (expand "coordinated_2D?")
     (inst - "vo" "vi" "nvo" "nvi" "s")
     (assert))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: predicate_coordination_2D
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (skeep)
   (lemma "coordinated_sum_indep_2D")
   (inst - "C" "Crit")
   (assert)
   (expand "sum_independent_2D?")
   (inst - "v" "s" "nv" "nv")
   (assert)
   (expand "sum_closed_2D?" -7)
   (inst - "s" "v" "nv" "nv")
   (assert))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal_criteria
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "sq_neg_pos_lt ")
   (inst -1 "R(sp)*det(sp, v)" "-(sp * v)")
   (("1"
     (replaces -1 :dir rl)
     (rewrite "sq_times")
     (rewrite "sq_neg")
     (ground))
    ("2" (assert))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal_criteria
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "Delta")
   (case-replace
    "sq(D) * sqv(nzv) - sq(det(sp, nzv)) > 0 IFF sq(D) * sqv(nzv) >  sq(det(sp,nzv))")
   (("1"
     (hide -1)
     (case-replace
      "sq(D) * sqv(nzv) > sq(det(sp, nzv)) IFF sq(D)*(sqv(nzv)*sqv(sp) - sq(det(sp,nzv))) > sq(det(sp,nzv))*(sqv(sp)-sq(D))")
     (("1"
       (hide -1)
       (lemma "sq_det")
       (inst?)
       (neg-formula -1)
       (move-terms -1 r 2)
       (replaces -1)
       (expand "R" :assert? none)
       (rewrite "sq_div")
       (split)
       (("1" (flatten) (field 1)) ("2" (flatten) (field -1))))
      ("2"
       (hide 2)
       (assert)
       (split)
       (("1"
         (flatten)
         (move-terms 1 l 2)
         (assert)
         (cancel-by 1 "sqv(sp)"))
        ("2"
         (flatten)
         (move-terms -1 l 2)
         (assert)
         (cancel-by 1 "sqv(sp)"))))))
    ("2" (hide 2) (ground))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal_criteria
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "Delta")
   (case-replace
    "sq(D) * sqv(nzv) - sq(det(sp, nzv)) = 0 IFF sq(D) * sqv(nzv) =  sq(det(sp,nzv))")
   (("1"
     (hide -1)
     (case-replace
      "sq(D) * sqv(nzv) = sq(det(sp, nzv)) IFF sq(D)*(sqv(nzv)*sqv(sp) - sq(det(sp,nzv))) = sq(det(sp,nzv))*(sqv(sp)-sq(D))")
     (("1"
       (hide -1)
       (lemma "sq_det")
       (inst?)
       (neg-formula -1)
       (move-terms -1 r 2)
       (replaces -1)
       (expand "R" :assert? none)
       (rewrite "sq_div")
       (split)
       (("1" (flatten) (field 1)) ("2" (flatten) (field -1))))
      ("2"
       (hide 2)
       (assert)
       (split)
       (("1" (flatten) (assert))
        ("2" (flatten) (cancel-by -1 "sqv(sp)"))))))
    ("2" (hide 2) (ground))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal_criteria
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "Delta_sq_det_equality")
   (inst?)
   (assert)
   (case "R(sp) = 0")
   (("1"
     (replace -1)
     (lemma "sq_0")
     (replace -1)
     (hide -1)
     (hide -1)
     (name "epsy" "-sign(det(sp,nzv))")
     (inst + "epsy")
     (assert)
     (replace -1 + rl)
     (lemma "sq_eq_0")
     (inst - "sp*nzv")
     (assert)
     (expand "sign")
     (lift-if)
     (assert))
    ("2"
     (lemma "sq_times")
     (inst - "R(sp)" "det(sp,nzv)")
     (replace -1 - rl)
     (hide -1)
     (lemma "sq_eq_sign")
     (inst - "sp*nzv" "R(sp)*det(sp,nzv)")
     (assert)
     (skosimp*)
     (inst + "eps!1")
     (assert)
     (prop)
     (("1" (assert))
      ("2"
       (div-by -1 "R(sp)")
       (name "hello" "sp*nzv / R(sp)")
       (replace -1)
       (field -2)
       (case "hello <= 0")
       (("1" (assert))
        ("2" (replace -1 + rl) (mult-by 1 "R(sp)") (assert))))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal_criteria
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep :preds? t)
   (split)
   (("1"
     (flatten)
     (lemma "horizontal_conflict_ever")
     (inst?)
     (assert)
     (lemma "sq_R_det")
     (inst?)
     (assert)
     (lemma "sdotv_lt_0")
     (inst?)
     (assert)
     (replaces -2 :dir rl)
     (lemma "Delta_gt_0")
     (inst?)
     (assert)
     (expand "Delta")
     (move-terms -1 l 2)
     (mult-by -1 "sqv(sp)")
     (assert)
     (rewrite "sq_det")
     (expand "R")
     (rewrite "sq_div")
     (field 1))
    ("2"
     (flatten)
     (case "sp*v < 0")
     (("1"
       (case "v=zero")
       (("1" (replaces -1) (assert))
        ("2"
         (lemma "horizontal_conflict")
         (inst?)
         (("1"
           (assert)
           (lemma "sq_R_det")
           (inst?)
           (assert)
           (lemma "Delta_sq_det")
           (inst?)
           (assert))
          ("2" (assert))))))
      ("2" (sub-formulas -1 -2))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal_criteria
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "horizontal_criterion?")
   (flatten)
   (mult-by - "cc")
   (rewrite "det_scal_right")
   (assert))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal_criteria
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "horizontal_criterion?")
   (skeep -1)
   (typepred "eps")
   (split -)
   (("1"
     (replace -1)
     (assert)
     (split +)
     (("1"
       (hide-all-but (-3 1))
       (case "det(sp,v) >= sign(-det(sp, v)) * det(sp, v)")
       (("1" (mult-by -1 "R(sp)") (assert))
        ("2" (hide 2) (hide -) (grind :exclude "det"))))
      ("2" (hide -) (grind :exclude "det"))))
    ("2"
     (replace -1)
     (assert)
     (split +)
     (("1"
       (case "-det(sp,v) >= sign(-det(sp, v)) * det(sp, v)")
       (("1" (mult-by -1 "R(sp)") (assert))
        ("2" (hide-all-but 1) (grind :exclude "det"))))
      ("2" (hide -) (grind))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal_criteria
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "horizontal_criterion?")
   (flatten)
   (case "det(sp,v) = 0")
   (("1" (replace -1) (assert))
    ("2"
     (hide-all-but (-2 -4 1 3))
     (typepred "eps1")
     (typepred "eps2")
     (ground))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal_criteria
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "horizontal_criterion?")
   (lemma "horizontal_solution")
   (inst?)
   (replaces -1)
   (split)
   (("1"
     (flatten)
     (skeep -1)
     (typepred "eps")
     (split -2)
     (("1" (assert)) ("2" (assert))))
    ("2"
     (flatten)
     (inst + "sign(-det(sp,v))")
     (assert)
     (split 1)
     (("1"
       (assert)
       (case "sign(-det(sp,v)) = -1")
       (("1"
         (replace -1)
         (assert)
         (case "det(sp,v) > 0")
         (("1" (assert) (mult-by -1 "R(sp)") (assert))
          ("2" (hide-all-but (-1 1)) (grind :exclude "det"))))
        ("2"
         (typepred "sign(-det(sp,v))")
         (assert)
         (replace -2)
         (assert)
         (hide-all-but (-2 3))
         (grind :exclude "det"))))
      ("2"
       (case "sign(-det(sp, v)) * det(sp, v) <= 0")
       (("1"
         (assert)
         (mult-by -1 "R(sp)")
         (case "sp*v >= 0")
         (("1" (assert)) ("2" (grind :exclude ("R" "det")))))
        ("2" (hide-all-but 1) (grind))))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal_criteria
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (name "Spredicate"
         "LAMBDA (ss,ww: Vect2): (LAMBDA (vv: Vect2): IF sqv(ss)>=sq(D) THEN horizontal_criterion?(ss,eps)(vv) ELSE FALSE ENDIF)")
   (label "spname" -1)
   (name "hcpred"
         "(LAMBDA (ss,vv: Vect2): (LAMBDA (ww:Vect2): horizontal_conflict?(ss,ww)))")
   (lemma "sum_indep_coordinated_2D")
   (inst - "hcpred" "Spredicate")
   (split -)
   (("1"
     (expand "coordinated_2D?")
     (inst - "vo" "vi" "nvo" "nvi" "sp")
     (assert)
     (expand "Spredicate")
     (expand "hcpred")
     (propax))
    ("2"
     (hide-all-but ("spname" 1))
     (expand "crit_symmetric_2D?")
     (skosimp*)
     (lemma "horizontal_criterion_symmetric")
     (case "sqv(s!1)>= sq(D)")
     (("1"
       (replace "spname" :dir rl)
       (assert)
       (inst - "eps" "s!1" "nv!1"))
      ("2" (replace "spname" :dir rl) (assert))))
    ("3"
     (hide-all-but ("spname" -1 1))
     (expand "sum_independent_2D?")
     (skosimp*)
     (expand "Spredicate")
     (expand "hcpred")
     (case "sqv(s!1) >= sq(D)")
     (("1"
       (assert)
       (lemma "horizontal_criterion_sum_closed")
       (inst - "eps" "s!1" "nv!1" "nw!1")
       (assert)
       (lemma "horizontal_criterion_independence")
       (inst - "s!1" "nv!1+nw!1")
       (assert)
       (inst + "eps"))
      ("2" (assert))))
    ("4"
     (hide-all-but (-1 1))
     (expand "sum_closed_2D?")
     (expand "hcpred")
     (skosimp*)
     (lemma "horizontal_conflict_sum_closed")
     (inst?)
     (assert))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal_criteria
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep :preds? t)
   (skeep 2)
   (rewrite "sqv_add")
   (hide 1)
   (sub-formulas 1 -2)
   (mult-ineq -2 -3)
   (assert))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal_criteria
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "horizontal_conflict")
   (inst?)
   (("1" (ground) (lemma "sdotv_lt_0") (inst?) (assert))
    ("2"
     (flatten)
     (replaces -1)
     (assert)
     (expand "horizontal_conflict?")
     (assert))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal_criteria
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "horizontal_exit_independence")
   (inst-cp -1 "sp" "vo-vi")
   (inst -1 "sp" "nvo-nvi")
   (assert)
   (flatten)
   (hide -1 -4 2 4)
   (grind))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: line_solutions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "line_solution?")
   (flatten)
   (replaces -1 :dir rl)
   (mult-by -1 "R(sp)")
   (assert))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: line_solutions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "line_solution_dot_neg")
   (inst?)
   (assert)
   (case "sp*v = 0")
   (("1"
     (hide -2)
     (hide 2)
     (expand "line_solution?")
     (flatten)
     (replace -1)
     (case "det(sp,v) = 0")
     (("1"
       (lemma "orthogonal_basis")
       (inst - "v" "perpR(v)" "sp")
       (assert)
       (split -)
       (("1"
         (replace -3)
         (assert)
         (rewrite "det_perpR")
         (replace -2)
         (assert)
         (typepred "sp")
         (replace -2)
         (assert))
        ("2"
         (flatten)
         (hide-all-but (-1 1))
         (expand "zero")
         (decompose-equality)
         (expand "perpR")
         (decompose-equality))
        ("3" (hide-all-but 1) (grind))))
      ("2"
       (case "R(sp) = 0")
       (("1" (lemma "R_eq_0") (inst?) (assert)) ("2" (assert))))))
    ("2" (assert))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: line_solutions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "line_solution?")
   (rewrite "R_eq_0")
   (replaces -1)
   (assert)
   (rewrite "dot_perpR")
   (assert)
   (grind))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: line_solutions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "line_solution?")
   (rewrite "R_eq_0")
   (assert)
   (hide -)
   (inst 1 "-sign(det(s,v))")
   (name-replace "dv" "det(s,v)")
   (grind))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: line_solutions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "line_solution?")
   (rewrite "det_scal_right")
   (split)
   (("1"
     (flatten)
     (split 1)
     (("1" (cancel-by 1 "pk"))
      ("2" (rewrite "dot_scal_right") (cancel-by 1 "pk"))
      ("3" (flatten) (assert) (cancel-by 1 "pk"))))
    ("2"
     (flatten)
     (split 1)
     (("1" (cancel-by -1 "pk"))
      ("2" (rewrite "dot_scal_right") (cancel-by -2 "pk"))
      ("3" (flatten) (assert) (cancel-by -4 "pk"))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: line_solutions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
script:
  (""
   (skeep)
   (split)
   (("1"
     (flatten)
     (skeep -1)
     (lemma "line_solution_dot_neg")
     (inst?)
     (assert)
     (hide -1)
     (expand "line_solution?")
     (flatten)
     (expand "Delta")
     (both-sides "+" "sq(det(sp,v))" 1)
     (assert)
     (expand "R")
     (rewrite "sq_det")
     (case "NOT sq(det(sp,v))*(sqv(sp)-sq(D)) = sq(sp*v)*sq(D)")
     (("1"
       (mult-eq -1 -1)
       (hide -2)
       (hide -2)
       (lemma "sq_sqrt")
       (inst?)
       (split -)
       (("1"
         (hide 2)
         (expand "sq" -1)
         (cross-mult -2)
         (typepred "eps")
         (grind :exclude ("det" "sqv")))
        ("2" (assert))))
      ("2"
       (hide -2)
       (rewrite "sq_det")
       (assert)
       (factor -1)
       (case "(-1 * sq(sp * v) - sq(D) * sqv(v) + sqv(sp) * sqv(v)) = 0")
       (("1" (assert)) ("2" (mult-by 1 "sqv(sp)") (assert))))))
    ("2"
     (flatten)
     (expand "line_solution?")
     (expand "R")
     (expand "Delta")
     (case "det(sp,v) = 0")
     (("1"
       (replace -1)
       (assert)
       (lemma "sqv_eq_0")
       (inst?)
       (div-by -3 "sq(D)")
       (assert)
       (replace -1)
       (assert)
       (inst + "1"))
      ("2"
       (name "epsil" "-sign(det(sp,v))")
       (label "espsilname" -1)
       (inst + "epsil")
       (case "epsil * det(sp, v) <= 0")
       (("1"
         (assert)
         (label "espdef2" -1)
         (lemma "sq_eq")
         (inst - "-(det(sp, v) * (sqrt(sqv(sp) - sq(D)) / D) * epsil)"
          "-(sp*v)")
         (("1"
           (assert)
           (lemma "sq_neg")
           (inst-cp - "(sp*v)")
           (replace -2)
           (hide -2)
           (inst?)
           (replace -1)
           (hide -1)
           (rewrite "sq_times")
           (rewrite "sq_times")
           (rewrite "sq_div")
           (cross-mult 1)
           (case-replace "sq(epsil) = 1")
           (("1" (assert) (factor 1) (rewrite "sq_det") (assert))
            ("2" (typepred "epsil") (hide-all-but (-1 -2 1)) (grind))))
          ("2"
           (name-replace "AA" "det(sp,v)")
           (name "BB" "(sqrt(sqv(sp) - sq(D)) / D)")
           (case "BB >= 0")
           (("1"
             (replace -2)
             (hide-all-but (-1 -3 1))
             (case-replace "AA*BB*epsil = (epsil*AA)*BB")
             (("1"
               (name-replace "CC" "epsil*AA")
               (case "CC*BB <= 0")
               (("1" (assert))
                ("2"
                 (assert)
                 (lemma "nnreal_times_nnreal_is_nnreal")
                 (inst - "-CC" "BB")
                 (assert))))
              ("2" (assert))))
            ("2" (replace -1 + rl) (cross-mult 1))))))
        ("2"
         (replace "espsilname" + rl)
         (name-replace "AAA" "det(sp,v)")
         (hide-all-but 1)
         (grind))))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: line_solutions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (skeep -1)
   (expand "line_solution?")
   (flatten)
   (hide -2)
   (replace -2)
   (assert)
   (lemma "sq_det")
   (inst?)
   (replaces -3)
   (assert)
   (replaces -2 :dir rl)
   (assert)
   (typepred "sp")
   (mult-cases -2))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: line_solutions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "line_solution_dot_neg")
   (inst?)
   (assert)
   (lemma "det_neq_0")
   (inst -1 "nzv" "sp")
   (split)
   (("1"
     (flatten)
     (expand "line_solution?")
     (flatten)
     (expand "eps_line")
     (hide-all-but (-3 1 2))
     (typepred "eps")
     (grind))
    ("2" (inst? 1))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: line_solutions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (skeep -1)
   (case "v=zero")
   (("1"
     (replaces -1)
     (hide -1)
     (lemma "line_solution_zero_eps")
     (inst?))
    ("2"
     (lemma "line_solution_eps")
     (inst?)
     (("1" (assert)) ("2" (assert))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: line_solutions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (skeep -1)
   (lemma "line_solution_dot_neg")
   (inst? -1)
   (assert)
   (expand "line_solution?")
   (flatten)
   (case "horizontal_conflict?(sp,v)")
   (("1"
     (hide -5)
     (lemma "horizontal_criterion_independence")
     (inst?)
     (assert)
     (inst 1 "eps")
     (expand "horizontal_criterion?")
     (assert))
    ("2"
     (expand "horizontal_conflict_ever?")
     (skeep -4)
     (expand "horizontal_conflict?")
     (inst 1 "t")
     (rewrite "sqv_add")
     (name-replace "spv" "sp*v")
     (typepred "sp")
     (case "2 * (t * spv) >= 0")
     (("1" (assert)) ("2" (mult-cases 1) (mult-cases 1))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: line_solutions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "line_solution_Delta")
   (inst-cp -1 "sp" "v")
   (inst -1 "sp+t*v" "v")
   (("1"
     (replace -1)
     (replace -2)
     (hide -1)
     (hide -1)
     (lemma "Delta_eq")
     (inst?)
     (replace -1 + rl)
     (assert)
     (expand "sign")
     (lift-if)
     (lift-if)
     (ground))
    ("2"
     (lemma "line_solution_independence")
     (inst?)
     (assert)
     (ground)
     (expand "horizontal_conflict_ever?")
     (inst + "t")
     (assert))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: line_solutions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (ground)
   (("1"
     (lemma "line_solution_Delta")
     (inst - "sp" "nzv")
     (ground)
     (hide -1)
     (expand "Delta")
     (rewrite "sq_det")
     (assert)
     (both-sides "-" "sq(D)*sqv(nzv)-sqv(nzv)*sqv(sp)" -1)
     (assert)
     (factor -1)
     (name "ttt" "-(sp*nzv)/sqv(nzv)")
     (label "tttname" -1)
     (inst + "ttt")
     (("1"
       (split)
       (("1"
         (case-replace
          "sqv(sp + ttt * nzv) = sqv(sp) + 2*ttt*(sp*nzv) + sq(ttt)*sqv(nzv)")
         (("1"
           (hide -1)
           (case-replace
            "2 * ttt * (sp * nzv) = -2*(sq(sp*nzv)/sqv(nzv))")
           (("1"
             (hide -1)
             (case-replace "sq(ttt) * sqv(nzv) = sq(sp*nzv)/sqv(nzv)")
             (("1" (hide -1) (assert) (field 1))
              ("2"
               (hide 2)
               (replace "tttname" + rl)
               (rewrite "sq_div")
               (rewrite "sq_neg")
               (field 1)
               (expand "sq")
               (propax))))
            ("2"
             (hide 2)
             (replace "tttname" + rl)
             (assert)
             (expand "sq")
             (assert))))
          ("2" (hide 2) (hide-all-but 1) (grind))))
        ("2"
         (case-replace "(sp + ttt * nzv) * nzv = sp*nzv + ttt*sqv(nzv)")
         (("1" (replace "tttname" + rl) (field 1))
          ("2" (hide 2) (grind))))))
      ("2" (replace "tttname" + rl) (cross-mult 1) (assert))))
    ("2"
     (skeep -1)
     (lemma "on_D_line")
     (inst - "sp + tt*nzv" "nzv")
     (assert)
     (lemma "line_solution_invariant")
     (inst - "sp - (-tt)*nzv" "-tt" "nzv")
     (("1"
       (assert)
       (case-replace "sp-(-tt)*nzv = sp+tt*nzv")
       (("1"
         (hide -1)
         (assert)
         (ground)
         (expand "sign")
         (lift-if)
         (ground)
         (lemma "line_solution_Delta")
         (inst?)
         (ground)
         (hide -1)
         (case-replace
          "-1 * ((sp + tt * nzv) * nzv) = -(sp*nzv) + (-tt*sqv(nzv))")
         (("1"
           (hide -1)
           (case "-tt * sqv(nzv) <= 0")
           (("1" (assert))
            ("2"
             (typepred "tt")
             (lemma "nnreal_times_nnreal_is_nnreal")
             (inst - "tt" "sqv(nzv)")
             (assert))))
          ("2" (hide-all-but 1) (grind))))
        ("2" (hide-all-but 1) (grind))))
      ("2"
       (case-replace "sp - (-tt) * nzv = sp + tt*nzv")
       (("1" (assert)) ("2" (hide-all-but 1) (grind))))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: line_solutions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (case "v = zero")
   (("1" (replace -1) (hide-all-but 1) (grind))
    ("2"
     (lemma "line_solution_Delta")
     (inst - "sp" "v")
     (split 2)
     (("1"
       (flatten)
       (split -2)
       (("1"
         (flatten)
         (split 1)
         (("1"
           (expand "Delta")
           (both-sides + "sq(det(sp,v))" -1)
           (assert)
           (lemma "sqrt_eq")
           (inst - "sq(D)*sqv(v)" "sq(det(sp,v))")
           (ground)
           (lemma "sqrt_times")
           (inst?)
           (replace -1)
           (expand "norm")
           (case "abs(det(sp,v)) = -eps*det(sp,v)")
           (("1" (lemma "sqrt_sq_abs") (inst - "det(sp,v)") (assert))
            ("2"
             (expand "line_solution?")
             (flatten)
             (hide-all-but (-7 1))
             (name-replace "AAdet" "det(sp,v)")
             (typepred "eps")
             (grind))))
          ("2" (propax))))
        ("2" (inst + "eps"))))
      ("2"
       (flatten)
       (assert)
       (case "Delta(sp,v) = 0")
       (("1"
         (assert)
         (ground)
         (skosimp*)
         (expand "line_solution?")
         (flatten)
         (case "eps!1 = eps OR eps!1 = -eps")
         (("1"
           (ground)
           (replace -1)
           (hide -1)
           (lemma "associative_mult")
           (inst - "R(sp)" "det(sp,v)" "-eps")
           (replace -1 - rl)
           (assert))
          ("2"
           (hide-all-but 1)
           (typepred "eps!1")
           (typepred "eps")
           (ground))))
        ("2"
         (hide-all-but (-1 1))
         (expand "Delta")
         (lemma "sq_eq")
         (inst - "-eps * det(sp, v)" "D * norm(v)")
         (ground)
         (rewrite "sq_times")
         (case "sq(-eps) = 1")
         (("1"
           (replace -1)
           (rewrite "sq_times")
           (lemma "sq_norm")
           (inst?)
           (assert))
          ("2" (hide-all-but 1) (typepred "eps") (grind))))))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: line_solutions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (name "vv1" "(1/norm(nzv1))*nzv1")
   (name "vv2" "(1/norm(nzv2))*nzv2")
   (case "EXISTS (pkk: posreal): vv1 = pkk*vv2")
   (("1"
     (skosimp*)
     (inst + "(norm(nzv1)/norm(nzv2))*pkk!1")
     (replace -2 :dir rl)
     (replace -3 :dir rl)
     (hide-all-but (-1 1))
     (grind)
     (apply-extensionality)
     (("1" (field 1)) ("2" (field 1))))
    ("2"
     (hide 2)
     (case "NOT (norm(vv2) = 1 AND norm(vv1) = 1)")
     (("1"
       (replace -1 :dir rl)
       (replace -2 :dir rl)
       (hide-all-but 1)
       (rewrite "norm_scal")
       (rewrite "norm_scal")
       (expand "abs")
       (propax))
      ("2"
       (flatten)
       (case "NOT (line_solution?(sp,vv1,eps) AND line_solution?(sp,vv2,eps))")
       (("1"
         (lemma "line_solution_scal")
         (inst-cp - "eps" "1/norm(nzv1)" "sp" "nzv1")
         (assert)
         (inst - "eps" "1/norm(nzv2)" "sp" "nzv2")
         (assert))
        ("2"
         (flatten)
         (lemma "line_solution_det")
         (inst-cp - "eps" "sp" "vv1")
         (inst - "eps" "sp" "vv2")
         (assert)
         (flatten)
         (replace -7)
         (replace -8)
         (assert)
         (expand "line_solution?" -5)
         (expand "line_solution?" -6)
         (lemma "linear_functional_is_perp_dot")
         (inst - "(lambda (vzv: Vect2): R(sp)*det(sp,vzv)*eps-sp*vzv)"
          "vv1")
         (assert)
         (split -1)
         (("1"
           (skosimp*)
           (decompose-equality)
           (case "rzk!1 /= 0")
           (("1"
             (inst - "vv2")
             (case "R(sp) * det(sp, vv2) * eps - sp * vv2 = 0")
             (("1"
               (replace -1)
               (lemma "parallel_det_0")
               (inst - "vv2" "vv1")
               (div-by -4 "rzk!1")
               (assert)
               (expand "parallel?")
               (skosimp*)
               (case "nzk!1 > 0")
               (("1"
                 (inst + "(1/nzk!1)")
                 (("1"
                   (hide-all-but (-1 -2 2))
                   (apply-extensionality)
                   (("1" (rewrite "vx_scal") (cross-mult 1) (grind))
                    ("2" (grind))))
                  ("2"
                   (lemma "posreal_div_posreal_is_posreal")
                   (inst - "1" "nzk!1")
                   (("1" (assert)) ("2" (assert))))))
                ("2"
                 (replace -1)
                 (rewrite "dot_scal_right")
                 (case "sp*vv1 /= 0")
                 (("1"
                   (lemma "posreal_times_posreal_is_posreal")
                   (inst - "-1*nzk!1" "-1*(sp*vv1)")
                   (("1" (assert)) ("2" (assert)) ("3" (assert))))
                  ("2"
                   (flatten)
                   (replace -1)
                   (assert)
                   (rewrite "det_scal_right")
                   (lemma "nzreal_times_nzreal_is_nzreal")
                   (inst - "det(sp,vv1)" "R(sp)*nzk!1*eps")
                   (("1" (assert)) ("2" (expand "R") (assert))))))))
              ("2" (assert))))
            ("2"
             (flatten)
             (replace -1)
             (inst - "perpR(sp)")
             (assert)
             (lemma "det_perpR")
             (inst - "sp" "sp")
             (rewrite "det_eq_0")
             (replace -1 :dir rl)
             (lemma "nzreal_times_nzreal_is_nzreal")
             (inst - "R(sp)*eps" "det(sp,perpR(sp))")
             (("1" (assert))
              ("2"
               (rewrite "det_perpR")
               (rewrite "perpR_perpR")
               (hide-all-but 1)
               (typepred "sp")
               (grind))
              ("3" (expand "R") (assert))))))
          ("2" (hide-all-but 1) (grind))))))))))


