# Proofs

proof_type: t_proof
decl_type: tcc
library: ACCoRD
theory: kb
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (case "s = zero")
   (("1" (typepred "s") (replace -2) (assert))
    ("2"
     (typepred "s")
     (split 2)
     (("1" (cross-mult 1) (assert))
      ("2"
       (cross-mult 1)
       (assert)
       (lemma "sqrt_sqv_norm")
       (inst?)
       (replace -1 :dir rl)
       (lemma "sq_lt")
       (inst - "D" "sqrt(sqv(s))")
       (assert))))))


proof_type: t_proof
decl_type: tcc
library: ACCoRD
theory: kb
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skeep)
   (skeep)
   (replace -1)
   (hide-all-but (-2 -4))
   (expand "chi_hc")
   (lift-if)
   (ground))


proof_type: t_proof
decl_type: tcc
library: ACCoRD
theory: kb
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skeep)
   (expand "chi_hc")
   (lift-if)
   (lift-if)
   (lift-if)
   (assert)
   (ground)
   (replace -1)
   (assert))


proof_type: t_proof
decl_type: tcc
library: ACCoRD
theory: kb
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skeep)
   (expand "chi_hc")
   (lift-if)
   (lift-if)
   (lift-if)
   (ground)
   (("1" (replace -1) (assert)) ("2" (replace -1) (assert))))


proof_type: t_proof
decl_type: tcc
library: ACCoRD
theory: kb
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skeep)
   (skeep)
   (expand "chi_hc")
   (lift-if)
   (lift-if)
   (lift-if)
   (ground)
   (("1" (replace -1 :dir rl) (replace -5) (assert))
    ("2" (replace -1 :dir rl) (replace -6) (assert))))


proof_type: t_proof
decl_type: tcc
library: ACCoRD
theory: losr_iterative
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "trk_only?")
   (lemma "norms_eq_sqv")
   (inst?)
   (assert)
   (hide 2)
   (rewrite "sqv_add")
   (case-replace "nvo*perpR(nvo) = 0")
   (("1"
     (assert)
     (rewrite "sqv_scal")
     (rewrite "sqv_scal")
     (rewrite "sqv_perpR")
     (lemma "sin2_cos2")
     (inst - "dir*step")
     (mult-by -1 "sqv(nvo)")
     (assert))
    ("2" (hide 2) (grind))))


proof_type: t_proof
decl_type: tcc
library: ACCoRD
theory: losr_iterative
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (typepred "nvo!1")
   (split +)
   (("1"
     (hide-all-but (-1 -6 1))
     (typepred "incr_trk_vect(nvo!1, step!1, dir!1)")
     (replaces -3 :dir rl)
     (expand "trk_only?")
     (assert))
    ("2"
     (lemma "repulsive_criteria_transitive")
     (inst - "eps!1" "nvo!1-vi!1" "nvop!1-vi!1" "s!1" "vo!1-vi!1")
     (assert))))


proof_type: t_proof
decl_type: tcc
library: ACCoRD
theory: losr_iterative
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (typepred "nvo!1")
   (hide 1)
   (split +)
   (("1"
     (hide-all-but (-1 -4 1))
     (typepred "incr_trk_vect(nvo!1, step!1, dir!1)")
     (replaces -3 :dir rl)
     (expand "trk_only?")
     (assert))
    ("2"
     (lemma "repulsive_criteria_transitive")
     (inst - "eps!1" "nvo!1-vi!1" "nvop!1-vi!1" "s!1" "vo!1-vi!1")
     (assert))))


proof_type: t_proof
decl_type: tcc
library: ACCoRD
theory: losr_iterative
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (hide -)
   (hide 1)
   (assert)
   (case "floor(maxtrk!1 / step!1) - i!1 >= 0")
   (("1" (grind))
    ("2"
     (hide 3)
     (typepred "floor(maxtrk!1 / step!1)")
     (name-replace "FF" "floor(maxtrk!1 / step!1)")
     (case "i!1 < maxtrk!1/step!1")
     (("1" (assert)) ("2" (hide-all-but (1 3)) (grind-reals))))))


proof_type: t_proof
decl_type: tcc
library: ACCoRD
theory: losr_iterative
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (typepred
    "losr_trk_iter_i(s!1, vo!1, vi!1, minrelgs!1, maxtrk!1,
                                        step!1, 1, dir3!1, eps!1, nvo!1)")
   (name-replace "vv"
    "losr_trk_iter_i(s!1, vo!1, vi!1, minrelgs!1, maxtrk!1, step!1, 1,
                              dir3!1, eps!1, nvo!1)")
   (assert)
   (flatten)
   (assert))


proof_type: t_proof
decl_type: tcc
library: ACCoRD
theory: losr_iterative
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (assert)
   (typepred "nvo!1")
   (lemma "gs_only_normalize")
   (inst? -)
   (assert)
   (inst? 1))


proof_type: t_proof
decl_type: tcc
library: ACCoRD
theory: losr_iterative
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "repulsive_criteria_transitive")
   (inst - "eps!1" "nvo!1-vi!1" "nvop!1-vi!1" "s!1" "vo!1-vi!1")
   (assert)
   (typepred "incr_gs_vect(nvo!1, step!1, dir!1)")
   (assert)
   (replaces -3 :dir rl)
   (typepred "nvo!1")
   (lemma "gs_only_normalize")
   (inst -1 "vo!1" "nvo!1")
   (flatten)
   (hide -1)
   (split -)
   (("1"
     (lemma "gs_only_trans")
     (inst -1 "vo!1" "nvo!1" "nvop!1")
     (assert))
    ("2" (inst? 1))))


proof_type: t_proof
decl_type: tcc
library: ACCoRD
theory: losr_iterative
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (typepred "nvo!1")
   (hide 1)
   (lemma "repulsive_criteria_transitive")
   (inst - "eps!1" "nvo!1-vi!1" "nvop!1-vi!1" "s!1" "vo!1-vi!1")
   (assert)
   (hide (-1 -4 -6))
   (expand "incr_gs_vect")
   (case "norm(nvo!1) = norm((norm(vo!1) + dir!1 * i!1 * step!1) * ^(vo!1))")
   (("1"
     (rewrite "norm_scal")
     (replaces -1)
     (replaces -1)
     (rewrite "normalize_scal")
     (rewrite "normalize_normalize")
     (rewrite "scal_assoc")
     (rewrite "sign_times_abs")
     (expand "sign")
     (assert)
     (expand "abs")
     (assert))
    ("2" (assert))))


proof_type: t_proof
decl_type: tcc
library: ACCoRD
theory: losr_iterative
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (hide -1 -2 1)
   (typepred "nvo!1")
   (hide -3)
   (case "norm(nvo!1) = norm((norm(vo!1) + dir!1 * i!1 * step!1) * ^(vo!1))")
   (("1"
     (hide -2)
     (rewrite "norm_scal")
     (expand "abs")
     (replaces -1)
     (assert)
     (typepred "dir!1")
     (hide -1)
     (split -)
     (("1"
       (replaces -1)
       (assert)
       (case "floor((maxgs!1 - norm(vo!1)) / step!1) - i!1 >= 0")
       (("1" (grind))
        ("2"
         (hide 4)
         (typepred "floor((maxgs!1 - norm(vo!1)) / step!1)")
         (name-replace "FF" "floor((maxgs!1 - norm(vo!1)) / step!1)")
         (case "i!1 < (maxgs!1-norm(vo!1))/step!1")
         (("1" (assert)) ("2" (grind-reals))))))
      ("2"
       (replaces -1)
       (assert)
       (case "floor((norm(vo!1) - mings!1) / step!1) - i!1 >= 0")
       (("1" (grind))
        ("2"
         (hide 4)
         (typepred "floor((norm(vo!1)-mings!1) / step!1)")
         (case "i!1 < (norm(vo!1)-mings!1)/step!1")
         (("1" (assert)) ("2" (grind-reals))))))))
    ("2" (assert))))


proof_type: t_proof
decl_type: tcc
library: ACCoRD
theory: losr_iterative
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp* :preds? t)
   (case "gs_only?(vo!1)(nvo!1)")
   (("1" (replaces -10) (rewrite "gs_only_zero_right"))
    ("2" (lemma "gs_only_normalize") (inst?) (assert) (inst?))))


proof_type: t_proof
decl_type: tcc
library: ACCoRD
theory: losr_iterative
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (assert)
   (expand "incr_gs_vect")
   (assert)
   (expand "losr_gs_iter_dir")
   (lift-if)
   (assert))


proof_type: t_proof
decl_type: tcc
library: ACCoRD
theory: losr_iterative
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (typepred
    "losr_gs_iter_i(s!1, vo!1, vi!1, minrelgs!1, mings!1,
                                  maxgs!1, step!1, 1, dir3!1, eps!1, nvo!1)")
   (name-replace "LGS"
    "losr_gs_iter_i(s!1,
                                             vo!1,
                                             vi!1,
                                             minrelgs!1,
                                             mings!1,
                                             maxgs!1,
                                             step!1,
                                             1,
                                             dir3!1,
                                             eps!1,
                                             nvo!1)")
   (assert)
   (flatten)
   (assert))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: repulsive_iterative
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "m")
   (("1"
     (assert)
     (skeep)
     (expand "maneuver_position_at")
     (name "iz" "floor(0)")
     (case "NOT iz = 0")
     (("1" (hide 2) (grind))
      ("2" (replaces -2) (replace -1) (grind) (decompose-equality))))
    ("2"
     (skeep)
     (skeep)
     (inst?)
     (expand "man_pos_seq" +)
     (assert)
     (replace -1 :dir rl)
     (hide -1)
     (assert)
     (expand "maneuver_position_at")
     (case "floor((j * timestep + timestep) / timestep) = floor(j * timestep / timestep)+1")
     (("1"
       (replaces -1)
       (assert)
       (expand "man_pos_seq" + 1)
       (grind :exclude ("man_pos_seq" "floor")))
      ("2" (hide 2) (grind))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: repulsive_iterative
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "repulsive_iterative?")
   (flatten)
   (expand "repulsive_criteria_iterative")
   (flatten)
   (case "s*v>=0")
   (("1"
     (assert)
     (hide 1)
     (case "FORALL (i:subrange(1,Nsteps)): man_pos_seq(s,timestep,velseq)(i)*velseq(i)>=0")
     (("1"
       (lemma "definitions.dot_nneg_divergent")
       (skeep)
       (case "FORALL (i:subrange(1,Nsteps-1)): norm(man_pos_seq(s, timestep, velseq)(1 + i)) >= norm(man_pos_seq(s, timestep, velseq)(i))")
       (("1"
         (case "FORALL (i:subrange(1,Nsteps)): norm(man_pos_seq(s, timestep, velseq)(i)) >= norm(s)")
         (("1"
           (name "ii" "min(floor(t/timestep)+1,Nsteps)")
           (inst - "ii")
           (("1"
             (case "norm(maneuver_position_at(s,timestep,velseq,Nsteps)(t))>=norm(man_pos_seq(s,timestep,velseq)(ii))")
             (("1" (assert))
              ("2"
               (hide (-2 2))
               (case "velseq(ii)=zero")
               (("1"
                 (expand "maneuver_position_at")
                 (replace -2)
                 (replace -1)
                 (assert))
                ("2"
                 (inst - "velseq(ii)"
                  "man_pos_seq(s,timestep,velseq)(ii)")
                 (("1"
                   (flatten)
                   (hide -4)
                   (expand "maneuver_position_at" +)
                   (split -)
                   (("1"
                     (expand "divergent?")
                     (replace -2)
                     (inst - "t-timestep*(ii-1)")
                     (("1"
                       (expand "dist")
                       (rewrite "sq_dist_norm")
                       (rewrite "sq_dist_norm")
                       (rewrite "sqrt_sq")
                       (rewrite "sqrt_sq")
                       (assert))
                      ("2"
                       (assert)
                       (case "t = timestep*(ii-1)")
                       (("1"
                         (case "NOT t - timestep * floor(t / timestep) = 0")
                         (("1" (assert))
                          ("2"
                           (replaces -1)
                           (case "t-ii*timestep+timestep = 0")
                           (("1" (replace -1) (assert))
                            ("2" (assert))))))
                        ("2"
                         (assert)
                         (case "t>=timestep*(ii-1)")
                         (("1" (assert))
                          ("2"
                           (name "pj" "1+floor(t/timestep)")
                           (case "pj>=ii AND t>=timestep*(pj-1)")
                           (("1"
                             (flatten)
                             (assert)
                             (mult-by -1 "timestep")
                             (assert))
                            ("2"
                             (case "NOT pj>=ii")
                             (("1"
                               (hide 2)
                               (expand "pj" 1)
                               (expand "ii" 1)
                               (assert))
                              ("2"
                               (replace -1)
                               (expand "pj" 1)
                               (assert)
                               (hide-all-but 1)
                               (typepred "floor(t/timestep)")
                               (cross-mult -1))))))))))))
                    ("2" (inst -3 "ii") (assert))))
                  ("2" (assert))))))))
            ("2" (hide-all-but (-1 1)) (grind :exclude "floor"))))
          ("2"
           (case "FORALL (ii:nat): ii+1<=Nsteps IMPLIES norm(man_pos_seq(s, timestep, velseq)(ii+1)) >= norm(s)")
           (("1" (skeep) (inst - "i-1") (assert))
            ("2"
             (hide 2)
             (induct "ii")
             (("1" (expand "man_pos_seq" 1) (propax))
              ("2"
               (skeep)
               (inst - "j+1")
               (("1" (assert)) ("2" (assert))))))))))
        ("2"
         (skeep)
         (expand "man_pos_seq" + 1)
         (case "velseq(i) = zero")
         (("1" (replaces -1) (assert))
          ("2"
           (inst - "velseq(i)" "man_pos_seq(s,timestep,velseq)(i)")
           (("1"
             (flatten)
             (hide -2)
             (split -1)
             (("1"
               (expand "divergent?")
               (inst - "timestep")
               (rewrite "dist_norm")
               (rewrite "dist_norm")
               (assert))
              ("2" (inst?))))
            ("2" (assert))))))))
      ("2"
       (hide 2)
       (expand "repulsive_criteria" - 1)
       (case "NOT s*velseq(1)>=0")
       (("1" (ground))
        ("2"
         (hide -3)
         (case "FORALL (ii:nat): ii<=Nsteps-1 IMPLIES man_pos_seq(s, timestep, velseq)(ii+1) * velseq(ii+1) >= 0")
         (("1" (skeep) (inst - "i-1") (assert))
          ("2"
           (hide 2)
           (induct "ii")
           (("1" (expand "man_pos_seq") (propax))
            ("2"
             (skeep)
             (inst - "j+1")
             (("1"
               (assert)
               (case "man_pos_seq(s,timestep,velseq)(2+j)*velseq(1+j)>=0")
               (("1"
                 (expand "repulsive_criteria")
                 (flatten)
                 (assert)
                 (flatten))
                ("2"
                 (hide 2)
                 (expand "man_pos_seq" +)
                 (hide (-2 -3 -4 -5 -6 -7 -8 -9))
                 (typepred "sqv(velseq(1+j))")
                 (mult-by -1 "timestep")
                 (grind :exclude "man_pos_seq"))))
              ("2" (assert))))))))))))
    ("2"
     (assert)
     (hide 3)
     (case "FORALL (dd:nat): dd+1<=Nsteps IMPLIES FORALL (i:subrange(1,dd+1)): FORALL (nnt:nnreal): norm(man_pos_seq(s, timestep, velseq)(i) + nnt*velseq(i)) >= norm(s + tca(s, v) * v)")
     (("1"
       (inst - "Nsteps-1")
       (assert)
       (expand "maneuver_position_at")
       (skeep 2)
       (name "jjp" "min(1 + floor(t / timestep), Nsteps)")
       (replace -1)
       (inst - "jjp")
       (("1"
         (inst?)
         (assert)
         (case "floor(t/timestep)*timestep<=t")
         (("1"
           (assert)
           (case "jjp-1 <= floor(t/timestep)")
           (("1" (mult-by -1 "timestep") (assert)) ("2" (assert))))
          ("2"
           (cross-mult 1)
           (typepred "floor(t/timestep)")
           (cross-mult -1))))
        ("2"
         (assert)
         (hide-all-but 1)
         (expand "jjp")
         (grind :exclude "floor"))))
      ("2"
       (hide 3)
       (induct "dd")
       (("1"
         (assert)
         (skosimp 1)
         (case "NOT i!1=1")
         (("1" (assert))
          ("2"
           (replace -1)
           (assert)
           (hide -3)
           (lemma "repulsive_criteria_repulsive")
           (inst?)
           (assert)
           (expand "man_pos_seq")
           (expand "repulsive?")
           (case "norm(s)>=norm(s+tca(s,v)*v)")
           (("1"
             (case "velseq(1) = zero")
             (("1" (replace -1) (assert))
              ("2"
               (split -)
               (("1"
                 (expand "tca" -1)
                 (assert)
                 (case "NOT s*velseq(1)>=0")
                 (("1"
                   (expand "horizontal_tca")
                   (cross-mult -1)
                   (ground)
                   (lemma "sqv_eq_0")
                   (inst?)
                   (assert))
                  ("2"
                   (lemma "definitions.dot_nneg_divergent")
                   (inst?)
                   (assert)
                   (skeep 2)
                   (expand "divergent?")
                   (inst - "nnt")
                   (("1"
                     (rewrite "dist_norm")
                     (rewrite "dist_norm")
                     (assert))
                    ("2"
                     (case "nnt = 0")
                     (("1" (replace -1) (assert)) ("2" (assert))))))))
                ("2"
                 (case "v = zero")
                 (("1" (replaces -1) (assert))
                  ("2"
                   (expand "tca")
                   (assert)
                   (lemma "horizontal_tca_min")
                   (skeep 3)
                   (inst - "velseq(1)" "s" "nnt")
                   (rewrite "horizontal_sq_dtca_eq")
                   (assert)
                   (rewrite "sqrt_le" -1 :dir rl)
                   (rewrite "sqrt_sqv_norm")
                   (rewrite "sqrt_sqv_norm")
                   (assert))))))))
            ("2"
             (hide -1)
             (expand "tca" 1)
             (assert)
             (lift-if)
             (split)
             (("1" (flatten) (replaces -1) (assert))
              ("2"
               (flatten)
               (assert)
               (lemma "horizontal_tca_min")
               (inst - "v" "s" "0")
               (assert)
               (rewrite "horizontal_sq_dtca_eq")
               (rewrite "sqrt_le" -1 :dir rl)
               (rewrite "sqrt_sqv_norm")
               (rewrite "sqrt_sqv_norm")
               (assert))))))))
        ("2"
         (skeep)
         (assert)
         (skeep)
         (inst -4 "i-1")
         (("1"
           (assert)
           (typepred "i")
           (case "NOT i=2+j")
           (("1" (inst - "i") (assert))
            ("2"
             (hide (-2 -3))
             (assert)
             (inst - "1+j")
             (assert)
             (replace -1)
             (assert)
             (hide -4)
             (lemma "repulsive_criteria_repulsive")
             (inst?)
             (assert)
             (lemma "repulsive_increases_dist")
             (inst?)
             (assert)
             (split -)
             (("1"
               (flatten)
               (skeep 2)
               (inst - "nnt")
               (assert)
               (invoke (name "ttca" "%1") (! -2 1))
               (replace -1)
               (inst - "timestep +ttca")
               (("1"
                 (expand "man_pos_seq" -4 2)
                 (assert)
                 (grind :exclude
                  ("repulsive_criteria"
                   "norm"
                   "man_pos_seq"
                   "horizontal_tca")))
                ("2" (assert))))
              ("2"
               (flatten)
               (skeep 2)
               (case "nnt = 0")
               (("1"
                 (replace -1)
                 (assert)
                 (hide -4)
                 (inst - "timestep")
                 (expand "man_pos_seq" +)
                 (propax))
                ("2"
                 (case "NOT nnt>0")
                 (("1" (assert))
                  ("2"
                   (inst - "nnt")
                   (expand "man_pos_seq" -4 2)
                   (inst - "timestep")
                   (assert))))))
              ("3"
               (flatten)
               (replace -1)
               (assert)
               (skeep)
               (inst - "nnt")
               (assert)
               (expand "man_pos_seq" -2 2)
               (replace -1)
               (assert))))))
          ("2"
           (assert)
           (case "NOT i=1")
           (("1" (assert))
            ("2" (replaces -1) (assert) (inst - "1"))))))))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: repulsive_iterative
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (induct "m")
   (("1" (expand "repulsive_criteria_iterative") (assert))
    ("2"
     (assert)
     (flatten)
     (expand "man_pos_seq")
     (expand "man_pos_seq")
     (assert)
     (lemma "repulsive_criteria_scal_nv")
     (inst?)
     (assert)
     (hide 2)
     (expand "repulsive_criteria_iterative")
     (propax))
    ("3"
     (skeep)
     (assert)
     (assert)
     (expand "repulsive_criteria_iterative")
     (flatten)
     (inst - "k")
     (assert)
     (split +)
     (("1"
       (assert)
       (hide -5)
       (expand "man_pos_seq")
       (assert)
       (name "mps" "man_pos_seq(s, timestep, velseq)(k)")
       (replaces -1)
       (expand "repulsive_criteria")
       (case "FORALL (vv:Vect2): vv=zero IFF (vv`x=0 AND vv`y=0)")
       (("1"
         (case "FORALL (vv:Vect2): vv/=zero IFF (vv`x/=0 OR vv`y/=0)")
         (("1"
           (rewrite -1)
           (rewrite -1)
           (rewrite -1)
           (rewrite -1)
           (rewrite -1)
           (rewrite -1)
           (rewrite -1)
           (rewrite -1)
           (expand "det")
           (typepred "eps")
           (hide -1)
           (rewrite "vx_distr_add")
           (rewrite "vy_distr_add")
           (rewrite "vx_scal")
           (rewrite "vy_scal")
           (expand "*")
           (expand "+")
           (name "rd" "velseq(k)")
           (replaces -1)
           (name "dv" "velseq(1+k)")
           (replaces -1)
           (assert)
           (flatten)
           (assert)
           (rewrite "vx_distr_sub")
           (rewrite "vy_distr_sub")
           (assert)
           (split -1)
           (("1"
             (replaces -1)
             (assert)
             (typepred "timestep")
             (hide -1)
             (metit *))
            ("2"
             (replaces -1)
             (assert)
             (typepred "timestep")
             (hide -1)
             (metit *))))
          ("2"
           (hide-all-but 1)
           (skosimp*)
           (ground)
           (("1" (expand "zero") (decompose-equality +))
            ("2" (expand "zero") (decompose-equality -))
            ("3" (expand "zero") (decompose-equality -))))))
        ("2"
         (hide-all-but 1)
         (skeep)
         (ground)
         (("1" (expand "zero") (decompose-equality -))
          ("2" (expand "zero") (decompose-equality -))
          ("3" (expand "zero") (decompose-equality +))))))
      ("2"
       (flatten)
       (name "mps" "man_pos_seq(s, timestep, velseq)(1+k)")
       (replace -1)
       (expand "man_pos_seq" +)
       (replaces -1)
       (hide -6)
       (hide (-1 -2))
       (expand "repulsive_criteria")
       (case "FORALL (vv:Vect2): vv=zero IFF (vv`x=0 AND vv`y=0)")
       (("1"
         (case "FORALL (vv:Vect2): vv/=zero IFF (vv`x/=0 OR vv`y/=0)")
         (("1"
           (rewrite -1)
           (rewrite -1)
           (rewrite -1)
           (rewrite -1)
           (rewrite -1)
           (rewrite -1)
           (rewrite -1)
           (rewrite -1)
           (rewrite -1)
           (expand "det")
           (typepred "eps")
           (hide -1)
           (expand "*")
           (expand "+")
           (rewrite "vx_distr_sub")
           (rewrite "vy_distr_sub")
           (rewrite "vx_distr_sub")
           (rewrite "vy_distr_sub")
           (assert)
           (name "rd" "velseq(k)")
           (replaces -1)
           (name "dv" "velseq(1+k)")
           (replaces -1)
           (assert)
           (flatten)
           (assert)
           (split -1)
           (("1"
             (replaces -1)
             (assert)
             (typepred "timestep")
             (hide -1)
             (metit *))
            ("2"
             (replaces -1)
             (assert)
             (typepred "timestep")
             (hide -1)
             (metit *))))
          ("2"
           (hide-all-but 1)
           (skosimp*)
           (ground)
           (("1" (expand "zero") (decompose-equality +))
            ("2" (expand "zero") (decompose-equality -))
            ("3" (expand "zero") (decompose-equality -))))))
        ("2"
         (hide-all-but 1)
         (skeep)
         (ground)
         (("1" (expand "zero") (decompose-equality -))
          ("2" (expand "zero") (decompose-equality -))
          ("3" (expand "zero") (decompose-equality +))))))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: repulsive_iterative
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "maneuver_position_at")
   (name "mm" "min(1 + floor(t / timestep), Nsteps)")
   (replaces -1)
   (case "NOT mm-1<Nsteps")
   (("1" (assert))
    ("2"
     (case "mm = 0")
     (("1" (expand "mm" -1) (hide-all-but (-1)) (grind))
      ("2"
       (case "mm = 1")
       (("1"
         (replaces -1)
         (assert)
         (expand "man_pos_seq")
         (assert)
         (lemma "repulsive_criteria_scal_nv")
         (inst?)
         (assert)
         (expand "repulsive_criteria_iterative")
         (propax))
        ("2"
         (name "vv"
               "(man_pos_seq(s, timestep, velseq)(mm)
                                                      - s)")
         (name "ww" "(t - mm * timestep + timestep) * velseq(mm)")
         (case "repulsive_criteria(s,v,eps)(vv+ww)")
         (("1"
           (hide-all-but (-1 3))
           (expand "vv")
           (expand "ww")
           (grind :exclude ("repulsive_criteria" "man_pos_seq")))
          ("2"
           (case "repulsive_criteria(s,v,eps)(vv)")
           (("1"
             (case "ww = zero")
             (("1" (replaces -1) (assert))
              ("2"
               (hide 5)
               (lemma "repulsive_criteria_sum_closed")
               (inst?)
               (assert)
               (lemma "repulsive_criteria_scal_nv")
               (expand "ww" 1)
               (inst?)
               (("1"
                 (assert)
                 (lemma "repulsive_criteria_iterative_reduces_seq")
                 (inst?)
                 (assert)
                 (inst?)
                 (assert))
                ("2"
                 (case "(t - mm * timestep + timestep) = 0")
                 (("1" (expand "ww" 3) (replaces -1) (assert))
                  ("2"
                   (assert)
                   (case "(t - mm * timestep + timestep) >= 0")
                   (("1" (assert))
                    ("2"
                     (hide (2 3))
                     (case "(mm-1)*timestep <= t")
                     (("1" (assert))
                      ("2"
                       (case "(mm-1)*timestep = min(floor(t/timestep)*timestep,(Nsteps-1)*timestep)")
                       (("1"
                         (case "t>=floor(t / timestep) * timestep")
                         (("1" (expand "min") (lift-if) (ground))
                          ("2"
                           (hide-all-but 1)
                           (grind)
                           (mult-by 1 "1/timestep")
                           (assert))))
                        ("2"
                         (hide-all-but 1)
                         (expand "mm")
                         (expand "min")
                         (lift-if)
                         (lift-if)
                         (lift-if)
                         (assert)
                         (ground)
                         (("1" (mult-by -1 "timestep") (assert))
                          ("2"
                           (mult-by 1 "timestep")
                           (assert))))))))))))))))
            ("2"
             (expand "vv" 1)
             (lemma "repulsive_criteria_iterative_reduces_seq")
             (inst?)
             (assert)
             (inst - "mm-1")
             (assert))))))))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: repulsive_iterative
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (replaces -1)
   (label "sname" -1)
   (hide "sname")
   (assert)
   (induct "m")
   (("1" (expand "repulsive_criteria_iterative") (assert))
    ("2"
     (assert)
     (flatten)
     (expand "man_pos_seq")
     (expand "man_pos_seq")
     (assert)
     (expand "repulsive_criteria_iterative")
     (propax))
    ("3"
     (assert)
     (skeep)
     (assert)
     (expand "repulsive_criteria_iterative")
     (flatten)
     (inst - "k")
     (assert)
     (split +)
     (("1"
       (assert)
       (hide -5)
       (expand "man_pos_seq")
       (assert)
       (name "mps" "man_pos_seq(s, 1, velseq)(k)")
       (replaces -1)
       (case "FORALL (vv:Vect2): vv=zero IFF (vv`x=0 AND vv`y=0)")
       (("1"
         (case "FORALL (vv:Vect2): vv/=zero IFF (vv`x/=0 OR vv`y/=0)")
         (("1"
           (expand "repulsive_criteria")
           (rewrite -1)
           (rewrite -1)
           (rewrite -1)
           (rewrite -1)
           (rewrite -1)
           (rewrite -1)
           (rewrite -1)
           (rewrite -1)
           (rewrite -1)
           (rewrite -1)
           (rewrite -1)
           (rewrite -1)
           (expand "det")
           (typepred "eps")
           (hide -1)
           (rewrite "vx_distr_add")
           (rewrite "vy_distr_add")
           (rewrite "vx_scal")
           (rewrite "vy_scal")
           (expand "*")
           (expand "+")
           (name "rd" "velseq(k)")
           (replaces -1)
           (name "dv" "velseq(1+k)")
           (replaces -1)
           (assert)
           (flatten)
           (assert)
           (rewrite "vx_distr_sub")
           (rewrite "vy_distr_sub")
           (assert)
           (reveal "sname")
           (replaces -1)
           (assert)
           (typepred "k")
           (hide (-4 -12 -18))
           (hide (-4 -5 -11))
           (assert)
           (metit *))
          ("2"
           (hide-all-but 1)
           (skosimp*)
           (ground)
           (("1" (expand "zero") (decompose-equality +))
            ("2" (expand "zero") (decompose-equality -))
            ("3" (expand "zero") (decompose-equality -))))))
        ("2"
         (hide-all-but 1)
         (skeep)
         (ground)
         (("1" (expand "zero") (decompose-equality -))
          ("2" (expand "zero") (decompose-equality -))
          ("3" (expand "zero") (decompose-equality +))))))
      ("2"
       (flatten)
       (name "mps" "man_pos_seq(s, 1, velseq)(1+k)")
       (replace -1)
       (expand "man_pos_seq" +)
       (replaces -1)
       (hide -6)
       (hide (-1 -2))
       (rewrite "scal_add_left")
       (assert)
       (expand "repulsive_criteria")
       (case "FORALL (vv:Vect2): vv=zero IFF (vv`x=0 AND vv`y=0)")
       (("1"
         (case "FORALL (vv:Vect2): vv/=zero IFF (vv`x/=0 OR vv`y/=0)")
         (("1"
           (rewrite -1)
           (rewrite -1)
           (rewrite -1)
           (rewrite -1)
           (rewrite -1)
           (rewrite -1)
           (rewrite -1)
           (rewrite -1)
           (rewrite -1)
           (rewrite -1)
           (rewrite -1)
           (rewrite -1)
           (rewrite -1)
           (rewrite -1)
           (rewrite -1)
           (expand "det")
           (typepred "eps")
           (hide -1)
           (expand "*")
           (expand "+")
           (rewrite "vx_distr_sub")
           (rewrite "vy_distr_sub")
           (rewrite "vx_distr_sub")
           (rewrite "vy_distr_sub")
           (assert)
           (name "rd" "velseq(k)")
           (replaces -1)
           (name "dv" "velseq(1+k)")
           (replaces -1)
           (assert)
           (flatten)
           (assert)
           (reveal "sname")
           (replaces -1)
           (assert)
           (case "NOT (v`x/=0 OR v`y/=0)")
           (("1"
             (flatten)
             (replaces -1)
             (replaces -1)
             (assert)
             (hide -5)
             (metit *))
            ("2"
             (replace -1)
             (case "v`x = 0 AND v`y = 0")
             (("1" (flatten) (metit *))
              ("2"
               (replace 1)
               (case "(2 * v`x = 0 AND 2 * v`y = 0)")
               (("1" (flatten) (assert))
                ("2"
                 (case "NOT (NOT k * v`x = 0 OR NOT k * v`y = 0)")
                 (("1" (hide-all-but (-1 1)) (ground))
                  ("2"
                   (replace -1)
                   (assert)
                   (hide (-1 -2 1))
                   (case "NOT (NOT (k+1) * v`x = 0 OR NOT (k+1) * v`y = 0)")
                   (("1" (hide-all-but (1 2)) (ground))
                    ("2"
                     (replace -1)
                     (hide -1)
                     (case "((k+1) * v`x = 0 AND (k+1) * v`y = 0)")
                     (("1" (hide-all-but (-1 1)) (ground))
                      ("2"
                       (replaces 1)
                       (hide 1)
                       (split -1)
                       (("1"
                         (replaces -1)
                         (assert)
                         (typepred "k")
                         (hide -2)
                         (assert)
                         (ground)
                         (("1" (metit *)) ("2" (metit *)) ("3" (metit *))
                          ("4" (metit *)) ("5" (metit *)) ("6" (metit *))
                          ("7" (metit *)) ("8" (metit *)) ("9" (metit *))
                          ("10" (metit *)) ("11" (metit *))
                          ("12" (metit *)) ("13" (metit *))
                          ("14" (metit *)) ("15" (metit *))
                          ("16" (metit *)) ("17" (metit *))
                          ("18" (metit *)) ("19" (metit *))
                          ("20" (metit *)) ("21" (metit *))
                          ("22" (metit *)) ("23" (metit *))
                          ("24" (metit *)) ("25" (metit *))
                          ("26" (metit *)) ("27" (metit *))
                          ("28" (metit *)) ("29" (metit *))
                          ("30" (metit *)) ("31" (metit *))
                          ("32" (metit *)) ("33" (metit *))
                          ("34" (metit *)) ("35" (metit *))
                          ("36" (metit *)) ("37" (metit *))
                          ("38" (metit *)) ("39" (metit *))
                          ("40" (metit *)) ("41" (metit *))
                          ("42" (metit *)) ("43" (metit *))
                          ("44" (metit *)) ("45" (metit *))
                          ("46" (metit *)) ("47" (metit *))
                          ("48" (metit *)) ("49" (metit *))
                          ("50" (metit *)) ("51" (metit *))
                          ("52" (metit *)) ("53" (metit *))
                          ("54" (metit *)) ("55" (metit *))
                          ("56" (metit *)) ("57" (metit *))
                          ("58" (metit *)) ("59" (metit *))
                          ("60" (metit *)) ("61" (metit *))
                          ("62" (metit *)) ("63" (metit *))
                          ("64" (metit *)) ("65" (metit *))
                          ("66" (metit *)) ("67" (metit *))
                          ("68" (metit *)) ("69" (metit *))
                          ("70" (metit *)) ("71" (metit *))
                          ("72" (metit *)) ("73" (metit *))
                          ("74" (metit *)) ("75" (metit *))
                          ("76" (metit *)) ("77" (metit *))
                          ("78" (metit *)) ("79" (metit *))
                          ("80" (metit *)) ("81" (metit *))
                          ("82" (metit *)) ("83" (metit *))
                          ("84" (metit *))))
                        ("2"
                         (replaces -1)
                         (assert)
                         (typepred "k")
                         (hide -2)
                         (assert)
                         (ground)
                         (("1" (metit *)) ("2" (metit *)) ("3" (metit *))
                          ("4" (metit *)) ("5" (metit *)) ("6" (metit *))
                          ("7" (metit *)) ("8" (metit *)) ("9" (metit *))
                          ("10" (metit *)) ("11" (metit *))
                          ("12" (metit *)) ("13" (metit *))
                          ("14" (metit *)) ("15" (metit *))
                          ("16" (metit *)) ("17" (metit *))
                          ("18" (metit *)) ("19" (metit *))
                          ("20" (metit *)) ("21" (metit *))
                          ("22" (metit *)) ("23" (metit *))
                          ("24" (metit *)) ("25" (metit *))
                          ("26" (metit *)) ("27" (metit *))
                          ("28" (metit *)) ("29" (metit *))
                          ("30" (metit *)) ("31" (metit *))
                          ("32" (metit *)) ("33" (metit *))
                          ("34" (metit *)) ("35" (metit *))
                          ("36" (metit *)) ("37" (metit *))
                          ("38" (metit *)) ("39" (metit *))
                          ("40" (metit *)) ("41" (metit *))
                          ("42" (metit *)) ("43" (metit *))
                          ("44" (metit *)) ("45" (metit *))
                          ("46" (metit *)) ("47" (metit *))
                          ("48" (metit *)) ("49" (metit *))
                          ("50" (metit *)) ("51" (metit *))
                          ("52" (metit *)) ("53" (metit *))
                          ("54" (metit *)) ("55" (metit *))
                          ("56" (metit *)) ("57" (metit *))
                          ("58" (metit *)) ("59" (metit *))
                          ("60" (metit *)) ("61" (metit *))
                          ("62" (metit *)) ("63" (metit *))
                          ("64" (metit *)) ("65" (metit *))
                          ("66" (metit *)) ("67" (metit *))
                          ("68" (metit *)) ("69" (metit *))
                          ("70" (metit *)) ("71" (metit *))
                          ("72" (metit *)) ("73" (metit *))
                          ("74" (metit *)) ("75" (metit *))
                          ("76" (metit *)) ("77" (metit *))
                          ("78" (metit *)) ("79" (metit *))
                          ("80" (metit *)) ("81" (metit *))
                          ("82" (metit *)) ("83" (metit *))
                          ("84" (metit *))))))))))))))))))
          ("2"
           (hide-all-but 1)
           (skosimp*)
           (ground)
           (("1" (expand "zero") (decompose-equality +))
            ("2" (expand "zero") (decompose-equality -))
            ("3" (expand "zero") (decompose-equality -))))))
        ("2"
         (hide-all-but 1)
         (skeep)
         (ground)
         (("1" (expand "zero") (decompose-equality -))
          ("2" (expand "zero") (decompose-equality -))
          ("3" (expand "zero") (decompose-equality +))))))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: repulsive_iterative
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (lemma "repulsive_criteria_iterative_reduces_seq_divergent_special")
   (skeep)
   (label "szero" 1)
   (hide "szero")
   (case "s/=zero AND sqv(s)>0 AND norm(s)>0")
   (("1"
     (flatten)
     (name "DF"
           "LAMBDA (ww:Vect2): (# x:= (1/sqv(s))*(ww*s),y:=(1/sqv(s))*(ww*-perpR(s)) #)")
     (("1"
       (lemma "orthogonal_basis_dot")
       (case "NOT FORALL (w1,w2:Vect2): sqv(s)*(DF(w1)*DF(w2))=w1*w2")
       (("1"
         (skeep)
         (lemma "orthogonal_basis")
         (inst - "s" "-perpR(s)" _)
         (inst-cp - "w1")
         (inst - "w2")
         (assert)
         (case "-perpR(s) /= zero AND orthogonal?(s, -perpR(s))")
         (("1"
           (flatten)
           (assert)
           (inst - "((w1 * s) / sqv(s))"
            "((w1 * -perpR(s)) / sqv(perpR(s)))" "((w2 * s) / sqv(s))"
            "((w2 * -perpR(s)) / sqv(perpR(s)))" "s" "-perpR(s)" "w1"
            "w2")
           (assert)
           (replaces -4)
           (expand "DF")
           (hide-all-but 2)
           (grind))
          ("2"
           (split 1)
           (("1"
             (flatten)
             (case "perpR(zero) = s-s")
             (("1"
               (replaces -2 -1 :dir rl)
               (hide-all-but (-1 2))
               (case "s+zero = perpR(-perpR(s))")
               (("1" (assert)) ("2" (hide-all-but 1) (grind))))
              ("2" (hide-all-but 1) (grind))))
            ("2" (hide-all-but 1) (grind))))))
        ("2"
         (label "Dlem" -1)
         (case "NOT FORALL (w1,w2:Vect2): DF(w1)*DF(w2)=(1/sqv(s))*(w1*w2)")
         (("1"
           (skeep)
           (cross-mult 1)
           (assert)
           (inst - "w1" "w2")
           (assert))
          ("2"
           (label "Hlem" -1)
           (assert)
           (case "NOT FORALL (tp:posreal,ss:Vect2,vv,ww:Vect2,epsi:Sign): (repulsive_criteria(ss,vv,epsi)(ww) IFF repulsive_criteria(DF(ss),tp*DF(vv),epsi)(tp*DF(ww)))")
           (("1"
             (hide (-7 3))
             (skeep)
             (case "NOT (repulsive_criteria(DF(ss), tp * DF(vv), epsi)
                                                                                                                                          (tp * DF(ww)) IFF repulsive_criteria(DF(ss),DF(vv), epsi)
                                                                                                                                          (DF(ww)))")
             (("1"
               (hide 2)
               (lemma "repulsive_criteria_scal_nv")
               (case "DF(ss)*DF(vv)>=0")
               (("1"
                 (inst - "tp" "epsi" "DF(ww)" "DF(ss)" "(tp)*DF(vv)")
                 (assert)
                 (split -)
                 (("1" (flatten) (mult-by -4 "tp") (assert))
                  ("2" (ground))))
                ("2"
                 (hide -1)
                 (hide -)
                 (expand "repulsive_criteria")
                 (assert)
                 (split)
                 (("1"
                   (flatten)
                   (assert)
                   (split -)
                   (("1"
                     (flatten)
                     (assert)
                     (split +)
                     (("1" (flatten) (replaces -1) (assert))
                      ("2" (mult-by 1 "tp") (grind))
                      ("3" (mult-by 1 "tp") (grind))
                      ("4" (mult-by 1 "tp") (mult-by 1 "tp") (grind))))
                    ("2" (flatten) (assert) (mult-by 4 "tp") (assert))))
                  ("2"
                   (flatten)
                   (assert)
                   (split +)
                   (("1"
                     (flatten)
                     (case "DF(ww) = (1/tp)*(tp*DF(ww))")
                     (("1" (replaces -2) (assert)) ("2" (assert))))
                    ("2" (mult-by 1 "1/tp") (grind))
                    ("3" (mult-by 1 "1/tp") (grind))
                    ("4"
                     (flatten)
                     (split +)
                     (("1" (mult-by 1 "1/tp") (grind))
                      ("2"
                       (mult-by 1 "1/tp")
                       (mult-by 1 "1/tp")
                       (grind))))))))))
              ("2"
               (replaces -1)
               (expand "repulsive_criteria" 1)
               (case "FORALL (Wp:Vect2): DF(Wp)/=zero IFF Wp/=zero")
               (("1"
                 (rewrite -1)
                 (rewrite -1)
                 (rewrite -1)
                 (case "FORALL (w1,w2:Vect2): det(DF(w1),DF(w2))=(1/sqv(s))*det(w1,w2)")
                 (("1"
                   (rewrite -1)
                   (rewrite -1)
                   (rewrite -1)
                   (rewrite "Hlem")
                   (rewrite "Hlem")
                   (assert)
                   (split +)
                   (("1"
                     (flatten)
                     (assert)
                     (split 3)
                     (("1" (assert) (mult-by 1 "sqv(s)") (assert))
                      ("2" (mult-by 1 "sqv(s)") (assert))
                      ("3"
                       (flatten)
                       (split -)
                       (("1"
                         (flatten)
                         (split 1)
                         (("1" (mult-by 1 "sqv(s)") (assert))
                          ("2" (mult-by 1 "sqv(s)") (assert))))
                        ("2"
                         (flatten)
                         (hide 1)
                         (split +)
                         (("1" (mult-by 1 "sqv(s)") (assert))
                          ("2" (flatten) (cross-mult 1) (assert))
                          ("3" (flatten) (mult-by 2 "sqv(s)") (assert))
                          ("4" (mult-by 1 "sqv(s)") (assert))))))))
                    ("2"
                     (flatten)
                     (assert)
                     (split +)
                     (("1"
                       (mult-by 1 "1/sqv(s)")
                       (("1" (assert))
                        ("2"
                         (split +)
                         (("1" (cross-mult 1)) ("2" (cross-mult 1))))))
                      ("2"
                       (mult-by 1 "1/sqv(s)")
                       (("1" (assert)) ("2" (cross-mult 1))))
                      ("3"
                       (flatten)
                       (split -)
                       (("1"
                         (flatten)
                         (assert)
                         (split 1)
                         (("1"
                           (mult-by 1 "1/sqv(s)")
                           (("1" (assert)) ("2" (cross-mult 1))))
                          ("2"
                           (mult-by 1 "1/sqv(s)")
                           (("1" (assert)) ("2" (cross-mult 1))))))
                        ("2"
                         (flatten)
                         (hide 1)
                         (split +)
                         (("1" (cross-mult -1) (assert))
                          ("2"
                           (flatten)
                           (replaces -1)
                           (assert)
                           (case "DF(zero) = zero")
                           (("1"
                             (assert)
                             (mult-by 1 "1/sqv(s)")
                             (("1" (assert))
                              ("2"
                               (split +)
                               (("1" (cross-mult 1))
                                ("2" (cross-mult 1))))))
                            ("2"
                             (hide-all-but 1)
                             (expand "DF")
                             (expand "zero")
                             (grind))))
                          ("3"
                           (flatten)
                           (inst -8 "vv")
                           (assert)
                           (mult-by 2 "1/sqv(s)")
                           (("1" (assert)) ("2" (cross-mult 1))))
                          ("4"
                           (mult-by 1 "1/sqv(s)")
                           (("1" (assert))
                            ("2"
                             (split +)
                             (("1" (cross-mult 1))
                              ("2" (cross-mult 1))))))))))))))
                  ("2"
                   (hide 2)
                   (skeep)
                   (rewrite "det_perpR" +)
                   (case "perpR(DF(w2)) = DF(perpR(w2))")
                   (("1"
                     (replaces -1)
                     (rewrite "Hlem" +)
                     (rewrite "det_perpR" +))
                    ("2" (hide-all-but 1) (expand "DF") (grind))))))
                ("2"
                 (hide 2)
                 (skeep)
                 (ground)
                 (("1"
                   (replaces -1)
                   (hide -)
                   (expand "DF")
                   (expand "zero")
                   (grind))
                  ("2"
                   (lemma "sqv_eq_0")
                   (inst - "DF(Wp)")
                   (assert)
                   (expand "sqv")
                   (rewrite "Hlem")
                   (cross-mult -1)
                   (lemma "sqv_eq_0")
                   (inst - "Wp")
                   (assert)
                   (expand "sqv")
                   (assert))))))))
            ("2"
             (inst - "Nsteps" "eps" "DF(s)" "1" "timestep*DF(v)"
              "LAMBDA (ii:posnat): timestep*DF(velseq(ii))")
             (assert)
             (case "NOT DF(s) = (# x := 1, y := 0 #)")
             (("1"
               (expand "DF" 1)
               (split 1)
               (("1" (cross-mult 1) (grind))
                ("2" (cross-mult 1) (grind))))
              ("2"
               (assert)
               (case "NOT timestep * (DF(s) * DF(v)) >= 0")
               (("1"
                 (mult-by 1 "1/timestep")
                 (assert)
                 (rewrite "Hlem" -1)
                 (assert)
                 (case "FORALL (egv:real): 0*egv=0")
                 (("1" (rewrite -1) (cross-mult 1)) ("2" (assert))))
                ("2"
                 (assert)
                 (replace -2 :dir rl)
                 (case "NOT repulsive_criteria_iterative(DF(s), timestep* DF(v), 1,
                                                                                                                                                                         LAMBDA (ii: posnat):
                                                                                                                                                                           timestep* DF(velseq(ii)),
                                                                                                                                                                         Nsteps, eps)")
                 (("1"
                   (hide -10)
                   (hide 3)
                   (expand "repulsive_criteria_iterative")
                   (rewrite -3 + :dir rl)
                   (flatten)
                   (assert)
                   (skeep)
                   (inst - "m")
                   (assert)
                   (case "man_pos_seq(DF(s),
                                                                                                                                                                                       1,
                                                                                                                                                                                       LAMBDA
                                                                                                                                                                                       (ii: posnat):
                                                                                                                                                                                       (timestep) * DF(velseq(ii)))
                                                                                                                                                                                      (1 + m) = DF(man_pos_seq(s, timestep, velseq)(1 + m))")
                   (("1" (replaces -1) (rewrite -3 + :dir rl))
                    ("2"
                     (hide 2)
                     (case "FORALL (mm:nat): man_pos_seq(DF(s), 1,
                                                                                                                                                     LAMBDA (ii: posnat): timestep * DF(velseq(ii)))
                                                                                                                                                    (1 + mm)
                                                                                                                                          = DF(man_pos_seq(s, timestep, velseq)(1 + mm))")
                     (("1" (inst - "m"))
                      ("2"
                       (hide 2)
                       (induct "mm")
                       (("1" (assert) (expand "man_pos_seq") (propax))
                        ("2"
                         (skeep)
                         (assert)
                         (expand "man_pos_seq" +)
                         (replaces -1)
                         (hide -)
                         (expand "DF")
                         (grind :exclude ("sqv" "man_pos_seq")))))))))
                  ("2"
                   (assert)
                   (skeep 2)
                   (inst - "m")
                   (flatten)
                   (assert)
                   (rewrite -4 :dir rl)
                   (assert)
                   (flatten)
                   (assert)
                   (case "man_pos_seq(DF(s),
                                                                                                                                                                                       1,
                                                                                                                                                                                       LAMBDA
                                                                                                                                                                                       (ii: posnat):
                                                                                                                                                                                       (timestep) * DF(velseq(ii)))
                                                                                                                                                                                      (1 + m) = DF(man_pos_seq(s, timestep, velseq)(1 + m))")
                   (("1"
                     (replaces -1)
                     (case "FORALL (ww1,ww2:Vect2): DF(ww1-ww2)=DF(ww1)-DF(ww2)")
                     (("1"
                       (rewrite -1 :dir rl)
                       (case "(m*timestep)*DF(v) = DF((m*timestep)*v)")
                       (("1"
                         (replaces -1)
                         (assert)
                         (inst -5 "1" _ _ _ _)
                         (assert)
                         (rewrite -5 :dir rl))
                        ("2" (hide-all-but 1) (expand "DF") (grind))))
                      ("2" (hide-all-but 1) (expand "DF") (grind))))
                    ("2"
                     (case "FORALL (mm:nat): man_pos_seq(DF(s), 1,
                                                                                                                                                     LAMBDA (ii: posnat): timestep * DF(velseq(ii)))
                                                                                                                                                    (1 + mm)
                                                                                                                                          = DF(man_pos_seq(s, timestep, velseq)(1 + mm))")
                     (("1" (inst - "m"))
                      ("2"
                       (hide 2)
                       (induct "mm")
                       (("1" (assert) (expand "man_pos_seq") (propax))
                        ("2"
                         (skeep)
                         (assert)
                         (expand "man_pos_seq" +)
                         (replaces -1)
                         (hide -)
                         (expand "DF")
                         (grind :exclude
                          ("sqv" "man_pos_seq")))))))))))))))))))))
      ("2" (lemma "sqv_eq_0") (inst?) (assert))))
    ("2"
     (assert)
     (reveal "szero")
     (assert)
     (lemma "sqv_eq_0")
     (inst?)
     (assert)
     (lemma "norm_eq_0")
     (inst?)
     (assert))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: repulsive_iterative
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (case "s = zero")
   (("1" (assert) (replaces -1) (assert))
    ("2"
     (label "szero" 1)
     (hide "szero")
     (name "newv" "LAMBDA (n:nat): eps*perpR(s) - (1/(n+1))*s")
     (case "FORALL (n:nat): repulsive_criteria_iterative(s, newv(n), timestep, velseq, Nsteps, eps)")
     (("1"
       (lemma "repulsive_criteria_iterative_reduces_seq")
       (case "FORALL (n:nat): FORALL (m:subrange(1,Nsteps)): s*velseq(m)>=0 AND (m < Nsteps IMPLIES
                                                                                                              repulsive_criteria(s, newv(n), eps)
                                                                                                                                (man_pos_seq(s, timestep, velseq)(m + 1) -
                                                                                                                                  s))")
       (("1"
         (skeep)
         (split +)
         (("1" (inst - "1") (inst - "m") (assert))
          ("2"
           (flatten)
           (skoletin 1)
           (case "NOT FORALL (n:nat): eps*det(vv,newv(n)) < 0")
           (("1"
             (skeep)
             (inst - "n")
             (inst - "m")
             (assert)
             (flatten)
             (hide -3)
             (expand "repulsive_criteria" -3)
             (case "s*newv(n)<0")
             (("1" (assert))
              ("2"
               (case "s = zero")
               (("1" (replaces -1) (assert))
                ("2"
                 (hide-all-but (1 2))
                 (expand "newv")
                 (case "sqv(s)>0")
                 (("1" (mult-by -1 "1/(1+n)") (grind))
                  ("2" (lemma "sqv_eq_0") (inst?) (assert))))))))
            ("2"
             (name "V" "(eps*perpR(s))")
             (case "eps*det(vv,V)<=0")
             (("1"
               (hide-all-but (-1 1))
               (expand "V")
               (typepred "eps")
               (grind))
              ("2"
               (expand "newv" -2)
               (replaces -1)
               (case "s = zero")
               (("1" (replaces -1) (assert))
                ("2"
                 (hide-all-but (-1 1 2))
                 (case "EXISTS (n:nat): (1/(1+n)) *(eps*det(vv,s)) <= eps*det(vv,V)")
                 (("1" (skeep -1) (inst - "n") (grind))
                  ("2"
                   (hide -1)
                   (case "FORALL (aa:real,bb:posreal): EXISTS (n:nat): (1/(1+n))*aa<=bb")
                   (("1" (inst?) (assert))
                    ("2"
                     (hide-all-but 1)
                     (skeep)
                     (case "aa<=0")
                     (("1" (inst + "1") (assert))
                      ("2"
                       (lemma "archimedean")
                       (inst - "bb/aa")
                       (("1"
                         (skeep -1)
                         (inst + "n-1")
                         (assert)
                         (cross-mult -1)
                         (cross-mult 2))
                        ("2"
                         (split +)
                         (("1" (cross-mult 1)) ("2" (cross-mult 1))))
                        ("3" (assert))))))))))))))))))
        ("2"
         (hide 2)
         (skeep)
         (skeep)
         (split +)
         (("1"
           (case "FORALL (n:nat): FORALL (m: subrange(1, Nsteps)):
                                                           repulsive_criteria(s, newv(n), eps)(velseq(m))")
           (("1"
             (hide (-2 -3))
             (hide -4)
             (expand "repulsive_criteria")
             (case "NOT FORALL (n:nat): (s * newv(n) < 0 AND eps * det(velseq(m), newv(n)) < 0)")
             (("1"
               (skeep)
               (inst - "n!1")
               (inst - "m")
               (assert)
               (flatten)
               (assert)
               (replace 1)
               (flatten)
               (hide-all-but (-3 2))
               (case "sqv(s)>0")
               (("1" (mult-by -1 "(1/(1+n!1))") (expand "newv") (grind))
                ("2" (lemma "sqv_eq_0") (inst?) (assert))))
              ("2"
               (expand "newv" -1)
               (hide -2)
               (case "EXISTS (n:nat): (1/(1+n))*(eps*det(velseq(m),s)) <= -(s*velseq(m))")
               (("1"
                 (skosimp*)
                 (inst - "n!1")
                 (flatten)
                 (typepred "eps")
                 (grind))
                ("2"
                 (hide -)
                 (case "FORALL (aa:real,bb:posreal): EXISTS (n:nat): (1/(1+n))*aa<=bb")
                 (("1" (inst?) (assert))
                  ("2"
                   (hide-all-but 1)
                   (skeep)
                   (case "aa<=0")
                   (("1" (inst + "1") (assert))
                    ("2"
                     (lemma "archimedean")
                     (inst - "bb/aa")
                     (("1"
                       (skosimp*)
                       (inst + "n!1-1")
                       (assert)
                       (cross-mult -1)
                       (cross-mult 2))
                      ("2"
                       (split +)
                       (("1" (cross-mult 1)) ("2" (cross-mult 1))))
                      ("3" (assert))))))))))))
            ("2"
             (skosimp*)
             (inst - "Nsteps" "eps" "s" "timestep" "newv(n!1)" "velseq")
             (assert)
             (inst - "n!1")
             (assert)
             (split -)
             (("1" (inst - "m!1") (assert))
              ("2"
               (reveal "szero")
               (hide-all-but (1 2))
               (expand "newv")
               (case "sqv(s)>0")
               (("1" (mult-by -1 "1/(1+n!1)") (grind))
                ("2" (lemma "sqv_eq_0") (inst?) (assert))))))))
          ("2"
           (flatten)
           (inst - "Nsteps" "eps" "s" "timestep" "newv(n)" "velseq")
           (assert)
           (split -)
           (("1" (inst - "m") (assert))
            ("2"
             (hide 2)
             (hide-all-but 1)
             (expand "newv")
             (case "sqv(s)>0")
             (("1" (mult-by -1 "1/(1+n)") (grind))
              ("2"
               (reveal "szero")
               (lemma "sqv_eq_0")
               (inst?)
               (assert))))
            ("3" (hide 2) (inst?))))))))
      ("2"
       (hide 2)
       (skeep)
       (expand "repulsive_criteria_iterative")
       (flatten)
       (name "V" "(eps*perpR(s))")
       (hide -2)
       (split +)
       (("1"
         (hide -4)
         (expand "repulsive_criteria")
         (flatten)
         (assert)
         (split +)
         (("1"
           (case "sqv(s)>0")
           (("1"
             (mult-by -1 "1/(1+n)")
             (hide-all-but (-1 -2 1 2))
             (expand "newv")
             (grind))
            ("2" (lemma "sqv_eq_0") (inst?) (assert))))
          ("2"
           (assert)
           (flatten)
           (case "NOT s*newv(n)<0")
           (("1"
             (hide (2 3))
             (expand "newv" 1)
             (case "sqv(s)>0")
             (("1" (mult-by -1 "1/(1+n)") (grind))
              ("2" (lemma "sqv_eq_0") (inst?) (assert))))
            ("2"
             (assert)
             (hide 2)
             (expand "newv")
             (typepred "eps")
             (mult-by -7 "1/(1+n)")
             (grind))))))
        ("2" (propax))))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: repulsive_iterative
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "maneuver_position_at")
   (name "mm" "min(1 + floor(t / timestep), Nsteps)")
   (replaces -1)
   (case "NOT mm-1<Nsteps")
   (("1" (assert))
    ("2"
     (case "mm = 0")
     (("1" (expand "mm" -1) (hide-all-but (-1)) (grind))
      ("2"
       (case "mm = 1")
       (("1"
         (replaces -1)
         (assert)
         (expand "man_pos_seq")
         (assert)
         (expand "repulsive_criteria_iterative")
         (flatten)
         (hide -4)
         (expand "repulsive_criteria")
         (flatten)
         (assert)
         (case "NOT s*velseq(1)>=0")
         (("1" (ground))
          ("2"
           (mult-by -1 "t")
           (assert)
           (case "v = zero")
           (("1" (replaces -1) (assert))
            ("2" (assert) (mult-by -7 "t") (assert))))))
        ("2"
         (assert)
         (lemma "repulsive_criteria_iterative_reduces_seq_divergent")
         (inst?)
         (assert)
         (case "s = zero")
         (("1" (replaces -1) (assert))
          ("2"
           (assert)
           (inst-cp - "mm-1")
           (assert)
           (flatten)
           (name "DV" "man_pos_seq(s, timestep, velseq)(mm) - s")
           (replace -1)
           (inst - "mm")
           (flatten)
           (hide -3)
           (assert)
           (hide -3)
           (name "tc" "(t - mm * timestep + timestep)")
           (case "tc>=0")
           (("1"
             (case "s*DV>=s*((mm * timestep - timestep) * v)")
             (("1"
               (case "s*velseq(mm)>=s*v")
               (("1"
                 (mult-by -1 "(t - mm * timestep + timestep)")
                 (hide-all-but (-1 -2 +))
                 (expand "DV")
                 (grind :exclude ("man_pos_seq")))
                ("2"
                 (hide 5)
                 (expand "repulsive_criteria" -5)
                 (flatten)
                 (case "v = zero")
                 (("1" (replaces -1) (assert)) ("2" (assert))))))
              ("2"
               (expand "repulsive_criteria" -5)
               (case "(mm * timestep - timestep) * v = zero")
               (("1" (replace -1) (assert))
                ("2"
                 (flatten)
                 (split -7)
                 (("1"
                   (flatten)
                   (mult-by -10 "(mm-1)*timestep")
                   (("1" (assert))
                    ("2"
                     (lemma "nnreal_times_nnreal_is_nnreal")
                     (inst - "mm-1" "timestep")
                     (assert))))
                  ("2" (flatten) (assert))))))))
            ("2"
             (case "(mm-1)*timestep <= t")
             (("1" (assert))
              ("2"
               (case "(mm-1)*timestep = min(floor(t/timestep)*timestep,(Nsteps-1)*timestep)")
               (("1"
                 (case "t>=floor(t / timestep) * timestep")
                 (("1" (expand "min") (lift-if) (ground))
                  ("2"
                   (hide-all-but 1)
                   (grind)
                   (mult-by 1 "1/timestep")
                   (assert))))
                ("2"
                 (hide-all-but 1)
                 (expand "mm")
                 (expand "min")
                 (lift-if)
                 (lift-if)
                 (lift-if)
                 (assert)
                 (ground)
                 (("1" (mult-by -1 "timestep") (assert))
                  ("2" (mult-by 1 "timestep") (assert))))))))))))))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: repulsive_iterative
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "repulsive_iterative?" +)
   (flatten)
   (case "s*(vo-vi)<0")
   (("1"
     (assert)
     (hide 2)
     (skeep)
     (lemma "repulsive_criteria_iterative_reduces")
     (inst - "Nsteps" "eps" "s" "t" "timestep" "vo-vi"
      "relative_velseq_vel(velseqo, vi)")
     (assert)
     (lemma "repulsive_criteria_iterative_reduces")
     (inst - "Nsteps" "eps" "-s" "t" "timestep" "vi-vo"
      "relative_velseq_vel(velseqi, vo)")
     (assert)
     (case "NOT -s * (vi - vo) < 0")
     (("1" (hide-all-but (-3 1)) (grind))
      ("2"
       (assert)
       (invoke (name "RVI" "%1") (! -2 1))
       (label "RVIname" -1)
       (replaces -1)
       (invoke (name "RVO" "%1") (! -3 1))
       (label "RVOname" -1)
       (replaces -1)
       (lemma "repulsive_criteria_scal_nv")
       (inst - "(1/t)" "eps" "RVO" "s" "vo-vi")
       (assert)
       (lemma "repulsive_criteria_scal_nv")
       (inst - "(1/t)" "eps" "RVI" "-s" "vi-vo")
       (assert)
       (name "nvop" "(1/t)*RVO+vi")
       (name "nvip" "(1/t)*RVI+vo")
       (lemma "repulsive_criteria_coordinately_repulsive")
       (inst - "eps" "nvip" "nvop" "s" "vi" "vo")
       (assert)
       (case "nvop-vi = (1/t)*RVO AND nvip-vo=(1/t)*RVI")
       (("1"
         (flatten)
         (assert)
         (lemma "repulsive_simple")
         (inst?)
         (assert)
         (flatten)
         (inst - "t")
         (assert)
         (invoke (case "s + t*(nvop-nvip) = %1") (! 1 1 1))
         (("1" (assert))
          ("2"
           (hide 2)
           (expand "maneuver_position_at" :assert? none)
           (skoletin 1)
           (skoletin 1)
           (skoletin 1)
           (case "NOT t*(nvop-nvip) = (RVO-RVI) - t *(vo-vi)")
           (("1"
             (expand "nvop" 1)
             (expand "nvip" 1)
             (hide-all-but 1)
             (grind))
            ("2"
             (replaces -1)
             (assert)
             (reveal "RVIname")
             (name "MPI"
                   "maneuver_position_at(-s, timestep, velseqi,
                                                               Nsteps)
                                                              (t)")
             (name "MPO"
                   "maneuver_position_at(s, timestep, velseqo,
                                                               Nsteps)
                                                              (t)")
             (case "RVO-RVI = (MPO-MPI)+t*(vo-vi) -s-s")
             (("1"
               (replaces -1)
               (assert)
               (case "NOT s + ((MPO - MPI) + t * (vo - vi) - s - s - t * (vo - vi)) = (MPO-MPI)-s")
               (("1" (hide-all-but 1) (grind))
                ("2"
                 (replaces -1)
                 (expand "MPO" +)
                 (expand "MPI" +)
                 (expand "maneuver_position_at" :assert? none)
                 (replace -6 :dir rl)
                 (assert)
                 (case "(man_pos_seq(s, timestep, velseqo)(numsteps) - man_pos_seq(-s, timestep, velseqi)(numsteps))-s = lastso")
                 (("1"
                   (replace -1 + :dir rl)
                   (expand "lastvo" +)
                   (hide -)
                   (grind :exclude "man_pos_seq"))
                  ("2"
                   (hide 2)
                   (expand "lastso")
                   (case "FORALL (mm:nat): (man_pos_seq(s, timestep, velseqo)(mm+1) -
                                                        man_pos_seq(-s, timestep, velseqi)(mm+1))
                                                       - s
                                                       =
                                                       man_pos_seq(s, timestep, relative_velseq(velseqo, velseqi))(mm+1)")
                   (("1" (inst?) (assert))
                    ("2"
                     (hide 2)
                     (hide -)
                     (induct "mm")
                     (("1" (grind) (decompose-equality))
                      ("2"
                       (skeep)
                       (assert)
                       (expand "man_pos_seq" +)
                       (replaces -1 :dir rl)
                       (grind :exclude "man_pos_seq"))))))))))
              ("2"
               (case "RVO = MPO - t*vi - s AND RVI = MPI - t*vo + s")
               (("1"
                 (flatten)
                 (replaces -1)
                 (replaces -1)
                 (hide-all-but 1)
                 (grind))
                ("2"
                 (hide (2 3))
                 (hide "RVIname")
                 (split +)
                 (("1"
                   (expand "RVO" +)
                   (both-sides "+" "s" 1)
                   (("1"
                     (assert)
                     (expand "MPO" 1)
                     (expand "maneuver_position_at" +)
                     (replace -5 :dir rl)
                     (expand "relative_velseq_vel" + 2)
                     (rewrite "scal_sub_right")
                     (case "man_pos_seq(s, timestep, relative_velseq_vel(velseqo, vi))(numsteps) = man_pos_seq(s, timestep, velseqo)(numsteps) - ((numsteps-1)*timestep)*vi")
                     (("1"
                       (replaces -1)
                       (hide -)
                       (grind :exclude "man_pos_seq"))
                      ("2"
                       (hide 2)
                       (case "FORALL (mm:nat): man_pos_seq(s, timestep, relative_velseq_vel(velseqo, vi))((mm+1))
                                                               =
                                                               man_pos_seq(s, timestep, velseqo)((mm+1)) -
                                                                (((mm+1) - 1) * timestep) * vi")
                       (("1" (inst?) (assert))
                        ("2"
                         (hide 2)
                         (induct "mm")
                         (("1" (assert) (hide -) (grind))
                          ("2"
                           (skeep)
                           (assert)
                           (expand "man_pos_seq" +)
                           (replaces -1)
                           (hide -)
                           (grind))))))))
                    ("2" (iff) (ground))))
                  ("2"
                   (expand "RVI" +)
                   (both-sides "-" "s" 1)
                   (("1"
                     (assert)
                     (case "NOT FORALL (vvdd:Vect2): vvdd - -s - s = vvdd+zero")
                     (("1" (hide-all-but 1) (grind))
                      ("2"
                       (rewrite -1)
                       (expand "MPI" 1)
                       (expand "maneuver_position_at" +)
                       (replace -6 :dir rl)
                       (assert)
                       (expand "relative_velseq_vel" + 2)
                       (assert)
                       (rewrite "scal_sub_right")
                       (assert)
                       (case "man_pos_seq(-s, timestep, relative_velseq_vel(velseqi, vo))(numsteps) = man_pos_seq(-s, timestep, velseqi)(numsteps) - (numsteps-1)*timestep*vo")
                       (("1"
                         (replace -1)
                         (hide -)
                         (grind :exclude "man_pos_seq"))
                        ("2"
                         (hide 2)
                         (case "FORALL (mm:nat): man_pos_seq(-s, timestep, relative_velseq_vel(velseqi, vo))((mm+1))
                                                                   =
                                                                   man_pos_seq(-s, timestep, velseqi)((mm+1)) -
                                                                    ((mm+1) - 1) * timestep * vo")
                         (("1" (inst?) (assert))
                          ("2"
                           (hide 2)
                           (induct "mm")
                           (("1" (hide -) (grind))
                            ("2"
                             (skeep)
                             (assert)
                             (expand "man_pos_seq" +)
                             (replace -1)
                             (assert)
                             (hide -)
                             (grind :exclude "man_pos_seq"))))))))))
                    ("2"
                     (iff)
                     (ground)
                     (hide-all-but (-1 1))
                     (grind :exclude
                      ("maneuver_position_at"
                       "relative_velseq_vel")))))))))))))))
        ("2"
         (hide -1)
         (replaces -1 :dir rl)
         (replaces -1 :dir rl)
         (hide-all-but 1)
         (grind))))))
    ("2"
     (assert)
     (hide 2)
     (skeep 2)
     (lemma "repulsive_criteria_iterative_reduces_div")
     (inst - "Nsteps" "eps" "s" "t" "timestep" "vo-vi"
      "relative_velseq_vel(velseqo, vi)")
     (assert)
     (lemma "repulsive_criteria_iterative_reduces_div")
     (inst - "Nsteps" "eps" "-s" "t" "timestep" "vi-vo"
      "relative_velseq_vel(velseqi, vo)")
     (assert)
     (case "NOT -s * (vi - vo) >= 0")
     (("1" (hide-all-but (1 2)) (grind))
      ("2"
       (assert)
       (assert)
       (invoke (name "RVI" "%1") (! -2 1 2))
       (label "RVIname" -1)
       (replaces -1)
       (invoke (name "RVO" "%1") (! -3 1 2))
       (label "RVOname" -1)
       (replaces -1)
       (name "nvop" "(1/t)*RVO+vi")
       (name "nvip" "(1/t)*RVI+vo")
       (invoke (case "s + t*(nvop-nvip) = %1") (! 2 1 1))
       (("1"
         (replaces -1 :dir rl)
         (case "s*(nvop-nvip)>=0")
         (("1"
           (lemma "closest_approach_2D.dot_nneg_divergent")
           (inst - "s" "zero" "nvop-nvip" "zero")
           (assert)
           (case "nvop-nvip=zero")
           (("1" (replaces -1) (assert))
            ("2"
             (assert)
             (expand "divergent?")
             (inst - "t")
             (rewrite "dist_norm")
             (rewrite "dist_norm")
             (assert))))
          ("2"
           (hide 3)
           (case "(1/t)*s*(RVO-RVI) >= s*(vo-vi)")
           (("1"
             (hide-all-but (-1 +))
             (expand "nvop")
             (expand "nvip")
             (grind))
            ("2"
             (case "s*(RVO-RVI) >= t*(s*(vo-vi))")
             (("1" (mult-by 1 "t") (grind))
              ("2"
               (hide-all-but (-4 -5 1 4))
               (mult-by 2 "t")
               (grind))))))))
        ("2"
         (hide 3)
         (expand "maneuver_position_at" :assert? none)
         (skoletin 1)
         (skoletin 1)
         (skoletin 1)
         (case "NOT t*(nvop-nvip) = (RVO-RVI) - t *(vo-vi)")
         (("1"
           (expand "nvop" 1)
           (expand "nvip" 1)
           (hide-all-but 1)
           (grind))
          ("2"
           (replaces -1)
           (assert)
           (reveal "RVIname")
           (name "MPI"
                 "maneuver_position_at(-s, timestep, velseqi,
                                                             Nsteps)
                                                            (t)")
           (name "MPO"
                 "maneuver_position_at(s, timestep, velseqo,
                                                             Nsteps)
                                                            (t)")
           (case "RVO-RVI = (MPO-MPI)+t*(vo-vi) -s-s")
           (("1"
             (replaces -1)
             (assert)
             (case "NOT s + ((MPO - MPI) + t * (vo - vi) - s - s - t * (vo - vi)) = (MPO-MPI)-s")
             (("1" (hide-all-but 1) (grind))
              ("2"
               (replaces -1)
               (expand "MPO" +)
               (expand "MPI" +)
               (expand "maneuver_position_at" :assert? none)
               (replace -6 :dir rl)
               (assert)
               (case "(man_pos_seq(s, timestep, velseqo)(numsteps) - man_pos_seq(-s, timestep, velseqi)(numsteps))-s = lastso")
               (("1"
                 (replace -1 + :dir rl)
                 (expand "lastvo" +)
                 (hide -)
                 (grind :exclude "man_pos_seq"))
                ("2"
                 (hide 2)
                 (expand "lastso")
                 (case "FORALL (mm:nat): (man_pos_seq(s, timestep, velseqo)(mm+1) -
                                                      man_pos_seq(-s, timestep, velseqi)(mm+1))
                                                     - s
                                                     =
                                                     man_pos_seq(s, timestep, relative_velseq(velseqo, velseqi))(mm+1)")
                 (("1" (inst?) (assert))
                  ("2"
                   (hide 2)
                   (hide -)
                   (induct "mm")
                   (("1" (grind) (decompose-equality))
                    ("2"
                     (skeep)
                     (assert)
                     (expand "man_pos_seq" +)
                     (replaces -1 :dir rl)
                     (grind :exclude "man_pos_seq"))))))))))
            ("2"
             (case "RVO = MPO - t*vi - s AND RVI = MPI - t*vo + s")
             (("1"
               (flatten)
               (replaces -1)
               (replaces -1)
               (hide-all-but 1)
               (grind))
              ("2"
               (hide (2 3))
               (hide "RVIname")
               (split +)
               (("1"
                 (expand "RVO" +)
                 (both-sides "+" "s" 1)
                 (("1"
                   (assert)
                   (expand "MPO" 1)
                   (expand "maneuver_position_at" +)
                   (replace -5 :dir rl)
                   (expand "relative_velseq_vel" + 2)
                   (rewrite "scal_sub_right")
                   (case "man_pos_seq(s, timestep, relative_velseq_vel(velseqo, vi))(numsteps) = man_pos_seq(s, timestep, velseqo)(numsteps) - ((numsteps-1)*timestep)*vi")
                   (("1"
                     (replaces -1)
                     (hide -)
                     (grind :exclude "man_pos_seq"))
                    ("2"
                     (hide 2)
                     (case "FORALL (mm:nat): man_pos_seq(s, timestep, relative_velseq_vel(velseqo, vi))((mm+1))
                                                             =
                                                             man_pos_seq(s, timestep, velseqo)((mm+1)) -
                                                              (((mm+1) - 1) * timestep) * vi")
                     (("1" (inst?) (assert))
                      ("2"
                       (hide 2)
                       (induct "mm")
                       (("1" (assert) (hide -) (grind))
                        ("2"
                         (skeep)
                         (assert)
                         (expand "man_pos_seq" +)
                         (replaces -1)
                         (hide -)
                         (grind))))))))
                  ("2" (iff) (ground))))
                ("2"
                 (expand "RVI" +)
                 (both-sides "-" "s" 1)
                 (("1"
                   (assert)
                   (case "NOT FORALL (vvdd:Vect2): vvdd - -s - s = vvdd+zero")
                   (("1" (hide-all-but 1) (grind))
                    ("2"
                     (rewrite -1)
                     (expand "MPI" 1)
                     (expand "maneuver_position_at" +)
                     (replace -6 :dir rl)
                     (assert)
                     (expand "relative_velseq_vel" + 2)
                     (assert)
                     (rewrite "scal_sub_right")
                     (assert)
                     (case "man_pos_seq(-s, timestep, relative_velseq_vel(velseqi, vo))(numsteps) = man_pos_seq(-s, timestep, velseqi)(numsteps) - (numsteps-1)*timestep*vo")
                     (("1"
                       (replace -1)
                       (hide -)
                       (grind :exclude "man_pos_seq"))
                      ("2"
                       (hide 2)
                       (case "FORALL (mm:nat): man_pos_seq(-s, timestep, relative_velseq_vel(velseqi, vo))((mm+1))
                                                                 =
                                                                 man_pos_seq(-s, timestep, velseqi)((mm+1)) -
                                                                  ((mm+1) - 1) * timestep * vo")
                       (("1" (inst?) (assert))
                        ("2"
                         (hide 2)
                         (induct "mm")
                         (("1" (hide -) (grind))
                          ("2"
                           (skeep)
                           (assert)
                           (expand "man_pos_seq" +)
                           (replace -1)
                           (assert)
                           (hide -)
                           (grind :exclude "man_pos_seq"))))))))))
                  ("2"
                   (iff)
                   (ground)
                   (hide-all-but (-1 1))
                   (grind :exclude
                    ("maneuver_position_at"
                     "relative_velseq_vel")))))))))))))))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal_criterion_line
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "horizontal_criterion?")
   (assert)
   (case "NOT FORALL (bb1,bb2,bb3:bool): (bb1 IFF bb2) IMPLIES ((bb1 AND bb3) IFF (bb2 AND bb3))")
   (("1" (hide 2) (grind))
    ("2"
     (inst?)
     (replace 1)
     (hide 2)
     (name "G"
           "(LAMBDA (vvvv: Vector): eps * det(vvvv, tangent_line(sp, eps)))")
     (label "Gname" -1)
     (name "H"
           "(LAMBDA (vvvv: Vector): R(sp) * det(sp, vvvv) * eps - sp * vvvv)")
     (label "Hname" -1)
     (name "VT" "tangent_line(sp,eps)")
     (label "hokie" -1)
     (replace -1)
     (name "UV" "-eps*perpR(VT)")
     (label "UVname" -1)
     (lemma "linear_functional_perp_signs_unique")
     (inst - "H" "G" "UV" "VT")
     (assert)
     (split -1)
     (("1"
       (inst - "v")
       (case "H(v) /= 0 AND G(v) /= 0")
       (("1"
         (flatten)
         (ground)
         (("1"
           (case "H(v) < 0")
           (("1"
             (case "G(v) < 0")
             (("1" (replace "Gname" - rl) (assert))
              ("2" (div-by -3 "-H(v)") (field -3))))
            ("2" (replace "Hname" :dir rl) (assert))))
          ("2"
           (case "G(v) < 0")
           (("1"
             (case "H(v) < 0")
             (("1" (replace "Hname" :dir rl) (assert))
              ("2" (div-by -3 "-G(v)") (assert))))
            ("2" (replace "Gname" :dir rl) (assert))))))
        ("2"
         (case "G(v) = 0")
         (("1"
           (hide 1)
           (replace "Gname" - rl)
           (assert)
           (lemma "parallel_det_0")
           (inst - "v" "tangent_line(sp,eps)")
           (("1"
             (case "det(v,VT) = 0")
             (("1"
               (assert)
               (hide -1)
               (expand "parallel?")
               (skosimp*)
               (lemma "line_solution_tangent_line")
               (inst - "eps" "sp")
               (expand "line_solution?")
               (flatten)
               (replace -3 1)
               (replace "hokie")
               (hide-all-but (-1 1))
               (rewrite "det_scal_right")
               (assert))
              ("2" (typepred "eps") (assert))))
            ("2"
             (flatten)
             (replace -1)
             (assert)
             (expand "det")
             (assert))))
          ("2"
           (case "H(v) = 0")
           (("1"
             (replace "Hname" :dir rl)
             (assert)
             (case "line_solution?(sp,v,eps)")
             (("1"
               (lemma "tangent_line_solution")
               (inst?)
               (assert)
               (expand "tangent_line?")
               (skosimp*)
               (replace "hokie")
               (replace -1)
               (hide-all-but 2)
               (grind))
              ("2"
               (expand "line_solution?")
               (case "line_solution?(sp,-v,eps)")
               (("1"
                 (lemma "tangent_line_solution")
                 (inst?)
                 (assert)
                 (expand "tangent_line?")
                 (skosimp*)
                 (case "v = (-nnk!1)*tangent_line(sp,eps)")
                 (("1"
                   (replace -1)
                   (replace "hokie")
                   (hide-all-but 3)
                   (grind))
                  ("2"
                   (replace "hokie")
                   (hide-all-but (-1 1))
                   (expand "*")
                   (expand "-")
                   (flatten)
                   (decompose-equality))))
                ("2"
                 (expand "line_solution?")
                 (split)
                 (("1" (hide-all-but (-1 1)) (grind))
                  ("2"
                   (lemma "det_scal_right")
                   (inst - "-1" "sp" "v")
                   (assert))))))))
            ("2" (assert))))))))
      ("2"
       (expand "linear_functional?")
       (skosimp*)
       (replace "Hname" + rl)
       (assert)
       (hide-all-but 1)
       (grind))
      ("3" (replace "Gname" + rl) (hide-all-but 1) (grind))
      ("4"
       (hide 2)
       (replace "Hname" + rl)
       (replace "Gname" + rl)
       (assert)
       (replace "UVname" + rl)
       (rewrite "det_scal_left")
       (assert)
       (rewrite "det_scal_right")
       (assert)
       (case "R(sp) * det(perpR(VT), VT) * det(sp, perpR(VT)) * -eps * -eps * eps *
                                      eps = R(sp) * det(perpR(VT), VT) * det(sp, perpR(VT)) AND (sp * perpR(VT)) * det(perpR(VT), VT) * -eps * -eps * eps = (sp * perpR(VT)) * det(perpR(VT), VT) * eps")
       (("1"
         (flatten)
         (replace -1)
         (replace -2)
         (factor 1)
         (case "det(perpR(VT),VT) > 0 AND (R(sp) * det(sp, perpR(VT)) - sp * perpR(VT) * eps) > 0")
         (("1"
           (flatten)
           (lemma "posreal_times_posreal_is_posreal")
           (inst?)
           (("1" (assert))
            ("2"
             (hide 2)
             (split)
             (("1"
               (rewrite "det_perpR")
               (typepred "sqv(perpR(VT))")
               (expand "sqv")
               (propax))
              ("2" (propax))))))
          ("2"
           (split)
           (("1"
             (rewrite "det_perpR")
             (typepred "sqv(perpR(VT))")
             (expand "sqv")
             (propax))
            ("2"
             (hide 2)
             (case "sp * perpR(VT) * eps < 0 AND R(sp) * det(sp, perpR(VT)) >= 0")
             (("1" (flatten) (assert))
              ("2"
               (hide 2)
               (split)
               (("1"
                 (lemma "line_solution_det")
                 (inst - "eps" "sp" "VT")
                 (assert)
                 (lemma "line_solution_tangent_line")
                 (inst - "eps" "sp")
                 (assert)
                 (flatten)
                 (rewrite "det_perpR")
                 (assert))
                ("2"
                 (lemma "nnreal_times_nnreal_is_nnreal")
                 (inst - "R(sp)" "det(sp,perpR(VT))")
                 (hide 2)
                 (lemma "line_solution_tangent_line")
                 (inst - "eps" "sp")
                 (lemma "line_solution_det")
                 (inst - "eps" "sp" "VT")
                 (assert)
                 (flatten)
                 (rewrite "det_perpR")
                 (rewrite "det_perpR")
                 (rewrite "perpR_perpR")
                 (hide-all-but (-2 1))
                 (grind))))))))))
        ("2"
         (hide-all-but 1)
         (typepred "eps")
         (split)
         (("1" (assert)) ("2" (assert))))))
      ("5"
       (replace "Hname" + rl)
       (assert)
       (lemma "line_solution_tangent_line")
       (inst?)
       (expand "line_solution?")
       (propax))
      ("6" (replace "Gname" + rl) (assert))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal_criterion_line
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "horizontal_criterion_independence")
   (inst?)
   (assert)
   (inst + "eps")
   (hide -3)
   (lemma "horizontal_criterion_symmetric")
   (inst - "eps" "sp" "vo-nvi")
   (case-replace "-(vo-nvi) = nvi-vo")
   (("1"
     (hide -1)
     (assert)
     (hide -2)
     (lemma "horizontal_criterion_rewrite")
     (inst?)
     (replace -1)
     (hide -1)
     (lemma "horizontal_criterion_rewrite")
     (inst?)
     (replace -1)
     (hide -1)
     (lemma "horizontal_criterion_rewrite")
     (inst?)
     (replace -1)
     (hide -1)
     (name "VT" "tangent_line(sp,eps)")
     (replace -1)
     (hide -1)
     (grind))
    ("2" (hide-all-but 1) (grind))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal_criterion_line
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "tangent_line_solution")
   (inst-cp - "eps" "sp" "nvo-vi")
   (inst - "eps" "sp" "v")
   (assert)
   (expand "tangent_line?")
   (skosimp*)
   (lemma "det_add_left")
   (inst - "vi-nvo" "nvo-nvi" "v")
   (case-replace "vi - nvo + (nvo - nvi) = vi-nvi")
   (("1"
     (hide -1)
     (replace -1)
     (assert)
     (lemma "det_scal_left")
     (inst - "-1" "nvo-vi" "v")
     (assert)
     (case-replace "-(nvo-vi) = vi-nvo")
     (("1"
       (hide -1)
       (replace -1)
       (replace -3)
       (replace -4)
       (hide-all-but 1)
       (rewrite "det_scal_left")
       (rewrite "det_scal_right")
       (assert))
      ("2" (hide-all-but 1) (grind))))
    ("2" (hide-all-but 1) (grind))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal_criterion_line
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "horizontal_criterion_dot_equality")
   (inst - "eps" "nvi" "nvo" "sp" "tangent_line(sp,eps)" "vi")
   (lemma "line_solution_tangent_line")
   (inst?)
   (assert)
   (lemma "horizontal_criterion_rewrite")
   (inst?)
   (replace -1)
   (hide -1)
   (lemma "horizontal_criterion_rewrite")
   (inst?)
   (replace -1)
   (replace -3)
   (assert)
   (ground)
   (expand "line_solution?")
   (flatten)
   (hide-all-but (-5 -7 1))
   (grind))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal_criterion_line
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "line_solution_meets_horizontal_criterion")
   (inst - "eps" "-sp" "nvi-vo")
   (assert)
   (lemma "horizontal_criterion_special_coordination")
   (inst - "eps" "nvi" "nvo" "sp" "vo")
   (assert))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal_criterion_line
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "horizontal_criterion_ext?")
   (ground)
   (lemma "horizontal_criterion_rewrite")
   (inst - "eps" "sp" _)
   (inst-cp - "v")
   (inst-cp - "nv")
   (inst - "nv-(1/2)*v")
   (assert)
   (flatten)
   (assert)
   (split +)
   (("1"
     (hide-all-but (-1 -3 1))
     (grind :exclude ("perpR" "tangent_line")))
    ("2" (assert) (hide-all-but (-2 -4 1)) (grind))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal_criterion_line
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "horizontal_criterion_independence")
   (inst?)
   (assert)
   (expand "horizontal_criterion_ext?")
   (lift-if)
   (assert)
   (ground)
   (("1" (inst + "eps")) ("2" (inst + "eps")) ("3" (inst + "-eps"))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal_criterion_line
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "horizontal_criterion_independence")
   (inst - "sp" "nv")
   (assert)
   (lemma "horizontal_criterion_ext_subset")
   (inst - "eps" "nv" "sp" "v")
   (assert)
   (inst + "eps"))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal_criterion_line
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "horizontal_criterion_independence")
   (inst - "sp" "vo-vi")
   (ground)
   (("1"
     (expand "horizontal_criterion_ext?")
     (split -)
     (("1"
       (flatten)
       (lemma "horizontal_criterion_symmetric")
       (inst-cp - "eps" "sp" "vo-vi")
       (inst - "eps" "sp" "-(vo-vi)")
       (assert)
       (case "-(vo-vi) = vi-vo")
       (("1"
         (replace -1)
         (assert)
         (lemma "horizontal_criterion_independence")
         (inst - "sp" "nvo-nvi")
         (hide -3)
         (flatten)
         (assert)
         (hide -1)
         (inst + "eps")
         (hide-all-but (-3 -4 -6 1))
         (rewrite "horizontal_criterion_rewrite")
         (rewrite "horizontal_criterion_rewrite")
         (rewrite "horizontal_criterion_rewrite")
         (rewrite "horizontal_criterion_rewrite")
         (flatten)
         (lemma "tangent_line_asymm")
         (inst?)
         (replace -1)
         (hide -1)
         (split +)
         (("1"
           (hide-all-but (-1 -3 -5 +))
           (grind :exclude "tangent_line"))
          ("2" (hide-all-but (-2 -4 -6 +)) (grind))))
        ("2" (hide-all-but 1) (grind))))
      ("2"
       (flatten)
       (lemma "horizontal_criterion_symmetric")
       (inst?)
       (case "-(vo-vi) = vi-vo")
       (("1"
         (replace -1)
         (assert)
         (split -)
         (("1"
           (flatten)
           (assert)
           (lemma "horizontal_criterion_symmetric")
           (inst - "eps" "sp" "vi-vo")
           (case "-(vi-vo) = vo-vi")
           (("1"
             (replace -1)
             (replace -2 :dir rl)
             (lemma "horizontal_criterion_symmetric")
             (inst - "-eps" "sp" "vo-vi")
             (case "-(vo-vi) = vi-vo")
             (("1"
               (replace -1)
               (replace -2 :dir rl)
               (assert)
               (replace -5)
               (hide (-2 -4))
               (skosimp*)
               (case "eps!1 = eps OR eps!1 = -eps")
               (("1"
                 (assert)
                 (replace -1)
                 (lemma "horizontal_criterion_symmetric")
                 (inst - "eps" "sp" "vo-nvi")
                 (case "-(vo-nvi) = nvi-vo")
                 (("1"
                   (replace -1)
                   (replace -2 :dir rl)
                   (hide (-1 -2))
                   (lemma "horizontal_criterion_independence")
                   (inst - "sp" "nvo-nvi")
                   (assert)
                   (inst + "eps")
                   (hide-all-but (-4 -5 -7 1))
                   (rewrite "horizontal_criterion_rewrite")
                   (rewrite "horizontal_criterion_rewrite")
                   (rewrite "horizontal_criterion_rewrite")
                   (rewrite "horizontal_criterion_rewrite")
                   (flatten)
                   (split +)
                   (("1"
                     (hide-all-but (-1 -3 -5 +))
                     (grind :exclude "tangent_line"))
                    ("2" (hide-all-but (-2 -4 -6 +)) (grind))))
                  ("2" (hide-all-but 1) (grind))))
                ("2"
                 (hide-all-but 1)
                 (typepred "eps!1")
                 (typepred "eps")
                 (ground))))
              ("2" (propax))))
            ("2" (hide-all-but 1) (grind))))
          ("2"
           (flatten)
           (case "-(vi-vo) = vo-vi")
           (("1"
             (lemma "horizontal_criterion_symmetric")
             (inst - "eps" "sp" "vi-vo")
             (replace -1 :dir rl)
             (assert)
             (lemma "horizontal_criterion_symmetric")
             (inst - "-eps" "sp" "vo-vi")
             (assert)
             (flatten)
             (assert)
             (lemma "horizontal_criterion_symmetric")
             (inst - "eps" "-sp" "nvi - vo - (1 / 2) * (vi - vo)")
             (assert)
             (case "NOT -(nvi - vo - (1 / 2) * (vi - vo)) = vo-nvi - (1/2)*(vo-vi)")
             (("1" (hide-all-but 1) (grind))
              ("2"
               (replace -1)
               (name "ww" "vo - nvi - (1 / 2) * (vo - vi)")
               (name "vv" "nvo - vi - (1 / 2) * (vo - vi)")
               (case "NOT ww+vv = nvo-nvi")
               (("1"
                 (hide-all-but 1)
                 (expand "vv")
                 (expand "ww")
                 (grind))
                ("2"
                 (replace -2)
                 (replace -3)
                 (replace -1 :dir rl)
                 (hide-all-but (-5 -10 -15))
                 (lemma "horizontal_criterion_independence")
                 (inst?)
                 (assert)
                 (inst + "eps")
                 (hide -3)
                 (rewrite "horizontal_criterion_rewrite")
                 (rewrite "horizontal_criterion_rewrite")
                 (rewrite "horizontal_criterion_rewrite")
                 (flatten)
                 (split)
                 (("1" (hide (-2 -4)) (grind :exclude "tangent_line"))
                  ("2" (hide (-1 -3)) (grind))))))))
            ("2" (hide-all-but 1) (grind))))))
        ("2" (hide-all-but 1) (grind))))))
    ("2"
     (expand "horizontal_criterion_ext?")
     (inst-cp + "eps")
     (inst-cp + "-eps")
     (assert)
     (lemma "horizontal_criterion_symmetric")
     (inst - "eps" "sp" "vo-vi")
     (lemma "horizontal_criterion_symmetric")
     (inst - "-eps" "sp" "vo-vi")
     (case "-(vo-vi) = vi-vo")
     (("1"
       (replaces -1)
       (replace -1 :dir rl)
       (replace -2 :dir rl)
       (assert)
       (lemma "horizontal_criterion_coordination")
       (inst - "eps" "nvi" "nvo" "sp" "vi" "vo")
       (assert))
      ("2" (hide-all-but 1) (grind))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal_criterion_line
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "horizontal_criterion_ext?")
   (split +)
   (("1"
     (flatten)
     (assert)
     (rewrite "horizontal_criterion_rewrite")
     (rewrite "horizontal_criterion_rewrite")
     (rewrite "horizontal_criterion_rewrite")
     (rewrite "horizontal_criterion_rewrite")
     (flatten)
     (split +)
     (("1" (hide-all-but (-1 -3 -5 +)) (grind :exclude "tangent_line"))
      ("2" (hide-all-but (-2 -4 -6 +)) (grind))))
    ("2"
     (flatten)
     (assert)
     (split +)
     (("1"
       (flatten)
       (replace -1)
       (hide-all-but (-2 -3 1))
       (rewrite "horizontal_criterion_rewrite")
       (rewrite "horizontal_criterion_rewrite")
       (rewrite "horizontal_criterion_rewrite")
       (flatten)
       (split +)
       (("1" (hide-all-but (-1 -3 +)) (grind :exclude "tangent_line"))
        ("2" (hide-all-but (-2 -4 +)) (grind))))
      ("2"
       (flatten)
       (assert)
       (flatten)
       (split +)
       (("1"
         (hide-all-but (-2 -4 1))
         (rewrite "horizontal_criterion_rewrite")
         (rewrite "horizontal_criterion_rewrite")
         (rewrite "horizontal_criterion_rewrite")
         (flatten)
         (split +)
         (("1" (hide-all-but (-1 -3 +)) (grind :exclude "tangent_line"))
          ("2" (hide-all-but (-2 -4 +)) (grind))))
        ("2"
         (hide-all-but (-3 -4 1))
         (rewrite "horizontal_criterion_rewrite")
         (rewrite "horizontal_criterion_rewrite")
         (rewrite "horizontal_criterion_rewrite")
         (flatten)
         (split +)
         (("1" (hide-all-but (-1 -3 +)) (grind :exclude "tangent_line"))
          ("2" (hide-all-but (-2 -4 +)) (grind))))))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal_criterion_line
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "horizontal_criterion_ext?")
   (lemma "horizontal_criterion_scal")
   (inst?)
   (("1"
     (assert)
     (ground)
     (("1"
       (lemma "horizontal_criterion_sum_closed")
       (inst - "eps" "sp" "(1/2)*v" "nv - (1 / 2) * v")
       (assert)
       (case "(1 / 2) * v + (nv - (1 / 2) * v) = nv")
       (("1"
         (split -2)
         (("1"
           (replace -2)
           (lemma "horizontal_criterion_scal")
           (inst - "eps" "sp" "nv" "c-1")
           (assert)
           (lemma "horizontal_criterion_sum_closed")
           (inst - "eps" "sp" "(c-1)*nv" "nv - (1/2)*v")
           (assert)
           (hide-all-but (-1 1))
           (grind :exclude "horizontal_criterion?"))
          ("2" (lemma "horizontal_criterion_scal") (inst?) (assert))))
        ("2"
         (hide-all-but 1)
         (decompose-equality)
         (("1" (grind)) ("2" (grind))))))
      ("2"
       (lemma "horizontal_criterion_sum_closed")
       (inst - "eps" "sp" "(c-1)*nv" "nv - (1/2)*v")
       (assert)
       (split -)
       (("1"
         (hide-all-but (-1 1))
         (grind :exclude "horizontal_criterion?"))
        ("2" (lemma "horizontal_criterion_scal") (inst?) (assert))))
      ("3"
       (lemma "horizontal_criterion_sum_closed")
       (inst - "eps" "sp" "(1/2)*v" "nv - (1 / 2) * v")
       (assert)
       (split -)
       (("1"
         (hide-all-but (-1 2))
         (case "(1 / 2) * v + (nv - (1 / 2) * v) = nv")
         (("1" (assert))
          ("2"
           (hide-all-but 1)
           (decompose-equality)
           (("1" (grind)) ("2" (grind))))))
        ("2" (lemma "horizontal_criterion_scal") (inst?) (assert))))))
    ("2" (assert))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal_criterion_line
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (case "FORALL (eps: Sign, sp: Sp_vect2[D], v, nv1, nv2: Vect2):
                                              horizontal_criterion?(sp, eps)(nv1) AND
                                               horizontal_criterion?(sp, eps)(nv2)
                                               IMPLIES
                                               (FORALL (t: real):
                                                  0 <= t AND t <= 1 IMPLIES
                                                   horizontal_criterion?(sp, eps)((1 - t) * nv1 + t * nv2))")
   (("1"
     (skeep)
     (skeep)
     (expand "horizontal_criterion_ext?")
     (assert)
     (split +)
     (("1"
       (flatten)
       (assert)
       (inst - "eps" "sp" "v" "nv1 - (1 / 2) * v" "nv2 - (1 / 2) * v")
       (assert)
       (inst - "t")
       (case "(1 - t) * (nv1 - (1 / 2) * v) +
                                                                                    t * (nv2 - (1 / 2) * v) = (1 - t) * nv1 + t * nv2 - (1 / 2) * v")
       (("1" (assert)) ("2" (hide-all-but 1) (grind))))
      ("2"
       (flatten)
       (assert)
       (split +)
       (("1"
         (flatten)
         (replace -1)
         (inst - "eps" "sp" "v" "nv1" "nv2")
         (assert)
         (inst - "t")
         (assert))
        ("2"
         (hide 2)
         (flatten)
         (assert)
         (flatten)
         (split +)
         (("1"
           (inst - "eps" "sp" "v" "nv1" "nv2")
           (assert)
           (inst - "t")
           (assert))
          ("2"
           (inst - "eps" "sp" "v" "nv1 - (1 / 2) * v"
            "nv2 - (1 / 2) * v")
           (assert)
           (inst - "t")
           (case "(1 - t) * (nv1 - (1 / 2) * v) +
                                                                                        t * (nv2 - (1 / 2) * v) = (1 - t) * nv1 + t * nv2 - (1 / 2) * v")
           (("1" (assert)) ("2" (hide-all-but 1) (grind))))))))))
    ("2"
     (hide 2)
     (skeep)
     (skeep)
     (rewrite "horizontal_criterion_rewrite")
     (rewrite "horizontal_criterion_rewrite")
     (rewrite "horizontal_criterion_rewrite")
     (flatten)
     (mult-by -1 "(1-t)")
     (mult-by -2 "(1-t)")
     (mult-by -3 "t")
     (mult-by -4 "t")
     (split +)
     (("1" (hide (-1 -3)) (grind :exclude "tangent_line"))
      ("2" (hide (-2 -4)) (grind))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal_criterion_line
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (case "FORALL (eps: Sign, sp: Sp_vect2[D], v, sp1, sp2: Vect2):
                                       horizontal_criterion_ext?(sp, v, eps)(sp1 - sp) AND
                                        horizontal_criterion_ext?(sp, v, eps)(sp2 - sp)
                                       IMPLIES
                                       (FORALL (t: real):
                                          0 <= t AND t <= 1 IMPLIES
                                           NOT sqv((1-t)*sp1 + t * sp2) < sq(D))")
   (("1"
     (skeep)
     (inst - "eps" "sp" "v" "sp1" "sp2")
     (assert)
     (skeep)
     (inst - "((t - t1) / (t2 - t1))")
     (split -)
     (("1"
       (name "tz" "(t-t1)/(t2-t1)")
       (replace -1)
       (hide-all-but (-7 1))
       (grind :exclude ("sqv" "sq")))
      ("2" (cross-mult 1) (assert)) ("3" (cross-mult 1) (assert))))
    ("2"
     (hide 2)
     (lemma "horizontal_criterion_ext_seg_convex")
     (skeep)
     (inst - "eps" "sp" "v" "sp1-sp" "sp2-sp")
     (assert)
     (skeep)
     (inst - "t")
     (assert)
     (lemma "horizontal_criterion_ext_independence")
     (inst - "eps" "(1 - t) * (sp1 - sp) + t * (sp2 - sp)" "sp" "v")
     (assert)
     (hide-all-but (-6 1))
     (expand "horizontal_conflict?")
     (inst + "1")
     (grind :exclude ("sqv" "sq")))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal_criterion_line
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (case "FORALL (ssp:Sp_vect2,vv,nvv:Vect2,eps:Sign): horizontal_criterion_ext?(ssp,vv,eps)(nvv) IMPLIES horizontal_criterion_ext?(-ssp,-vv,eps)(-nvv)")
   (("1"
     (label "lem1" -1)
     (hide "lem1")
     (case "FORALL (eps: Sign, nso1, nso2, nsi1, nsi2: Vect2,
                                                                                   t1, t2: real,sp,v):
                                                                                  t1 < t2 AND
                                                                              horizontal_criterion_ext?(sp, v, eps)(nso1 - sp)
                                                                              AND horizontal_criterion_ext?(sp, v, eps)(nso2 - sp)
                                                                              AND horizontal_criterion_ext?(-sp, -v, eps)(nsi1 +sp)
                                                                              AND horizontal_criterion_ext?(-sp, -v, eps)(nsi2 +sp)
                                                                              IMPLIES
                                                                              (FORALL (t: real):
                                                                                 LET time01 = (t - t1) / (t2 - t1),
                                                                                     ownshippos = nso1 + time01 * (nso2 - nso1),
                                                                                     intruderpos = nsi1 + time01 * (nsi2 - nsi1)
                                                                                   IN
                                                                                   t1 <= t AND t <= t2 IMPLIES
                                                                                    horizontal_criterion_ext?(sp,v,eps)(ownshippos-intruderpos-2*sp))")
     (("1"
       (skeep)
       (inst - "eps" "nso1-si" "nso2-si" "nsi1-so" "nsi2-so" "t1" "t2"
        "so-si" "vo-vi")
       (assert)
       (split -)
       (("1"
         (skeep)
         (inst - "t")
         (assert)
         (name "nt" "(t-t1)/(t2-t1)")
         (replace -1)
         (hide -1)
         (name "vvr"
               "nso1 + nt * (nso2 - nso1) - (nsi1 + nt * (nsi2 - nsi1))")
         (replace -1)
         (case "NOT (nso1 - si + nt * (nso2 - si - (nso1 - si))
                                                                                   -
                                                                                   (nsi1 - so +
                                                                                     nt * (nsi2 - so - (nsi1 - so)))
                                                                                   - 2 * (so - si)) = vvr - (so-si)")
         (("1" (hide-all-but 1) (expand "vvr") (grind))
          ("2"
           (replace -1)
           (hide (-1 -2))
           (lemma "horizontal_criterion_ext_independence")
           (inst?)
           (assert)
           (expand "horizontal_conflict?")
           (inst + "1")
           (assert)
           (hide-all-but (-10 1))
           (grind))))
        ("2"
         (hide 2)
         (grind :exclude ("sqv" "sq" "horizontal_criterion_ext?")))
        ("3"
         (hide 2)
         (grind :exclude ("sqv" "sq" "horizontal_criterion_ext?")))
        ("4"
         (hide 2)
         (grind :exclude ("sqv" "sq" "horizontal_criterion_ext?")))
        ("5"
         (hide 2)
         (grind :exclude ("sqv" "sq" "horizontal_criterion_ext?")))))
      ("2"
       (hide 2)
       (lemma "horizontal_criterion_ext_seg_convex")
       (skeep)
       (skeep)
       (inst - "eps" "sp" "v" "nso1-nsi1 - 2*sp" "nso2-nsi2-2*sp")
       (assert)
       (split -)
       (("1"
         (flatten)
         (assert)
         (inst - "(t-t1)/(t2-t1)")
         (split -1)
         (("1"
           (name "nt" "(t-t1)/(t2-t1)")
           (replace -1)
           (hide -1)
           (hide-all-but (-1 1))
           (grind :exclude "horizontal_criterion_ext?"))
          ("2" (cross-mult 1)) ("3" (cross-mult 1))))
        ("2"
         (hide 2)
         (lemma "horizontal_criterion_ext_sum_closed")
         (inst - "eps" "nso1-sp" "-(nsi1+sp)" "sp" "v")
         (assert)
         (split -)
         (("1"
           (hide-all-but (-1 1))
           (grind :exclude "horizontal_criterion_ext?"))
          ("2"
           (reveal "lem1")
           (inst - "-sp" "-v" "nsi1+sp" "eps")
           (assert))))
        ("3"
         (hide 2)
         (lemma "horizontal_criterion_ext_sum_closed")
         (inst - "eps" "nso2-sp" "-(nsi2+sp)" "sp" "v")
         (assert)
         (split -)
         (("1"
           (hide-all-but (-1 1))
           (grind :exclude "horizontal_criterion_ext?"))
          ("2"
           (reveal "lem1")
           (inst - "-sp" "-v" "nsi2+sp" "eps")
           (assert))))))
      ("3" (hide 2) (skeep) (assert))))
    ("2"
     (hide 2)
     (skeep)
     (expand "horizontal_criterion_ext?")
     (rewrite "horizontal_criterion_symmetric" :dir rl)
     (rewrite "horizontal_criterion_symmetric" :dir rl)
     (rewrite "horizontal_criterion_symmetric" :dir rl)
     (rewrite "horizontal_criterion_symmetric" :dir rl)
     (case "-nvv-(1/2)*-vv = -(nvv-(1/2)*vv)")
     (("1"
       (replace -1)
       (hide -1)
       (rewrite "horizontal_criterion_symmetric" :dir rl))
      ("2" (hide-all-but 1) (grind))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: predicate_coordination
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (case "FORALL (C, Crit1, Crit2: Criter):
                                      symmetric?(C) IMPLIES (coordinated?(Crit1, Crit2, C) IMPLIES coordinated?(Crit2, Crit1, C))")
   (("1"
     (skeep)
     (inst-cp - "C" "Crit1" "Crit2")
     (inst - "C" "Crit2" "Crit1")
     (ground))
    ("2"
     (hide 2)
     (skeep)
     (expand "coordinated?")
     (skeep)
     (inst - "vi" "vo" "nvi" "nvo" "-s")
     (assert)
     (expand "symmetric?")
     (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
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (ground)
   (expand "coordinated?")
   (skeep)
   (expand "crit_symmetric?")
   (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?")
         (inst - "s" "AA" "CC+BB-AA" "AA")
         (assert)
         (expand "sum_independent?")
         (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
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?")
   (skeep)
   (label "vnv" -4)
   (label "vnw" -5)
   (label "Cv" -6)
   (hide "Cv")
   (label "Cnvnw" -6)
   (case "v /= zero")
   (("1"
     (flatten)
     (reveal "Clem")
     (expand "open?")
     (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?")
           (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_3D.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?")
                       (inst - "vo1" "vi1" "nvo1" "nvi1" "s")
                       (assert)
                       (expand "crit_symmetric?")
                       (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?")
                             (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_3D.norm_eq_0") (inst - "v") (assert))))
    ("2"
     (reveal "Cv")
     (flatten)
     (replace -2)
     (expand "crit_symmetric?")
     (inst - "zero " "s" "nv")
     (assert)
     (expand "coordinated?")
     (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
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (ground)
   (expand "coordinated?")
   (skeep)
   (expand "crit_antisymmetric?")
   (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?")
         (inst - "s" "AA" "CC+BB-AA" "AA")
         (assert)
         (expand "sum_independent?")
         (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
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?")
   (skeep)
   (label "vnv" -4)
   (label "vnw" -5)
   (label "Cv" -6)
   (hide "Cv")
   (label "Cnvnw" -6)
   (case "v /= zero")
   (("1"
     (flatten)
     (reveal "Clem")
     (expand "open?")
     (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?")
           (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_3D.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?")
                       (replace "newvname")
                       (inst - "vo1" "vi1" "nvo1" "nvi1" "s")
                       (assert)
                       (expand "crit_antisymmetric?")
                       (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?")
                             (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_3D.norm_eq_0") (inst - "v") (assert))))
    ("2"
     (reveal "Cv")
     (flatten)
     (replace -2)
     (expand "crit_antisymmetric?")
     (inst - "zero " "s" "nv" "eps")
     (assert)
     (expand "coordinated?")
     (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
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?")
   (inst - "s" "v" "x" "-l*v")
   (grind))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: predicate_coordination
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "coordinated?")
   (skeep)
   (expand "deriv")
   (assert)
   (expand "crit_symmetric?")
   (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?")
       (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
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "deriv_coordinated")
   (inst - "C" "Crit" "1" "0")
   (assert)
   (rewrite "deriv_0"))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: predicate_coordination
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "coordinated?" +)
   (skeep)
   (expand "Comb")
   (ground)
   (("1"
     (lemma "sum_indep_coordinated")
     (inst - "C" "Crit1")
     (assert)
     (expand "coordinated?")
     (inst - "vo" "vi" "nvo" "nvi" "s")
     (assert))
    ("2"
     (lemma "deriv_coordinated_1")
     (inst - "C" "Crit1")
     (split -)
     (("1"
       (expand "coordinated?")
       (inst - "vi" "vo" "nvi" "nvo" "-s")
       (assert)
       (expand "symmetric?")
       (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?")
     (inst - "vo" "vi" "nvo" "nvi" "s")
     (assert))
    ("4"
     (expand "coordinated?")
     (inst - "vo" "vi" "nvo" "nvi" "s")
     (assert))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: vertical_criterion
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (assert)
   (rewrite "dot_add_left")
   (case "(sq(D) - vect2(s) * vect2(p)) / (vect2(v) * vect2(p)) *
                   (vect2(v) * vect2(p)) = (sq(D) - vect2(s) * vect2(p))")
   (("1" (replace -1) (assert)) ("2" (cross-mult 1))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: vertical_criterion
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (case "forall (m,b, x1,x2: real): m > 0 AND x1 > x2 IMPLIES m*x1 + b > m*x2 + b")
   (("1"
     (label "linelem" -1)
     (skeep)
     (assert)
     (name "tt" "(sq(D) - vect2(s) * vect2(p)) / (vect2(v) * vect2(p))")
     (replace -1)
     (flatten)
     (lemma "closed_region_3D_t_def")
     (inst - "p" "s" "v")
     (assert)
     (replace -2)
     (typepred "sign(vect2(v)*vect2(p))")
     (hide -1)
     (typepred "sign(tt - tztime)")
     (hide -1)
     (ground)
     (("1"
       (replace -1)
       (replace -2)
       (expand "sign")
       (lift-if)
       (ground)
       (inst - "vect2(v)*vect2(p)" "sq(D) - vect2(s)*vect2(p)" "tt"
        "tztime")
       (assert)
       (hide-all-but (-3 "linelem" 1))
       (grind))
      ("2"
       (replace -1)
       (replace -2)
       (assert)
       (expand "sign")
       (lift-if)
       (ground)
       (inst - "- (vect2(v)*vect2(p))" "sq(D) - (vect2(s)*vect2(p))" "tt"
        "tztime")
       (assert)
       (hide-all-but (-1 -4 "linelem"))
       (grind))
      ("3"
       (replace -1)
       (replace -2)
       (expand "sign")
       (lift-if)
       (ground)
       (inst - "vect2(v)*vect2(p)" "vect2(s)*vect2(p) - sq(D)" "tztime"
        "tt")
       (assert)
       (hide-all-but (-1 -3 "linelem"))
       (grind))
      ("4"
       (replace -1)
       (replace -2)
       (real-props)
       (expand "sign")
       (lift-if)
       (ground)
       (inst - "-(vect2(v)*vect2(p))" "sq(D) - (vect2(s)*vect2(v))"
        "tztime" "tt")
       (assert)
       (hide-all-but (-1 "linelem" 1))
       (grind))))
    ("2" (hide 2) (skosimp*) (mult-by -2 "m!1") (assert))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: vertical_criterion
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
script:
  (""
   (case "forall (a,b: nzreal): a/b >= 0 IFF sign(a) = sign(b)")
   (("1"
     (label "signlem" -1)
     (hide "signlem")
     (case "FORALL (c1, c3, k: real, c2, c4: nzreal): c1/c2 >= k AND c3/c4 >= k AND sign(c2) = sign(c4) IMPLIES (c2 + c4) /= 0 AND (c1 + c3)/(c2 + c4) >= k")
     (("1"
       (label "divisorlem" -1)
       (hide "divisorlem")
       (skeep)
       (expand "closed_region_3D")
       (flatten)
       (case "sign(vect2(v + w) * vect2(p)) = dir")
       (("1"
         (assert)
         (split 3)
         (("1"
           (rewrite "vect2_add")
           (rewrite "dot_add_left")
           (typepred "dir")
           (expand "sign")
           (lift-if)
           (ground))
          ("2"
           (reveal "signlem")
           (copy -1)
           (inst?)
           (("1"
             (assert)
             (inst - "sq(D) - vect2(s) * vect2(p)" "vect2(v) * vect2(p)")
             (assert))
            ("2" (assert))))
          ("3"
           (both-sides "-" "s`z*eps" 1)
           (("1"
             (assert)
             (rewrite "vz_distr_add")
             (rewrite "vect2_add")
             (rewrite "dot_add_left")
             (reveal "divisorlem")
             (inst - "v`z*(sq(D) - vect2(s) * vect2(p))*eps"
              "w`z*(sq(D) - vect2(s) * vect2(p))*eps" "H-s`z*eps"
              "vect2(v) * vect2(p)" "vect2(w) * vect2(p)")
             (assert))
            ("2" (assert))))
          ("4" (propax))))
        ("2"
         (rewrite "vect2_add")
         (rewrite "dot_add_left")
         (typepred "dir")
         (expand "sign")
         (lift-if)
         (hide 4)
         (ground))))
      ("2"
       (hide-all-but 1)
       (skeep)
       (typepred "sign(c2)")
       (split 1)
       (("1" (expand "sign") (lift-if) (lift-if) (ground))
        ("2"
         (expand "sign")
         (lift-if)
         (lift-if)
         (ground)
         (("1" (cross-mult -5) (cross-mult -6) (cross-mult 2))
          ("2"
           (lift-if)
           (prop)
           (("1" (cross-mult -3) (cross-mult -4) (cross-mult 5) (assert))
            ("2" (cross-mult -1) (cross-mult -2) (cross-mult 6))))))))))
    ("2"
     (hide 2)
     (skeep)
     (typepred "sign(b)")
     (ground)
     (("1"
       (replace -2)
       (expand "sign")
       (lift-if)
       (ground)
       (cross-mult -2))
      ("2"
       (replace -2)
       (expand "sign")
       (lift-if)
       (ground)
       (lemma "posreal_div_posreal_is_posreal")
       (inst - "a" "b")
       (assert))
      ("3"
       (replace -2)
       (expand "sign")
       (lift-if)
       (ground)
       (cross-mult -2))
      ("4"
       (replace -2)
       (expand "sign")
       (lift-if)
       (ground)
       (cross-mult 3))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: vertical_criterion
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "crit_sum_closed?")
   (skeep)
   (name "ddir" "IF abs(s`z) >= H THEN eps*sign(s`z) ELSE -1 ENDIF")
   (expand "vertical_criterion?")
   (flatten)
   (case "vect2(v) = zero")
   (("1"
     (assert)
     (lemma "Delta_gt_0_nzv")
     (inst - "s" "v")
     (assert)
     (flatten)
     (assert)
     (hide-all-but (-3 -5 2))
     (grind))
    ("2"
     (assert)
     (hide 1)
     (hide 1)
     (lemma "closed_region_3D_sum_closed")
     (replace -2)
     (name "ppoint" "s + Theta_D(vect2(s), vect2(v), ddir) * v")
     (("1" (replace -1) (assert) (flatten) (inst?) (assert))
      ("2" (assert))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: vertical_criterion
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "crit_antisymmetric?")
   (skeep)
   (case "FORALL (sss, vvv, nvvv: Vect3, eeeps: Sign): vertical_criterion?(eeeps)(sss,vvv)(nvvv) IMPLIES vertical_criterion?(-eeeps)(-sss,-vvv)(-nvvv)")
   (("1"
     (split)
     (("1" (inst?))
      ("2"
       (inst - "-s" "-v" "-nv" "-eps")
       (case-replace "--eps = eps")
       (("1" (assert)) ("2" (assert))))))
    ("2"
     (hide-all-but 1)
     (skeep)
     (expand "vertical_criterion?")
     (split -1)
     (("1"
       (flatten)
       (hide-all-but (-1 -2 -3 1))
       (expand "zero")
       (expand "vect2")
       (flatten)
       (grind))
      ("2"
       (flatten)
       (hide 1)
       (case "NOT Delta(vect2(-sss), vect2(-vvv)) > 0")
       (("1"
         (hide 2)
         (expand "Delta")
         (case "sqv(vect2(-vvv)) = sqv(vect2(vvv))")
         (("1"
           (case "det(vect2(-sss), vect2(-vvv)) = det(vect2(sss), vect2(vvv))")
           (("1" (assert)) ("2" (hide-all-but 1) (grind))))
          ("2" (hide-all-but 1) (grind))))
        ("2"
         (assert)
         (name "ddir"
               "IF abs((-sss)`z) >= H
                                                                                                                                        THEN -eeeps * sign((-sss)`z)
                                                                                                                                      ELSE -1
                                                                                                                                      ENDIF")
         (replace -1)
         (case "IF abs(sss`z) >= H THEN eeeps * sign(sss`z)
                                                                                                                                     ELSE -1
                                                                                                                                     ENDIF = ddir")
         (("1"
           (replace -1)
           (case "NOT Theta_D(vect2(-sss), vect2(-vvv), ddir) = Theta_D(vect2(sss), vect2(vvv), ddir)")
           (("1"
             (lemma "Theta_D_symm")
             (inst - "ddir" "vvv" "sss")
             (case "vect2(-sss) = -vect2(sss) AND vect2(-vvv) = -vect2(vvv)")
             (("1" (flatten) (assert)) ("2" (hide-all-but 1) (grind))))
            ("2"
             (assert)
             (replace -1)
             (name "ppoint"
                   "sss + Theta_D(vect2(sss), vect2(vvv), ddir) * vvv")
             (replace -1)
             (case "NOT -ppoint = -sss + Theta_D(vect2(sss), vect2(vvv), ddir) * -vvv")
             (("1"
               (name "TD11" "Theta_D(vect2(sss), vect2(vvv), ddir)")
               (replace -1)
               (hide-all-but (-2 1))
               (grind))
              ("2"
               (replace -1 :dir rl)
               (expand "closed_region_3D")
               (assert)
               (flatten)
               (split 2)
               (("1" (hide-all-but (-1 1)) (grind))
                ("2"
                 (case "sign(vect2(-nvvv) * vect2(-ppoint)) = sign(vect2(nvvv) * vect2(ppoint))")
                 (("1" (replace -1) (propax))
                  ("2" (hide-all-but 1) (grind))))
                ("3"
                 (case "vect2(-sss) * vect2(-ppoint) = vect2(sss) * vect2(ppoint) AND vect2(-nvvv) * vect2(-ppoint) = vect2(nvvv) * vect2(ppoint)")
                 (("1" (flatten) (assert))
                  ("2" (hide-all-but 1) (grind))))
                ("4"
                 (case "vect2(-sss) * vect2(-ppoint) = vect2(sss) * vect2(ppoint) AND vect2(-nvvv) * vect2(-ppoint) = vect2(nvvv) * vect2(ppoint)")
                 (("1"
                   (flatten)
                   (replace -1)
                   (replace -2)
                   (case "(-sss)`z = -sss`z AND (-nvvv)`z = -nvvv`z")
                   (("1" (flatten) (assert))
                    ("2" (hide-all-but 1) (grind))))
                  ("2" (hide-all-but 1) (grind))))
                ("5"
                 (case "abs(sss`z) >= H")
                 (("1"
                   (case "abs((-sss)`z) = abs(sss`z)")
                   (("1" (replace -1) (assert))
                    ("2" (hide-all-but 1) (grind))))
                  ("2"
                   (case "abs((-sss)`z) = abs(sss`z)")
                   (("1" (replace -1) (assert))
                    ("2" (hide-all-but 1) (grind))))))))))
            ("3"
             (lemma "Delta_gt_0_nzv")
             (inst - "-sss" "-vvv")
             (assert))))
          ("2" (hide-all-but (-1 1)) (grind))))))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: vertical_criterion
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (case "NOT (forall (sz,vz,epsils, tlt, tln, H: real): epsils*sz >= H AND epsils*(sz + tlt*vz) >= H AND tlt >= 0 AND tln >=0 AND tln <= tlt IMPLIES epsils*(sz+tln*vz) >= H)")
   (("1"
     (hide 2)
     (case "NOT (FORALL (mz, bz, tz1,tz2,tz3: real): mz+tz1*bz >= 0 AND mz+tz3*bz >= 0 AND tz1 <= tz2 AND tz2 <= tz3 IMPLIES mz + tz2*bz >= 0)")
     (("1"
       (hide 2)
       (skeep)
       (both-sides "-" "mz" -1)
       (("1"
         (both-sides "-" "mz" -2)
         (("1"
           (both-sides "-" "mz" 1)
           (("1"
             (assert)
             (case "bz = 0")
             (("1" (assert))
              ("2"
               (case "bz > 0")
               (("1" (div-by -2 "bz") (div-by 2 "bz") (assert))
                ("2" (div-by -2 "-bz") (div-by 3 "-bz") (assert))))))
            ("2" (assert))))
          ("2" (assert))))
        ("2" (assert))))
      ("2"
       (skosimp*)
       (inst - "epsils!1*sz!1 - H!1" "epsils!1*vz!1" "0" "tln!1" "tlt!1")
       (assert))))
    ("2"
     (label "signlem" -1)
     (hide -1)
     (skeep)
     (expand "vertical_criterion?")
     (split -1)
     (("1"
       (flatten)
       (expand "conflict?")
       (skosimp*)
       (mult-by -2 "nnt!1")
       (add-formulas -1 -3)
       (case "nv`z * eps * nnt!1 + eps * s`z = abs(s`z + nnt!1 * nv`z)")
       (("1" (assert))
        ("2" (hide-all-but (-1 1)) (typepred "eps") (grind))))
      ("2"
       (flatten)
       (label "Deltagt0" -1)
       (label "Thetagt0" -2)
       (label "conflictnv" -4)
       (name "ddir"
             "IF abs(s`z) >= H
                                                                                                                                                                                           THEN eps * sign(s`z)
                                                                                                                                                                                           ELSE -1
                                                                                                                                                                                           ENDIF")
       (label "ddirname" -1)
       (name "ppoint" "s + Theta_D(vect2(s), vect2(v), ddir) * v")
       (("1"
         (label "ppointname" -1)
         (replace -2)
         (replace -1)
         (expand "closed_region_3D")
         (assert)
         (flatten)
         (name "ttime"
               "(sq(D) - vect2(s) * vect2(ppoint)) / (vect2(nv) * vect2(ppoint))")
         (label "ttimename" -1)
         (replace -1)
         (case "ttime > 0")
         (("1"
           (label "ttimegt0" -1)
           (hide -1)
           (label "scases" -9)
           (split "scases")
           (("1"
             (flatten)
             (label "gtH" -1)
             (case "ddir = 1 OR ddir = -1")
             (("1"
               (split -1)
               (("1"
                 (replace -1)
                 (hide -1)
                 (hide "ddirname")
                 (case "eps*s`z >= H")
                 (("1"
                   (expand "conflict?")
                   (skosimp*)
                   (case "nnt!1 <= ttime")
                   (("1"
                     (reveal "signlem")
                     (inst - "s`z" "nv`z" "eps" "ttime" "nnt!1" "H")
                     (assert)
                     (case "abs(s`z + nnt!1*nv`z) = s`z * eps + nv`z * eps * nnt!1")
                     (("1" (assert))
                      ("2"
                       (hide-all-but (-1 1))
                       (typepred "eps")
                       (grind))))
                    ("2"
                     (lemma "closed_region_3D_t_direction")
                     (inst - "ppoint" "s" "nnt!1" "nv")
                     (assert)
                     (replace "ttimename")
                     (expand "sign")
                     (lift-if)
                     (hide "scases")
                     (ground)
                     (name "VW" "vect2(s) + nnt!1*vect2(nv)")
                     (replace -1)
                     (lemma "vectors_2D.cauchy_schwarz")
                     (inst - "VW" "vect2(ppoint)")
                     (assert)
                     (case "sq(VW*vect2(ppoint)) < sq(D)*sq(D)")
                     (("1"
                       (lemma "sq_lt")
                       (inst - "VW*vect2(ppoint)" "sq(D)")
                       (("1" (assert) (expand "sq") (assert))
                        ("2"
                         (case "sqv(VW)*sqv(vect2(ppoint)) < sq(D) * sq(D)")
                         (("1" (assert))
                          ("2"
                           (lemma "posreal_times_posreal_is_posreal")
                           (inst - "sq(D) - sqv(VW)" "sq(D)")
                           (assert))))))
                      ("2"
                       (case "sqv(vect2(ppoint)) = sq(D)")
                       (("1" (mult-by -16 "sq(D)") (assert))
                        ("2"
                         (lemma "Theta_D_unique")
                         (inst - "v" "s" "Theta_D(vect2(s),vect2(v),1)")
                         (assert)
                         (replace "ppointname" :dir rl)
                         (rewrite "vect2_add")
                         (rewrite "vect2_scal"))))))))
                  ("2" (hide-all-but ("gtH" "scases" 1)) (grind))))
                ("2"
                 (replace -1)
                 (hide -1)
                 (expand "conflict?")
                 (skosimp*)
                 (case "eps*s`z <=-H")
                 (("1"
                   (case "nnt!1 >= ttime")
                   (("1"
                     (case "s`z * eps + nv`z * nnt!1 * eps >= s`z * eps + nv`z * ttime * eps")
                     (("1"
                       (case "s`z * eps + nv`z * nnt!1 * eps = abs(s`z + nv`z*nnt!1)")
                       (("1" (assert))
                        ("2"
                         (hide-all-but (-1 1 -13))
                         (typepred "eps")
                         (grind))))
                      ("2"
                       (case "nv`z * ttime * eps >= 0")
                       (("1"
                         (div-by -1 "ttime")
                         (mult-by -1 "(nnt!1 - ttime)")
                         (assert))
                        ("2" (assert))))))
                    ("2"
                     (lemma "closed_region_3D_t_direction")
                     (inst - "ppoint" "s" "nnt!1" "nv")
                     (assert)
                     (replace "ttimename")
                     (case "sq(D) - (vect2(s) + nnt!1 * vect2(nv)) * vect2(ppoint) >= 0")
                     (("1" (expand "sign") (lift-if) (ground))
                      ("2"
                       (name "VW" "vect2(s) + nnt!1*vect2(nv)")
                       (replace -1)
                       (lemma "vectors_2D.cauchy_schwarz")
                       (inst - "VW" "vect2(ppoint)")
                       (assert)
                       (case "sq(VW*vect2(ppoint)) < sq(D)*sq(D)")
                       (("1"
                         (lemma "sq_lt")
                         (inst - "VW*vect2(ppoint)" "sq(D)")
                         (assert)
                         (expand "sq")
                         (propax))
                        ("2"
                         (case "sqv(VW)*sqv(vect2(ppoint)) < sq(D) * sq(D)")
                         (("1" (assert))
                          ("2"
                           (lemma "posreal_times_posreal_is_posreal")
                           (inst - "sq(D) - sqv(VW)" "sq(D)")
                           (assert)
                           (case "sqv(vect2(ppoint)) = sq(D)")
                           (("1" (mult-by -18 "sq(D)") (assert))
                            ("2"
                             (lemma "Theta_D_unique")
                             (inst - "v" "s"
                              "Theta_D(vect2(s),vect2(v),-1)")
                             (replace "ppointname" :dir rl)
                             (rewrite "vect2_add")
                             (rewrite "vect2_scal")
                             (assert))))))))))))
                  ("2" (hide-all-but ("gtH" "scases" 1)) (grind))))))
              ("2"
               (hide-all-but ("scases" 1))
               (typepred "sign(s`z)")
               (typepred "eps")
               (ground))))
            ("2"
             (flatten)
             (replace -2)
             (case "eps*s`z < H")
             (("1"
               (expand "conflict?")
               (skosimp*)
               (case "nnt!1 >= ttime")
               (("1"
                 (case "s`z * eps + nv`z * nnt!1 * eps >= s`z * eps + nv`z * ttime * eps")
                 (("1"
                   (case "s`z * eps + nv`z * nnt!1 * eps = abs(s`z + nv`z*nnt!1)")
                   (("1" (assert))
                    ("2"
                     (hide-all-but (-1 1 -13))
                     (typepred "eps")
                     (grind))))
                  ("2"
                   (case "nv`z * ttime * eps >= 0")
                   (("1"
                     (div-by -1 "ttime")
                     (mult-by -1 "(nnt!1 - ttime)")
                     (assert))
                    ("2" (reveal "ttimegt0") (assert))))))
                ("2"
                 (lemma "closed_region_3D_t_direction")
                 (inst - "ppoint" "s" "nnt!1" "nv")
                 (assert)
                 (replace "ttimename")
                 (case "sq(D) - (vect2(s) + nnt!1 * vect2(nv)) * vect2(ppoint) >= 0")
                 (("1" (expand "sign") (lift-if) (ground))
                  ("2"
                   (name "VW" "vect2(s) + nnt!1*vect2(nv)")
                   (replace -1)
                   (lemma "vectors_2D.cauchy_schwarz")
                   (inst - "VW" "vect2(ppoint)")
                   (assert)
                   (case "sq(VW*vect2(ppoint)) < sq(D)*sq(D)")
                   (("1"
                     (lemma "sq_lt")
                     (inst - "VW*vect2(ppoint)" "sq(D)")
                     (assert)
                     (expand "sq")
                     (propax))
                    ("2"
                     (case "sqv(VW)*sqv(vect2(ppoint)) < sq(D) * sq(D)")
                     (("1" (assert))
                      ("2"
                       (lemma "posreal_times_posreal_is_posreal")
                       (inst - "sq(D) - sqv(VW)" "sq(D)")
                       (assert)
                       (case "sqv(vect2(ppoint)) = sq(D)")
                       (("1" (assert))
                        ("2"
                         (lemma "Theta_D_unique")
                         (inst - "v" "s" "Theta_D(vect2(s),vect2(v),-1)")
                         (replace "ppointname" :dir rl)
                         (rewrite "vect2_add")
                         (rewrite "vect2_scal")
                         (assert))))))))))))
              ("2" (hide-all-but (-1 1)) (typepred "eps") (grind))))))
          ("2"
           (case "ttime = 0")
           (("1"
             (replace -1)
             (hide -1)
             (cross-mult -1)
             (case "sq(D) - vect2(s) * vect2(ppoint) /= 0")
             (("1" (assert))
              ("2"
               (flatten)
               (hide -2)
               (assert)
               (expand "Delta")
               (expand "conflict?")
               (skosimp*)
               (case "line_solution?(s,v)")
               (("1"
                 (skosimp*)
                 (lemma "line_solution_Delta")
                 (inst - "s" "v")
                 (case "EXISTS (eps: Sign): line_solution?(vect2(s), vect2(v), eps)")
                 (("1" (assert)) ("2" (inst + "eps!1"))))
                ("2"
                 (lemma "line_solution_rewrite")
                 (inst - "v" "s")
                 (("1"
                   (replace 1)
                   (assert)
                   (inst + "Theta_D(vect2(s),vect2(v),ddir)")
                   (lemma "Theta_D_unique")
                   (inst - "v" "s" "Theta_D(vect2(s), vect2(v), ddir)")
                   (assert)
                   (case "sqv(vect2(s) + Theta_D(vect2(s), vect2(v), ddir) * vect2(v)) = sq(D)")
                   (("1"
                     (assert)
                     (name "td" "Theta_D(vect2(s), vect2(v), ddir)")
                     (replace -1)
                     (case "vect2(v)*vect2(ppoint) = 0")
                     (("1"
                       (replace "ppointname" -1 rl)
                       (hide-all-but (-1 1))
                       (grind))
                      ("2"
                       (case "vect2(s)*vect2(ppoint) = vect2(ppoint)*vect2(ppoint)")
                       (("1"
                         (case "vect2(s)*vect2(ppoint) = (vect2(s) + td*vect2(v))*vect2(ppoint)")
                         (("1"
                           (case "td*(vect2(v)*vect2(ppoint)) = 0")
                           (("1" (div-by -1 "td") (assert))
                            ("2"
                             (hide-all-but ("ppointname" -1 1))
                             (grind))))
                          ("2"
                           (case "vect2(s) + td * vect2(v) = vect2(ppoint)")
                           (("1" (expand "sqv") (assert))
                            ("2"
                             (replace "ppointname" + rl)
                             (hide-all-but 1)
                             (grind))))))
                        ("2"
                         (replace "ppointname" + rl)
                         (expand "sqv")
                         (rewrite "vect2_add")
                         (rewrite "vect2_scal")
                         (replace -2)
                         (replace "ppointname" -4 :dir rl)
                         (rewrite "vect2_add")
                         (rewrite "vect2_scal")
                         (assert))))))
                    ("2"
                     (assert)
                     (case "ddir = 1 or ddir = -1")
                     (("1" (hide-all-but (-1 2)) (ground))
                      ("2"
                       (hide (2 3 4 5 6 7 8 9))
                       (flatten)
                       (hide-all-but ("ddirname" 1 2))
                       (typepred "sign(s`z)")
                       (typepred "eps")
                       (lift-if)
                       (ground))))))
                  ("2"
                   (lemma "vectors_2D.cauchy_schwarz")
                   (inst - "s" "ppoint")
                   (case "sqv(vect2(s)) * sqv(vect2(ppoint)) < sq(D) * sq(D)")
                   (("1" (expand "sq") (assert))
                    ("2"
                     (case "sqv(vect2(ppoint)) = sq(D)")
                     (("1" (mult-by 2 "sq(D)") (assert))
                      ("2"
                       (lemma "Theta_D_unique")
                       (inst - "v" "s" "Theta_D(vect2(s),vect2(v),ddir)")
                       (replace "ppointname" :dir rl)
                       (rewrite "vect2_add")
                       (rewrite "vect2_scal")
                       (assert)
                       (case "ddir = -1 or ddir = 1")
                       (("1" (ground))
                        ("2"
                         (hide-all-but ("ddirname" 1))
                         (typepred "eps")
                         (typepred "sign(s`z)")
                         (lift-if)
                         (ground))))))))))
                ("3"
                 (lemma "vectors_2D.cauchy_schwarz")
                 (inst - "s" "ppoint")
                 (case "sqv(vect2(s)) * sqv(vect2(ppoint)) < sq(D) * sq(D)")
                 (("1" (expand "sq") (assert))
                  ("2"
                   (case "sqv(vect2(ppoint)) = sq(D)")
                   (("1" (mult-by 2 "sq(D)") (assert))
                    ("2"
                     (lemma "Theta_D_unique")
                     (inst - "v" "s" "Theta_D(vect2(s),vect2(v),ddir)")
                     (replace "ppointname" :dir rl)
                     (rewrite "vect2_add")
                     (rewrite "vect2_scal")
                     (assert)
                     (case "ddir = -1 or ddir = 1")
                     (("1" (ground))
                      ("2"
                       (hide-all-but ("ddirname" 1))
                       (typepred "eps")
                       (typepred "sign(s`z)")
                       (lift-if)
                       (ground))))))))))))
            ("2" (assert))))))
        ("2"
         (hide-all-but (-1 1))
         (typepred "eps")
         (typepred "sign(s`z)")
         (lift-if)
         (ground))
        ("3" (assert))))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: vertical_criterion
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (name "cpred"
         "(LAMBDA (ss:Vect3,vv:Vect3): (LAMBDA (ww:Vect3): conflict?(ss,ww)))")
   (lemma "sum_indep_coordinated_antisym")
   (skeep)
   (inst - "cpred" "vertical_criterion?" "eps")
   (split -)
   (("1"
     (expand "coordinated?")
     (inst - "vo" "vi" "nvo" "nvi" "s")
     (expand "cpred")
     (assert))
    ("2" (lemma "vertical_criterion_antisymmetric") (propax))
    ("3"
     (lemma "vertical_criterion_sum_closed")
     (inst - "eps")
     (expand "crit_sum_closed?")
     (expand "sum_independent?")
     (skosimp*)
     (inst - "s!1" "v!1" "nv!1" "nw!1")
     (assert)
     (lemma "vertical_criterion_independence")
     (inst - "eps" "nv!1+nw!1" "s!1" "v!1")
     (assert)
     (expand "cpred")
     (propax))
    ("4"
     (expand "sum_closed?")
     (skosimp*)
     (expand "cpred")
     (lemma "conflict_sum_closed")
     (inst - "s!1" "nv!1" "nw!1")
     (assert))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: vertical_criterion
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (name "DIR"
         "sign(IF abs(s`z) >= H THEN eps * sign(s`z) ELSE -1 ENDIF)")
   (label "dirname" -1)
   (case "IF abs(s`z) >= H THEN eps * sign(s`z) ELSE -1 ENDIF = DIR")
   (("1"
     (label "dirname2" -1)
     (replace "dirname2" +)
     (beta)
     (flatten)
     (label "horizontal_sol" -8)
     (hide "horizontal_sol")
     (label "deltapos" -3)
     (label "Thetadpos" -4)
     (label "Thetahpos" -5)
     (label "epssign" -6)
     (label "onDD" -7)
     (label "vc" 2)
     (label "vznz" 1)
     (lemma "Delta_gt_0_nzv")
     (inst?)
     (assert)
     (label "vnz" -1)
     (expand "vertical_criterion?")
     (replace "dirname2" +)
     (assert)
     (expand "closed_region_3D")
     (name "TD" "Theta_D(s,vo-vi,DIR)")
     (label "tdname" -1)
     (replace "tdname")
     (assert)
     (name "TH" "Theta_H(s`z,(vo-vi)`z,-DIR)")
     (label "thname" -1)
     (replace "thname")
     (hide "dirname")
     (rewrite "vect2_add")
     (rewrite "vect2_scal")
     (lemma "Theta_D_on_D")
     (inst? -1)
     (assert)
     (label "onD" -1)
     (case "eps*(eps*H) = H")
     (("1"
       (label "epsepsH" -1)
       (assert)
       (case "vect2(nvo - vi) * (vect2(s) + TD * vect2(vo - vi)) = 0")
       (("1"
         (hide "vc")
         (lemma "tangent_vector_not_conflict")
         (inst - "DIR" "s" "TH" "vo-vi" "nvo-vi")
         (assert)
         (lemma "Theta_D_positive_conflict")
         (inst?)
         (assert)
         (lemma "Theta_D_lt")
         (inst?)
         (assert)
         (hide-all-but ("Thetadpos" -1 1 "tdname"))
         (typepred "DIR")
         (ground))
        ("2"
         (assert)
         (label "notline" 1)
         (case "sign(vect2(nvo - vi) * (vect2(s) + TD * vect2(vo - vi))) = DIR")
         (("1"
           (label "signdir" -1)
           (assert)
           (case "(sq(D) - vect2(s) * (vect2(s) + TD * vect2(vo - vi))) /
                                                      (vect2(nvo - vi) * (vect2(s) + TD * vect2(vo - vi))) = TH")
           (("1"
             (assert)
             (replace -1)
             (label "thquot" -1)
             (reveal "horizontal_sol")
             (case "(nvo-vi)`z = (vo-vi)`z")
             (("1"
               (label "relhoriz" -1)
               (name "newz" "s`z + (vo-vi)`z*TH")
               (label "newzname" -1)
               (replace "relhoriz")
               (case "eps*newz >= H")
               (("1"
                 (replace -2 -1 rl)
                 (assert)
                 (hide-all-but ("dirname2" "vc"))
                 (grind))
                ("2"
                 (case "abs(newz) >= H")
                 (("1"
                   (replace "newzname")
                   (hide-all-but (-1 1 "epssign"))
                   (grind))
                  ("2" (lemma "Theta_H_on_H") (inst?) (assert))))))
              ("2" (hide-all-but ("horizontal_sol" 1)) (grind))))
            ("2"
             (hide "vc")
             (cross-mult 1)
             (hide-all-but ("onDD" 1))
             (grind))))
          ("2"
           (hide "vc")
           (lemma "tangent_line_intersection_v_independent")
           (inst - "TH" "TD" "s" "vo-vi" "nvo-vi")
           (split -1)
           (("1"
             (replace -1 + :dir rl)
             (lemma "Theta_D_horizontal_dir")
             (inst - "DIR" "s" "vo-vi")
             (assert)
             (lemma "vectors_2D.dot_comm")
             (inst?)
             (replace -1)
             (replace "tdname")
             (name "const343"
                   "vect2(vo - vi) * (vect2(s) + TD * vect2(vo - vi))")
             (replace -1)
             (case "const343 /= 0")
             (("1" (hide-all-but (-1 -4 1)) (typepred "DIR") (grind))
              ("2"
               (replace -1 :dir rl)
               (hide -1)
               (hide -2)
               (hide -2)
               (flatten)
               (replace -1)
               (lemma "Delta_eq_0_dot_on_D")
               (inst - "(vect2(s) + TD * vect2(vo - vi))" "vo-vi")
               (assert)
               (lemma "Delta_eq")
               (inst - "s" "TD" "vo-vi")
               (assert))))
            ("2" (assert))))))))
      ("2" (hide-all-but 1) (typepred "eps") (ground))))
    ("2" (hide 2) (typepred "eps") (grind))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: vertical_criterion
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
script:
  (""
   (skeep)
   (split)
   (("1"
     (flatten)
     (expand "vertical_criterion?")
     (name "dir1"
           "IF abs(s`z) >= H THEN eps * sign(s`z)
                                                       ELSE -1
                                                       ENDIF")
     (replace -1)
     (label "dir1name" -1)
     (hide "dir1name")
     (split -)
     (("1" (propax))
      ("2"
       (flatten)
       (hide 1)
       (expand "safe_p")
       (case "NOT safe_dir(s,v,eps) = dir1")
       (("1" (reveal "dir1name") (expand "safe_dir" 1) (propax))
        ("2"
         (replace -1)
         (assert)
         (expand "intersects_half_plane?")
         (expand "closed_region_3D")
         (flatten)
         (assert)
         (case "eps*(eps*H) = H")
         (("1" (assert)) ("2" (typepred "eps") (ground))))))))
    ("2"
     (flatten)
     (split -)
     (("1" (expand "vertical_criterion?") (flatten) (assert))
      ("2"
       (name "dir1"
             "IF abs(s`z) >= H THEN eps * sign(s`z)
                                                             ELSE -1
                                                             ENDIF")
       (label "dir1name" -1)
       (case "NOT safe_dir(s,v,eps) = dir1")
       (("1" (expand "safe_dir" 1) (propax))
        ("2"
         (replace -1)
         (flatten)
         (case "NOT vect2(v) = zero")
         (("1"
           (case "vect2(v)*(vect2(s) + Theta_D(s,v,dir1)*vect2(v)) /= 0")
           (("1"
             (label "dpnz" -1)
             (hide "dpnz")
             (expand "intersects_half_plane?")
             (expand "safe_p")
             (replace -1)
             (flatten)
             (case "eps*(eps*H) = H")
             (("1"
               (replace -1)
               (hide -1)
               (expand "vertical_criterion?")
               (expand "closed_region_3D")
               (replace "dir1name")
               (flatten)
               (hide 3)
               (assert)
               (split 3)
               (("1"
                 (case "forall (a,b: nzreal): a/b >= 0 IFF sign(a) = sign(b)")
                 (("1"
                   (label "signlem" -1)
                   (inst -
                    "(sq(D) -
                                                              vect2(s) * vect2((s + Theta_D(vect2(s), vect2(v), dir1) * v)))"
                    "(vect2(nv) * vect2((s + Theta_D(vect2(s), vect2(v), dir1) * v)))")
                   (("1"
                     (assert)
                     (replace -1 :dir rl)
                     (hide -1)
                     (lemma "Theta_D_unique")
                     (inst - "v" "s" "Theta_D(s,v,dir1)")
                     (assert)
                     (case "sqv(vect2(s) + Theta_D(vect2(s), vect2(v), dir1) * vect2(v)) = sq(D)")
                     (("1"
                       (hide -2)
                       (replace -1 + :dir rl)
                       (hide -1)
                       (case "(sqv(vect2(s) + Theta_D(vect2(s), vect2(v), dir1) * vect2(v)) -
                                                                                              vect2(s) *
                                                                                               vect2((s + Theta_D(vect2(s), vect2(v), dir1) * v))) = Theta_D(s,v,dir1)*(vect2(v)*(vect2(s) + Theta_D(s,v,dir1)*vect2(v)))")
                       (("1"
                         (replace -1)
                         (hide -1)
                         (case "sign(
                                                                                                   (vect2(v) *
                                                                                                     (vect2(s) + Theta_D(vect2(s), vect2(v), dir1) * vect2(v))))
                                                                                              = dir1")
                         (("1"
                           (hide-all-but (-1 1 -5))
                           (expand "sign")
                           (lift-if)
                           (ground)
                           (("1"
                             (mult-by -1 "Theta_D(s,v,dir1)")
                             (assert))
                            ("2"
                             (mult-by 2 "Theta_D(s,v,dir1)")
                             (assert))))
                          ("2"
                           (hide 2)
                           (lemma "Theta_D_horizontal_dir")
                           (inst - "dir1" "s" "v")
                           (assert)
                           (name "pp"
                                 "vect2(s) + Theta_D(vect2(s), vect2(v), dir1) * vect2(v)")
                           (replace -1)
                           (case "vect2(v)*pp /= 0")
                           (("1"
                             (case "dir1 = 1 OR dir1 = -1")
                             (("1" (hide-all-but (-1 -2 -4 1)) (grind))
                              ("2"
                               (lift-if)
                               (ground)
                               (typepred "eps")
                               (typepred "sign(s`z)")
                               (ground))))
                            ("2" (reveal "dpnz") (assert))))))
                        ("2"
                         (hide-all-but 1)
                         (grind :exclude "Theta_D"))))
                      ("2"
                       (case "dir1 = 1 OR dir1 = -1")
                       (("1"
                         (lemma "Theta_D_unique")
                         (inst - "v" "s" "Theta_D(s,v,dir1)")
                         (ground))
                        ("2"
                         (typepred "eps")
                         (typepred "sign(s`z)")
                         (lift-if)
                         (ground))))))
                    ("2"
                     (flatten)
                     (lemma "Theta_D_unique")
                     (inst - "v" "s" "Theta_D(s,v,dir1)")
                     (assert)
                     (case "sqv(vect2(s) + Theta_D(vect2(s), vect2(v), dir1) * vect2(v)) = sq(D)")
                     (("1"
                       (hide -2)
                       (replace -1 -2 :dir rl)
                       (hide -1)
                       (case "sqv(vect2(s) + Theta_D(vect2(s), vect2(v), dir1) * vect2(v)) -
                                                                vect2(s) * vect2((s + Theta_D[D](vect2(s), vect2(v), dir1) * v)) = Theta_D(s,v,dir1)*(vect2(v)*(vect2((s + Theta_D[D](vect2(s), vect2(v), dir1) * v))))")
                       (("1"
                         (replace -1)
                         (hide -1)
                         (reveal "dpnz")
                         (rewrite "vect2_add")
                         (rewrite "vect2_scal")
                         (flatten)
                         (mult-by 1 "Theta_D(s,v,dir1)")
                         (assert))
                        ("2"
                         (hide-all-but 1)
                         (grind :exclude "Theta_D"))))
                      ("2"
                       (assert)
                       (case "dir1 = 1 OR dir1 = -1")
                       (("1" (ground))
                        ("2"
                         (typepred "eps")
                         (typepred "sign(s`z)")
                         (lift-if)
                         (ground))))))))
                  ("2"
                   (hide-all-but 1)
                   (skeep)
                   (ground)
                   (("1"
                     (expand "sign")
                     (lift-if)
                     (lift-if)
                     (assert)
                     (ground)
                     (("1" (mult-by -2 "-b") (assert))
                      ("2"
                       (lift-if)
                       (ground)
                       (mult-by -2 "b")
                       (assert))))
                    ("2"
                     (expand "sign")
                     (lift-if)
                     (lift-if)
                     (ground)
                     (("1" (mult-by 1 "b") (assert))
                      ("2"
                       (lift-if)
                       (ground)
                       (mult-by 3 "-b")
                       (assert))))))))
                ("2" (lift-if) (ground))))
              ("2" (typepred "eps") (ground))))
            ("2"
             (lemma "Delta_eq_0_dot_on_D")
             (inst - "vect2(s) + Theta_D(s,v,dir1)*vect2(v)" "v")
             (("1"
               (assert)
               (split -)
               (("1"
                 (lemma "Delta_eq")
                 (inst - "s" "Theta_D(s,v,dir1)" "v")
                 (assert))
                ("2"
                 (lemma "Theta_D_unique")
                 (inst - "v" "s" "Theta_D(s,v,dir1)")
                 (assert)
                 (case "dir1 = 1 OR dir1 = -1")
                 (("1" (ground))
                  ("2"
                   (typepred "eps")
                   (typepred "sign(s`z)")
                   (lift-if)
                   (ground))))
                ("3" (hide-all-but (1 2)) (grind :exclude "Theta_D"))))
              ("2" (assert))))
            ("3" (assert))))
          ("2" (lemma "Delta_gt_0_nzv") (inst - "s" "v") (assert))))))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: criteria_3D
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "criterion_3D?")
   (split)
   (("1"
     (flatten)
     (lemma "horizontal_criterion_independence")
     (inst -1 "sp" "nv")
     (flatten)
     (hide -2)
     (split -1)
     (("1"
       (hide-all-but (-4 1))
       (lemma "vertical_horizontal_conflict")
       (inst?)
       (assert))
      ("2" (inst? 1))))
    ("2"
     (flatten)
     (hide -2)
     (lemma "vertical_criterion_independence")
     (inst -1 "epsv" "nv" "sp" "v")
     (assert))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: criteria_3D
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "criterion_3D?")
   (ground)
   (("1"
     (lemma "horizontal_criterion_coordination")
     (inst - "epsh" "nvi" "nvo" "sp" "vi" "vo")
     (rewrite "vect2_sub")
     (rewrite "vect2_sub")
     (assert)
     (rewrite "vect2_neg")
     (assert)
     (split -)
     (("1"
       (hide-all-but (-6 1))
       (rewrite "vect2_sub" :dir rl)
       (lemma "vertical_horizontal_conflict")
       (inst?)
       (assert))
      ("2"
       (hide-all-but (-5 1))
       (rewrite "vect2_sub" :dir rl)
       (lemma "vertical_horizontal_conflict")
       (inst?)
       (assert))))
    ("2" (hide-all-but (-1 -3)) (grind))
    ("3"
     (case "nvi-vo-(vi-vo) = nvi-vi")
     (("1"
       (replace -1)
       (hide -1)
       (lemma " horizontal_criterion_special_coordination")
       (inst - "epsh" "nvo" "nvi" "-sp" "vi")
       (rewrite "vect2_sub" :dir rl)
       (rewrite "vect2_sub" :dir rl)
       (rewrite "vect2_neg" :dir rl)
       (assert)
       (hide-all-but (-6 1))
       (rewrite "vect2_neg")
       (rewrite "vect2_sub" :dir rl)
       (case-replace "vect2(nvi-nvo)=-vect2(nvo-nvi)")
       (("1"
         (rewrite "horizontal_conflict_symm")
         (lemma "vertical_horizontal_conflict")
         (inst?)
         (assert))
        ("2" (hide -) (grind))))
      ("2" (hide -) (grind))))
    ("4" (hide-all-but (-1 -3)) (grind))
    ("5"
     (lemma "vertical_criterion_coordination")
     (inst -1 "epsv" "nvi" "nvo" "sp" "vi" "vo")
     (assert))
    ("6"
     (lemma "vertical_criterion_coordination")
     (inst -1 "epsv" "nvi" "nvo" "sp" "vi" "vo")
     (assert))
    ("7"
     (case "nvo-vi-(vo-vi) = nvo-vo")
     (("1"
       (replace -1)
       (lemma " horizontal_criterion_special_coordination")
       (inst - "epsh" "nvi" "nvo" "sp" "vo")
       (hide -2)
       (rewrite "vect2_sub" :dir rl)
       (rewrite "vect2_sub" :dir rl)
       (rewrite "vect2_sub" :dir rl)
       (rewrite "vect2_neg")
       (assert)
       (hide-all-but (-6 1))
       (lemma "vertical_horizontal_conflict")
       (inst?)
       (assert))
      ("2" (hide -) (grind))))
    ("8"
     (lemma "vertical_criterion_coordination")
     (inst -1 "epsv" "nvi" "nvo" "sp" "vi" "vo")
     (assert))
    ("9"
     (lemma "vertical_criterion_coordination")
     (inst -1 "epsv" "nvi" "nvo" "sp" "vi" "vo")
     (assert))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: opt_trk_gs
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (assert)
   (rewrite "dot_sub_right")
   (expand "k_opt")
   (rewrite "sqv" :dir rl)
   (assert))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: opt_trk_gs
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (beta)
   (flatten)
   (expand "opt_trk_gs_vertical?")
   (flatten)
   (expand "opt_trk_gs_vertical")
   (lift-if)
   (split -1)
   (("1"
     (flatten)
     (assert)
     (typepred
      "opt_trk_gs_dot(t * (s + Theta_D(s, vo - vi, dir) * (vo - vi)), vo, vi,
                                 sq(D) - s * (s + Theta_D(s, vo - vi, dir) * (vo - vi)))")
     (replaces -5 :dir rl)
     (hide-all-but (-2 2))
     (grind :exclude "Theta_D"))
    ("2" (flatten))))


proof_type: t_proof
decl_type: tcc
library: ACCoRD
theory: opt_trk_gs
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "optimal?")
   (skeep)
   (lemma "le_rel")
   (inst? -1)
   (inst -1 "vi")
   (assert)
   (hide 2)
   (expand "le?")
   (both-sides-f 1 "sq")
   (("1"
     (rewrite "sq_norm")
     (rewrite "sq_norm")
     (case "sqv(vo2 - vi - (vo - vi)) = sqv(k * nzv - (vo - vi)) + sqv(vo2-vi-k*nzv)")
     (("1" (assert))
      ("2"
       (hide 2)
       (name-replace "a" "k * nzv - (vo - vi)" :hide? nil)
       (name-replace "b" "vo2 - vi - k * nzv" :hide? nil)
       (case-replace "vo2 - vi - (vo - vi) = a+b")
       (("1"
         (hide -1)
         (rewrite "sqv_add")
         (assert)
         (cancel-by 1 "2")
         (hide 1)
         (expand "parallel?")
         (skeep -4)
         (lemma "k_opt_tangent")
         (inst?)
         (assert)
         (replaces -4 :dir rl)
         (replace -3)
         (case-replace " vo2 - vi - k * nzv = vo2 - (k * nzv + vi)")
         (("1"
           (hide -1)
           (replaces -2)
           (replaces -3)
           (rewrite "dot_scal_right")
           (lemma "dot_comm")
           (inst?)
           (replaces -1)
           (replace -1)
           (assert))
          ("2" (hide-all-but 1) (grind))))
        ("2" (replaces (-1 -2) :dir rl) (hide-all-but 1) (grind))))))
    ("2" (rewrite "sq_le"))))


proof_type: t_proof
decl_type: tcc
library: ACCoRD
theory: opt_trk_gs
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (name-replace "opto"
    "opt_trk_gs_line(Vdir(u, vo - vi), vo, vi + W0(u, j))")
   (typepred "opto")
   (case "W0(u,j) + opto`1 * Vdir(u, vo - vi) = opto`2 - vi")
   (("1" (replaces -1 :dir rl) (rewrite "W_dot"))
    ("2" (replaces -1) (hide-all-but 1) (grind :exclude "W0"))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: opt_vertical
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "opt_vertical?")
   (flatten)
   (expand "opt_vertical" :assert? none)
   (case-replace "vo`z = vi`z")
   (("1" (replaces -2) (assert))
    ("2"
     (name "DIR"
           "sign(IF abs(sp`z) >= H THEN epsv * sign(sp`z) ELSE -1 ENDIF)")
     (case "IF abs(sp`z) >= H THEN epsv * sign(sp`z) ELSE -1 ENDIF = DIR")
     (("1"
       (hide -2)
       (replace -1)
       (assert)
       (lift-if -2)
       (split -2)
       (("1"
         (flatten)
         (split -3)
         (("1" (flatten) (replaces -2) (rewrite "vect2_sub"))
          ("2" (flatten) (replaces -1) (assert))))
        ("2" (flatten) (replaces -1) (assert))))
      ("2" (hide-all-but (-1 1)) (typepred "epsv") (grind))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: opt_vertical
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "opt_vertical?")
   (flatten)
   (expand "opt_vertical" :assert? none)
   (case-replace "vo`z = vi`z")
   (("1" (replaces -2) (assert))
    ("2"
     (name "DIR"
           "sign(IF abs(s`z) >= H THEN epsv * sign(s`z) ELSE -1 ENDIF)")
     (case "IF abs(s`z) >= H THEN epsv * sign(s`z) ELSE -1 ENDIF = DIR")
     (("1"
       (hide -2)
       (replace -1)
       (assert)
       (lift-if -2)
       (split -2)
       (("1"
         (flatten)
         (split -3)
         (("1"
           (flatten)
           (hide -1)
           (name-replace "opto"
            "opt_trk_gs_vertical(vect2(s), vect2(vo), vect2(vi),
                                                                                      Theta_H(s`z, (vo - vi)`z, -DIR), DIR)"
            :hide? nil)
           (("1"
             (lemma "opt_trk_gs_vertical_on_D")
             (inst -1 "DIR" "opto" "s" "Theta_H(s`z, (vo - vi)`z, -DIR)"
              "vi" "vo")
             (("1"
               (beta)
               (split -1)
               (("1"
                 (flatten)
                 (lemma "horizontal_meets_vertical_criterion")
                 (inst -1 "epsv" "nvo" "s" "vi" "vo")
                 (replaces -9)
                 (replaces -6)
                 (assert)
                 (rewrite "vect2_sub")
                 (rewrite "vect2_sub")
                 (assert))
                ("2"
                 (expand "opt_trk_gs_vertical?")
                 (assert)
                 (flatten)
                 (replaces -1)
                 (replaces -2)
                 (assert))))
              ("2" (assert))))
            ("2" (assert))))
          ("2" (flatten) (replaces -1) (assert))))
        ("2" (flatten) (replaces -1) (assert))))
      ("2" (hide-all-but (-1 1)) (typepred "epsv") (grind))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: circle_solutions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "vertical_conflict?")
   (expand "circle_solution?")
   (flatten)
   (case-replace "v`z = 0")
   (("1" (expand "vertical_solution?" -5) (assert))
    ("2" (assert) (lemma "vertical_solution_Theta_H") (inst?) (assert))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: circle_solutions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "horizontal_conflict?")
   (expand "circle_solution?")
   (flatten)
   (case-replace "vect2(v) = zero")
   (("1" (expand "circle_solution_2D?" -4) (flatten) (assert))
    ("2" (assert) (lemma "circle_solution_2D_Theta_D") (inst?) (assert))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: circle_solutions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "circle_solution?")
   (flatten)
   (expand "circle_solution_2D?")
   (flatten)
   (expand "vertical_solution?")
   (flatten)
   (expand "circle_criterion?")
   (rewrite "vect2_add")
   (rewrite "vect2_scal")
   (assert)
   (rewrite "vz_distr_add")
   (rewrite "vz_scal")
   (assert))


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


proof_type: t_proof
decl_type: tcc
library: ACCoRD
theory: circle_solutions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (assert)
   (expand "circle_solution?")
   (flatten)
   (lemma "circle_solution_2D_Delta_ge_0")
   (inst?)
   (assert))


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


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: trk_circle
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "trk_circle?")
   (flatten)
   (skeep -1)
   (expand "trk_circle")
   (lift-if)
   (split -)
   (("1" (flatten) (replaces -2) (rewrite "vect2_zero"))
    ("2"
     (flatten)
     (split -)
     (("1"
       (flatten)
       (name-replace "t" "Theta_H(s`z, vo`z - vi`z, -dir)")
       (name-replace "trk"
        "trk_only_circle(vect2(s), vect2(vo), vect2(vi),t,dir,irt)"
        :hide? nil)
       (("1"
         (rewrite "vect2_sub")
         (case-replace "vect2(nvo) = trk")
         (("1"
           (lemma "trk_only_circle_solution")
           (inst? -1)
           (("1"
             (assert)
             (inst -1 "vect2(vo)")
             (expand "trk_only_circle?")
             (inst 1 "irt")
             (assert))
            ("2" (assert))))
          ("2"
           (hide-all-but (-3 1))
           (replaces -1)
           (expand "vect2")
           (decompose-equality 1))))
        ("2" (assert))))
      ("2" (flatten) (replaces -1) (rewrite "vect2_zero"))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: trk_circle
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "trk_circle_solution_2D")
   (inst?)
   (assert)
   (expand "circle_solution?")
   (expand "vertical_solution?")
   (hide -1)
   (expand "trk_circle?")
   (flatten)
   (skeep -1)
   (expand "trk_circle")
   (lift-if)
   (split -)
   (("1" (flatten) (replaces -2) (rewrite "vect2_zero"))
    ("2"
     (flatten)
     (split -)
     (("1"
       (flatten)
       (lemma "Theta_H_on_H")
       (inst?)
       (skoletin -1)
       (replace -1 :dir rl)
       (assert)
       (split +)
       (("1" (rewrite "vz_distr_sub") (assert))
        ("2"
         (rewrite "vz_distr_sub")
         (replaces -3)
         (assert)
         (lemma "Theta_H_vertical_dir")
         (inst?)
         (assert))))
      ("2" (flatten) (replaces -1) (rewrite "vect2_zero"))))))


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


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: trk_circle
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "circle_solution?")
   (flatten)
   (name-replace "t" "Theta_H(s`z, vo`z - vi`z, -dir)" :hide? nil)
   (lemma "trk_only_circle_complete")
   (rewrite "vect2_sub")
   (inst -1 "dir" "nvo" "s" "t" "vi" "vo")
   (("1"
     (assert)
     (expand "trk_circle?")
     (expand "trk_only_circle?")
     (flatten)
     (assert)
     (skeep -1)
     (inst 4 "irt")
     (expand "trk_circle")
     (replaces -2)
     (replaces -1 :dir rl)
     (replaces -2)
     (hide-all-but 4)
     (assert))
    ("2" (assert))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: trk_circle
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (skoletin 1 :postfix "p")
   (flatten)
   (expand "trk_vertical?")
   (assert)
   (expand "trk_vertical")
   (lift-if)
   (split -1)
   (("1" (flatten) (inst 2 "1"))
    ("2"
     (flatten)
     (split -1)
     (("1" (flatten) (inst 3 "-1")) ("2" (flatten) (inst 5 "1"))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: trk_circle
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "trk_vertical?")
   (flatten)
   (skeep -1)
   (expand "trk_vertical_irt" :assert? none)
   (case-replace "vo`z = vi`z")
   (("1" (replaces -2) (assert))
    ("2"
     (name "DIR"
           "sign(IF abs(sp`z) >= H THEN epsv * sign(sp`z) ELSE -1 ENDIF)")
     (case "IF abs(sp`z) >= H THEN epsv * sign(sp`z) ELSE -1 ENDIF = DIR")
     (("1"
       (hide -2)
       (replace -1)
       (assert)
       (lift-if -2)
       (split -2)
       (("1"
         (flatten)
         (split -3)
         (("1" (flatten) (replaces -2) (rewrite "vect2_sub"))
          ("2" (flatten) (replaces -1) (assert))))
        ("2" (flatten) (replaces -1) (assert))))
      ("2" (hide-all-but (-1 1)) (typepred "epsv") (grind))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: trk_circle
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "trk_vertical?")
   (flatten)
   (skeep -1)
   (expand "trk_vertical_irt" :assert? none)
   (case-replace "vo`z = vi`z")
   (("1" (replaces -2) (assert))
    ("2"
     (name "DIR"
           "sign(IF abs(s`z) >= H THEN epsv * sign(s`z) ELSE -1 ENDIF)")
     (case "IF abs(s`z) >= H THEN epsv * sign(s`z) ELSE -1 ENDIF = DIR")
     (("1"
       (hide -2)
       (replace -1)
       (assert)
       (lift-if -2)
       (split -2)
       (("1"
         (flatten)
         (split -3)
         (("1"
           (flatten)
           (hide -1)
           (name-replace "trko"
            "trk_only_vertical(vect2(s), vect2(vo), vect2(vi),
                                                                                      Theta_H(s`z, (vo - vi)`z, -DIR), DIR,irt)"
            :hide? nil)
           (("1"
             (lemma "trk_only_vertical_on_D")
             (inst -1 "DIR" "trko" "s" "Theta_H(s`z, (vo - vi)`z, -DIR)"
              "vi" "vo")
             (("1"
               (beta)
               (split -1)
               (("1"
                 (flatten)
                 (lemma "horizontal_meets_vertical_criterion")
                 (inst -1 "epsv" "nvo" "s" "vi" "vo")
                 (replaces -9)
                 (replaces -6)
                 (assert)
                 (rewrite "vect2_sub")
                 (rewrite "vect2_sub")
                 (assert))
                ("2"
                 (expand "trk_only_vertical?")
                 (split 1)
                 (("1" (flatten) (replaces -1) (replaces -2) (assert))
                  ("2" (inst 1 "irt") (replaces -1))))))
              ("2" (assert))))
            ("2" (assert))))
          ("2" (flatten) (replaces -1) (assert))))
        ("2" (flatten) (replaces -1) (assert))))
      ("2" (hide-all-but (-1 1)) (typepred "epsv") (grind))))))


proof_type: t_proof
decl_type: tcc
library: ACCoRD
theory: trk_circle
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (skeep 2)
   (skeep 2)
   (typepred
    "trk_only_circle(vect2(s), vect2(vo), vect2(vi),t, dir,irt)")
   (("1" (replaces -4 :dir rl) (assert)) ("2" (assert))))


proof_type: t_proof
decl_type: tcc
library: ACCoRD
theory: trk_circle
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (assert)
   (typepred
    "trk_only_vertical(vect2(s!1), vect2(vo!1), vect2(vi!1), t!1, dir!1,
                             irt!1)")
   (assert))


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


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: gs_circle
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "gs_circle?")
   (flatten)
   (skeep -1)
   (expand "gs_circle")
   (lift-if)
   (split -)
   (("1" (flatten) (replaces -2) (rewrite "vect2_zero"))
    ("2"
     (flatten)
     (name-replace "t" "Theta_H(s`z, vo`z - vi`z, -dir)")
     (split -)
     (("1"
       (flatten)
       (name-replace "gsoc"
        "gs_only_circle(vect2(s), vect2(vo), vect2(vi),t,dir,irt)" :hide?
        nil)
       (("1"
         (rewrite "vect2_sub")
         (lemma "gs_only_circle_solution")
         (inst -1 "dir" "gsoc" "s" "t" "vi" "vo")
         (("1"
           (case-replace "vect2(nvo)=gsoc")
           (("1"
             (assert)
             (expand "gs_only_circle?")
             (inst 1 "irt")
             (assert))
            ("2"
             (hide-all-but (-4 1))
             (replaces -1)
             (expand "vect2")
             (decompose-equality 1))))
          ("2" (assert))))
        ("2" (assert))))
      ("2" (flatten) (replaces -1) (rewrite "vect2_zero"))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: gs_circle
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "circle_solution?")
   (expand "vertical_solution?")
   (lemma "gs_circle_solution_2D")
   (inst?)
   (assert)
   (hide -1)
   (expand "gs_circle?")
   (flatten)
   (skeep -1)
   (expand "gs_circle")
   (lift-if)
   (split -)
   (("1" (flatten) (replaces -2) (rewrite "vect2_zero"))
    ("2"
     (flatten)
     (split -)
     (("1"
       (flatten)
       (assert)
       (lemma "Theta_H_on_H")
       (inst? -1)
       (skoletin -1)
       (replace -1 :dir rl)
       (split +)
       (("1" (rewrite "vz_distr_sub") (assert))
        ("2"
         (hide (-2 3))
         (rewrite "vz_distr_sub")
         (replaces -3)
         (assert)
         (lemma "Theta_H_vertical_dir")
         (inst?)
         (assert))))
      ("2" (flatten) (replaces -1) (rewrite "vect2_zero"))))))


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


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: gs_circle
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "circle_solution?")
   (flatten)
   (name-replace "t" "Theta_H(s`z, vo`z - vi`z, -dir)" :hide? nil)
   (lemma "gs_only_circle_complete")
   (rewrite "vect2_sub")
   (inst -1 "dir" "nvo" "s" "t" "vi" "vo")
   (("1"
     (assert)
     (expand "gs_circle?")
     (expand "gs_only_circle?")
     (flatten)
     (assert)
     (skeep -1)
     (inst 3 "irt")
     (expand "gs_circle")
     (replaces -2)
     (replaces -1 :dir rl)
     (replaces -2)
     (hide-all-but 3)
     (assert))
    ("2" (assert))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: gs_circle
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "gs_vertical?")
   (flatten)
   (expand "gs_vertical" :assert? none)
   (case-replace "vo`z = vi`z")
   (("1" (replaces -2) (assert))
    ("2"
     (name "DIR"
           "sign(IF abs(sp`z) >= H THEN epsv * sign(sp`z) ELSE -1 ENDIF)")
     (case "IF abs(sp`z) >= H THEN epsv * sign(sp`z) ELSE -1 ENDIF = DIR")
     (("1"
       (hide -2)
       (replace -1)
       (assert)
       (lift-if -2)
       (split -2)
       (("1"
         (flatten)
         (split -3)
         (("1" (flatten) (replaces -2) (rewrite "vect2_sub"))
          ("2" (flatten) (replaces -1) (assert))))
        ("2" (flatten) (replaces -1) (assert))))
      ("2" (hide-all-but (-1 1)) (typepred "epsv") (grind))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: gs_circle
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "gs_vertical?")
   (flatten)
   (expand "gs_vertical" :assert? none)
   (case-replace "vo`z = vi`z")
   (("1" (replaces -2) (assert))
    ("2"
     (name "DIR"
           "sign(IF abs(s`z) >= H THEN epsv * sign(s`z) ELSE -1 ENDIF)")
     (case "IF abs(s`z) >= H THEN epsv * sign(s`z) ELSE -1 ENDIF = DIR")
     (("1"
       (hide -2)
       (replace -1)
       (assert)
       (lift-if -2)
       (split -2)
       (("1"
         (flatten)
         (split -3)
         (("1"
           (flatten)
           (hide -1)
           (name-replace "gso"
            "gs_only_vertical(vect2(s), vect2(vo), vect2(vi),
                                                                  Theta_H(s`z, (vo - vi)`z, -DIR), DIR)"
            :hide? nil)
           (("1"
             (lemma "gs_only_vertical_on_D")
             (inst -1 "DIR" "gso" "s" "Theta_H(s`z, (vo - vi)`z, -DIR)"
              "vi" "vo")
             (("1"
               (beta)
               (split -1)
               (("1"
                 (flatten)
                 (lemma "horizontal_meets_vertical_criterion")
                 (inst -1 "epsv" "nvo" "s" "vi" "vo")
                 (replaces -9)
                 (replaces -6)
                 (assert)
                 (rewrite "vect2_sub")
                 (rewrite "vect2_sub")
                 (assert))
                ("2"
                 (expand "gs_only_vertical?")
                 (assert)
                 (flatten)
                 (replaces -1)
                 (replaces -2)
                 (assert))))
              ("2" (assert))))
            ("2" (assert))))
          ("2" (flatten) (replaces -1) (assert))))
        ("2" (flatten) (replaces -1) (assert))))
      ("2" (hide-all-but (-1 1)) (typepred "epsv") (grind))))))


proof_type: t_proof
decl_type: tcc
library: ACCoRD
theory: gs_circle
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (skeep 2)
   (skeep 2)
   (typepred
    "gs_only_circle(vect2(s), vect2(vo), vect2(vi), t, dir, irt)")
   (("1"
     (replaces -4 :dir rl)
     (case-replace "vect2(nvo2 WITH [z |-> vo`z]) = nvo2")
     (("1" (assert))
      ("2" (hide-all-but 1) (expand "vect2") (decompose-equality 1))))
    ("2" (assert))))


proof_type: t_proof
decl_type: tcc
library: ACCoRD
theory: gs_circle
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (assert)
   (typepred
    "gs_only_vertical(vect2(s!1), vect2(vo!1), vect2(vi!1), t!1, dir!1)")
   (assert))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: vs_only
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "circle_criterion?")
   (flatten)
   (rewrite "vect2_add")
   (rewrite "vect2_add")
   (rewrite "vect2_scal")
   (rewrite "vect2_scal")
   (assert)
   (lemma "vertical_sep_dir_at")
   (inst -1 "-eps" "nnt" "v`z" "s`z" "vz")
   (assert)
   (hide -2 -4)
   (expand* "+" "*")
   (ground))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: vs_only
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "horizontal_conflict")
   (inst?)
   (assert)
   (flatten)
   (lemma "Theta_D_entry_gt_0")
   (inst?)
   (assert)
   (name-replace "tentry" "Theta_D(ss,vgs,Entry)" :hide? nil)
   (lemma "circle_vs_only_ge")
   (inst -1 "Entry" "tentry" "ss" "vgs" "vs_at(ss`z, tentry, eps)")
   (("1"
     (skoletin -1)
     (assert)
     (hide 2)
     (lemma "vs_at_H")
     (inst?)
     (expand "circle_criterion?")
     (rewrite "vect2_add")
     (rewrite "vect2_scal")
     (case-replace
      "(ss + tentry * (vgs WITH [z := vs_at(ss`z, tentry, eps)]))`z =
               ss`z+tentry*vs_at(ss`z,tentry,eps)")
     (("1"
       (hide -1)
       (replaces -1)
       (lemma "Theta_D_on_D")
       (inst?)
       (assert)
       (lemma "sdotv_lt_0")
       (inst? -1)
       (rewrite "horizontal_conflict_entry")
       (assert)
       (rewrite "sign_abs")
       (lemma "sign_mult_pos")
       (inst -1 "H" "eps")
       (assert)
       (replaces -1)
       (rewrite "sign_id")
       (assert)
       (case-replace "eps*(eps*H) = H" :hide? nil)
       (("1"
         (assert)
         (expand "vs_at")
         (hide-all-but (-1 -6 -10 -11 1))
         (grind-reals)
         (cancel-by 1 "H"))
        ("2" (hide-all-but 1) (typepred "eps") (hide -1) (grind))))
      ("2" (hide-all-but 1) (expand* "+" "*"))))
    ("2" (assert))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: vs_only
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "horizontal_conflict")
   (inst?)
   (assert)
   (flatten)
   (lemma "Theta_D_exit_gt_0")
   (inst?)
   (assert)
   (replaces -1)
   (name-replace "texit" "Theta_D(s, vgs, Exit)" :hide? nil)
   (expand "circle_criterion?")
   (lemma "vs_at_H")
   (inst?)
   (case-replace "(s+texit*vgs)`z = s`z+texit*vgs`z")
   (("1"
     (hide -1)
     (replace -7 :dir rl)
     (replaces -1)
     (rewrite "vect2_add")
     (rewrite "vect2_scal")
     (lemma "Theta_D_on_D")
     (inst?)
     (assert)
     (case "abs(eps*H) >= H")
     (("1"
       (assert)
       (split 1)
       (("1"
         (lemma "not_horizontal_conflict_exit")
         (inst?)
         (assert)
         (lemma "horizontal_conflict")
         (inst?)
         (assert)
         (lemma "Delta_eq")
         (inst?)
         (assert))
        ("2"
         (replaces -8)
         (expand "vs_at")
         (cancel-by 1 "H")
         (hide-all-but (-7 2))
         (typepred "eps")
         (cross-mult 1)
         (grind))))
      ("2" (hide-all-but 1) (typepred "eps") (grind))))
    ("2" (hide-all-but 1) (expand* "+" "*"))))


proof_type: t_proof
decl_type: tcc
library: ACCoRD
theory: vs_only
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (rewrite "horizontal_conflict")
   (flatten)
   (lemma "Theta_D_exit_gt_0")
   (inst?)
   (assert))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: vs_circle
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "vs_circle?")
   (flatten)
   (expand "vs_circle")
   (lift-if)
   (split -)
   (("1"
     (flatten)
     (expand "vertical_criterion?")
     (flatten)
     (hide 3)
     (assert)
     (rewrite "vect2_sub")
     (rewrite "vz_distr_sub")
     (replace -1)
     (expand "horizontal_conflict?")
     (skosimp*)
     (replace -3)
     (assert)
     (typepred "sp")
     (assert)
     (grind))
    ("2"
     (flatten)
     (expand "vertical_criterion?")
     (flatten)
     (split -1)
     (("1"
       (flatten)
       (split -)
       (("1"
         (flatten)
         (assert)
         (lemma "Delta_gt_0_nzv")
         (inst?)
         (assert)
         (hide 1)
         (hide 2)
         (flatten)
         (name-replace "vso"
          "vs_only(sp, vect2(vo - vi), Theta_D(vect2(sp), vect2(vo - vi), 1),
                                                                                                                                                                                                                          eps)"
          :hide? nil)
         (label "vsoname" -1)
         (name "ddir"
               "IF abs(sp`z) >= H THEN eps * sign(sp`z)
                                                                                                                                                                                 ELSE -1
                                                                                                                                                                                 ENDIF")
         (label "ddirname" -1)
         (case "ddir = 1 or ddir = -1")
         (("1"
           (label "ddirtp" -1)
           (replace "ddirname")
           (lift-if)
           (replaces -5)
           (expand "closed_region_3D")
           (assert)
           (rewrite "vect2_sub")
           (rewrite "vect2_sub")
           (rewrite "vect2_add")
           (("1"
             (rewrite "vect2_scal")
             (("1"
               (rewrite "vz_distr_sub")
               (case "eps*(eps*H) = H")
               (("1"
                 (assert)
                 (name "thetad"
                       "Theta_D(vect2(sp), vect2(vo) - vect2(vi), ddir)")
                 (("1"
                   (replace -1)
                   (label "thetadname" -1)
                   (name "ppoint" "vect2(sp) + thetad * vect2(vo - vi)")
                   (label "ppointname" -1)
                   (replace -1)
                   (case "sqv(ppoint) = sq(D)")
                   (("1"
                     (assert)
                     (case "NOT (vect2(vo) - vect2(vi)) * ppoint = 0")
                     (("1"
                       (assert)
                       (lemma "Theta_D_line_intersection")
                       (inst - "ddir" "sp" "vect2(vo)-vect2(vi)")
                       (assert)
                       (replace "thetadname")
                       (rewrite "vect2_sub")
                       (replace "ppointname")
                       (assert)
                       (replace -1)
                       (lemma "Theta_D_positive_conflict")
                       (inst - "sp" "vect2(vo)-vect2(vi)")
                       (assert)
                       (label "td1pos" -1)
                       (case "sign((vect2(vo) - vect2(vi)) * ppoint) = ddir")
                       (("1"
                         (assert)
                         (expand "vs_only")
                         (lift-if)
                         (split "vsoname")
                         (("1"
                           (flatten)
                           (replace -3 :dir rl)
                           (assert)
                           (hide -3 -13)
                           (split "ddirtp")
                           (("1"
                             (replace -1)
                             (assert)
                             (hide -1)
                             (split "ddirname")
                             (("1"
                               (flatten)
                               (assert)
                               (lemma "vs_at_H")
                               (hide-all-but (-2 -3 -4))
                               (grind))
                              ("2" (propax))))
                            ("2"
                             (replace -1)
                             (hide -1)
                             (split "ddirname")
                             (("1"
                               (flatten)
                               (assert)
                               (lemma "Theta_D_entry_gt_0")
                               (inst - "vect2(vo)-vect2(vi)" "sp")
                               (assert)
                               (lemma "vs_at_H")
                               (inst - "eps" "thetad" "sp`z")
                               (mult-by -1 "eps")
                               (assert))
                              ("2"
                               (assert)
                               (lemma "Theta_D_entry_gt_0")
                               (inst - "vect2(vo)-vect2(vi)" "sp")
                               (assert)
                               (lemma "vs_at_H")
                               (inst - "eps" "thetad" "sp`z")
                               (mult-by -1 "eps")
                               (assert))))))
                          ("2"
                           (flatten)
                           (split -1)
                           (("1"
                             (flatten)
                             (replace -2 :dir rl)
                             (assert)
                             (hide -2 -12 1)
                             (case-replace "eps*sp`z = abs(sp`z)")
                             (("1"
                               (assert)
                               (case "ddir = 1")
                               (("1"
                                 (replace -1)
                                 (assert)
                                 (hide -1)
                                 (lemma "vs_at_H")
                                 (inst?)
                                 (mult-by -1 "eps")
                                 (assert))
                                ("2"
                                 (hide-all-but
                                  (-1 "ddirtp" "ddirname" 1))
                                 (grind))))
                              ("2"
                               (hide-all-but (-1 1))
                               (typepred "eps")
                               (grind))))
                            ("2"
                             (flatten)
                             (replace -1 :dir rl)
                             (assert))))))
                        ("2"
                         (lemma "Theta_D_horizontal_dir")
                         (inst - "ddir" "sp" "vect2(vo)-vect2(vi)")
                         (assert)
                         (replace "thetadname")
                         (replace "ppointname")
                         (hide-all-but (-1 "ddirtp" 1 2))
                         (grind))))
                      ("2"
                       (hide 3)
                       (lemma "on_D_line")
                       (inst - "ppoint" "vo-vi")
                       (assert)
                       (rewrite "vect2_sub")
                       (lemma "vectors_2D.dot_comm")
                       (inst?)
                       (assert)
                       (skosimp*)
                       (lemma "line_solution_Delta")
                       (inst - "ppoint" "vect2(vo)-vect2(vi)")
                       (flatten)
                       (hide -2)
                       (split -1)
                       (("1"
                         (flatten)
                         (replace "ppointname" -1 :dir rl)
                         (lemma "Delta_eq")
                         (inst - "sp" "thetad" "vect2(vo)-vect2(vi)")
                         (assert))
                        ("2" (inst + "eps!1"))))))
                    ("2"
                     (lemma "Theta_D_on_D")
                     (inst?)
                     (assert)
                     (rewrite "vect2_sub")
                     (assert))))
                  ("2"
                   (hide 4)
                   (split "ddirtp")
                   (("1" (replace -1) (assert))
                    ("2" (replace -1) (assert))))))
                ("2" (hide-all-but 1) (typepred "eps") (grind))))
              ("2"
               (hide 4)
               (split "ddirtp")
               (("1" (replace -1) (assert))
                ("2" (replace -1) (assert))))))
            ("2" (hide 4) (ground))))
          ("2" (hide-all-but ("ddirname" 1)) (typepred "eps") (grind))))
        ("2" (flatten) (replace -1) (assert))))
      ("2" (flatten) (replace -1) (assert))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: vs_circle
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (label "vso" -2)
   (label "epsge" -3)
   (expand "vertical_criterion?")
   (name "ddir"
         "IF abs(s`z) >= H THEN eps * sign(s`z)
                                                               ELSE -1
                                                               ENDIF")
   (replace -1)
   (label "ddirname" -1)
   (flatten)
   (split -2)
   (("1"
     (hide 2)
     (flatten)
     (assert)
     (rewrite "vz_distr_sub")
     (rewrite "vz_distr_sub")
     (assert))
    ("2"
     (hide 1)
     (flatten)
     (assert)
     (expand "closed_region_3D")
     (assert)
     (flatten)
     (assert)
     (expand "vs_only?")
     (rewrite "vect2_sub")
     (rewrite "vect2_sub")
     (assert)
     (split 2)
     (("1"
       (rewrite "vect2_add")
       (rewrite "vect2_scal")
       (name "ppoint"
             "vect2(s) + Theta_D(vect2(s), vect2(v), ddir) * vect2(v)")
       (replace -1)
       (replace "vso" :dir rl)
       (name "tt"
             "(sq(D) - vect2(s) * ppoint) / ((vect2(nvo1) - vect2(vi)) * ppoint)")
       (replace -1)
       (case "(nvo2 - vi)`z = (nvo2`z - nvo1`z) + (nvo1 - vi)`z")
       (("1" (replace -1) (copy "epsge") (mult-by -1 "tt") (assert))
        ("2"
         (rewrite "vz_distr_sub")
         (rewrite "vz_distr_sub")
         (assert))))
      ("2" (propax))))))


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


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: vs_circle
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "vs_circle_meets_vertical_criterion")
   (inst-cp -1 "eps" "nvo" "sp" "vi" "vo")
   (inst -1 "-eps" "nvi" "-sp" "vo" "vi")
   (assert)
   (rewrite "vect2_neg")
   (lemma "horizontal_conflict_symm")
   (inst? -1)
   (assert)
   (replaces -1 :dir rl)
   (case-replace "-vect2(vi-vo) = vect2(vo-vi)")
   (("1"
     (hide -1)
     (case "horizontal_conflict?(vect2(sp), vect2(vo - vi))")
     (("1"
       (assert)
       (expand "vs_circle?")
       (flatten)
       (typepred "vs_circle(sp, vo, vi, eps)")
       (assert)
       (typepred "vs_circle(-sp, vi, vo, -eps)")
       (assert)
       (replaces (-7 -8) :dir rl)
       (lemma "vertical_criterion_coordination")
       (inst - "eps" "nvi" "nvo" "sp" "vi" "vo")
       (assert))
      ("2"
       (expand "conflict?")
       (expand "horizontal_conflict?")
       (skosimp*)
       (inst + "nnt!1"))))
    ("2" (hide-all-but 1) (grind))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: vertical_cr
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "hor_circle?")
   (split)
   (("1"
     (expand "gs_vertical?")
     (flatten)
     (typepred "gs_vertical(sp, vo, vi, epsh, epsv)")
     (assert))
    ("2"
     (expand "trk_vertical?")
     (flatten)
     (skeep -1)
     (typepred "trk_vertical_irt(sp, vo, vi, epsh, epsv, irt)")
     (assert))
    ("3"
     (expand "opt_vertical?")
     (flatten)
     (typepred "opt_vertical(sp, vo, vi, epsh, epsv)")
     (assert))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: vertical_cr
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "vertical_cr?")
   (split -2)
   (("1" (lemma "vs_circle_meets_vertical_criterion") (inst?) (assert))
    ("2"
     (expand "hor_circle?")
     (split)
     (("1"
       (lemma "gs_vertical_meets_vertical_criterion")
       (inst?)
       (assert))
      ("2"
       (lemma "trk_vertical_meets_vertical_criterion")
       (inst?)
       (assert))
      ("3"
       (lemma "opt_vertical_meets_vertical_criterion")
       (inst?)
       (assert))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: vertical_cr
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "hor_circle?")
   (split)
   (("1"
     (lemma "gs_vertical_meets_horizontal_criterion")
     (inst?)
     (assert))
    ("2"
     (lemma "trk_vertical_meets_horizontal_criterion")
     (inst?)
     (assert))
    ("3"
     (lemma "opt_vertical_meets_horizontal_criterion")
     (inst?)
     (assert))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: opt_line
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "opt_line_eps?")
   (flatten)
   (expand "opt_line_eps" :assert? none)
   (skoletin -1 :postfix "a")
   (lift-if)
   (split -)
   (("1"
     (flatten)
     (typepred "opt_trk_gs_line(tangent_line(sp, eps),vo, vi)")
     (replaces (-4 -5) :dir rl)
     (expand "tangent_line?")
     (inst?)
     (assert))
    ("2" (flatten))))


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


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal_cr
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "horizontal_cr?")
   (split)
   (("1" (lemma "gs_line_is_line_solution") (inst?) (assert))
    ("2" (lemma "trk_line_is_line_solution") (inst?) (assert))
    ("3" (lemma "opt_line_is_line_solution") (inst?) (assert))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: cr3d
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "cr?")
   (expand "criterion_3D?")
   (flatten)
   (split -2)
   (("1"
     (flatten)
     (hide 2)
     (assert)
     (lemma "horizontal_cr_is_line_solution")
     (inst?)
     (assert)
     (lemma "line_solution_meets_horizontal_criterion")
     (inst?)
     (assert)
     (rewrite "vect2_sub" :dir rl))
    ("2"
     (case-replace "nvo - vi - (vo - vi) = nvo-vo")
     (("1"
       (hide -1)
       (lemma "vertical_horizontal_conflict")
       (inst -1 "sp" "vo-vi")
       (assert)
       (flatten)
       (lemma "vertical_cr_meets_vertical_criterion")
       (inst?)
       (assert)
       (lemma "hor_circle_meets_horizontal_criterion")
       (inst -1 "hst(vect2(sp), vect2(vo - vi))" "vst(sp, vo - vi)" "nvo"
        "sp" "vi" "vo")
       (split -1)
       (("1" (assert)) ("2" (assert))
        ("3"
         (expand "vertical_cr?")
         (assert)
         (ground)
         (case-replace "vect2(nvo-vo)=zero")
         (("1" (hide-all-but 4) (grind))
          ("2"
           (hide-all-but (-4 1))
           (expand "vs_circle?")
           (flatten)
           (typepred "vs_circle(sp, vo, vi, vst(sp, vo - vi))")
           (assert)
           (replaces -2 :dir rl)
           (decompose-equality 1)
           (("1" (grind)) ("2" (grind))))))))
      ("2" (hide-all-but 1) (grind))))))


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


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: cr3d
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "cr_satifies_criterion_3D")
   (inst?)
   (assert)
   (hide -3)
   (lemma "cr_satifies_criterion_3D")
   (inst -1 "hst" "nvi" "-sp" "vo" "vi" "vst")
   (assert)
   (split -1)
   (("1"
     (lemma "criterion_3D_coordination")
     (rewrite "vect2_neg")
     (inst -1 "hst(vect2(sp), vect2(vo - vi))" "vst(sp, vo - vi)" "nvi"
      "nvo" "sp" "vi" "vo")
     (assert)
     (typepred "hst")
     (inst?)
     (case-replace "vect2(vi - vo) = -vect2(vo - vi)")
     (("1"
       (hide -1)
       (replaces -1)
       (typepred "vst")
       (inst -1 "sp" "vo-vi")
       (split -1)
       (("1"
         (case-replace "-(vo-vi) = vi-vo")
         (("1" (assert)) ("2" (hide-all-but 1) (grind))))
        ("2" (hide-all-but 1) (flatten) (typepred "sp") (grind))))
      ("2" (hide-all-but 1) (grind))))
    ("2"
     (lemma "conflict_symm")
     (inst -1 "sp" "vo-vi")
     (case-replace "-(vo-vi) = vi-vo")
     (("1" (assert)) ("2" (hide-all-but 1) (grind))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: tca_3D
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "diff_continuous[real,real_dist]")
   (inst - "fullset[real]"
    "(LAMBDA (t:real): sqv(vect2(s) + t * vect2(v)) / sq(D))"
    "(LAMBDA (t:real): sq(s`z + t * v`z) / sq(H))")
   (expand "-" -)
   (assert)
   (hide 2)
   (lemma "vectors_2D.sqv_add")
   (name "hf1" "(LAMBDA (t:real): sqv(vect2(s))/sq(D))")
   (name "hf2" "(LAMBDA (t:real): t*(2*vect2(s)*vect2(v)/sq(D)))")
   (name "hf3" "(LAMBDA (t:real): t*(sqv(vect2(v))/sq(D)))")
   (name "hf4" "(LAMBDA (t:real): t)")
   (case "NOT (LAMBDA (t: real): sqv(vect2(s) + t * vect2(v)) / sq(D)) = hf1 + hf2 + hf3*hf4")
   (("1"
     (hide 2)
     (hide -5)
     (decompose-equality +)
     (hide -)
     (expand "hf1" +)
     (expand "hf2" +)
     (expand "hf3" +)
     (expand "hf4" +)
     (grind))
    ("2"
     (replace -1)
     (name "vf1" "(LAMBDA (t:real): sq(s`z)/sq(H))")
     (name "vf2" "(LAMBDA (t:real): t*(2*s`z*v`z/sq(H)))")
     (name "vf3" "(LAMBDA (t:real): t*(sq(v`z)/sq(H)))")
     (name "vf4" "(LAMBDA (t:real): t)")
     (case "NOT (LAMBDA (t: real): sq(s`z + t * v`z) / sq(H)) = vf1 + vf2 + vf3*vf4")
     (("1"
       (hide 2)
       (decompose-equality +)
       (hide -)
       (expand "vf1" +)
       (expand "vf2" +)
       (expand "vf3" +)
       (expand "vf4" +)
       (grind))
      ("2"
       (replace -1)
       (hide -1)
       (hide -1)
       (hide -1)
       (hide -1)
       (hide -1)
       (hide -1)
       (hide -1)
       (hide -1)
       (hide -1)
       (hide -1)
       (hide -1)
       (split +)
       (("1"
         (lemma "sum_continuous[real,real_dist]")
         (inst - "fullset[real]" "hf1 + hf2" "hf3*hf4")
         (assert)
         (hide 2)
         (split +)
         (("1"
           (lemma "sum_continuous[real,real_dist]")
           (inst?)
           (assert)
           (hide 2)
           (split +)
           (("1"
             (expand "continuous?")
             (skosimp*)
             (expand "continuous_at?")
             (skosimp*)
             (inst + "1")
             (skosimp*)
             (expand "member" +)
             (expand "ball" +)
             (expand "real_dist")
             (expand "hf1" +)
             (assert))
            ("2"
             (expand "hf2")
             (name "cc" "2*vect2(s)*vect2(v)/sq(D)")
             (replace -1)
             (case "cc = 0")
             (("1" (replace -1) (hide -) (grind))
              ("2"
               (expand "continuous?")
               (skosimp*)
               (expand "continuous_at?")
               (skosimp*)
               (inst + "epsilon!1/abs(cc)")
               (("1"
                 (hide -)
                 (skosimp*)
                 (expand "member")
                 (expand "ball")
                 (expand "real_dist")
                 (lemma "abs_mult")
                 (inst - "cc" "x!1-y!1")
                 (assert)
                 (replace -1)
                 (cross-mult -2)
                 (assert))
                ("2"
                 (case "epsilon!1/abs(cc) > 0")
                 (("1" (assert)) ("2" (cross-mult 1) (assert))
                  ("3" (assert))))
                ("3" (assert))))))))
          ("2"
           (lemma "prod_continuous[real,real_dist]")
           (inst?)
           (assert)
           (hide 2)
           (split +)
           (("1"
             (expand "hf3")
             (name "cc" "sqv(vect2(v))/sq(D)")
             (replace -1)
             (case "cc = 0")
             (("1" (replace -1) (hide -) (grind))
              ("2"
               (expand "continuous?")
               (skosimp*)
               (expand "continuous_at?")
               (skosimp*)
               (inst + "epsilon!1/abs(cc)")
               (("1"
                 (hide -)
                 (skosimp*)
                 (expand "member")
                 (expand "ball")
                 (expand "real_dist")
                 (lemma "abs_mult")
                 (inst - "cc" "x!1-y!1")
                 (assert)
                 (replace -1)
                 (cross-mult -2)
                 (assert))
                ("2"
                 (case "epsilon!1/abs(cc) > 0")
                 (("1" (assert)) ("2" (cross-mult 1) (assert))
                  ("3" (assert))))
                ("3" (assert))))))
            ("2"
             (expand "hf4")
             (expand "continuous?")
             (skosimp*)
             (expand "continuous_at?")
             (skosimp*)
             (inst + "epsilon!1")
             (skosimp*))))))
        ("2"
         (lemma "sum_continuous[real,real_dist]")
         (inst?)
         (assert)
         (hide 2)
         (split)
         (("1"
           (lemma "sum_continuous[real,real_dist]")
           (inst?)
           (assert)
           (hide 2)
           (split)
           (("1" (expand "vf1") (grind :exclude ("fullset" "sq")))
            ("2"
             (expand "vf2")
             (name "cc" "(2 * (s`z * v`z) / sq(H))")
             (replace -1)
             (case "cc = 0")
             (("1" (replace -1) (hide -) (grind))
              ("2"
               (expand "continuous?")
               (skosimp*)
               (expand "continuous_at?")
               (skosimp*)
               (inst + "epsilon!1/abs(cc)")
               (("1"
                 (hide -)
                 (skosimp*)
                 (expand "member")
                 (expand "ball")
                 (expand "real_dist")
                 (lemma "abs_mult")
                 (inst - "cc" "x!1-y!1")
                 (assert)
                 (replace -1)
                 (cross-mult -2)
                 (assert))
                ("2"
                 (case "epsilon!1/abs(cc) > 0")
                 (("1" (assert)) ("2" (cross-mult 1) (assert))
                  ("3" (assert))))
                ("3" (assert))))))))
          ("2"
           (lemma "prod_continuous[real,real_dist]")
           (inst?)
           (assert)
           (hide 2)
           (split)
           (("1"
             (expand "vf3")
             (name "cc" "sq(v`z)/sq(H)")
             (replace -1)
             (case "cc = 0")
             (("1" (replace -1) (hide -) (grind))
              ("2"
               (expand "continuous?")
               (skosimp*)
               (expand "continuous_at?")
               (skosimp*)
               (inst + "epsilon!1/abs(cc)")
               (("1"
                 (hide -)
                 (skosimp*)
                 (expand "member")
                 (expand "ball")
                 (expand "real_dist")
                 (lemma "abs_mult")
                 (inst - "cc" "x!1-y!1")
                 (assert)
                 (replace -1)
                 (cross-mult -2)
                 (assert))
                ("2"
                 (case "epsilon!1/abs(cc) > 0")
                 (("1" (assert)) ("2" (cross-mult 1) (assert))
                  ("3" (assert))))
                ("3" (assert))))))
            ("2"
             (expand "vf4")
             (expand "continuous?")
             (skosimp*)
             (expand "continuous_at?")
             (skosimp*)
             (inst + "epsilon!1")
             (skosimp*))))))))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: tca_3D
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (name "ff"
         "LAMBDA (tr:real): (sqv(vect2(s) + tr*vect2(v))/sq(D) - sq(s`z+tr*v`z)/sq(H))")
   (lemma "cyl_norm_sq_diff_cont")
   (inst - "s" "v")
   (replace -2)
   (case "ff(t1) >= 0")
   (("1"
     (case "ff(t2) <= 0")
     (("1"
       (hide -5)
       (case "EXISTS (t: real):
                                           ((t1 <= t AND t <= t2) OR (t2 <= t AND t <= t1)) AND ff(t) = 0")
       (("1"
         (skosimp*)
         (inst + "t!1")
         (assert)
         (replace -1)
         (hide -1)
         (expand "ff" -1)
         (assert))
        ("2"
         (hide 3)
         (hide 2)
         (hide -4)
         (lemma "real_fun_continuity_equiv")
         (inst - "ff")
         (assert)
         (ground)
         (("1"
           (case "t1 <= t2")
           (("1"
             (assert)
             (lemma "intermediate_value4[t1,t2]")
             (inst - "ff" "0")
             (expand "restrict")
             (split -)
             (("1" (skosimp*) (inst + "c!1") (assert))
              ("2"
               (hide 2)
               (expand "continuous?" (-3 +))
               (skosimp*)
               (inst - "x0!1")
               (expand "continuous?" (-3 +))
               (skosimp*)
               (inst - "epsilon!1")
               (skosimp*)
               (inst + "delta!1")
               (skosimp*)
               (inst - "x!1")
               (assert))))
            ("2"
             (lemma "intermediate_value2[t2,t1]")
             (("1"
               (inst - "ff" "0")
               (("1"
                 (assert)
                 (split -)
                 (("1"
                   (skosimp*)
                   (inst + "c!1")
                   (assert)
                   (expand "restrict")
                   (propax))
                  ("2"
                   (hide 2)
                   (hide 2)
                   (expand "continuous?" (-2 +))
                   (skosimp*)
                   (inst - "x0!1")
                   (expand "continuous?" (-2 +))
                   (expand "restrict")
                   (skosimp*)
                   (inst - "epsilon!1")
                   (skosimp*)
                   (inst + "delta!1")
                   (skosimp*)
                   (inst - "x!1")
                   (assert))
                  ("3" (expand "restrict") (propax))
                  ("4" (expand "restrict") (assert))))
                ("2" (assert))))
              ("2" (assert))))))
          ("2"
           (expand "continuous?" -)
           (expand "continuous?" 1)
           (skosimp*)
           (inst - "x0!1")
           (("1"
             (expand "continuous?" 1)
             (expand "continuous_at?" -)
             (expand "member")
             (expand "ball")
             (expand "real_dist")
             (skosimp*)
             (inst - "epsilon!1")
             (skosimp*)
             (inst + "delta!1")
             (skosimp*)
             (inst - "x!1")
             (("1"
               (assert)
               (split -4)
               (("1" (expand "abs") (lift-if) (ground))
                ("2" (expand "abs" (-1 1)) (lift-if) (ground))))
              ("2" (expand "fullset") (propax))))
            ("2" (expand "fullset") (propax))))))))
      ("2"
       (hide 3)
       (hide -3)
       (expand "ff")
       (hide -)
       (expand "cyl_norm_sq" +)
       (rewrite "vect2_add")
       (rewrite "vect2_scal")
       (rewrite "vz_distr_add")
       (rewrite "vz_scal")
       (expand "max")
       (lift-if)
       (ground))))
    ("2"
     (hide-all-but (-3 1))
     (expand "ff")
     (expand "cyl_norm_sq")
     (rewrite "vect2_add")
     (rewrite "vect2_scal")
     (rewrite "vz_distr_add")
     (rewrite "vz_scal")
     (expand "max")
     (lift-if)
     (ground)
     (replace -2)
     (assert))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: tca_3D
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (name "ff"
         "LAMBDA (tr:real): (sqv(vect2(s) + tr*vect2(v))/sq(D) - sq(s`z+tr*v`z)/sq(H))")
   (lemma "cyl_norm_sq_diff_cont")
   (inst - "s" "v")
   (replace -2)
   (case "ff(t1) <= 0")
   (("1"
     (case "ff(t2) >= 0")
     (("1"
       (hide -5)
       (case "EXISTS (t: real):
                                                                            ((t1 <= t AND t <= t2) OR (t2 <= t AND t <= t1)) AND ff(t) = 0")
       (("1"
         (skosimp*)
         (inst + "t!1")
         (assert)
         (replace -1)
         (hide -1)
         (expand "ff" -1)
         (assert))
        ("2"
         (hide 3)
         (hide 2)
         (hide -4)
         (lemma "real_fun_continuity_equiv")
         (inst - "ff")
         (assert)
         (ground)
         (("1"
           (case "t2 <= t1")
           (("1"
             (assert)
             (lemma "intermediate_value4[t2,t1]")
             (inst - "ff" "0")
             (expand "restrict")
             (split -)
             (("1" (skosimp*) (inst + "c!1") (assert))
              ("2"
               (hide 2)
               (expand "continuous?" (-3 +))
               (skosimp*)
               (inst - "x0!1")
               (expand "continuous?" (-3 +))
               (skosimp*)
               (inst - "epsilon!1")
               (skosimp*)
               (inst + "delta!1")
               (skosimp*)
               (inst - "x!1")
               (assert))))
            ("2"
             (lemma "intermediate_value2[t1,t2]")
             (("1"
               (inst - "ff" "0")
               (("1"
                 (assert)
                 (expand "restrict")
                 (split -)
                 (("1" (skosimp*) (inst + "c!1") (assert))
                  ("2"
                   (hide 2)
                   (hide 2)
                   (expand "continuous?" (-2 +))
                   (skosimp*)
                   (inst - "x0!1")
                   (expand "continuous?" (-2 +))
                   (skosimp*)
                   (inst - "epsilon!1")
                   (skosimp*)
                   (inst + "delta!1")
                   (skosimp*)
                   (inst - "x!1")
                   (assert))))
                ("2" (assert))))
              ("2" (assert))))))
          ("2"
           (expand "continuous?" -)
           (expand "continuous?" 1)
           (skosimp*)
           (inst - "x0!1")
           (("1"
             (expand "continuous?" 1)
             (expand "continuous_at?" -)
             (expand "member")
             (expand "ball")
             (expand "real_dist")
             (skosimp*)
             (inst - "epsilon!1")
             (skosimp*)
             (inst + "delta!1")
             (skosimp*)
             (inst - "x!1")
             (("1"
               (assert)
               (split -4)
               (("1" (expand "abs") (lift-if) (ground))
                ("2" (expand "abs" (-1 1)) (lift-if) (ground))))
              ("2" (expand "fullset") (propax))))
            ("2" (expand "fullset") (propax))))))))
      ("2"
       (hide 3)
       (hide -)
       (expand "ff")
       (expand "cyl_norm_sq" +)
       (rewrite "vect2_add")
       (rewrite "vect2_scal")
       (rewrite "vz_distr_add")
       (rewrite "vz_scal")
       (expand "max")
       (lift-if)
       (ground))))
    ("2"
     (hide-all-but (-3 1))
     (expand "ff")
     (expand "cyl_norm_sq")
     (rewrite "vect2_add")
     (rewrite "vect2_scal")
     (rewrite "vz_distr_add")
     (rewrite "vz_scal")
     (expand "max")
     (lift-if)
     (ground)
     (replace -1)
     (assert))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: tca_3D
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "cyl_norm_sq_fun")
   (expand "cyl_norm_sq")
   (lemma "max_of_convex")
   (inst - "LAMBDA (t:real): sqv(vect2(s + t * v)) / sq(D)"
    "LAMBDA (t:real): sq((s + t * v)`z) / sq(H)")
   (assert)
   (hide 2)
   (lemma "quad_convex")
   (split)
   (("1"
     (name "ac" "sqv(vect2(v))/sq(D)")
     (name "bc" "2*vect2(s)*vect2(v)/sq(D)")
     (name "cc" "sqv(vect2(s))/sq(D)")
     (case "NOT quadratic(ac,bc,cc) = (LAMBDA (t: real): sqv(vect2(s + t * v)) / sq(D))")
     (("1"
       (hide 2)
       (hide -4)
       (decompose-equality)
       (expand "ac" +)
       (expand "bc" +)
       (expand "cc" +)
       (hide -)
       (grind))
      ("2" (replace -1 :dir rl) (inst - "ac" "bc" "cc"))))
    ("2"
     (name "ad" "sq(v`z)/sq(H)")
     (name "bd" "2*s`z*v`z/sq(H)")
     (name "cd" "sq(s`z)/sq(H)")
     (case "NOT quadratic(ad,bd,cd) = (LAMBDA (t: real): sq((s + t * v)`z) / sq(H))")
     (("1"
       (hide-all-but 1)
       (decompose-equality)
       (expand "ad")
       (expand "bd")
       (expand "cd")
       (grind))
      ("2" (replace -1 :dir rl) (inst - "ad" "bd" "cd"))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: tca_3D
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "cyl_norm_sq_fun")
   (expand "cyl_norm_sq")
   (lemma "max_fun_continuous[real,real_dist]")
   (name "fD"
         "LAMBDA (t):
                                    sqv(vect2(s + t * v)) / sq(D)")
   (name "fH"
         "LAMBDA (t):
                                        sq((s + t * v)`z) / sq(H)")
   (inst - "fullset[real]" "fD" "fH")
   (expand "max_fun")
   (replace -1 -3 :dir rl)
   (replace -2 -3 :dir rl)
   (assert)
   (hide 2)
   (name "vf1" "(LAMBDA (t:real): sq(s`z)/sq(H))")
   (name "vf2" "(LAMBDA (t:real): t*(2*s`z*v`z/sq(H)))")
   (name "vf3" "(LAMBDA (t:real): t*(sq(v`z)/sq(H)))")
   (name "vf4" "(LAMBDA (t:real): t)")
   (case "NOT (LAMBDA (t: real): sq((s + t * v)`z) / sq(H)) = vf1 + vf2 + vf3*vf4")
   (("1"
     (hide 2)
     (decompose-equality +)
     (hide -)
     (expand "vf1" +)
     (expand "vf2" +)
     (expand "vf3" +)
     (expand "vf4" +)
     (grind))
    ("2"
     (replace -1)
     (hide -1)
     (hide -1)
     (hide -1)
     (hide -1)
     (hide -1)
     (name "hf1" "(LAMBDA (t:real): sqv(vect2(s))/sq(D))")
     (name "hf2" "(LAMBDA (t:real): t*(2*vect2(s)*vect2(v)/sq(D)))")
     (name "hf3" "(LAMBDA (t:real): t*(sqv(vect2(v))/sq(D)))")
     (name "hf4" "(LAMBDA (t:real): t)")
     (case "NOT (LAMBDA (t: real): sqv(vect2(s + t * v)) / sq(D)) = hf1 + hf2 + hf3*hf4")
     (("1"
       (hide 2)
       (decompose-equality +)
       (hide -)
       (expand "hf1" +)
       (expand "hf2" +)
       (expand "hf3" +)
       (expand "hf4" +)
       (grind))
      ("2"
       (replace -1)
       (split +)
       (("1"
         (lemma "sum_continuous[real,real_dist]")
         (inst?)
         (assert)
         (hide 2)
         (split +)
         (("1"
           (lemma "sum_continuous[real,real_dist]")
           (inst?)
           (assert)
           (hide 2)
           (split +)
           (("1"
             (expand "continuous?")
             (skosimp*)
             (expand "continuous_at?")
             (skosimp*)
             (inst + "1")
             (skosimp*)
             (expand "member" +)
             (expand "ball" +)
             (expand "real_dist")
             (expand "hf1" +)
             (assert))
            ("2"
             (expand "hf2")
             (name "cc" "2*vect2(s)*vect2(v)/sq(D)")
             (replace -1)
             (case "cc = 0")
             (("1" (replace -1) (hide -) (grind))
              ("2"
               (expand "continuous?")
               (skosimp*)
               (expand "continuous_at?")
               (skosimp*)
               (inst + "epsilon!1/abs(cc)")
               (("1"
                 (hide -)
                 (skosimp*)
                 (expand "member")
                 (expand "ball")
                 (expand "real_dist")
                 (lemma "abs_mult")
                 (inst - "cc" "x!1-y!1")
                 (assert)
                 (replace -1)
                 (cross-mult -2)
                 (assert))
                ("2"
                 (case "epsilon!1/abs(cc) > 0")
                 (("1" (assert)) ("2" (cross-mult 1) (assert))
                  ("3" (assert))))
                ("3" (assert))))))))
          ("2"
           (lemma "prod_continuous[real,real_dist]")
           (inst?)
           (assert)
           (hide 2)
           (split +)
           (("1"
             (expand "hf3")
             (name "cc" "sqv(vect2(v))/sq(D)")
             (replace -1)
             (case "cc = 0")
             (("1" (replace -1) (hide -) (grind))
              ("2"
               (expand "continuous?")
               (skosimp*)
               (expand "continuous_at?")
               (skosimp*)
               (inst + "epsilon!1/abs(cc)")
               (("1"
                 (hide -)
                 (skosimp*)
                 (expand "member")
                 (expand "ball")
                 (expand "real_dist")
                 (lemma "abs_mult")
                 (inst - "cc" "x!1-y!1")
                 (assert)
                 (replace -1)
                 (cross-mult -2)
                 (assert))
                ("2"
                 (case "epsilon!1/abs(cc) > 0")
                 (("1" (assert)) ("2" (cross-mult 1) (assert))
                  ("3" (assert))))
                ("3" (assert))))))
            ("2"
             (expand "hf4")
             (expand "continuous?")
             (skosimp*)
             (expand "continuous_at?")
             (skosimp*)
             (inst + "epsilon!1")
             (skosimp*))))))
        ("2"
         (lemma "sum_continuous[real,real_dist]")
         (inst?)
         (assert)
         (hide 2)
         (split)
         (("1"
           (lemma "sum_continuous[real,real_dist]")
           (inst?)
           (assert)
           (hide 2)
           (split)
           (("1" (expand "vf1") (grind :exclude ("fullset" "sq")))
            ("2"
             (expand "vf2")
             (name "cc" "(2 * (s`z * v`z) / sq(H))")
             (replace -1)
             (case "cc = 0")
             (("1" (replace -1) (hide -) (grind))
              ("2"
               (expand "continuous?")
               (skosimp*)
               (expand "continuous_at?")
               (skosimp*)
               (inst + "epsilon!1/abs(cc)")
               (("1"
                 (hide -)
                 (skosimp*)
                 (expand "member")
                 (expand "ball")
                 (expand "real_dist")
                 (lemma "abs_mult")
                 (inst - "cc" "x!1-y!1")
                 (assert)
                 (replace -1)
                 (cross-mult -2)
                 (assert))
                ("2"
                 (case "epsilon!1/abs(cc) > 0")
                 (("1" (assert)) ("2" (cross-mult 1) (assert))
                  ("3" (assert))))
                ("3" (assert))))))))
          ("2"
           (lemma "prod_continuous[real,real_dist]")
           (inst?)
           (assert)
           (hide 2)
           (split)
           (("1"
             (expand "vf3")
             (name "cc" "sq(v`z)/sq(H)")
             (replace -1)
             (case "cc = 0")
             (("1" (replace -1) (hide -) (grind))
              ("2"
               (expand "continuous?")
               (skosimp*)
               (expand "continuous_at?")
               (skosimp*)
               (inst + "epsilon!1/abs(cc)")
               (("1"
                 (hide -)
                 (skosimp*)
                 (expand "member")
                 (expand "ball")
                 (expand "real_dist")
                 (lemma "abs_mult")
                 (inst - "cc" "x!1-y!1")
                 (assert)
                 (replace -1)
                 (cross-mult -2)
                 (assert))
                ("2"
                 (case "epsilon!1/abs(cc) > 0")
                 (("1" (assert)) ("2" (cross-mult 1) (assert))
                  ("3" (assert))))
                ("3" (assert))))))
            ("2"
             (expand "vf4")
             (expand "continuous?")
             (skosimp*)
             (expand "continuous_at?")
             (skosimp*)
             (inst + "epsilon!1")
             (skosimp*))))))))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: tca_3D
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skeep)
   (lemma "closed_intervals_compact")
   (inst - "B1" "B2")
   (("1"
     (lemma "cont_on_compact_min")
     (inst - "closed_intv(B1,B2)" "cyl_norm_sq_fun(s,v)")
     (("1"
       (assert)
       (case "continuous?(cyl_norm_sq_fun(s, v),
                               LAMBDA (x: real): B1 <= x AND x <= B2)")
       (("1"
         (assert)
         (split -)
         (("1"
           (expand "empty?")
           (inst - "B1")
           (expand "member")
           (propax))
          ("2"
           (skosimp*)
           (inst + "s!1")
           (assert)
           (skosimp*)
           (inst - "r!1")
           (assert))))
        ("2"
         (hide -1)
         (hide -1)
         (hide 2)
         (lemma "cyl_norm_sq_fun_cont")
         (inst?)
         (expand "continuous?")
         (skosimp*)
         (inst - "x!1")
         (("1"
           (expand "continuous_at?")
           (skosimp*)
           (inst - "epsilon!1")
           (skosimp*)
           (inst + "delta!1")
           (skosimp*)
           (inst - "y!1")
           (("1" (assert)) ("2" (expand "fullset") (propax))))
          ("2" (expand "fullset") (propax))))))
      ("2" (inst + "B1") (assert) (skosimp*) (assert))))
    ("2" (inst + "B1") (assert) (skosimp*) (assert))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: tca_3D
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (case "FORALL (aa,bb,cc,ZZ:real): aa > 0 IMPLIES (EXISTS (BBB: nnreal): FORALL (xx:real): xx>=BBB IMPLIES quadratic(aa,bb,cc)(xx) >= ZZ)")
   (("1"
     (label "quadlem" -1)
     (hide "quadlem")
     (skeep)
     (case "EXISTS (Bz:nnreal): FORALL (nnt:nnreal): nnt >= Bz IMPLIES cyl_norm_sq_fun(s,v)(nnt) >= cyl_norm_sq_fun(s,v)(0)")
     (("1"
       (skeep -1)
       (lemma "cyl_norm_min_exists")
       (inst - "0" "Bz" "s" "v")
       (assert)
       (skosimp*)
       (inst + "t!1")
       (("1"
         (skosimp*)
         (case "nnt!1 <= Bz")
         (("1" (inst - "nnt!1") (assert))
          ("2" (inst -4 "nnt!1") (inst - "0") (assert))))
        ("2" (assert))))
      ("2"
       (hide 2)
       (case "vect2(v) /= zero IMPLIES EXISTS (BD:nnreal): FORALL (nnt:nnreal): nnt >= BD IMPLIES sqv(vect2(s+nnt*v))/sq(D) >= cyl_norm_sq_fun(s,v)(0)")
       (("1"
         (case "v`z /= 0 IMPLIES EXISTS (BH:nnreal): FORALL (nnt:nnreal): nnt >= BH IMPLIES sq((s+nnt*v)`z)/sq(H) >= cyl_norm_sq_fun(s,v)(0)")
         (("1"
           (case "vect2(v) /= zero OR v`z /= 0")
           (("1"
             (split -)
             (("1"
               (assert)
               (skeep -3)
               (inst + "BD")
               (skosimp*)
               (inst - "nnt!1")
               (assert)
               (hide -1)
               (expand "cyl_norm_sq_fun" + 1)
               (expand "cyl_norm_sq")
               (expand "max")
               (lift-if)
               (ground))
              ("2"
               (assert)
               (hide -3)
               (skeep -2)
               (inst + "BH")
               (skosimp*)
               (inst - "nnt!1")
               (assert)
               (expand "cyl_norm_sq_fun" + 1)
               (expand "cyl_norm_sq")
               (expand "max")
               (lift-if)
               (ground))))
            ("2"
             (hide -)
             (case "v = zero")
             (("1"
               (replace -1)
               (hide 1)
               (hide -)
               (inst + "1")
               (skosimp*)
               (expand "cyl_norm_sq_fun")
               (assert))
              ("2"
               (hide 3)
               (flatten)
               (expand "zero")
               (decompose-equality)
               (("1" (grind)) ("2" (grind))))))))
          ("2"
           (hide-all-but 1)
           (flatten)
           (case "sq(v`z) /= 0")
           (("1"
             (flatten)
             (reveal "quadlem")
             (inst - "sq(v`z)" "2*s`z*v`z" "sq(s`z)"
              "cyl_norm_sq_fun(s,v)(0)*sq(H)")
             (assert)
             (skeep -1)
             (inst + "BBB")
             (skosimp*)
             (inst - "nnt!1")
             (assert)
             (cross-mult 3)
             (grind))
            ("2" (lemma "sq_eq_0") (inst?) (assert))))))
        ("2"
         (hide 2)
         (flatten)
         (reveal "quadlem")
         (inst - "sqv(vect2(v))" "2*vect2(s)*vect2(v)" "sqv(vect2(s))"
          "cyl_norm_sq_fun(s,v)(0)*sq(D)")
         (case "sqv(vect2(v)) > 0")
         (("1"
           (assert)
           (skeep -2)
           (inst + "BBB")
           (skosimp*)
           (inst - "nnt!1")
           (assert)
           (hide -1)
           (cross-mult 2)
           (grind))
          ("2"
           (lemma "vectors_2D.sqv_eq_0")
           (inst - "vect2(v)")
           (assert))))))))
    ("2"
     (hide 2)
     (skeep)
     (name "BB" "max(max((1-bb)/aa,0),ZZ-cc)")
     (("1"
       (name "yy" "max((1-bb)/aa,0)")
       (replace -1)
       (typepred "max(yy,ZZ-cc)")
       (name "rr" "max(yy,ZZ-cc)")
       (replace -1)
       (inst + "BB")
       (("1"
         (replace -5 + :dir rl)
         (skeep)
         (expand "quadratic")
         (case "xx*(aa*xx+bb) >= ZZ-cc")
         (("1" (hide-all-but (-1 1)) (grind))
          ("2"
           (hide 2)
           (case "aa*xx+bb >= 1")
           (("1" (mult-by -1 "xx") (assert))
            ("2"
             (typepred "yy")
             (case "aa*xx >= aa*yy")
             (("1" (cross-mult -2) (assert))
              ("2" (mult-by -9 "aa") (mult-by -5 "aa") (assert))))))))
        ("2" (assert))))
      ("2" (assert))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: tca_3D
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "cyl_norm_sq")
   (expand "max")
   (lift-if)
   (ground)
   (("1"
     (cross-mult 1)
     (lemma "sq_lt")
     (inst?)
     (assert)
     (rewrite "vz_distr_add")
     (rewrite "vz_scal")
     (assert))
    ("2"
     (cross-mult -1)
     (lemma "sq_lt")
     (inst?)
     (assert)
     (rewrite "vz_distr_add")
     (rewrite "vz_scal")
     (assert))
    ("3"
     (rewrite "vect2_add")
     (rewrite "vect2_scal")
     (mult-by -2 "sq(D)")
     (assert)
     (mult-by -1 "sq(D)")
     (assert))
    ("4"
     (rewrite "vect2_add")
     (cross-mult 1)
     (rewrite "vect2_scal")
     (assert))
    ("5"
     (case "sq((s+t*v)`z) < sq(H)")
     (("1"
       (lemma "sq_lt")
       (inst - "abs(s`z + t*v`z)" "H")
       (assert)
       (rewrite "vz_distr_add")
       (rewrite "vz_scal")
       (assert))
      ("2"
       (hide 2)
       (case "sq((s+t*v)`z)/sq(H) < 1")
       (("1" (cross-mult -1) (assert)) ("2" (assert))))))
    ("6"
     (cross-mult -1)
     (rewrite "vect2_add")
     (rewrite "vect2_scal")
     (assert))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: tca_3D
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "cyl_intersect_time")
   (lift-if)
   (lift-if)
   (lift-if)
   (assert)
   (split +)
   (("1" (propax))
    ("2"
     (flatten)
     (split 2)
     (("1" (propax))
      ("2"
       (flatten)
       (split 2)
       (("1" (propax))
        ("2"
         (flatten)
         (rewrite "root2b_root")
         (rewrite "root2b_root")
         (name "aa" "sqv(vect2(v)) / sq(D) - sq(v`z) / sq(H)")
         (replace -1)
         (name "bb" "vect2(s) * vect2(v) / sq(D) - s`z * v`z / sq(H)")
         (replace -1)
         (copy -1)
         (mult-by -1 "2")
         (assert)
         (replace -1)
         (name "cc" "sqv(vect2(s)) / sq(D) - sq(s`z) / sq(H)")
         (replace -1)
         (rewrite "discr2b_discr")
         (hide -)
         (expand "root")
         (case "aa > 0")
         (("1"
           (copy -1)
           (mult-by -1 "2")
           (assert)
           (cross-mult 2)
           (expand "sign")
           (case "sqrt(discr(aa,2*bb,cc)) >= 0")
           (("1" (mult-by -1 "aa") (assert)) ("2" (assert))))
          ("2"
           (expand "sign")
           (assert)
           (case "2*aa < 0")
           (("1"
             (cross-mult 3)
             (case "sqrt(discr(aa,2*bb,cc)) >= 0")
             (("1" (mult-by -1 "-aa") (assert)) ("2" (assert))))
            ("2" (assert))))))))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: tca_3D
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (deftactic squim (&optional (fnum 1))
    (then (isolate fnum l 1) (assert fnum)))
   (skeep)
   (label "exlem" -1)
   (hide "exlem")
   (name "a" "sqv(vect2(v))/sq(D) - sq(v`z)/sq(H)")
   (name "b" "vect2(s)*vect2(v)/sq(D) - s`z*v`z/sq(H)")
   (name "c" "sqv(vect2(s))/sq(D) - sq(s`z)/sq(H)")
   (case "NOT quadratic(a,2*b,c)(t) = 0")
   (("1"
     (hide 2)
     (expand "a" +)
     (expand "b" +)
     (expand "c" +)
     (hide -1)
     (hide -1)
     (hide -1)
     (grind))
    ("2"
     (expand "cyl_intersect_time")
     (replace -2)
     (replace -3)
     (case "(2 * (vect2(s) * vect2(v) / sq(D)) -
                                                                  2 * (s`z * v`z / sq(H))) = 2*b")
     (("1"
       (replace -1)
       (replace -5)
       (lemma "quad2b_eq_0")
       (inst - "a" "b" "c" "t")
       (("1"
         (assert)
         (flatten)
         (skosimp*)
         (inst + "sign(a)*eps!1")
         (lift-if)
         (lift-if)
         (lift-if)
         (assert)
         (split +)
         (("1"
           (flatten)
           (replace -1)
           (replace -2)
           (assert)
           (expand "quadratic")
           (replace -6)
           (reveal "exlem")
           (skosimp*)
           (mult-by -7 "t1!1")
           (mult-by -8 "sq(t1!1)")
           (grind))
          ("2"
           (flatten)
           (split 2)
           (("1"
             (flatten)
             (assert)
             (split 1)
             (("1" (flatten) (assert))
              ("2"
               (flatten)
               (assert)
               (replace -1)
               (expand "quadratic")
               (cross-mult 2)
               (assert))))
            ("2"
             (flatten)
             (case "sign(a)*sign(a) = 1")
             (("1" (assert)) ("2" (typepred "sign(a)") (ground))))))))
        ("2"
         (flatten)
         (replace -1)
         (assert)
         (inst + "1")
         (lift-if)
         (ground)
         (("1"
           (replace -1)
           (expand "quadratic")
           (replace -4)
           (assert)
           (reveal "exlem")
           (skosimp*)
           (rewrite "vect2_add")
           (rewrite "vect2_add")
           (rewrite "vz_distr_add")
           (rewrite "vz_scal")
           (rewrite "vect2_scal")
           (rewrite "vect2_scal")
           (rewrite "sqv_add")
           (rewrite "sq_plus")
           (rewrite "sqv_scal")
           (rewrite "sq_times")
           (assert)
           (rewrite "div_distributes" :dir rl)
           (rewrite "div_distributes" :dir rl)
           (rewrite "div_distributes" :dir rl)
           (rewrite "div_distributes" :dir rl)
           (assert)
           (squim -5)
           (squim -6)
           (squim -7)
           (replace -5)
           (replace -6)
           (assert)
           (replace -7)
           (field))
          ("2" (expand "quadratic") (cross-mult 2) (assert))))))
      ("2" (assert))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: tca_3D
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "tca_3D")
   (decompose-equality -1)
   (inst - "(s,v)")
   (typepred
    "minimum_info(horiz_vert_min_info(s, v),
                                  cyl_intersect_min_info(s, v))")
   (hide -1)
   (name "MIB"
         "minimum_info(horiz_vert_min_info(s, v),
                                                                cyl_intersect_min_info(s, v))")
   (replace -1)
   (name "hvmi" "horiz_vert_min_info(s, v)")
   (replace -1)
   (name "cimi" "cyl_intersect_min_info(s, v)")
   (replace -1)
   (case "MIB`min_dist = cyl_norm_sq(s + tca_3D(s, v) * v)")
   (("1"
     (replace -1)
     (hide -1)
     (case "nnt = 0")
     (("1"
       (hide -8)
       (replace -1)
       (assert)
       (typepred "hvmi")
       (expand "info" -1)
       (assert))
      ("2"
       (label "nntnz" 1)
       (assert)
       (hide 1)
       (split -)
       (("1"
         (flatten)
         (typepred "hvmi")
         (assert)
         (expand "horizontal_tca")
         (assert)
         (replace -4 :dir rl)
         (expand "info" -2)
         (assert))
        ("2"
         (flatten)
         (typepred "hvmi")
         (assert)
         (case "nnt = -s`z/v`z")
         (("1" (replace -1) (assert) (expand "info" -4) (assert))
          ("2" (expand "sq") (assert))))
        ("3"
         (lemma "cyl_intersect_time_id")
         (inst - "s" "nnt" "v")
         (assert)
         (split -)
         (("1"
           (skosimp*)
           (typepred "cimi")
           (inst - "eps!1")
           (assert)
           (expand "info" -1)
           (assert))
          ("2"
           (case "NOT FORALL (zz:real): cyl_norm_sq(s+zz*v) = sqv(vect2(s) + zz*vect2(v))/sq(D)")
           (("1"
             (hide-all-but (1 2))
             (skosimp*)
             (inst + "zz!1")
             (expand "cyl_norm_sq")
             (expand "max")
             (lift-if)
             (ground)
             (("1" (hide +) (grind)) ("2" (hide 1) (grind))))
            ("2"
             (label "normeq" -1)
             (copy -1)
             (hide "normeq")
             (hide 1)
             (inst-cp - "nnt")
             (inst-cp - "tca_3D(s,v)")
             (inst - "0")
             (assert)
             (replace -2)
             (replace -3)
             (case "vect2(v) = zero")
             (("1" (replace -1) (assert))
              ("2"
               (case "sqv(vect2(s) + nnt * vect2(v)) / sq(D) >= hvmi`min_dist")
               (("1" (assert))
                ("2"
                 (hide 3)
                 (expand "hvmi" 1)
                 (typepred "horiz_vert_min_info(s,v)")
                 (assert)
                 (case "horizontal_tca(s,v) >= 0")
                 (("1"
                   (assert)
                   (expand "info" -3)
                   (reveal "normeq")
                   (copy "normeq")
                   (hide "normeq")
                   (inst - "horizontal_tca(s,v)")
                   (replace -1)
                   (assert)
                   (case "sqv(vect2(s) + horizontal_tca(vect2(s), vect2(v)) * vect2(v)) / sq(D) <= sqv(vect2(s) + nnt * vect2(v)) / sq(D)")
                   (("1" (assert))
                    ("2"
                     (lemma "horizontal_tca_min")
                     (inst - "v" "s" "nnt")
                     (lemma "horizontal_sq_dtca_eq")
                     (inst - "v" "s")
                     (replace -1)
                     (hide -1)
                     (assert)
                     (cross-mult 1)
                     (mult-by -1 "sq(D)"))))
                  ("2"
                   (lemma "dot_pos_divergent")
                   (inst - "s" "v")
                   (split -1)
                   (("1"
                     (expand "divergent?")
                     (inst - "nnt")
                     (assert)
                     (expand "dist")
                     (rewrite "sq_dist_norm")
                     (rewrite "sq_dist_norm")
                     (lemma "sqrt_lt")
                     (inst?)
                     (replace -1)
                     (hide -1)
                     (lemma "sq_lt")
                     (inst?)
                     (assert)
                     (lemma "vectors_2D.norm_le_sqv")
                     (inst - "s" "vect2(s)+nnt*vect2(v)")
                     (assert)
                     (expand "info" -4)
                     (assert)
                     (reveal "normeq")
                     (copy -1)
                     (hide "normeq")
                     (inst - "0")
                     (assert)
                     (replace -1)
                     (hide -1)
                     (cross-mult -4)
                     (cross-mult 2))
                    ("2"
                     (assert)
                     (hide-all-but (1 2 4))
                     (expand "horizontal_tca")
                     (cross-mult 2)
                     (ground)
                     (lemma "vectors_2D.sqv_eq_0")
                     (inst?)
                     (assert))))))))))))
          ("3" (propax))))))))
    ("2"
     (expand "MIB" +)
     (hide-all-but 1)
     (expand "tca_3D")
     (expand "minimum_info")
     (lift-if)
     (ground)
     (("1"
       (hide -)
       (expand "horiz_vert_min_info")
       (lift-if)
       (ground)
       (("1"
         (expand "horizontal_min_info")
         (lift-if)
         (expand "info")
         (assert)
         (expand "minimum_info")
         (lift-if)
         (assert))
        ("2"
         (expand "horizontal_min_info")
         (expand "info")
         (expand "minimum_info")
         (lift-if)
         (propax))
        ("3"
         (expand "minimum_info")
         (lift-if)
         (ground)
         (("1"
           (hide -)
           (expand "horizontal_min_info")
           (lift-if)
           (ground)
           (("1" (expand "info") (propax)) ("2" (expand "info") (propax))
            ("3"
             (expand "minimum_info")
             (lift-if)
             (ground)
             (("1" (expand "info") (propax))
              ("2" (expand "info") (propax))))))
          ("2" (expand "info") (propax))))))
      ("2"
       (hide 1)
       (expand "cyl_intersect_min_info")
       (lift-if)
       (ground)
       (("1"
         (expand "horizontal_min_info")
         (lift-if)
         (ground)
         (("1" (expand "info") (propax)) ("2" (expand "info") (propax))
          ("3"
           (expand "minimum_info")
           (lift-if)
           (ground)
           (("1" (expand "info") (propax))
            ("2" (expand "info") (propax))))))
        ("2" (expand "minimum_info") (lift-if) (propax))))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: tca_3D
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "cyl_norm_sq_IVT1")
   (inst - "s" "nnt" "tca_3D(s,v)" "v")
   (assert)
   (rewrite "vect2_add" -3)
   (rewrite "vect2_scal" -3)
   (expand "cyl_norm_sq_fun" -3)
   (assert)
   (split -)
   (("1"
     (skosimp*)
     (lemma "tca_3D_id")
     (inst - "t!1" "s" "v")
     (("1"
       (assert)
       (rewrite "vect2_add" -1)
       (rewrite "vect2_scal" -1)
       (rewrite "vz_distr_add" -1)
       (rewrite "vz_scal" -1)
       (assert)
       (replace -3 -1)
       (replace -4)
       (assert)
       (expand "cyl_norm_sq_fun")
       (replace -5)
       (expand "cyl_norm_sq" -1 1)
       (rewrite "vect2_add")
       (rewrite "vect2_scal")
       (rewrite "vz_distr_add")
       (rewrite "vz_scal")
       (replace -4)
       (assert)
       (expand "max")
       (hide -2)
       (lift-if)
       (ground)
       (replace -3)
       (propax))
      ("2" (ground))))
    ("2"
     (flatten)
     (replace -2)
     (assert)
     (expand "cyl_norm_sq_fun")
     (assert))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: tca_3D
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "cyl_norm_sq_IVT2")
   (inst - "s" "nnt" "tca_3D(s,v)" "v")
   (assert)
   (rewrite "vz_distr_add")
   (rewrite "vz_scal")
   (expand "cyl_norm_sq_fun" -3)
   (assert)
   (split -)
   (("1"
     (skosimp*)
     (lemma "tca_3D_id")
     (inst - "t!1" "s" "v")
     (("1"
       (assert)
       (replace -4)
       (rewrite "vect2_add")
       (rewrite "vect2_scal")
       (rewrite "vz_distr_add")
       (rewrite "vz_scal")
       (replace -3 -1)
       (replace -4)
       (assert)
       (expand "cyl_norm_sq_fun")
       (replace -5)
       (hide -2)
       (expand "cyl_norm_sq" -1 1)
       (rewrite "vect2_add")
       (rewrite "vect2_scal")
       (rewrite "vz_distr_add")
       (rewrite "vz_scal")
       (replace -3)
       (assert)
       (expand "max")
       (lift-if)
       (ground)
       (replace -2)
       (propax))
      ("2" (ground))))
    ("2"
     (flatten)
     (case "cyl_norm_sq_fun(s,v)(tca_3D(s,v)) = sq(s`z + tca_3D(s,v)*v`z)/sq(H)")
     (("1" (replace -3) (assert) (expand "cyl_norm_sq_fun") (assert))
      ("2" (expand "cyl_norm_sq_fun" 1) (propax))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: tca_3D
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (case "FORALL (aa:nnreal,bb,cc,zz:real): (aa/=0 OR bb/=0) AND (NOT (aa/=0 AND zz = -bb/(2*aa))) IMPLIES (FORALL (epsilon:posreal): EXISTS (xx:real): abs(zz-xx)<epsilon AND quadratic(aa,bb,cc)(xx) < quadratic(aa,bb,cc)(zz))")
   (("1"
     (label "quadlem" -1)
     (hide -1)
     (skeep)
     (lemma "cyl_norm_min_exists_inf")
     (inst - "s" "v")
     (skosimp*)
     (label "tzlem" -1)
     (case "cyl_norm_sq(s+tz!1*v) >= cyl_norm_sq(s+tca_3D(s,v)*v)")
     (("1" (inst - "nnt") (expand "cyl_norm_sq_fun") (assert))
      ("2"
       (hide 2)
       (lemma "tca_3D_id")
       (inst - "tz!1" "s" "v")
       (assert)
       (flatten)
       (case "cyl_norm_sq(s+tz!1*v) = sqv(vect2(s+tz!1*v))/sq(D)")
       (("1"
         (case "EXISTS (epsilon:posreal): FORALL (t: real): abs(tz!1-t) < epsilon IMPLIES t > 0 AND cyl_norm_sq_fun(s,v)(t) = sqv(vect2(s+t*v))/sq(D)")
         (("1"
           (reveal "quadlem")
           (inst - "sqv(vect2(v))" "2*vect2(s)*vect2(v)" "sqv(vect2(s))"
            "tz!1")
           (assert)
           (split -)
           (("1"
             (skosimp*)
             (inst - "epsilon!1")
             (skosimp*)
             (inst - "xx!1")
             (assert)
             (flatten)
             (inst "tzlem" "xx!1")
             (("1"
               (expand "cyl_norm_sq_fun")
               (replace -4)
               (replace -5)
               (hide-all-but ("quadlem" "tzlem"))
               (cross-mult -3)
               (mult-by -2 "sq(D)")
               (grind))
              ("2" (assert))))
            ("2"
             (flatten)
             (case "vect2(v) = zero")
             (("1"
               (lemma "tca_3D_vect2_zero")
               (inst - "tz!1" "s" "v")
               (assert)
               (split -)
               (("1" (expand "cyl_norm_sq_fun") (propax))
                ("2" (assert) (expand "cyl_norm_sq_fun") (propax))))
              ("2" (lemma "vectors_2D.sqv_eq_0") (inst?) (assert))))
            ("3" (flatten) (assert) (flatten) (replace -4) (assert))))
          ("2"
           (name "df"
                 "LAMBDA (t:real): (sqv(vect2(s) + t*vect2(v))/sq(D) - sq(s`z+t*v`z)/sq(H))")
           (lemma "cyl_norm_sq_diff_cont")
           (inst - "s" "v")
           (replace -2)
           (case "df(tz!1) > 0")
           (("1"
             (case "EXISTS (epsilon:posreal): FORALL (t:real): abs(tz!1-t) < epsilon IMPLIES t > 0 AND df(t)>0")
             (("1"
               (skosimp*)
               (inst + "epsilon!1")
               (skosimp*)
               (inst - "t!1")
               (assert)
               (flatten)
               (assert)
               (expand "df" -2)
               (expand "cyl_norm_sq_fun" 1)
               (expand "cyl_norm_sq" 1)
               (rewrite "vect2_add")
               (rewrite "vect2_scal")
               (rewrite "vz_distr_add")
               (rewrite "vz_scal")
               (expand "max")
               (lift-if)
               (ground))
              ("2"
               (hide-all-but (-1 -2 1 3))
               (expand "continuous?")
               (inst - "tz!1")
               (("1"
                 (expand "continuous_at?")
                 (inst - "df(tz!1)")
                 (("1"
                   (skosimp*)
                   (inst + "min(delta!1,tz!1)")
                   (("1"
                     (skosimp*)
                     (inst - "t!1")
                     (("1" (grind)) ("2" (expand "fullset") (propax))))
                    ("2" (hide -) (grind))))
                  ("2" (assert))))
                ("2" (expand "fullset") (propax))))))
            ("2"
             (expand "df" 1)
             (rewrite "vect2_add")
             (rewrite "vect2_scal")
             (rewrite "vz_distr_add")
             (rewrite "vz_scal")
             (expand "cyl_norm_sq" -3)
             (expand "max" -3)
             (lift-if)
             (split -)
             (("1"
               (flatten)
               (assert)
               (rewrite "vz_distr_add")
               (rewrite "vz_scal")
               (rewrite "vect2_add")
               (rewrite "vect2_scal")
               (assert))
              ("2"
               (flatten)
               (assert)
               (rewrite "vect2_add")
               (rewrite "vect2_scal")
               (rewrite "vz_distr_add")
               (rewrite "vz_scal")
               (assert))))))))
        ("2"
         (case "cyl_norm_sq(s+tz!1*v) = sq((s+tz!1*v)`z)/sq(H)")
         (("1"
           (case "EXISTS (epsilon:posreal): FORALL (t: real): abs(tz!1-t) < epsilon IMPLIES t > 0 AND cyl_norm_sq_fun(s,v)(t) = sq((s+t*v)`z)/sq(H)")
           (("1"
             (reveal "quadlem")
             (assert)
             (inst - "sq(v`z)" "2*s`z*v`z" "sq(s`z)" "tz!1")
             (assert)
             (split -)
             (("1"
               (skosimp*)
               (inst - "epsilon!1")
               (skosimp*)
               (inst - "xx!1")
               (assert)
               (flatten)
               (inst "tzlem" "xx!1")
               (("1"
                 (expand "cyl_norm_sq_fun")
                 (replace -4)
                 (replace -5)
                 (hide-all-but ("quadlem" "tzlem"))
                 (cross-mult -3)
                 (mult-by -2 "sq(H)")
                 (grind))
                ("2" (assert))))
              ("2"
               (flatten)
               (case "v`z = 0")
               (("1"
                 (replace -1)
                 (assert)
                 (hide -2)
                 (hide -2)
                 (lemma "tca_3D_vz_zero")
                 (inst - "tz!1" "s" "v")
                 (assert)
                 (split -)
                 (("1" (expand "cyl_norm_sq_fun") (propax))
                  ("2" (assert) (expand "cyl_norm_sq_fun") (propax))))
                ("2" (lemma "sq_eq_0") (inst?) (assert))))
              ("3" (flatten) (assert))))
            ("2"
             (name "df"
                   "LAMBDA (t:real): (sqv(vect2(s) + t*vect2(v))/sq(D) - sq(s`z+t*v`z)/sq(H))")
             (lemma "cyl_norm_sq_diff_cont")
             (inst - "s" "v")
             (replace -2)
             (case "df(tz!1) < 0")
             (("1"
               (case "EXISTS (epsilon:posreal): FORALL (t:real): abs(tz!1-t) < epsilon IMPLIES t > 0 AND df(t)<0")
               (("1"
                 (skosimp*)
                 (inst + "epsilon!1")
                 (skosimp*)
                 (inst - "t!1")
                 (assert)
                 (flatten)
                 (assert)
                 (expand "df" -2)
                 (expand "cyl_norm_sq_fun" 1)
                 (expand "cyl_norm_sq" 1)
                 (rewrite "vect2_add")
                 (rewrite "vect2_scal")
                 (rewrite "vz_distr_add")
                 (rewrite "vz_scal")
                 (expand "max")
                 (lift-if)
                 (ground))
                ("2"
                 (hide-all-but (-1 -2 1 4))
                 (expand "continuous?")
                 (inst - "tz!1")
                 (("1"
                   (expand "continuous_at?")
                   (inst - "-df(tz!1)")
                   (("1"
                     (skosimp*)
                     (inst + "min(delta!1,tz!1)")
                     (("1"
                       (skosimp*)
                       (inst - "t!1")
                       (("1" (grind)) ("2" (expand "fullset") (propax))))
                      ("2" (hide -) (grind))))
                    ("2" (assert))))
                  ("2" (expand "fullset") (propax))))))
              ("2"
               (expand "df" 1)
               (rewrite "vect2_add")
               (rewrite "vect2_scal")
               (rewrite "vz_distr_add")
               (rewrite "vz_scal")
               (expand "cyl_norm_sq" -3)
               (expand "max" -3)
               (lift-if)
               (split -)
               (("1"
                 (flatten)
                 (assert)
                 (rewrite "vz_distr_add")
                 (rewrite "vz_scal")
                 (rewrite "vect2_add")
                 (rewrite "vect2_scal")
                 (assert))
                ("2"
                 (flatten)
                 (assert)
                 (rewrite "vect2_add")
                 (rewrite "vect2_scal"))))))))
          ("2"
           (rewrite "vz_distr_add")
           (rewrite "vz_scal")
           (assert)
           (expand "cyl_norm_sq" (1 2))
           (expand "max" (1 2))
           (rewrite "vz_distr_add")
           (rewrite "vz_scal")
           (rewrite "vect2_add")
           (rewrite "vect2_scal")
           (lift-if)
           (ground))))))))
    ("2"
     (hide 2)
     (skeep)
     (case "aa = 0")
     (("1"
       (assert)
       (hide 1)
       (flatten)
       (expand "quadratic")
       (replace -1)
       (assert)
       (skosimp*)
       (name "xy" "zz-sign(bb)*epsilon!1/2")
       (inst + "xy")
       (split +)
       (("1" (replace -1 :dir rl) (assert) (grind))
        ("2"
         (replace -1 :dir rl)
         (assert)
         (hide -1)
         (expand "sign")
         (lift-if)
         (ground)
         (("1"
           (case "epsilon!1 / 2 * bb >= 0")
           (("1" (assert)) ("2" (mult-by -1 "epsilon!1/2") (assert))))
          ("2"
           (case "-1 * epsilon!1 / 2 * bb >= 0")
           (("1" (assert)) ("2" (mult-by 2 "epsilon!1/2") (assert))))))))
      ("2"
       (case "aa > 0")
       (("1"
         (hide -2)
         (hide 1)
         (assert)
         (case "zz > -bb/(2*aa)")
         (("1"
           (skosimp*)
           (name "ep2" "zz+bb/(2*aa)")
           (name "myep" "min(ep2,epsilon!1)")
           (name "xy" "zz-myep/2")
           (inst + "xy")
           (split)
           (("1"
             (replace -1 :dir rl)
             (assert)
             (expand "abs" +)
             (lift-if)
             (split +)
             (("1"
               (flatten)
               (replace -3 -1 :dir rl)
               (expand "min" -1)
               (lift-if)
               (ground)
               (case "ep2 > 0")
               (("1" (assert))
                ("2" (assert) (replace -4 :dir rl) (assert))))
              ("2"
               (flatten)
               (replace -2 :dir rl)
               (expand "min" 2)
               (lift-if)
               (ground))))
            ("2"
             (lemma "quad_min_mono_inc")
             (inst - "aa" "bb" "cc" "zz" "xy")
             (assert)
             (split -)
             (("1" (assert))
              ("2"
               (case "myep/2>0")
               (("1" (assert))
                ("2"
                 (case "myep > 0")
                 (("1" (assert))
                  ("2"
                   (expand "myep" 1)
                   (case "ep2 > 0")
                   (("1" (assert) (expand "min" 1) (lift-if) (ground))
                    ("2" (expand "ep2" 1) (assert))))))))
              ("3"
               (expand "xy" 1)
               (case "zz-myep >= -bb/(2*aa)")
               (("1" (assert))
                ("2"
                 (hide 2)
                 (expand "myep" 1)
                 (case "zz-ep2 >= -bb/(2*aa)")
                 (("1" (assert)) ("2" (expand "ep2" 1) (assert))))))))))
          ("2"
           (case "zz < -bb/(2*aa)")
           (("1"
             (hide 1)
             (hide 1)
             (skosimp*)
             (name "ep2" "-zz-bb/(2*aa)")
             (case "ep2 > 0")
             (("1"
               (name "myep" "min(ep2,epsilon!1)")
               (name "xy" "zz+myep/2")
               (inst + "xy")
               (split)
               (("1"
                 (replace -1 :dir rl)
                 (assert)
                 (expand "abs" +)
                 (lift-if)
                 (split +)
                 (("1"
                   (flatten)
                   (replace -3 -1 :dir rl)
                   (expand "min" -1)
                   (lift-if)
                   (ground))
                  ("2"
                   (flatten)
                   (case "myep > 0")
                   (("1" (assert))
                    ("2"
                     (expand "myep" 1)
                     (expand "min" 1)
                     (lift-if)
                     (ground))))))
                ("2"
                 (lemma "quad_min_mono_dec")
                 (inst - "aa" "bb" "cc" "zz" "xy")
                 (assert)
                 (assert)
                 (hide 2)
                 (split +)
                 (("1"
                   (case "myep > 0")
                   (("1" (assert))
                    ("2"
                     (hide 2)
                     (expand "myep" +)
                     (expand "min" +)
                     (lift-if)
                     (ground))))
                  ("2"
                   (expand "xy" +)
                   (case "zz + myep <= -bb/(2*aa)")
                   (("1" (assert))
                    ("2"
                     (hide 2)
                     (expand "myep" 1)
                     (case "ep2 + zz <= -bb/(2*aa)")
                     (("1" (assert))
                      ("2" (hide 2) (expand "ep2" +) (assert))))))))))
              ("2" (assert) (expand "ep2" +) (assert))))
            ("2" (assert))))))
        ("2" (assert))))))
    ("3" (hide 2) (skosimp*) (assert))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: tca_3D
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skeep)
   (ground)
   (("1"
     (expand "conflict?")
     (skosimp*)
     (lemma "conflict_at_cyl_norm_sq")
     (inst - "s" "nnt!1" "v")
     (assert)
     (lemma "tca_3D_def")
     (inst - "nnt!1" "s" "v")
     (assert))
    ("2"
     (expand "conflict?")
     (inst + "tca_3D(s,v)")
     (lemma "conflict_at_cyl_norm_sq")
     (inst - "s" "tca_3D(s,v)" "v")
     (assert))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: tca_3D
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skeep)
   (lemma "convex_btw_pt_left_lt")
   (inst - "nnt" "tca_3D(s,v)" "cyl_norm_sq_fun(s,v)(pt)"
    "cyl_norm_sq_fun(s,v)" "pt")
   (assert)
   (lemma "cyl_norm_sq_fun_convex")
   (inst?)
   (assert)
   (lemma "tca_3D_def")
   (inst - "nnt" "s" "v")
   (assert)
   (expand "cyl_norm_sq_fun")
   (assert))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: tca_3D
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skeep)
   (lemma "convex_btw_pt_left_lt")
   (inst - "tca_3D(s,v)" "pt" "cyl_norm_sq_fun(s,v)(nnt)"
    "cyl_norm_sq_fun(s,v)" "nnt")
   (assert)
   (lemma "cyl_norm_sq_fun_convex")
   (inst?)
   (assert)
   (lemma "tca_3D_def")
   (inst-cp - "nnt" "s" "v")
   (inst - "pt" "s" "v")
   (expand "cyl_norm_sq_fun")
   (assert))


proof_type: t_proof
decl_type: tcc
library: ACCoRD
theory: tca_3D
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (split -)
   (("1" (assert) (typepred "horizontal_min_info(s,v)") (assert))
    ("2"
     (typepred "horizontal_min_info(s,v)")
     (assert)
     (flatten)
     (assert)
     (split +)
     (("1" (propax)) ("2" (flatten) (assert))))))


proof_type: t_proof
decl_type: tcc
library: ACCoRD
theory: tca_3D
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (assert)
   (split +)
   (("1"
     (name "MII"
           "minimum_info(horizontal_min_info(s, v),
                              info(s, v, -s`z / v`z))")
     (replace -1)
     (typepred "MII")
     (hide -1)
     (typepred "horizontal_min_info(s,v)")
     (assert))
    ("2"
     (flatten)
     (name "MII"
           "minimum_info(horizontal_min_info(s, v),
                              info(s, v, -s`z / v`z))")
     (replace -1)
     (typepred "MII")
     (hide -1)
     (typepred "horizontal_min_info(s,v)")
     (assert))
    ("3"
     (name "MII"
           "minimum_info(horizontal_min_info(s, v),
                              info(s, v, -s`z / v`z))")
     (replace -1)
     (typepred "MII")
     (propax))))


proof_type: t_proof
decl_type: tcc
library: ACCoRD
theory: tca_3D
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (skeep)
   (lemma "cyl_intersect_time_lt")
   (inst - "s" "v")
   (replace -2 :dir rl)
   (replace -4 :dir rl)
   (skeep)
   (typepred "eps")
   (ground))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: tca_3D_interval
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skeep)
   (expand "tca_3D_interval")
   (lift-if)
   (ground)
   (("1" (lemma "tca_3D_def") (inst?))
    ("2"
     (hide 2)
     (lemma "tca_3D_right_increasing")
     (inst - "B" "t" "s" "v")
     (assert)
     (expand "cyl_norm_sq_fun")
     (assert))
    ("3"
     (lemma "tca_3D_left_decreasing")
     (inst - "t" "T" "s" "v")
     (assert)
     (expand "cyl_norm_sq_fun")
     (propax))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: tca_3D_interval
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (lemma "conflict_at_cyl_norm_sq")
   (skeep)
   (ground)
   (("1"
     (expand "conflict_3D?")
     (skosimp*)
     (inst - "s" "t!1" "v")
     (assert)
     (lemma "tca_3D_interval_def")
     (inst - "s" "t!1" "v")
     (assert))
    ("2"
     (inst - "s" "tca_3D_interval(s,v)" "v")
     (assert)
     (flatten)
     (expand "conflict_3D?")
     (inst?)
     (assert))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: tca_3D_interval
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skeep)
   (rewrite "tca_3D_interval_conflict")
   (lemma "conflict_at_cyl_norm_sq")
   (inst?)
   (ground))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: delay_3D
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (case "conflict_3D?[D, H, 0, nnt](s, v)")
   (("1"
     (hide 3)
     (hide-all-but (-1 -2 1))
     (expand "conflict_3D?")
     (skeep -1)
     (inst + "t")
     (("1" (assert)) ("2" (assert))))
    ("2"
     (case "NOT rt > nnt")
     (("1" (assert))
      ("2"
       (hide -2)
       (label "rtgtnnt" -1)
       (assert)
       (copy -3)
       (expand "conflict?" -1)
       (skolem -1 "pstar")
       (flatten)
       (lemma "conflict_sum_closed[D,H]")
       (inst - "s + rt*v" "(rt-nnt)*v" "(pstar*nv) - ((rt-nnt)*v)")
       (split -)
       (("1"
         (case "NOT (rt - nnt) * v + ((pstar * nv) - ((rt - nnt) * v)) = pstar*nv")
         (("1" (hide-all-but 1) (grind))
          ("2"
           (replace -1)
           (hide -1)
           (hide-all-but (-1 3))
           (expand "conflict?")
           (skosimp*)
           (case "pstar = 0")
           (("1" (inst + "0") (replace -1) (assert))
            ("2"
             (inst + "nnt!1*pstar")
             (grind :exclude ("abs" "sqv")))))))
        ("2"
         (hide-all-but (-4 "rtgtnnt" 3 1))
         (case "conflict?[D,H](s + rt * v, v)")
         (("1"
           (hide-all-but (-1 -2 1))
           (expand "conflict?")
           (skosimp*)
           (inst + "nnt!1/(rt-nnt)")
           (("1"
             (case "NOT (s + rt * v)`z + nnt!1 * v`z = (s + rt * v)`z + nnt!1 / (rt - nnt) * ((rt - nnt) * v)`z")
             (("1" (assert) (cross-mult 1) (rewrite "vz_scal") (assert))
              ("2"
               (assert)
               (case "vect2(s + rt * v) + nnt!1 * vect2(v) = vect2(s + rt * v) + nnt!1 / (rt - nnt) * vect2((rt - nnt) * v)")
               (("1" (assert))
                ("2"
                 (assert)
                 (case "nnt!1 * vect2(v) = nnt!1 / (rt - nnt) * vect2((rt - nnt) * v)")
                 (("1" (assert))
                  ("2"
                   (hide 2)
                   (rewrite "vect2_scal")
                   (case "nnt!1 = nnt!1/(rt-nnt) * (rt-nnt)")
                   (("1" (assert)) ("2" (cross-mult 1))))))))))
            ("2" (cross-mult 1))))
          ("2"
           (hide 2)
           (expand "conflict?")
           (skosimp*)
           (case "nnt!1 <= rt")
           (("1"
             (hide 1)
             (expand "conflict_3D?")
             (inst + "nnt!1")
             (assert))
            ("2"
             (hide 3)
             (inst + "nnt!1 - rt")
             (("1" (grind :exclude ("abs" "sqv"))) ("2" (assert))))))))
        ("3"
         (expand "conflict?" 1)
         (inst + "1")
         (case "(s + rt * v)`z + 1 * ((pstar * nv) - ((rt - nnt) * v))`z = (s + nnt * v)`z + pstar * nv`z")
         (("1"
           (case "vect2(s + rt * v) + 1 * vect2((pstar * nv) - ((rt - nnt) * v)) = vect2(s + nnt * v) + pstar * vect2(nv)")
           (("1" (assert)) ("2" (hide-all-but 1) (grind))))
          ("2" (hide-all-but 1) (grind))))))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: delay_3D
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (lemma "delay_conflict_free_rel")
   (skeep)
   (inst - "nnt" "nvo-vi" "rt" "so-si" "vo-vi")
   (assert)
   (case "FORALL (zzrt:real): so - si + zzrt * (vo - vi) = (so + zzrt * vo) - (si + zzrt * vi)")
   (("1"
     (inst-cp - "rt")
     (inst - "nnt")
     (replace -1)
     (replace -2)
     (hide (-1 -2))
     (assert))
    ("2" (hide-all-but 1) (grind))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: cd_sphere
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (case "v /= zero")
   (("1"
     (label "vnz" -1)
     (hide "vnz")
     (name "aa" "sqv(v)")
     (name "bb" "2*(s*v)")
     (name "cc" "sqv(s)-sq(D)")
     (name "qq" "quadratic(aa,bb,cc)")
     (label "qqname" -1)
     (hide -)
     (name "gg" "sq(s*v)-sqv(v)*(sqv(s)-sq(D))")
     (label "ggname" -1)
     (hide "ggname")
     (case "NOT discr(aa,bb,cc) = 4*gg")
     (("1"
       (hide 2)
       (expand "aa")
       (expand "bb")
       (expand "cc")
       (expand "gg")
       (grind))
      ("2"
       (label "discrlem" -1)
       (hide "discrlem")
       (case "NOT (conflict_sphere_ever(D,s,v) IFF (EXISTS (t:nnreal): qq(t)<0))")
       (("1"
         (case "NOT (conflict_sphere_ever(D,s,v) IFF (EXISTS (t:nnreal): sqv(s+t*v)<sq(D)))")
         (("1"
           (hide-all-but 1)
           (expand "conflict_sphere_ever")
           (ground)
           (("1"
             (lemma "sq_lt")
             (skosimp*)
             (inst + "t!1")
             (inst?)
             (rewrite "sq_norm")
             (ground))
            ("2"
             (skosimp*)
             (inst + "t!1")
             (lemma "sqrt_lt")
             (inst?)
             (rewrite "sqrt_sqv_norm")
             (ground))))
          ("2"
           (replace -1)
           (hide -1)
           (hide-all-but 1)
           (ground)
           (("1"
             (skosimp*)
             (inst + "t!1")
             (expand "qq")
             (expand "aa")
             (expand "bb")
             (expand "cc")
             (grind))
            ("2"
             (skosimp*)
             (inst + "t!1")
             (expand "qq")
             (expand "aa")
             (expand "bb")
             (expand "cc")
             (grind))))))
        ("2"
         (replace -1)
         (hide -1)
         (expand "cd_sphere")
         (lift-if)
         (split +)
         (("1"
           (flatten)
           (reveal "ggname")
           (replace -1)
           (hide "ggname")
           (split +)
           (("1"
             (flatten)
             (case "aa>0")
             (("1"
               (case "-bb/(2*aa)>=0")
               (("1"
                 (inst + "-bb/(2*aa)")
                 (reveal "discrlem")
                 (case "discr(aa,bb,cc)>0")
                 (("1"
                   (mult-by -1 "1/aa")
                   (("1" (hide-all-but (-1 -4 1)) (expand "qq") (grind))
                    ("2"
                     (case "1/aa>0")
                     (("1" (assert)) ("2" (hide 2) (cross-mult 1))))))
                  ("2" (assert))))
                ("2" (cross-mult 1) (expand "bb") (assert))
                ("3" (assert))))
              ("2"
               (expand "aa")
               (lemma "sqv_eq_0")
               (inst?)
               (assert)
               (reveal "vnz")
               (ground))))
            ("2"
             (flatten)
             (skosimp*)
             (expand "qq")
             (lemma "a_gt_0_discr_gt_0")
             (inst - "aa" "bb" "cc" "t!1")
             (("1"
               (expand "quadratic")
               (assert)
               (split -)
               (("1" (reveal "discrlem") (assert))
                ("2"
                 (expand "aa" 1)
                 (lemma "sqv_eq_0")
                 (inst?)
                 (assert)
                 (reveal "vnz")
                 (ground))))
              ("2"
               (flatten)
               (expand "aa")
               (lemma "sqv_eq_0")
               (inst?)
               (reveal "vnz")
               (ground))))))
          ("2"
           (flatten)
           (split)
           (("1"
             (flatten)
             (inst + "0")
             (expand "qq")
             (expand "quadratic")
             (expand "cc")
             (assert))
            ("2"
             (flatten)
             (skosimp*)
             (lemma "quad_min_mono_inc")
             (inst - "aa" "bb" "cc" "t!1" "0")
             (("1"
               (assert)
               (split -)
               (("1"
                 (expand "qq")
                 (expand "quadratic")
                 (expand "aa")
                 (expand "bb")
                 (expand "cc")
                 (grind))
                ("2"
                 (case "t!1 = 0")
                 (("1"
                   (replace -1)
                   (expand "qq")
                   (expand "aa")
                   (expand "bb")
                   (expand "cc")
                   (grind))
                  ("2" (assert))))
                ("3"
                 (case "aa > 0")
                 (("1" (cross-mult 1) (expand "bb") (assert))
                  ("2"
                   (expand "aa")
                   (lemma "sqv_eq_0")
                   (inst?)
                   (reveal "vnz")
                   (ground))))
                ("4"
                 (expand "aa")
                 (lemma "sqv_eq_0")
                 (inst?)
                 (reveal "vnz")
                 (ground))))
              ("2"
               (flatten)
               (expand "aa")
               (lemma "sqv_eq_0")
               (inst?)
               (reveal "vnz")
               (ground))))))))))
      ("3"
       (flatten)
       (expand "aa")
       (lemma "sqv_eq_0")
       (inst?)
       (reveal "vnz")
       (ground))))
    ("2"
     (flatten)
     (replace -1)
     (hide -)
     (expand "conflict_sphere_ever")
     (expand "cd_sphere")
     (assert)
     (case "sqv(s)<sq(D) IFF norm(s)<D")
     (("1" (ground))
      ("2"
       (hide 2)
       (lemma "sqrt_sqv_norm")
       (inst?)
       (replace -1 :dir rl)
       (lemma "sqrt_lt")
       (inst - "sqv(s)" "sq(D)")
       (ground))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: cd2d_inf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (assert)
   (expand "detection_2D_inf")
   (lift-if)
   (assert)
   (ground)
   (lemma "horizontal_los_inside_Theta")
   (inst?)
   (assert)
   (expand "max" -3)
   (lift-if)
   (ground))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: cd2d_inf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (assert)
   (flatten)
   (expand "detection_2D_inf")
   (lift-if)
   (assert)
   (lemma "Delta_gt_0")
   (inst?)
   (assert)
   (split -)
   (("1"
     (assert)
     (lemma "horizontal_los_inside_Theta")
     (inst?)
     (assert)
     (flatten)
     (expand "max")
     (lift-if)
     (lift-if)
     (assert))
    ("2" (hide 2) (expand "horizontal_conflict_ever?") (inst + "t"))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: cd2d_inf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (assert)
   (ground)
   (("1"
     (lemma "detection_2D_inf_complete")
     (expand "horizontal_conflict?")
     (skosimp*)
     (inst - "nzv" "s" "nnt!1")
     (assert))
    ("2"
     (name "tav"
           "(detection_2D_inf(s, nzv)`1 + detection_2D_inf(s, nzv)`2)/2")
     (lemma "detection_2D_inf_correct")
     (inst - "nzv" "s" "tav")
     (assert)
     (split -)
     (("1" (expand "horizontal_conflict?") (inst + "tav"))
      ("2" (hide 2) (assert)) ("3" (assert))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: cd2d_inf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (ground)
   (("1"
     (expand "cd2d_inf?")
     (case "v = zero")
     (("1"
       (replace -1)
       (expand "horizontal_conflict?")
       (skosimp*)
       (assert))
      ("2"
       (flatten)
       (lemma "Delta_gt_0")
       (inst?)
       (assert)
       (lemma "horizontal_conflict_ever")
       (inst?)
       (assert)
       (lemma "sdotv_lt_0")
       (inst?)
       (assert))))
    ("2"
     (expand "cd2d_inf?")
     (split -)
     (("1" (expand "horizontal_conflict?") (inst + "0") (assert))
      ("2"
       (flatten)
       (lemma "horizontal_tca_los")
       (inst?)
       (("1"
         (assert)
         (expand "horizontal_conflict?")
         (inst + "horizontal_tca(s,v)")
         (assert)
         (expand "horizontal_tca")
         (cross-mult 1)
         (assert)
         (ground)
         (lemma "sqv_eq_0")
         (inst?)
         (assert)
         (replace -1)
         (assert))
        ("2" (flatten) (replace -1) (assert))))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: cd3d_inf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (split)
   (("1"
     (flatten)
     (expand "conflict?")
     (skosimp*)
     (lemma "vertical_los_inside_Theta")
     (inst - "abs(v`z)" "sign(v`z)*s`z" "nnt!1")
     (("1"
       (flatten)
       (hide -1)
       (split -1)
       (("1"
         (flatten)
         (expand "Theta_H")
         (case "sign(abs(v`z)) = 1")
         (("1"
           (replace -1)
           (hide -1)
           (assert)
           (cross-mult -1)
           (cross-mult -2)
           (expand "conflict_2D?")
           (inst + "nnt!1*abs(v`z)")
           (("1"
             (rewrite "vect2_scal")
             (case "abs(v`z) * vect2(s) + nnt!1 * abs(v`z) * vect2(v) = abs(v`z)*(vect2(s)+nnt!1*vect2(v))")
             (("1"
               (replace -1)
               (hide -1)
               (rewrite "sqv_scal")
               (rewrite "sq_times")
               (div-by 1 "sq(v`z)")
               (lemma "sq_eq_0")
               (inst?)
               (assert))
              ("2" (hide-all-but 1) (grind))))
            ("2" (expand "max") (lift-if) (ground))))
          ("2" (expand "sign") (assert))))
        ("2" (hide-all-but (-1 1)) (grind))))
      ("2" (assert))))
    ("2"
     (flatten)
     (lemma
      "conflict_2D_on_open_interval[D *abs( v`z),
                                     max(-H - sign(v`z) * s`z, 0),
                                     H - sign(v`z) * s`z]")
     (("1"
       (inst?)
       (assert)
       (replace -2)
       (assert)
       (skosimp*)
       (name "t!2" "topen!1/abs(v`z)")
       (case "max(Theta_H[H](sign(v`z)*s`z,abs(v`z),-1),0)< t!2 AND t!2 < Theta_H[H](sign(v`z)*s`z,abs(v`z),1)")
       (("1"
         (flatten)
         (expand "conflict?")
         (inst + "t!2")
         (("1"
           (split 1)
           (("1"
             (lemma "vertical_los_inside_Theta")
             (inst - "abs(v`z)" "sign(v`z)*s`z" "t!2")
             (flatten)
             (hide -2)
             (split -1)
             (("1" (hide-all-but (-1 +)) (grind))
              ("2" (hide-all-but (-1 -2 1)) (grind :exclude "Theta_H"))
              ("3" (propax))))
            ("2"
             (rewrite "vect2_scal")
             (case "abs(v`z) * vect2(s) + topen!1 * vect2(v) = abs(v`z)*(vect2(s) + t!2*vect2(v))")
             (("1"
               (replace -1)
               (rewrite "sqv_scal")
               (rewrite "sq_times")
               (div-by -7 "sq(v`z)"))
              ("2"
               (replace -3 :dir rl)
               (hide-all-but (1 3))
               (grind :exclude "abs"))))))
          ("2" (hide-all-but (-1 -2 1)) (grind :exclude "Theta_H"))))
        ("2"
         (replace -1 1 :dir rl)
         (hide-all-but (-2 -3 -6 1))
         (split)
         (("1"
           (cross-mult 1)
           (lemma "nneg_mult_max")
           (inst - "abs(v`z)" "Theta_H[H](sign(v`z) * s`z, abs(v`z), -1)"
            "0")
           (replace -1)
           (expand "Theta_H")
           (case "v`z>0")
           (("1" (expand "abs") (expand "sign") (assert))
            ("2"
             (case "v`z < 0")
             (("1" (expand "abs") (expand "sign") (assert))
              ("2" (assert))))))
          ("2"
           (cross-mult 1)
           (expand "Theta_H")
           (case "v`z>0")
           (("1" (expand "abs") (expand "sign") (assert))
            ("2"
             (case "v`z < 0")
             (("1" (expand "abs") (expand "sign") (assert))
              ("2" (assert))))))))))
      ("2" (hide-all-but (-2 1)) (assert))
      ("3"
       (lemma "posreal_times_posreal_is_posreal")
       (inst - "D" "abs(v`z)")
       (("1" (assert)) ("2" (lemma "abs_eq_0") (inst?) (assert))))
      ("4"
       (lemma "posreal_times_posreal_is_posreal")
       (inst - "D" "abs(v`z)")
       (assert))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: cd3d_inf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (split)
   (("1"
     (flatten)
     (expand "conflict?")
     (skosimp*)
     (inst + "nnt!1")
     (assert)
     (expand "abs")
     (lift-if)
     (ground))
    ("2"
     (flatten)
     (expand "conflict?")
     (skosimp*)
     (inst + "nnt!1")
     (assert)
     (expand "abs")
     (lift-if)
     (ground))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: cd3d_inf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (split)
   (("1"
     (flatten)
     (expand "conflict?")
     (skosimp*)
     (case "exists (epH:posreal): FORALL (th: real): abs(th-nnt!1)<epH IMPLIES abs(s`z+th*v`z)<H")
     (("1"
       (skeep -1)
       (case "exists (epD:posreal): FORALL (td: real): abs(td-nnt!1)<epD IMPLIES sqv(vect2(s)+td*vect2(v))<sq(D)")
       (("1"
         (skeep -1)
         (name "newt" "min(epD/2,epH/2)")
         (case "newt > 0")
         (("1"
           (case "nnt!1 = 0")
           (("1"
             (replace -1)
             (hide -1)
             (inst + "newt")
             (assert)
             (inst - "newt")
             (inst - "newt")
             (case "abs(newt)<epD and abs(newt)<epH")
             (("1" (flatten) (assert))
              ("2"
               (hide 2)
               (hide -3)
               (hide -3)
               (hide -3)
               (hide -3)
               (grind))))
            ("2" (assert) (inst + "nnt!1") (assert))))
          ("2" (hide-all-but (-1 1)) (grind))))
        ("2"
         (case "vect2(v) = zero")
         (("1" (replace -1) (assert))
          ("2"
           (hide -1)
           (hide -1)
           (hide 3)
           (lemma "sqv_cont")
           (expand "continuous_vr?")
           (inst - "vect2(s) + nnt!1 * vect2(v)")
           (expand "continuous_vr?")
           (inst - "sq(D) - sqv(vect2(s)+nnt!1*vect2(v))")
           (("1"
             (skosimp*)
             (inst + "delta!1/norm(vect2(v))")
             (("1"
               (skosimp*)
               (inst - "vect2(s) + td!1*vect2(v)")
               (split -1)
               (("1"
                 (name "const1" "sqv(vect2(s) + td!1*vect2(v))")
                 (replace -1)
                 (name "const2" "sqv(vect2(s) + nnt!1*vect2(v))")
                 (replace -1)
                 (hide -1)
                 (hide -1)
                 (hide -2)
                 (grind))
                ("2"
                 (case "vect2(s) + td!1 * vect2(v) - (vect2(s) + nnt!1 * vect2(v)) = (td!1-nnt!1)*vect2(v)")
                 (("1"
                   (replace -1)
                   (rewrite "norm_scal")
                   (cross-mult -2))
                  ("2" (hide-all-but 1) (grind))))))
              ("2"
               (lemma "posreal_div_posreal_is_posreal")
               (inst - "delta!1" "norm(vect2(v))")
               (("1" (assert))
                ("2" (lemma "vectors_2D.norm_eq_0") (inst?) (assert))))
              ("3" (lemma "vectors_2D.norm_eq_0") (inst?) (assert))))
            ("2" (assert))))))))
      ("2"
       (case "v`z = 0")
       (("1" (replace -1) (assert))
        ("2"
         (inst + "(H-abs(s`z+nnt!1*v`z))/abs(v`z)")
         (("1"
           (skosimp*)
           (cross-mult -1)
           (hide-all-but (-1 -2 2))
           (rewrite "abs_mult" :dir rl)
           (both-sides "+" "abs(s`z+nnt!1*v`z)" -1)
           (assert)
           (lemma "triangle")
           (inst - "v`z * th!1 - v`z * nnt!1" "s`z + nnt!1 * v`z")
           (assert))
          ("2"
           (split 1)
           (("1" (cross-mult 1) (assert)) ("2" (cross-mult 1) (assert))))
          ("3" (expand "abs" 1) (lift-if) (ground))))))))
    ("2"
     (flatten)
     (skosimp*)
     (expand "conflict?")
     (inst + "topen!1")
     (assert))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: cd3d_inf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (skoletin 1)
   (flatten)
   (expand "detection_inf")
   (lift-if)
   (split -)
   (("1"
     (flatten)
     (assert)
     (replace -1)
     (assert)
     (lemma "vertical_los_inside_Theta")
     (inst?)
     (assert)
     (grind :exclude "Theta_H"))
    ("2"
     (flatten)
     (assert)
     (split -1)
     (("1"
       (flatten)
       (assert)
       (split -2)
       (("1"
         (flatten)
         (assert)
         (split -)
         (("1" (flatten) (assert))
          ("2"
           (flatten)
           (lemma "vertical_los_inside_Theta")
           (inst? -1)
           (assert)
           (lemma "horizontal_los_inside_Theta")
           (inst?)
           (assert)
           (grind :exclude
            ("sqv" "vect2" "Theta_D" "Theta_H" "Delta")))))
        ("2"
         (flatten)
         (split -2)
         (("1"
           (flatten)
           (assert)
           (split -)
           (("1" (flatten) (assert))
            ("2"
             (flatten)
             (lemma "horizontal_los_inside_Theta")
             (inst? -1)
             (assert)
             (grind :exclude
              ("sqv" "vect2" "Theta_D" "Theta_H" "Delta")))))
          ("2" (propax))))))
      ("2" (propax))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: cd3d_inf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (skoletin 1)
   (flatten)
   (expand "detection_inf")
   (lift-if)
   (split -)
   (("1"
     (flatten)
     (assert)
     (lemma "vertical_los_inside_Theta")
     (inst? -1)
     (assert)
     (grind :exclude ("sqv" "vect2" "Theta_D" "Theta_H" "Delta")))
    ("2"
     (flatten)
     (assert)
     (split -)
     (("1"
       (flatten)
       (split -)
       (("1"
         (flatten)
         (assert)
         (split -)
         (("1" (flatten) (assert))
          ("2"
           (flatten)
           (assert)
           (lemma "vertical_los_inside_Theta")
           (inst?)
           (assert)
           (lemma "horizontal_los_inside_Theta")
           (inst?)
           (assert)
           (grind :exclude
            ("sqv" "vect2" "Theta_D" "Theta_H" "Delta")))))
        ("2"
         (flatten)
         (assert)
         (lemma "horizontal_los_inside_Theta")
         (inst?)
         (assert)
         (grind :exclude ("sqv" "vect2" "Theta_D" "Theta_H" "Delta")))))
      ("2"
       (flatten)
       (assert)
       (replace 2)
       (lemma "Delta_gt_0")
       (inst - "s" "nzv")
       (assert)
       (split 1)
       (("1" (ground))
        ("2" (expand "horizontal_conflict_ever?") (inst + "t"))))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: cd3d_inf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (name-replace "cd" "detection_inf(s,nzv)" :hide? nil)
   (skoletin 1)
   (split)
   (("1"
     (flatten)
     (lemma "detection_inf_complete")
     (expand "conflict?")
     (skeep -2)
     (inst -1 "nzv" "s" "nnt")
     (replaces -5)
     (beta)
     (assert))
    ("2"
     (flatten)
     (lemma "detection_inf_correct")
     (inst -1 "nzv" "s" "(tin+tout)/2")
     (replaces -5)
     (beta)
     (split)
     (("1" (expand "conflict?") (inst 1 "(tin+tout)/2"))
      ("2" (grind-reals)) ("3" (replaces -3 :dir rl) (grind-reals))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: cd3d_inf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "cd3d_inf?")
   (split)
   (("1"
     (flatten)
     (split -)
     (("1" (flatten) (assert))
      ("2"
       (flatten)
       (split -)
       (("1"
         (flatten)
         (assert)
         (hide 2)
         (split)
         (("1"
           (flatten)
           (lemma
            "cd2d[D * abs(v`z), max(-H - sign(v`z) * s`z, 0),
                                                                         H - sign(v`z) * s`z]")
           (("1"
             (inst?)
             (lemma
              "cd2d[D, max(Theta_H[H](s`z, v`z, -1), 0), Theta_H[H](s`z, v`z, 1)]")
             (("1"
               (inst?)
               (replaces (-1 -2) :dir rl)
               (expand "conflict_2D?")
               (skosimp*)
               (inst + "t!1/abs(v`z)")
               (("1"
                 (rewrite "sqv_add")
                 (rewrite "sqv_add")
                 (rewrite "vect2_scal")
                 (rewrite "sqv_scal")
                 (rewrite "sqv_scal")
                 (rewrite "sqv_scal")
                 (rewrite "sq_div")
                 (mult-by 1 "sq(v`z)")
                 (rewrite "sq_times")
                 (expand "sq")
                 (hide-all-but (-3 1))
                 (grind))
                ("2"
                 (split 1)
                 (("1" (cross-mult 1))
                  ("2"
                   (assert)
                   (typepred "t!1")
                   (cross-mult 1)
                   (hide-all-but (-2 1 3))
                   (grind))
                  ("3"
                   (cross-mult 1)
                   (typepred "t!1")
                   (hide-all-but (-3 1))
                   (grind))))))
              ("2" (assert))))
            ("2"
             (lemma "posreal_times_posreal_is_posreal")
             (inst - "D" "abs(v`z)"))))
          ("2" (mult-by 1 "abs(v`z)") (hide-all-but (-1 1)) (grind))))
        ("2" (propax))))))
    ("2"
     (flatten)
     (split -1)
     (("1" (flatten) (assert))
      ("2"
       (flatten)
       (split -)
       (("1"
         (flatten)
         (assert)
         (hide 2)
         (split)
         (("1"
           (flatten)
           (lemma
            "cd2d[D, max(Theta_H(s`z, v`z, -1), 0), Theta_H(s`z, v`z, 1)]")
           (inst?)
           (lemma
            "cd2d[D * abs(v`z), max(-H - sign(v`z) * s`z, 0),
                                                                         H - sign(v`z) * s`z]")
           (("1"
             (inst?)
             (replaces (-1 -2) :dir rl)
             (expand "conflict_2D?")
             (skosimp*)
             (inst + "t!1*abs(v`z)")
             (("1"
               (mult-by -3 "sq(v`z)")
               (("1" (hide-all-but (-3 1)) (grind))
                ("2" (lemma "sq_eq_0") (inst?) (assert))))
              ("2"
               (split 1)
               (("1"
                 (typepred "t!1")
                 (mult-by -2 "abs(v`z)")
                 (hide-all-but (-1 1))
                 (grind)
                 (("1" (cross-mult -2)) ("2" (cross-mult 1))
                  ("3" (cross-mult -1)) ("4" (cross-mult 2))))
                ("2"
                 (assert)
                 (typepred "t!1")
                 (mult-by -3 "abs(v`z)")
                 (hide-all-but (-1 1))
                 (grind))))))
            ("2" (assert))
            ("3"
             (lemma "posreal_times_posreal_is_posreal")
             (inst - "D" "abs(v`z)")
             (lemma "abs_eq_0")
             (inst?)
             (assert))))
          ("2"
           (mult-by -1 "abs(v`z)")
           (hide -2)
           (lemma "nneg_mult_max")
           (inst - "abs(v`z)" "Theta_H(s`z, v`z, -1)" "0")
           (replace -1)
           (hide -1)
           (grind))))
        ("2" (propax))))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: cd3d_inf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "cd3d_inf?")
   (split -1)
   (("1"
     (flatten)
     (rewrite "cd2d_inf" :dir rl)
     (expand "horizontal_conflict?")
     (expand "conflict?")
     (skosimp*)
     (inst + "nnt!1")
     (assert))
    ("2"
     (flatten)
     (split -1)
     (("1"
       (flatten)
       (hide 2)
       (lemma "conflict_3D_2D_inf_stable")
       (inst?)
       (assert)
       (rewrite "cd2d")
       (lemma "posreal_times_posreal_is_posreal")
       (inst - "D" "abs(v`z)"))
      ("2" (propax))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: cd3d_inf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "cd3d_inf?")
   (split 1)
   (("1"
     (flatten)
     (rewrite "cd2d_inf" :dir rl)
     (expand "horizontal_conflict?")
     (expand "conflict?")
     (skosimp*)
     (inst + "nnt!1"))
    ("2"
     (flatten)
     (split 2)
     (("1"
       (flatten)
       (lemma "conflict_3D_2D_inf_stable")
       (inst - "s" "v")
       (assert)
       (rewrite "cd2d")
       (lemma "posreal_times_posreal_is_posreal")
       (inst - "D" "abs(v`z)"))
      ("2"
       (case "v`z = 0")
       (("1" (assert) (expand "conflict?") (propax))
        ("2"
         (hide 3)
         (assert)
         (lemma "conflict_on_open_interval")
         (inst - "s" "v")
         (assert)
         (skosimp*)
         (lemma "vertical_los_inside_Theta")
         (inst - "abs(v`z)" "sign(v`z)*s`z" "topen!1")
         (("1"
           (flatten)
           (hide -1)
           (split -1)
           (("1"
             (flatten)
             (expand "Theta_H")
             (cross-mult -1)
             (case "sign(abs(v`z)) = 1")
             (("1"
               (replace -1)
               (hide -1)
               (assert)
               (cross-mult -2)
               (mult-by -3 "abs(v`z)")
               (mult-by -4 "abs(v`z)")
               (typepred "topen!1")
               (mult-by -2 "abs(v`z)")
               (grind))
              ("2"
               (expand "sign")
               (assert)
               (typepred "abs(v`z)")
               (assert))))
            ("2" (hide-all-but (-2 1)) (grind))))
          ("2" (assert))))))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: cd3d_inf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "cd3d_inf_correct")
   (inst? -1)
   (lemma "cd3d_inf_complete")
   (inst?)
   (ground))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal_sq_dtca
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "horizontal_sq_dtca")
   (lemma "derivable_div")
   (inst - "LAMBDA (r): sq(det(s,V(r)))" "LAMBDA (r): sqv(V(r))")
   (("1" (expand "/" -1) (expand "derivable?" -1) (inst - "r1"))
    ("2" (lemma "sqvdot_diff") (inst - "V"))
    ("3"
     (skosimp*)
     (inst - "r!1")
     (lemma "sqv_eq_0")
     (inst - "V(r!1)")
     (assert))
    ("4"
     (expand "sq" 1)
     (lemma "detsv_diff")
     (inst - "V" "s")
     (lemma "derivable_prod")
     (inst - "LAMBDA (r): det(s, V(r))" "LAMBDA (r): det(s, V(r))")
     (("1" (expand "*" -1) (propax)) ("2" (expand "detsv") (propax))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal_sq_dtca
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "detsv_diff")
   (inst - "V" "s")
   (expand "detsv")
   (copy -1)
   (expand "derivable?" -1)
   (inst - "r1")
   (assert)
   (expand "horizontal_sq_dtca")
   (lemma "deriv_div")
   (inst - "lambda (r: real): sq(det(s,V(r)))"
    "lambda (r: real): sqv(V(r))" "r1")
   (("1"
     (assert)
     (split -1)
     (("1"
       (expand "/" -1 1)
       (replace -1)
       (hide -1)
       (lemma "deriv_prod")
       (inst - "lambda (r: real): det(s,V(r))"
        "lambda (r: real): det(s,V(r))" "r1")
       (assert)
       (expand "*" -1)
       (expand "sq" 1 1)
       (replace -1)
       (hide -1)
       (lemma "detsvp_deriv")
       (inst - "V" "r1" "s")
       (expand "detsv")
       (expand "deriv" -1)
       (replace -1)
       (hide -1)
       (lemma "sqvdot_deriv")
       (inst - "V" "r1")
       (expand "deriv" -1)
       (replace -1)
       (hide -1)
       (expand "sq")
       (assert))
      ("2"
       (expand "sq" 1)
       (lemma "derivable_prod")
       (inst - "LAMBDA (r): det(s, V(r))" "LAMBDA (r): det(s, V(r))")
       (expand "*" -1)
       (expand "derivable?" -1)
       (inst - "r1"))
      ("3"
       (lemma "sqvdot_diff")
       (inst - "V")
       (expand "derivable?" -1)
       (inst - "r1"))))
    ("2"
     (skeep)
     (inst - "r")
     (lemma "sqv_eq_0")
     (inst - "V(r)")
     (assert))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal_sq_dtca
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (skoletin* 1 :postfix "p")
   (("1"
     (cross-mult 1)
     (cancel-by 1 "2*sq(sqv(vp))")
     (case "sqv(vp)*wp = (wp * vp)* vp + det(wp, vp) * perpR(vp)")
     (("1"
       (hide 1)
       (case-replace
        "(sqv(vp) * det(s, vp) * det(s, wp)) = det(s, vp) * det(s,sqv(vp)*wp)")
       (("1"
         (hide -1)
         (replaces -1)
         (rewrite "det_add_right")
         (rewrite "det_scal_right")
         (rewrite "det_scal_right")
         (replace -2 :dir rl)
         (lemma "dot_perpR")
         (inst -1 "s" "vp")
         (neg-formula -1)
         (replaces -1 :dir rl)
         (assert)
         (lemma "det_asym")
         (inst -1 "wp" "vp")
         (replaces -1)
         (hide-all-but 1)
         (grind))
        ("2" (hide-all-but 1) (grind))))
      ("2" (hide-all-but 1) (grind))))
    ("2"
     (skeep)
     (inst -5 "r")
     (flatten)
     (rewrite "sq_eq_0")
     (rewrite "sqv_eq_0")
     (assert))
    ("3"
     (skeep)
     (skeep)
     (inst -5 "r")
     (flatten)
     (rewrite "sq_eq_0")
     (rewrite "sqv_eq_0")
     (assert))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: horizontal_sq_dtca
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "horizontal_sq_dtca_deriv")
   (inst?)
   (split -1)
   (("1"
     (replaces -1)
     (lemma "horizontal_sq_dtca_deriv_simpl")
     (inst?)
     (inst -1 "ss")
     (split -1)
     (("1"
       (assert)
       (replaces -1)
       (skeep -2)
       (lemma "line_solution_eps")
       (inst?)
       (("1"
         (assert)
         (replaces -1 :dir rl)
         (lemma "parallel_nzv_Qs")
         (inst?)
         (("1"
           (assert)
           (expand "dir_parallel?")
           (skeep -1)
           (replaces -1)
           (rewrite "det_scal_left")
           (rewrite "dot_scal_right")
           (rewrite "det_scal_right")
           (lemma "s_dot_Qs_lt_0")
           (inst?)
           (lemma "det_s_Qs_lt_0")
           (inst?)
           (name-replace "ww" "deriv_rv(V)(r1)")
           (lemma "det_asym")
           (inst -1 "Qs(ss,eps)" "ww")
           (replaces -1)
           (lemma "det_perpR")
           (inst -1 "ww" "Qs(ss,eps)")
           (replaces -1)
           (lemma "dot_comm")
           (inst -1 "ww" "perpR(Qs(ss,eps))")
           (replaces -1)
           (lemma "Q_eq_Qs_perp")
           (inst -1 "eps" "ss")
           (replaces -1)
           (case "(D / sqrt(sqv(ss) - sq(D))) > 0")
           (("1"
             (name-replace "dd" "(D / sqrt(sqv(ss) - sq(D)))")
             (name-replace "bb" "det(ss, Qs(ss, eps))")
             (case-replace
              "-eps * dd * perpR(Qs(ss, eps)) * ww = dd*(-eps*(perpR(Qs(ss, eps)) * ww))")
             (("1"
               (hide -1)
               (name-replace "aa" "(perpR(Qs(ss, eps)) * ww)")
               (name-replace "cc" "ss * Qs(ss, eps)")
               (hide -4 -5)
               (case-replace
                "(2 * (pk * cc * (pk * -aa) * (pk * bb)) / sq(sqv(pk * Qs(ss, eps)))) = ((2*pk*pk*pk)/sq(sqv(pk * Qs(ss, eps))))*(cc*-aa*bb)")
               (("1"
                 (hide -1)
                 (case-replace
                  "((2 * pk * pk * pk) / sq(sqv(pk * Qs(ss, eps)))) > 0")
                 (("1"
                   (name-replace "ee"
                    " ((2 * pk * pk * pk) / sq(sqv(pk * Qs(ss, eps))))")
                   (grind)
                   (("1"
                     (grind-reals)
                     (("1" (neg-formula 1) (neg-formula -6))
                      ("2" (neg-formula 1) (neg-formula -6))))
                    ("2"
                     (grind-reals)
                     (("1" (neg-formula 1) (neg-formula -6))
                      ("2" (neg-formula 1) (neg-formula -6))))))
                  ("2" (hide 2) (cross-mult 1) (grind-reals))))
                ("2" (hide 2) (assert))))
              ("2" (hide 2) (assert))))
            ("2" (hide 2) (grind-reals))))
          ("2" (inst -1 "r1"))))
        ("2" (inst -1 "r1"))))
      ("2" (propax))))
    ("2" (propax))))


proof_type: t_proof
decl_type: tcc
library: ACCoRD
theory: horizontal_sq_dtca
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (skeep)
   (skeep)
   (rewrite "sq_eq_0")
   (rewrite "sqv_eq_0")
   (inst -1 "r")
   (assert))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: cd2d_ever
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (case "v /= zero")
   (("1"
     (label "vnz" -1)
     (hide "vnz")
     (name "aa" "sqv(v)")
     (name "bb" "2*(s*v)")
     (name "cc" "sqv(s)-sq(D)")
     (name "qq" "quadratic(aa,bb,cc)")
     (label "qqname" -1)
     (hide -)
     (name "gg" "sq(s*v)-sqv(v)*(sqv(s)-sq(D))")
     (label "ggname" -1)
     (hide "ggname")
     (case "NOT discr(aa,bb,cc) = 4*gg")
     (("1"
       (hide 2)
       (expand "aa")
       (expand "bb")
       (expand "cc")
       (expand "gg")
       (grind))
      ("2"
       (label "discrlem" -1)
       (hide "discrlem")
       (case "NOT (horizontal_conflict?[D](s,v) IFF (EXISTS (t:nnreal): qq(t)<0))")
       (("1"
         (case "NOT (horizontal_conflict?[D](s,v) IFF (EXISTS (t:nnreal): sqv(s+t*v)<sq(D)))")
         (("1" (hide-all-but 1) (expand "horizontal_conflict?") (propax))
          ("2"
           (replace -1)
           (hide -1)
           (hide-all-but 1)
           (ground)
           (("1"
             (skosimp*)
             (inst + "t!1")
             (expand "qq")
             (expand "aa")
             (expand "bb")
             (expand "cc")
             (grind))
            ("2"
             (skosimp*)
             (inst + "t!1")
             (expand "qq")
             (expand "aa")
             (expand "bb")
             (expand "cc")
             (grind))))))
        ("2"
         (replace -1)
         (hide -1)
         (expand "cd2d_ever")
         (lift-if)
         (split +)
         (("1"
           (flatten)
           (reveal "ggname")
           (replace -1)
           (hide "ggname")
           (split +)
           (("1"
             (flatten)
             (case "aa>0")
             (("1"
               (case "-bb/(2*aa)>=0")
               (("1"
                 (inst + "-bb/(2*aa)")
                 (reveal "discrlem")
                 (case "discr(aa,bb,cc)>0")
                 (("1"
                   (mult-by -1 "1/aa")
                   (("1" (hide-all-but (-1 -4 1)) (expand "qq") (grind))
                    ("2"
                     (case "1/aa>0")
                     (("1" (assert)) ("2" (hide 2) (cross-mult 1))))))
                  ("2" (assert))))
                ("2" (cross-mult 1) (expand "bb") (assert))
                ("3" (assert))))
              ("2"
               (expand "aa")
               (lemma "sqv_eq_0")
               (inst?)
               (assert)
               (reveal "vnz")
               (ground))))
            ("2"
             (flatten)
             (skosimp*)
             (expand "qq")
             (lemma "a_gt_0_discr_gt_0")
             (inst - "aa" "bb" "cc" "t!1")
             (("1"
               (expand "quadratic")
               (assert)
               (split -)
               (("1" (reveal "discrlem") (assert))
                ("2"
                 (expand "aa" 1)
                 (lemma "sqv_eq_0")
                 (inst?)
                 (assert)
                 (reveal "vnz")
                 (ground))))
              ("2"
               (flatten)
               (expand "aa")
               (lemma "sqv_eq_0")
               (inst?)
               (reveal "vnz")
               (ground))))))
          ("2"
           (flatten)
           (split)
           (("1"
             (flatten)
             (inst + "0")
             (expand "qq")
             (expand "quadratic")
             (expand "cc")
             (assert))
            ("2"
             (flatten)
             (skosimp*)
             (lemma "quad_min_mono_inc")
             (inst - "aa" "bb" "cc" "t!1" "0")
             (("1"
               (assert)
               (split -)
               (("1"
                 (expand "qq")
                 (expand "quadratic")
                 (expand "aa")
                 (expand "bb")
                 (expand "cc")
                 (grind))
                ("2"
                 (case "t!1 = 0")
                 (("1"
                   (replace -1)
                   (expand "qq")
                   (expand "aa")
                   (expand "bb")
                   (expand "cc")
                   (grind))
                  ("2" (assert))))
                ("3"
                 (case "aa > 0")
                 (("1" (cross-mult 1) (expand "bb") (assert))
                  ("2"
                   (expand "aa")
                   (lemma "sqv_eq_0")
                   (inst?)
                   (reveal "vnz")
                   (ground))))
                ("4"
                 (expand "aa")
                 (lemma "sqv_eq_0")
                 (inst?)
                 (reveal "vnz")
                 (ground))))
              ("2"
               (flatten)
               (expand "aa")
               (lemma "sqv_eq_0")
               (inst?)
               (reveal "vnz")
               (ground))))))))))
      ("3"
       (flatten)
       (expand "aa")
       (lemma "sqv_eq_0")
       (inst?)
       (reveal "vnz")
       (ground))))
    ("2"
     (flatten)
     (replace -1)
     (hide -)
     (expand "horizontal_conflict?")
     (expand "cd2d_ever")
     (assert)
     (case "sqv(s)<sq(D) IFF norm(s)<D")
     (("1" (ground))
      ("2"
       (hide 2)
       (lemma "sqrt_sqv_norm")
       (inst?)
       (replace -1 :dir rl)
       (lemma "sqrt_lt")
       (inst - "sqv(s)" "sq(D)")
       (ground))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: cd3d_ever
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (split)
   (("1"
     (flatten)
     (expand "conflict?")
     (skosimp*)
     (lemma "vertical_los_inside_Theta")
     (inst - "abs(v`z)" "sign(v`z)*s`z" "nnt!1")
     (("1"
       (flatten)
       (hide -1)
       (split -1)
       (("1"
         (flatten)
         (expand "Theta_H")
         (case "sign(abs(v`z)) = 1")
         (("1"
           (replace -1)
           (hide -1)
           (assert)
           (cross-mult -1)
           (cross-mult -2)
           (expand "conflict_2D?")
           (inst + "nnt!1*abs(v`z)")
           (("1"
             (rewrite "vect2_scal")
             (case "abs(v`z) * vect2(s) + nnt!1 * abs(v`z) * vect2(v) = abs(v`z)*(vect2(s)+nnt!1*vect2(v))")
             (("1"
               (replace -1)
               (hide -1)
               (rewrite "sqv_scal")
               (rewrite "sq_times")
               (div-by 1 "sq(v`z)")
               (lemma "sq_eq_0")
               (inst?)
               (assert))
              ("2" (hide-all-but 1) (grind))))
            ("2"
             (hide -3)
             (hide -3)
             (hide-all-but (-1 1))
             (lemma "nnreal_times_nnreal_is_nnreal")
             (inst - "nnt!1" "abs(v`z)")
             (expand "max")
             (lift-if)
             (ground))))
          ("2" (expand "sign") (assert))))
        ("2" (hide-all-but (-1 1)) (grind))))
      ("2" (assert))))
    ("2"
     (flatten)
     (lemma
      "conflict_2D_on_open_interval[D *abs( v`z),
                                     max(-H - sign(v`z) * s`z, 0),
                                     H - sign(v`z) * s`z]")
     (("1"
       (inst?)
       (replaces -1)
       (skosimp*)
       (name "t!2" "topen!1/abs(v`z)")
       (("1"
         (case "max(Theta_H[H](sign(v`z)*s`z,abs(v`z),-1),0)< t!2 AND t!2 < Theta_H[H](sign(v`z)*s`z,abs(v`z),1)")
         (("1"
           (flatten)
           (expand "conflict?")
           (inst + "t!2")
           (("1"
             (split 1)
             (("1"
               (lemma "vertical_los_inside_Theta")
               (inst - "abs(v`z)" "sign(v`z)*s`z" "t!2")
               (flatten)
               (hide -2)
               (split -1)
               (("1" (hide-all-but (-1 +)) (grind))
                ("2" (hide-all-but (-1 -2 1)) (grind :exclude "Theta_H"))
                ("3" (propax))))
              ("2"
               (rewrite "vect2_scal")
               (case "abs(v`z) * vect2(s) + topen!1 * vect2(v) = abs(v`z)*(vect2(s) + t!2*vect2(v))")
               (("1"
                 (replace -1)
                 (rewrite "sqv_scal")
                 (rewrite "sq_times")
                 (div-by -7 "sq(v`z)"))
                ("2"
                 (replace -3 :dir rl)
                 (hide-all-but (1 3))
                 (grind :exclude "abs"))))))
            ("2" (hide-all-but (-1 -2 1)) (grind :exclude "Theta_H"))))
          ("2"
           (replace -1 1 :dir rl)
           (hide-all-but (-2 -3 -6 1 3))
           (split)
           (("1"
             (cross-mult 1)
             (lemma "nneg_mult_max")
             (inst - "abs(v`z)"
              "Theta_H[H](sign(v`z) * s`z, abs(v`z), -1)" "0")
             (replace -1)
             (expand "Theta_H")
             (case "v`z>0")
             (("1" (expand "abs") (expand "sign") (assert))
              ("2"
               (case "v`z < 0")
               (("1" (expand "abs") (expand "sign") (assert))
                ("2" (assert))))))
            ("2"
             (cross-mult 1)
             (case "H - sign(v`z) * s`z<=Theta_H[H](sign(v`z) * s`z, abs(v`z), 1) * abs(v`z)")
             (("1" (assert))
              ("2"
               (hide-all-but 1)
               (expand "Theta_H")
               (cross-mult 1)
               (grind))))))))
        ("2" (assert))))
      ("2" (assert)) ("3" (assert)) ("4" (grind-reals))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: cd3d_ever
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (split)
   (("1"
     (flatten)
     (expand "conflict?")
     (skosimp*)
     (case "nnt!1  = 0")
     (("1"
       (replace -1)
       (assert)
       (hide -1)
       (case "exists (epH:posreal): FORALL (th: real): abs(th)<epH IMPLIES abs(s`z+th*v`z)<H")
       (("1"
         (skeep -1)
         (case "exists (epD:posreal): FORALL (td: real): abs(td)<epD IMPLIES sqv(vect2(s)+td*vect2(v))<sq(D)")
         (("1"
           (skeep -1)
           (name "newt" "min(epD/2,epH/2)")
           (inst + "newt")
           (assert)
           (inst - "newt")
           (assert)
           (split -)
           (("1"
             (inst - "newt")
             (assert)
             (assert)
             (hide-all-but (-2 1))
             (grind))
            ("2" (hide-all-but (-1 1)) (grind))))
          ("2"
           (case "vect2(v) = zero")
           (("1" (replace -1) (assert))
            ("2"
             (hide -1)
             (hide -1)
             (hide 3)
             (assert)
             (lemma "sqv_cont")
             (expand "continuous_vr?")
             (inst - "vect2(s) ")
             (expand "continuous_vr?")
             (inst - "sq(D) - sqv(vect2(s))")
             (skosimp*)
             (inst + "delta!1/norm(vect2(v))")
             (("1"
               (skosimp*)
               (inst - "vect2(s) + td!1*vect2(v)")
               (split -1)
               (("1"
                 (name "const1" "sqv(vect2(s) + td!1*vect2(v))")
                 (replace -1)
                 (name "const2" "sqv(vect2(s))")
                 (replace -1)
                 (hide -1)
                 (hide -1)
                 (hide -2)
                 (grind))
                ("2" (assert) (rewrite "norm_scal") (cross-mult -1))))
              ("2"
               (lemma "posreal_div_posreal_is_posreal")
               (inst - "delta!1" "norm(vect2(v))")
               (("1" (assert))
                ("2" (lemma "vectors_2D.norm_eq_0") (inst?) (assert))))
              ("3" (lemma "vectors_2D.norm_eq_0") (inst?) (assert))))))))
        ("2"
         (assert)
         (case "v`z = 0")
         (("1" (replace -1) (assert))
          ("2"
           (inst + "(H-abs(s`z))/abs(v`z)")
           (("1"
             (skosimp*)
             (cross-mult -1)
             (hide-all-but (-1 -2 2))
             (rewrite "abs_mult" :dir rl)
             (both-sides "+" "abs(s`z)" -1)
             (assert)
             (lemma "triangle")
             (inst - "v`z * th!1" "s`z")
             (assert))
            ("2"
             (assert)
             (lemma "posreal_div_posreal_is_posreal")
             (inst?)
             (ground))
            ("3" (assert))))))))
      ("2" (assert) (inst + "nnt!1") (ground))))
    ("2"
     (flatten)
     (skosimp*)
     (expand "conflict?")
     (inst + "topen!1")
     (assert))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: cd3d_ever
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "cd3d_ever?")
   (split)
   (("1"
     (flatten)
     (split -)
     (("1" (flatten) (assert))
      ("2"
       (flatten)
       (split -)
       (("1"
         (flatten)
         (assert)
         (hide 2)
         (split)
         (("1"
           (flatten)
           (lemma
            "cd2d[D * abs(v`z), max(-H - sign(v`z) * s`z, 0),
                                                               H - sign(v`z) * s`z]")
           (("1"
             (inst?)
             (lemma
              "cd2d[D, max(Theta_H(s`z, v`z, -1), 0), Theta_H(s`z, v`z, 1)]")
             (("1"
               (inst?)
               (replaces (-1 -2) :dir rl)
               (expand "conflict_2D?")
               (skosimp*)
               (inst + "t!1/abs(v`z)")
               (("1"
                 (rewrite "sqv_add")
                 (rewrite "sqv_add")
                 (rewrite "vect2_scal")
                 (rewrite "sqv_scal")
                 (rewrite "sqv_scal")
                 (rewrite "sqv_scal")
                 (rewrite "sq_div")
                 (mult-by 1 "sq(v`z)")
                 (rewrite "sq_times")
                 (expand "sq")
                 (hide-all-but (-3 1))
                 (grind))
                ("2"
                 (split 1)
                 (("1" (cross-mult 1))
                  ("2"
                   (assert)
                   (typepred "t!1")
                   (cross-mult 1)
                   (hide-all-but (-2 1 3))
                   (grind))
                  ("3"
                   (cross-mult 1)
                   (typepred "t!1")
                   (hide-all-but (-3 1))
                   (grind))))))
              ("2" (assert))))
            ("2"
             (lemma "posreal_times_posreal_is_posreal")
             (inst - "D" "abs(v`z)"))))
          ("2" (mult-by 1 "abs(v`z)") (hide-all-but (-1 1)) (grind))))
        ("2" (propax))))))
    ("2"
     (flatten)
     (split -1)
     (("1" (flatten) (assert))
      ("2"
       (flatten)
       (split -)
       (("1"
         (flatten)
         (assert)
         (hide 2)
         (split)
         (("1"
           (flatten)
           (lemma
            "cd2d[D, max(Theta_H(s`z, v`z, -1), 0), Theta_H(s`z, v`z, 1)]")
           (inst?)
           (lemma
            "cd2d[D * abs(v`z), max(-H - sign(v`z) * s`z, 0),
                                                               H - sign(v`z) * s`z]")
           (("1"
             (inst?)
             (replaces (-1 -2) :dir rl)
             (expand "conflict_2D?")
             (skosimp*)
             (inst + "t!1*abs(v`z)")
             (("1"
               (mult-by -3 "sq(v`z)")
               (("1" (hide-all-but (-3 1)) (grind))
                ("2" (lemma "sq_eq_0") (inst?) (assert))))
              ("2"
               (split 1)
               (("1"
                 (typepred "t!1")
                 (mult-by -2 "abs(v`z)")
                 (hide-all-but (-1 1))
                 (grind)
                 (("1" (cross-mult -2)) ("2" (cross-mult 1))
                  ("3" (cross-mult -1)) ("4" (cross-mult 2))))
                ("2"
                 (assert)
                 (typepred "t!1")
                 (mult-by -3 "abs(v`z)")
                 (hide-all-but (-1 1))
                 (grind))))))
            ("2" (cross-mult -2) (assert))
            ("3"
             (cross-mult 1)
             (assert)
             (lemma "posreal_times_posreal_is_posreal")
             (inst - "D" "abs(v`z)"))))
          ("2"
           (mult-by -1 "abs(v`z)")
           (hide -2)
           (lemma "nneg_mult_max")
           (inst - "abs(v`z)" "Theta_H(s`z, v`z, -1)" "0")
           (replace -1)
           (hide -1)
           (grind))))
        ("2" (propax))))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: cd3d_ever
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "cd3d_ever?")
   (split -1)
   (("1"
     (flatten)
     (rewrite "cd2d_ever_def")
     (expand "horizontal_conflict?")
     (skosimp*)
     (expand "conflict?")
     (assert)
     (inst + "nnt!1"))
    ("2"
     (flatten)
     (split -1)
     (("1"
       (flatten)
       (hide 2)
       (lemma "conflict_2D_stable")
       (inst?)
       (assert)
       (rewrite "cd2d")
       (lemma "posreal_times_posreal_is_posreal")
       (inst - "D" "abs(v`z)"))
      ("2" (propax))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: cd3d_ever
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "cd3d_ever?")
   (split 1)
   (("1"
     (flatten)
     (expand "conflict?")
     (skosimp*)
     (rewrite "cd2d_ever_def")
     (expand "horizontal_conflict?")
     (inst + "nnt!1"))
    ("2"
     (flatten)
     (split 2)
     (("1"
       (flatten)
       (lemma "conflict_2D_stable")
       (inst - "s" "v")
       (assert)
       (rewrite "cd2d")
       (lemma "posreal_times_posreal_is_posreal")
       (inst - "D" "abs(v`z)"))
      ("2"
       (case "v`z = 0")
       (("1" (assert) (expand "conflict?") (propax))
        ("2"
         (hide 3)
         (assert)
         (lemma "conflict_on_open_interval")
         (inst - "s" "v")
         (assert)
         (skosimp*)
         (lemma "vertical_los_inside_Theta")
         (inst - "abs(v`z)" "sign(v`z)*s`z" "topen!1")
         (("1"
           (flatten)
           (hide -1)
           (split -1)
           (("1"
             (flatten)
             (expand "Theta_H")
             (cross-mult -1)
             (case "sign(abs(v`z)) = 1")
             (("1"
               (replace -1)
               (hide -1)
               (assert)
               (cross-mult -2)
               (case "H - sign(v`z) * s`z > 0")
               (("1" (expand "max") (lift-if) (ground))
                ("2"
                 (lemma "nnreal_times_nnreal_is_nnreal")
                 (inst - "topen!1" "abs(v`z)")
                 (assert))))
              ("2" (hide-all-but 1) (expand "sign") (propax))))
            ("2" (hide-all-but (-2 1)) (grind))))
          ("2" (assert))))))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: cd3d_ever
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "cd3d_ever_correct")
   (inst? -1)
   (lemma "cd3d_ever_complete")
   (inst?)
   (ground))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: vertical_los_criterion
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "time_vertical_exit_by")
   (case "-eps*MinRelVertSpeed = -(eps*MinRelVertSpeed)")
   (("1"
     (replace -1)
     (rewrite "Theta_H_symm")
     (rewrite "Theta_H_symm")
     (hide -1)
     (lift-if)
     (lift-if)
     (lift-if)
     (ground))
    ("2" (assert))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: vertical_los_criterion
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "min_rel_vert_speed")
   (lift-if)
   (lift-if)
   (lift-if)
   (assert)
   (ground)
   (rewrite "abs_neg"))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: vertical_los_criterion
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "sq_gt")
   (inst?)
   (assert)
   (hide 2)
   (rewrite "sq_norm")
   (rewrite "sq_norm")
   (assert)
   (case "eps*v`z > 0")
   (("1"
     (expand "vs_bound_crit?")
     (assert)
     (flatten)
     (case "eps * horizontal_tca(vect2(s), vect2(nv)) * nv`z >=
                                                                                               eps * horizontal_tca(vect2(s), vect2(v)) * v`z")
     (("1" (grind :exclude "horizontal_tca"))
      ("2"
       (hide 3)
       (case "NOT sqv(horizontal_tca(s,nv)*vect2(nv)) >= sqv(horizontal_tca(s,v)*vect2(v))")
       (("1"
         (rewrite "vect2_add")
         (rewrite "vect2_add")
         (rewrite "vect2_scal")
         (rewrite "vect2_scal")
         (rewrite "horizontal_sq_dtca_eq" :dir rl)
         (rewrite "horizontal_sq_dtca_eq" :dir rl)
         (expand "horizontal_sq_dtca")
         (rewrite "sqv_scal")
         (rewrite "sqv_scal")
         (assert)
         (assert)
         (expand "horizontal_tca" 1)
         (rewrite "sq_div")
         (("1"
           (rewrite "sq_div")
           (case "FORALL (ap1:posreal,b:real): b/sq(ap1) * ap1 = b/ap1")
           (("1"
             (rewrite -1)
             (("1"
               (rewrite -1)
               (lemma "orthogonal_basis")
               (inst-cp - "nv" "perpR(nv)" "s")
               (assert)
               (case "vect2(nv) /= zero AND
                                                                                                                                                                                    perpR(vect2(nv)) /= zero AND
                                                                                                                                                                                     orthogonal?(vect2(nv), perpR(vect2(nv)))")
               (("1"
                 (flatten)
                 (assert)
                 (inst - "v" "perpR(v)" "s")
                 (case "vect2(v) /= zero AND
                                                                                                                                                                                                      perpR(vect2(v)) /= zero AND orthogonal?(vect2(v), perpR(vect2(v)))")
                 (("1"
                   (flatten)
                   (assert)
                   (lemma "orthogonal_basis_sqv")
                   (inst - _ _ "v" "perpR(v)" "s")
                   (inst?)
                   (assert)
                   (lemma "orthogonal_basis_sqv")
                   (inst - _ _ "nv" "perpR(nv)" "s")
                   (inst?)
                   (assert)
                   (rewrite "sqv_perpR")
                   (rewrite "sqv_perpR")
                   (assert)
                   (rewrite "det_perpR" :dir rl)
                   (rewrite "det_perpR" :dir rl)
                   (assert)
                   (rewrite "sq_neg")
                   (rewrite "sq_neg")
                   (assert)
                   (rewrite "sq_div")
                   (("1"
                     (rewrite "sq_div")
                     (("1"
                       (rewrite "sq_div")
                       (rewrite "sq_div")
                       (assert)
                       (rewrite -7)
                       (("1"
                         (rewrite -7)
                         (("1" (rewrite -7) (rewrite -7) (assert))
                          ("2"
                           (lemma "vectors_2D.sqv_eq_0")
                           (inst?)
                           (assert))))
                        ("2"
                         (lemma "vectors_2D.sqv_eq_0")
                         (inst?)
                         (assert))))
                      ("2"
                       (lemma "vectors_2D.sqv_eq_0")
                       (inst?)
                       (assert))))
                    ("2"
                     (lemma "vectors_2D.sqv_eq_0")
                     (inst?)
                     (assert))))
                  ("2"
                   (split)
                   (("1" (flatten) (replace -1) (assert))
                    ("2"
                     (flatten)
                     (lemma "perpR_perpR")
                     (inst?)
                     (replace -2)
                     (assert)
                     (case "--vect2(v) = zero")
                     (("1" (assert) (replace -1) (assert))
                      ("2" (replace -1 :dir rl) (assert))))
                    ("3" (hide-all-but 1) (grind))))))
                ("2"
                 (split)
                 (("1" (flatten) (replace -1) (assert))
                  ("2"
                   (flatten)
                   (lemma "perpR_perpR")
                   (inst - "nv")
                   (replace -2)
                   (assert)
                   (case "--vect2(nv) = zero")
                   (("1" (assert) (replace -1) (assert))
                    ("2" (replace -1 :dir rl) (assert))))
                  ("3" (hide-all-but 1) (grind))))))
              ("2"
               (lemma "vectors_2D.sqv_eq_0")
               (inst?)
               (assert)
               (replace -1)
               (assert))))
            ("2" (hide-all-but 1) (grind))))
          ("2"
           (lemma "vectors_2D.sqv_eq_0")
           (inst?)
           (assert)
           (replace -1)
           (assert))))
        ("2"
         (hide 2)
         (rewrite "sqv_scal")
         (rewrite "sqv_scal")
         (expand "horizontal_tca" -1)
         (rewrite "sq_div")
         (("1"
           (rewrite "sq_div")
           (("1"
             (case "FORALL (ap1:posreal,b:real): b/sq(ap1) * ap1 = b/ap1")
             (("1"
               (rewrite -1)
               (("1"
                 (rewrite -1)
                 (("1"
                   (hide -1)
                   (cross-mult -1)
                   (("1"
                     (invoke (case "%1") (! -1 1))
                     (("1"
                       (assert)
                       (cross-mult -2)
                       (invoke (case "%1") (! -2 1))
                       (("1"
                         (assert)
                         (case "NOT nv`z * horizontal_tca(vect2(s), vect2(nv)) * eps <
                                                                                                                                                                                                                                                 v`z * horizontal_tca(vect2(s), vect2(v)) * eps")
                         (("1" (assert))
                          ("2"
                           (expand "horizontal_tca" -1)
                           (cross-mult -1)
                           (cross-mult -1)
                           (case "(sq(-(vect2(s) * vect2(v))) * sqv(vect2(nv))) > 0")
                           (("1"
                             (case "nv`z * sqv(vect2(v)) * -(vect2(s) * vect2(nv)) * eps > 0")
                             (("1"
                               (mult-ineq -3 -6)
                               (name "K1"
                                     "sqv(vect2(v))*(-(vect2(s)*vect2(nv)))*(-vect2(s)*vect2(v))*sqv(vect2(nv))")
                               (case "K1 > 0")
                               (("1" (mult-by -12 "K1") (hide 1) (grind))
                                ("2"
                                 (hide (-1 -2 2))
                                 (hide (-1 -2 -3 -6))
                                 (expand "K1")
                                 (rewrite
                                  "posreal_times_posreal_is_posreal")
                                 (hide 2)
                                 (invoke (case "%1") (! 1 2))
                                 (("1" (assert))
                                  ("2"
                                   (hide 2)
                                   (rewrite
                                    "posreal_times_posreal_is_posreal")
                                   (("1" (hide 2) (grind))
                                    ("2"
                                     (hide 2)
                                     (rewrite
                                      "posreal_times_posreal_is_posreal"))))))))
                              ("2"
                               (lemma "posreal_times_posreal_is_posreal")
                               (inst - "eps*nv`z"
                                "sqv(vect2(v)) * -(vect2(s) * vect2(nv))")
                               (("1" (assert))
                                ("2"
                                 (invoke (case "%1") (! 1 2))
                                 (("1" (assert))
                                  ("2"
                                   (hide 2)
                                   (rewrite
                                    "posreal_times_posreal_is_posreal"))))))))
                            ("2"
                             (rewrite "posreal_times_posreal_is_posreal")
                             (lemma "sq_eq_0")
                             (inst?)
                             (assert))))))
                        ("2"
                         (lemma "vectors_2D.sqv_eq_0")
                         (inst?)
                         (assert)
                         (replace -1)
                         (assert))))
                      ("2"
                       (lemma "vectors_2D.sqv_eq_0")
                       (inst?)
                       (assert)
                       (replace -1)
                       (assert))))
                    ("2"
                     (lemma "vectors_2D.sqv_eq_0")
                     (inst?)
                     (assert)
                     (replace -1)
                     (assert))))
                  ("2"
                   (lemma "vectors_2D.sqv_eq_0")
                   (inst?)
                   (assert)
                   (replace -1)
                   (assert))))
                ("2"
                 (lemma "vectors_2D.sqv_eq_0")
                 (inst?)
                 (assert)
                 (replace -1)
                 (assert))))
              ("2" (hide-all-but 1) (grind))))
            ("2"
             (lemma "vectors_2D.sqv_eq_0")
             (inst?)
             (assert)
             (replace -1)
             (assert))))
          ("2"
           (lemma "vectors_2D.sqv_eq_0")
           (inst?)
           (assert)
           (replace -1)
           (assert))))))))
    ("2"
     (assert)
     (case "v`z = 0")
     (("1"
       (expand "vs_bound_crit?")
       (replace -1)
       (assert)
       (rewrite "vz_distr_add")
       (rewrite "vz_distr_add")
       (rewrite "vz_scal")
       (rewrite "vz_scal")
       (replace -1)
       (assert)
       (mult-by -2 "horizontal_tca(vect2(s), vect2(nv))")
       (("1" (assert))
        ("2"
         (hide 3)
         (expand "horizontal_tca" 1)
         (cross-mult 1)
         (ground)
         (lemma "vectors_2D.sqv_eq_0")
         (inst?)
         (assert)
         (replace -1)
         (assert))))
      ("2"
       (case "NOT eps*v`z < 0")
       (("1" (typepred "eps") (ground))
        ("2"
         (expand "vs_bound_crit?")
         (assert)
         (rewrite "vz_distr_add")
         (rewrite "vz_distr_add")
         (rewrite "vz_scal")
         (rewrite "vz_scal")
         (assert)
         (mult-by -1 "horizontal_tca(vect2(s), vect2(v))")
         (("1"
           (mult-by -2 "horizontal_tca(vect2(s), vect2(nv))")
           (("1" (assert))
            ("2"
             (hide 3)
             (hide 3)
             (hide 3)
             (expand "horizontal_tca" 1)
             (cross-mult 1)
             (ground)
             (lemma "vectors_2D.sqv_eq_0")
             (inst?)
             (assert)
             (replace -1)
             (assert))))
          ("2"
           (invoke (case "%1") (! 1 2))
           (("1" (assert))
            ("2"
             (hide 2)
             (hide 4)
             (hide 4)
             (expand "horizontal_tca" 1)
             (cross-mult 1)
             (ground)
             (lemma "vectors_2D.sqv_eq_0")
             (inst?)
             (assert)
             (replace -1)
             (assert))))))))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: vertical_los_criterion
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "vs_bound_crit_vect?")
   (split +)
   (("1"
     (flatten)
     (assert)
     (split -)
     (("1"
       (flatten)
       (assert)
       (case "NOT (eps * (nvo - nvi)`z >= eps * (vo - vi)`z)")
       (("1" (hide 2) (hide (-3 -6)) (grind))
        ("2"
         (name "vv" "vo-vi")
         (replace -1)
         (case "vi-vo = -vv")
         (("1"
           (replace -1)
           (name "v1" "nvo-vi")
           (replace -1)
           (name "v2" "nvi-vo")
           (replace -1)
           (case "NOT nvo-nvi = v1-v2-vv")
           (("1"
             (hide-all-but 1)
             (expand "v1")
             (expand "v2")
             (expand "vv")
             (grind))
            ("2"
             (replace -1)
             (hide (-1 -2 -3 -4 -5))
             (rewrite "vz_neg")
             (assert)
             (case "vv`z * (vect2(- vv) * vect2(vv)) * -eps +
                                                            (- vv)`z * sqv(vect2(vv)) * eps
                                                            >= 0")
             (("1" (grind))
              ("2"
               (hide-all-but (-5 1))
               (case "vect2(-vv)*vect2(vv) = -sqv(vect2(vv))")
               (("1"
                 (replace -1)
                 (mult-by -2 "sqv(vect2(vv))")
                 (hide -1)
                 (grind))
                ("2" (hide-all-but 1) (grind))))))))
          ("2" (hide-all-but 1) (expand "vv") (grind))))))
      ("2" (flatten) (assert) (hide-all-but (-2 1)) (grind))))
    ("2"
     (flatten)
     (assert)
     (split -)
     (("1" (flatten) (hide-all-but (-1 1)) (grind))
      ("2" (flatten) (grind))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: vertical_los_criterion
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "vertical_los_criterion?")
   (flatten)
   (assert)
   (split +)
   (("1"
     (lemma "vs_bound_crit_coord")
     (inst - "eps" "nvi" "nvo" "zero" "s" "vi" "vo")
     (assert))
    ("2"
     (case "vi-vo = -(vo-vi)")
     (("1"
       (replace -1)
       (hide -1)
       (rewrite "vz_neg")
       (rewrite "vz_neg")
       (rewrite "min_rel_vert_speed_symm")
       (expand "min_rel_vert_speed")
       (lift-if)
       (split +)
       (("1" (flatten) (assert) (hide-all-but (-1 -4 -7 1)) (grind))
        ("2"
         (flatten)
         (assert)
         (expand "max" +)
         (lift-if)
         (lift-if)
         (lift-if)
         (ground)
         (("1"
           (hide-all-but (-5 -8 +))
           (case "eps = sign((vo-vi)`z)")
           (("1" (replace -1) (hide -1) (grind))
            ("2" (hide-all-but (1 3)) (typepred "eps") (grind))))
          ("2"
           (hide-all-but (-1 -4 -7 +))
           (case "eps = sign((vo-vi)`z)")
           (("1" (replace -1) (hide -1) (grind))
            ("2" (hide-all-but (1 4)) (typepred "eps") (grind))))
          ("3"
           (hide-all-but (-1 -4 -7 +))
           (case "eps = sign((vo-vi)`z)")
           (("1" (replace -1) (hide -1) (grind))
            ("2" (hide-all-but (1 4)) (typepred "eps") (grind))))
          ("4"
           (hide-all-but (-3 -6 +))
           (case "eps = sign((vo-vi)`z)")
           (("1" (replace -1) (hide -1) (grind))
            ("2" (hide-all-but (1 5)) (typepred "eps") (grind))))))))
      ("2" (hide-all-but 1) (grind))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: vertical_los_criterion
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "vertical_sep_after")
   (skeep)
   (case "vz >= 0")
   (("1"
     (case "sz + tr*vz >= 0")
     (("1"
       (hide -3)
       (expand "abs" -)
       (assert)
       (mult-by -4 "vz")
       (expand "abs" +)
       (lift-if)
       (ground))
      ("2" (hide 2) (mult-by -1 "tr") (grind))))
    ("2"
     (case "sz + tr*vz <= -H")
     (("1" (mult-by -4 "-vz") (grind))
      ("2" (hide 3) (mult-by 2 "tr") (grind))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: vertical_los_criterion
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "vertical_los_criterion?")
   (flatten)
   (skoletin 1)
   (typepred "teb")
   (assert)
   (lemma "vertical_sep_after_def")
   (inst?)
   (assert)
   (hide 2)
   (case "eps*(s`z + teb*nv`z)>=H")
   (("1" (hide-all-but (-1 1)) (typepred "eps") (grind))
    ("2"
     (hide 2)
     (expand "time_vertical_exit_by")
     (lift-if)
     (ground)
     (("1"
       (expand "min_rel_vert_speed")
       (mult-by -6 "teb")
       (assert)
       (case "s`z + teb*(eps*MinRelVertSpeed) = eps*H")
       (("1" (assert) (typepred "eps") (ground))
        ("2"
         (replace -3 1)
         (expand "Theta_H" +)
         (hide-all-but 1)
         (typepred "eps")
         (grind))))
      ("2"
       (expand "min_rel_vert_speed")
       (expand "min" -1)
       (lift-if)
       (split -)
       (("1"
         (flatten)
         (replace -2)
         (case "eps*(s`z+teb*v`z)>=H")
         (("1"
           (copy 1)
           (mult-by 1 "teb")
           (case "eps*nv`z>=eps*v`z")
           (("1" (mult-by -1 "teb") (hide-all-but (-1 -2 +)) (grind))
            ("2" (hide-all-but (-7 1 3)) (typepred "eps") (grind))))
          ("2"
           (mult-by 2 "teb")
           (replace -2)
           (lemma "Theta_H_on_H")
           (inst?)
           (assert)
           (hide-all-but (-1 -5 1 2))
           (typepred "eps")
           (grind :exclude "Theta_H"))))
        ("2"
         (flatten)
         (lemma "Theta_H_on_H")
         (inst - "1" "eps*MinRelVertSpeed" "s`z")
         (assert)
         (replace -2 :dir rl)
         (typepred "eps")
         (split -)
         (("1"
           (replace -1)
           (assert)
           (expand "abs" -3)
           (lift-if)
           (assert)
           (ground)
           (("1"
             (lemma "nnreal_times_nnreal_is_nnreal")
             (inst?)
             (hide-all-but (-1 -2 -7))
             (grind))
            ("2"
             (case "nv`z>=MinRelVertSpeed")
             (("1" (mult-by -1 "teb") (assert)) ("2" (assert))))))
          ("2"
           (replace -1)
           (assert)
           (assert)
           (case "-s`z+teb*MinRelVertSpeed = H")
           (("1"
             (case "-nv`z>=MinRelVertSpeed")
             (("1" (mult-by -1 "teb") (assert)) ("2" (assert))))
            ("2"
             (lemma "nnreal_times_nnreal_is_nnreal")
             (inst?)
             (hide-all-but (-1 -4 -7 1))
             (grind))))))))))))


proof_type: t_proof
decl_type: tcc
library: ACCoRD
theory: vertical_los_criterion
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "vertical_los_inside_Theta")
   (inst - "eps*MinRelVertSpeed" "sz" "0")
   (assert))


proof_type: t_proof
decl_type: tcc
library: ACCoRD
theory: vertical_los_criterion
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "vertical_los_inside_Theta")
   (inst-cp - "eps*MinRelVertSpeed" "sz" "0")
   (inst - "vz" "sz" "0")
   (assert)
   (flatten)
   (expand "min")
   (lift-if)
   (assert))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: vertical_los_crit_CA
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "vs_bound_crit_indep")
   (expand "vertical_los_crit_CA?")
   (expand "vertical_los_criterion?")
   (flatten)
   (inst - "dv_to_ec(vertical_decision_vect)(s, v)" "nv" "s" "v")
   (assert))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: vertical_los_crit_CA
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "vertical_los_crit_CA_independent")
   (inst?)
   (assert)
   (assert)
   (name "epsi" "dv_to_ec(vertical_decision_vect)(s, v)")
   (replace -1)
   (expand "dv_to_ec" -1)
   (expand "vertical_decision_vect" -1)
   (lift-if)
   (split -1)
   (("1"
     (flatten)
     (assert)
     (invoke (case "NOT %1") (! 2 1))
     (("1" (hide-all-but (-1 1)) (ground))
      ("2"
       (replace -1)
       (assert)
       (case "s`z = 0")
       (("1"
         (case "sign(s`z) = 1")
         (("1"
           (replace -1)
           (replace -2)
           (assert)
           (flatten)
           (case "NOT v`z>=0")
           (("1" (expand "sign") (assert))
            ("2"
             (assert)
             (expand "sign")
             (case "v = zero")
             (("1" (replace -1) (assert))
              ("2"
               (case "sqv(v)=0")
               (("1" (lemma "vectors_3D.sqv_eq_0") (inst?) (assert))
                ("2"
                 (assert)
                 (case "v`z = 0")
                 (("1"
                   (rewrite "vz_distr_add")
                   (rewrite "vz_distr_add")
                   (rewrite "vz_scal")
                   (rewrite "vz_scal")
                   (assert))
                  ("2"
                   (case "NOT v`z > 0")
                   (("1" (assert))
                    ("2"
                     (assert)
                     (case "NOT epsi = 1")
                     (("1"
                       (lemma "break_vz_symm_sz")
                       (inst - "v")
                       (assert))
                      ("2"
                       (assert)
                       (replace -1)
                       (assert)
                       (rewrite "vz_distr_add")
                       (rewrite "vz_distr_add")
                       (rewrite "vz_scal")
                       (rewrite "vz_scal")
                       (assert)
                       (replace -4)
                       (assert)
                       (mult-by -2 "horizontal_tca(s,v)")
                       (("1" (assert) (expand "abs") (propax))
                        ("2"
                         (invoke (case "%1") (! 1 2))
                         (("1" (assert))
                          ("2"
                           (hide 2)
                           (expand "horizontal_tca" 1)
                           (cross-mult 1)
                           (ground)
                           (lemma "vectors_2D.sqv_eq_0")
                           (inst?)
                           (assert)
                           (replace -1)
                           (assert))))))))))))))))))
          ("2" (replace -1) (assert))))
        ("2"
         (assert)
         (case "sign(s`z) = sign(v`z)")
         (("1"
           (assert)
           (hide 3)
           (case "epsi * (s + horizontal_tca((vect2(s)), vect2(v)) * v)`z >=0")
           (("1"
             (typepred "epsi")
             (expand "abs")
             (lift-if)
             (lift-if)
             (lift-if)
             (assert)
             (ground))
            ("2"
             (hide 4)
             (case "FORALL (egr:real): sign(egr)*egr >= 0")
             (("1"
               (inst-cp - "v`z")
               (inst - "s`z")
               (assert)
               (mult-by -2 "horizontal_tca(s,v)")
               (("1"
                 (assert)
                 (lemma "break_vz_symm_sz")
                 (inst - "s")
                 (assert)
                 (replace -7)
                 (replace -1 :dir rl)
                 (replace -4 :dir rl)
                 (rewrite "vz_distr_add")
                 (rewrite "vz_distr_add")
                 (rewrite "vz_scal")
                 (rewrite "vz_scal")
                 (assert))
                ("2"
                 (expand "horizontal_tca" 1)
                 (cross-mult 1)
                 (ground)
                 (("1"
                   (lemma "vectors_2D.sqv_eq_0")
                   (inst?)
                   (assert)
                   (replace -1)
                   (assert))
                  ("2"
                   (assert)
                   (lemma "vectors_2D.sqv_eq_0")
                   (inst?)
                   (assert)
                   (replace -1)
                   (assert))
                  ("3"
                   (lemma "vectors_2D.sqv_eq_0")
                   (inst?)
                   (assert)
                   (replace -1)
                   (assert))
                  ("4"
                   (lemma "vectors_2D.sqv_eq_0")
                   (inst?)
                   (assert)
                   (replace -1)
                   (assert))))))
              ("2" (hide-all-but 1) (grind))))))
          ("2"
           (assert)
           (lemma "break_vz_symm_sz")
           (inst - "s")
           (assert)
           (replace -4)
           (expand "vertical_los_crit_CA?")
           (expand "vertical_decision_vect")
           (expand "dv_to_ec")
           (assert)
           (replace -3)
           (replace -4)
           (expand "vertical_los_criterion?")
           (flatten)
           (assert)
           (expand "min_rel_vert_speed")
           (assert)
           (case "NOT epsi*nv`z >= 0")
           (("1" (lift-if) (ground))
            ("2"
             (hide -9)
             (assert)
             (case "sign(nv`z) = sign(s`z)")
             (("1"
               (replace -6 :dir rl)
               (case "epsi*nv`z >= 0")
               (("1"
                 (mult-by -1 "horizontal_tca(s,nv)")
                 (("1"
                   (assert)
                   (case "epsi = sign((s + horizontal_tca((vect2(s)), vect2(nv)) * nv)`z)")
                   (("1"
                     (case "FORALL (egr:real): sign(egr)*egr = abs(egr)")
                     (("1"
                       (inst-cp -
                        "(s + horizontal_tca((vect2(s)), vect2(nv)) * nv)`z")
                       (inst - "s`z")
                       (replace -3 :dir rl)
                       (replace -7 :dir rl)
                       (assert)
                       (rewrite "vz_distr_add")
                       (rewrite "vz_distr_add")
                       (rewrite "vz_scal")
                       (rewrite "vz_scal")
                       (assert)
                       (replace -2 :dir rl)
                       (replace -1 :dir rl)
                       (assert))
                      ("2" (hide-all-but 1) (grind))))
                    ("2"
                     (replace -4)
                     (replace -7 :dir rl)
                     (hide-all-but (-1 -2 1))
                     (grind :exclude "horizontal_tca"))))
                  ("2"
                   (expand "horizontal_tca" 1)
                   (cross-mult 1)
                   (ground)
                   (("1"
                     (lemma "vectors_2D.sqv_eq_0")
                     (inst?)
                     (assert)
                     (replace -1)
                     (assert))
                    ("2"
                     (lemma "vectors_2D.sqv_eq_0")
                     (inst?)
                     (assert)
                     (replace -1)
                     (assert))
                    ("3"
                     (lemma "vectors_2D.sqv_eq_0")
                     (inst?)
                     (assert)
                     (replace -1)
                     (assert))
                    ("4"
                     (lemma "vectors_2D.sqv_eq_0")
                     (inst?)
                     (assert)
                     (replace -1)
                     (assert))))))
                ("2" (replace -6 :dir rl) (propax))))
              ("2"
               (replace -2)
               (case "NOT nv`z = 0")
               (("1" (hide-all-but (-1 -2 1 2)) (grind))
                ("2"
                 (rewrite "vz_distr_add")
                 (rewrite "vz_distr_add")
                 (rewrite "vz_scal")
                 (rewrite "vz_scal")
                 (replace -1)
                 (assert))))))))))))))
    ("2"
     (flatten)
     (assert)
     (hide 4)
     (split -1)
     (("1" (flatten) (replace -1) (assert))
      ("2"
       (flatten)
       (lemma "break_vz_symm_sz")
       (inst?)
       (invoke (case "%1") (! -1 1))
       (("1"
         (assert)
         (flatten)
         (replace -2)
         (replace -1)
         (case "FORALL (egr:real): sign(egr)*egr = abs(egr)")
         (("1"
           (inst - "(s + horizontal_tca((vect2(s)), vect2(v)) * v)`z")
           (replace -2 :dir rl)
           (assert)
           (replace -1 :dir rl)
           (replace -1)
           (hide-all-but (-4 +))
           (typepred "epsi")
           (grind :exclude "horizontal_tca"))
          ("2" (hide-all-but 1) (grind))))
        ("2" (flatten) (replace -1) (assert))))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: vertical_los_crit_CA
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "vertical_los_crit_CA?")
   (expand "vertical_los_criterion?")
   (expand "dv_to_ec")
   (flatten)
   (expand "min_rel_vert_speed")
   (expand "max")
   (lift-if)
   (assert))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: vertical_los_crit_CA
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "vertical_los_crit_CA?")
   (lemma "vertical_los_criterion_coord")
   (inst - "MinRelVertSpeedi" "MinRelVertSpeedo"
    "dv_to_ec(vertical_decision_vect)(s,vo-vi)" "nvi" "nvo" "s" "vi"
    "vo")
   (assert)
   (split -)
   (("1"
     (expand "vertical_los_criterion?" -1)
     (flatten)
     (expand "dv_to_ec")
     (rewrite "vz_distr_sub")
     (expand "min_rel_vert_speed")
     (expand "max")
     (lift-if)
     (lift-if)
     (lift-if)
     (ground))
    ("2"
     (typepred "dv_to_ec(vertical_decision_vect)")
     (inst - "s" "vo-vi")
     (assert)
     (case "-(vo-vi) = vi-vo")
     (("1" (assert)) ("2" (hide-all-but 1) (grind))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: vertical_los_crit_CA
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "vertical_los_crit_CA?")
   (lemma "vertical_los_criterion_coord")
   (inst?)
   (assert)
   (typepred "dv_to_ec(vertical_decision_vect)")
   (inst - "s" "vo-vi")
   (assert)
   (case "-(vo-vi) = vi-vo")
   (("1" (assert)) ("2" (hide-all-but 1) (grind))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: vertical_los_crit_CA
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (skoletin 1 :postfix "aa")
   (skoletin 1 :postfix "aa")
   (flatten)
   (lemma "vertical_los_crit_CA_coordinated")
   (inst - "MinRelVertSpeedi" "MinRelVertSpeedo" "nvi" "nvo" "s" "vi"
    "vo")
   (assert)
   (lemma "vertical_los_crit_CA_independent_strong")
   (inst - "max(MinRelVertSpeedo,MinRelVertSpeedi)" "nvo-nvi" "s"
    "vo-vi")
   (assert)
   (flatten)
   (assert)
   (ground))


proof_type: t_proof
decl_type: tcc
library: ACCoRD
theory: vertical_los_crit_CA
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (inst + "LAMBDA (s,v:Vect3): IF s = zero THEN v ELSE s ENDIF")
   (skeep)
   (grind)
   (("1" (decompose-equality +)) ("2" (decompose-equality +))
    ("3" (decompose-equality +))
    ("4"
     (decompose-equality +)
     (("1" (decompose-equality 2)) ("2" (decompose-equality 2))
      ("3" (decompose-equality 2))))
    ("5" (decompose-equality 2)) ("6" (decompose-equality 2))))


proof_type: j_proof
decl_type: tcc
library: ACCoRD
theory: vertical_los_crit_CA
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (typepred "dv")
   (inst - "s" "v")
   (assert)
   (replace -2)
   (flatten)
   (expand "dv_to_ec")
   (lemma "break_vz_symm_comm")
   (inst - "dv(s,v)")
   (assert))


proof_type: t_proof
decl_type: tcc
library: ACCoRD
theory: vertical_los_crit_CA
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (assert)
   (hide -2)
   (expand "CA_cyl_conflict_ever?")
   (rewrite "cd3d_ever" :dir rl)
   (expand "conflict?")
   (inst + "horizontal_tca(s,v)")
   (("1"
     (hide-all-but (-2 3))
     (expand "zero")
     (grind :exclude "horizontal_tca"))
    ("2"
     (expand "horizontal_tca")
     (cross-mult 1)
     (ground)
     (lemma "vectors_2D.sqv_eq_0")
     (inst?)
     (assert))))


proof_type: t_proof
decl_type: tcc
library: ACCoRD
theory: vertical_los_crit_CA
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (assert)
   (expand "CA_cyl_conflict_ever?")
   (lemma "cd3d_ever")
   (inst?)
   (assert)
   (expand "conflict?")
   (inst + "horizontal_tca(s,v)")
   (("1"
     (assert)
     (replace -3)
     (name "A" "vectors_3D.zero")
     (case "A`z = zero`z")
     (("1"
       (copy -2)
       (replace -5 -1 :dir rl)
       (replace -1 -2 :dir rl)
       (rewrite "vz_distr_add")
       (rewrite "vz_scal")
       (replace -2)
       (case "vect2(A) = vect2(zero)")
       (("1"
         (replace -2 -1 :dir rl)
         (rewrite "vect2_add")
         (rewrite "vect2_scal")
         (assert)
         (replace -1)
         (assert))
        ("2" (assert) (replace -3 :dir rl) (assert))))
      ("2" (assert) (replace -1 :dir rl) (assert))))
    ("2"
     (expand "horizontal_tca" 1)
     (cross-mult 1)
     (ground)
     (("1" (lemma "vectors_2D.sqv_eq_0") (inst?) (assert))
      ("2" (lemma "vectors_2D.sqv_eq_0") (inst?) (assert))))))


proof_type: j_proof
decl_type: tcc
library: ACCoRD
theory: vertical_los_crit_CA
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (split +)
   (("1"
     (assert)
     (typepred "vertical_decision_vect(s, v)")
     (replace -2)
     (propax))
    ("2"
     (expand "vertical_decision_vect")
     (case "vect2(v)=zero IFF vect2(-v)=zero")
     (("1"
       (replace -1 :dir rl)
       (case "CA_cyl_conflict_ever?(s, v) IFF CA_cyl_conflict_ever?(-s, -v)")
       (("1"
         (replace -1 :dir rl)
         (hide -1)
         (case "vect2(-s) * vect2(-v)=vect2(s) * vect2(v)")
         (("1"
           (replace -1)
           (hide -1)
           (case "NOT vect2(v) = zero IMPLIES (-s + horizontal_tca(vect2(-s), vect2(-v)) * -v) = -(s + horizontal_tca(vect2(s), vect2(v)) * v)")
           (("1"
             (case "FORALL (vvss:Vect3): vvss=zero IFF -vvss = zero")
             (("1"
               (inst-cp - "s")
               (inst - "v")
               (hide -1)
               (replace -1 :dir rl)
               (case "FORALL (vvss:Vect3): vvss/=zero IFF -vvss /= zero")
               (("1"
                 (inst-cp - "s")
                 (hide -1)
                 (replace -1 :dir rl)
                 (rewrite "vz_neg")
                 (case "FORALL (vvss:Vect3): vvss=zero IFF -vvss = zero")
                 (("1"
                   (inst - "v")
                   (rewrite "vz_neg")
                   (case "v = zero IFF vect2(v) = zero AND v`z = 0")
                   (("1"
                     (lift-if)
                     (lift-if)
                     (lift-if)
                     (lift-if)
                     (lift-if)
                     (lift-if)
                     (assert)
                     (ground))
                    ("2"
                     (hide-all-but 1)
                     (expand "zero")
                     (grind)
                     (decompose-equality +))))
                  ("2"
                   (hide-all-but 1)
                   (skeep)
                   (ground)
                   (("1"
                     (case "vvss = -(-vvss)")
                     (("1" (replace -1 +) (replace -2) (assert))
                      ("2" (assert))))
                    ("2"
                     (case "vvss = -(-vvss)")
                     (("1" (replace -1 +) (replace -2) (assert))
                      ("2" (assert))))))))
                ("2"
                 (hide-all-but 1)
                 (skeep)
                 (ground)
                 (("1"
                   (case "vvss = -(-vvss)")
                   (("1" (replace -1 +) (replace -2) (assert))
                    ("2" (assert))))
                  ("2"
                   (case "vvss = -(-vvss)")
                   (("1" (replace -1 +) (replace -2) (assert))
                    ("2" (assert))))))))
              ("2"
               (assert)
               (hide-all-but 1)
               (skeep)
               (ground)
               (("1"
                 (case "vvss = -(-vvss)")
                 (("1" (replace -1 +) (replace -2) (assert))
                  ("2" (assert))))
                ("2"
                 (case "vvss = -(-vvss)")
                 (("1" (replace -1 +) (replace -2) (assert))
                  ("2" (assert))))))))
            ("2"
             (hide-all-but 1)
             (flatten)
             (assert)
             (case "horizontal_tca(vect2(-s), vect2(-v))=horizontal_tca(vect2(s), vect2(v))")
             (("1"
               (replace -1)
               (hide -1)
               (grind :exclude "horizontal_tca"))
              ("2"
               (hide 3)
               (expand "horizontal_tca")
               (cross-mult 1)
               (grind))))
            ("3" (ground)) ("4" (hide 2) (ground))))
          ("2" (hide-all-but 1) (grind))))
        ("2"
         (hide-all-but 1)
         (expand "CA_cyl_conflict_ever?")
         (rewrite "cd3d_ever" :dir rl)
         (rewrite "cd3d_ever" :dir rl)
         (expand "conflict?")
         (ground)
         (("1" (skosimp*) (inst + "nnt!1") (grind))
          ("2" (skosimp*) (inst + "nnt!1") (grind))))))
      ("2" (hide 2) (expand "zero") (grind))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: wedge_optimum_2D
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (case "FORALL (p,w,v,a,b,e1,e2): intersects_segment_fun?(p,w,v,a,b,e1,e2) = intersects_segment?(p,w,v,a,b,e1,e2)")
   (("1" (decompose-equality))
    ("2"
     (hide 2)
     (skeep)
     (expand "intersects_segment_fun?")
     (name "tlow1"
           "IF v * e1 > 0 THEN ((p - w) * e1) / (v * e1)
                                                    ELSIF v * e1 = 0 AND (w - p) * e1 < 0 THEN 1 + b
                                                    ELSE a
                                                    ENDIF")
     (("1"
       (replace -1)
       (name "thigh1"
             "IF v * e1 < 0 THEN ((p - w) * e1) / (v * e1)
                                                              ELSIF v * e1 = 0 AND (w - p) * e1 < 0 THEN a - 1
                                                              ELSE b
                                                              ENDIF")
       (("1"
         (replace -1)
         (name "tlow2"
               "IF v * e2 > 0 THEN ((p - w) * e2) / (v * e2)
                                                                    ELSIF v * e2 = 0 AND (w - p) * e2 < 0 THEN 2 + b
                                                                    ELSE a
                                                                    ENDIF")
         (("1"
           (replace -1)
           (name "thigh2"
                 "IF v * e2 < 0 THEN ((p - w) * e2) / (v * e2)
                                                                              ELSIF v * e2 = 0 AND (w - p) * e2 < 0 THEN a - 2
                                                                              ELSE b
                                                                              ENDIF")
           (("1"
             (replace -1)
             (name "tlow" "max(max(tlow1,tlow2),a)")
             (("1"
               (replace -1)
               (name "thigh" "min(min(thigh1,thigh2),b)")
               (("1"
                 (replace -1)
                 (case "NOT (FORALL (t:real): (a<=t AND t<=b AND (w+t*v-p)*e1>=0 AND (w+t*v-p)*e2>=0) IFF (tlow <= t AND t<=thigh))")
                 (("1"
                   (hide-all-but 1)
                   (skeep)
                   (ground)
                   (("1"
                     (expand "tlow")
                     (case "t>=tlow1 AND t>=tlow2")
                     (("1"
                       (flatten)
                       (expand "max")
                       (lift-if)
                       (lift-if)
                       (lift-if)
                       (assert))
                      ("2"
                       (hide 2)
                       (split +)
                       (("1"
                         (expand "tlow1")
                         (lift-if)
                         (assert)
                         (ground)
                         (("1"
                           (cross-mult 1)
                           (hide-all-but (-4 1))
                           (grind))
                          ("2" (hide-all-but (-1 -2 -5)) (grind))))
                        ("2"
                         (expand "tlow2")
                         (lift-if)
                         (assert)
                         (ground)
                         (("1"
                           (cross-mult 1)
                           (hide-all-but (-5 1))
                           (grind))
                          ("2" (hide-all-but (-1 -2 -6)) (grind))))))
                      ("3"
                       (assert)
                       (flatten)
                       (expand "tlow2" 1)
                       (ground))))
                    ("2"
                     (expand "thigh")
                     (case "t<=thigh1 AND t<=thigh2")
                     (("1"
                       (flatten)
                       (expand "min")
                       (lift-if)
                       (lift-if)
                       (lift-if)
                       (assert))
                      ("2"
                       (hide 2)
                       (split +)
                       (("1"
                         (expand "thigh1")
                         (lift-if)
                         (assert)
                         (ground)
                         (("1"
                           (cross-mult 1)
                           (hide-all-but (-4 1))
                           (grind))
                          ("2" (hide-all-but (-1 -2 -5)) (grind))))
                        ("2"
                         (expand "thigh2")
                         (lift-if)
                         (assert)
                         (ground)
                         (("1"
                           (cross-mult 1)
                           (hide-all-but (-5 1))
                           (grind))
                          ("2" (hide-all-but (-1 -2 -6)) (grind))))))
                      ("3"
                       (flatten)
                       (hide 2)
                       (expand "thigh2" 1)
                       (ground))))
                    ("3"
                     (expand "tlow")
                     (expand "thigh")
                     (case "t>=tlow1 AND t<=thigh1")
                     (("1"
                       (hide (-2 -3))
                       (flatten)
                       (expand "thigh1")
                       (expand "tlow1")
                       (lift-if)
                       (split -)
                       (("1"
                         (flatten)
                         (cross-mult -2)
                         (hide-all-but (-2 1))
                         (grind))
                        ("2"
                         (flatten)
                         (split -)
                         (("1" (flatten) (assert))
                          ("2"
                           (flatten)
                           (assert)
                           (split -)
                           (("1"
                             (flatten)
                             (cross-mult -2)
                             (hide-all-but (-2 3))
                             (grind))
                            ("2"
                             (flatten)
                             (assert)
                             (split -)
                             (("1" (propax))
                              ("2"
                               (case "v*e1 = 0")
                               (("1"
                                 (mult-by -1 "t")
                                 (hide-all-but (-1 1 5))
                                 (grind))
                                ("2" (assert))))))))))))
                      ("2"
                       (expand "min")
                       (expand "max")
                       (lift-if)
                       (lift-if)
                       (lift-if)
                       (assert)
                       (ground))
                      ("3" (flatten) (expand "thigh1" +) (ground))))
                    ("4"
                     (expand "thigh")
                     (expand "tlow")
                     (case "tlow2 <= t AND t<=thigh2")
                     (("1"
                       (hide (-2 -3))
                       (flatten)
                       (expand "thigh2")
                       (expand "tlow2")
                       (lift-if)
                       (split -)
                       (("1"
                         (flatten)
                         (cross-mult -2)
                         (hide-all-but (-2 1))
                         (grind))
                        ("2"
                         (flatten)
                         (split -)
                         (("1" (flatten) (assert))
                          ("2"
                           (flatten)
                           (assert)
                           (split -)
                           (("1"
                             (flatten)
                             (cross-mult -2)
                             (hide-all-but (-2 3))
                             (grind))
                            ("2"
                             (flatten)
                             (ground)
                             (case "v*e2 = 0")
                             (("1"
                               (mult-by -1 "t")
                               (hide-all-but (-1 1 5))
                               (grind))
                              ("2" (assert))))))))))
                      ("2"
                       (expand "min")
                       (expand "max")
                       (lift-if)
                       (lift-if)
                       (lift-if)
                       (assert)
                       (ground))
                      ("3" (flatten) (expand "thigh2" +) (ground))))))
                  ("2"
                   (hide-all-but (-1 1))
                   (iff)
                   (ground)
                   (("1"
                     (inst - "tlow")
                     (expand "intersects_segment?")
                     (assert)
                     (flatten)
                     (inst + "tlow")
                     (assert))
                    ("2"
                     (expand "intersects_segment?")
                     (skeep -1)
                     (inst - "t")
                     (assert)
                     (ground))))))
                ("2" (hide-all-but 1) (expand "thigh2") (ground))
                ("3" (hide-all-but 1) (expand "thigh1") (ground))))
              ("2" (hide-all-but 1) (expand "tlow2") (ground))
              ("3" (hide-all-but 1) (expand "tlow1") (ground))))
            ("2" (hide-all-but 1) (ground))))
          ("2" (hide-all-but 1) (ground))))
        ("2" (hide-all-but 1) (ground))))
      ("2" (hide-all-but 1) (ground))))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: wedge_optimum_2D
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (ground)
   (("1" (expand "intersects_segment?") (skeep -1) (inst + "t") (assert))
    ("2"
     (expand "intersects_segment?")
     (skeep -1)
     (inst + "t")
     (assert))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: wedge_optimum_2D
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (decompose-equality)
   (iff)
   (ground)
   (("1"
     (expand "on_segment_in_wedge?")
     (skeep -1)
     (inst + "t")
     (assert))
    ("2"
     (expand "on_segment_in_wedge?")
     (skeep -1)
     (inst + "t")
     (assert))))


proof_type: f_proof
decl_type: formula
library: ACCoRD
theory: wedge_optimum_2D
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (name "mspis" "max_segment_point_in_slice(p, w, v, a, b, e1, e2)")
   (label "mspisdef" -1)
   (replace -1)
   (assert)
   (expand "max_segment_point_in_slice")
   (name "tlow1"
         "IF v * e1 > 0 THEN ((p - w) * e1) / (v * e1)
                                    ELSIF v * e1 = 0 AND (w - p) * e1 < 0 THEN 1 + b
                                    ELSE a
                                    ENDIF")
   (("1"
     (replace -1)
     (name "thigh1"
           "IF v * e1 < 0 THEN ((p - w) * e1) / (v * e1)
                                          ELSIF v * e1 = 0 AND (w - p) * e1 < 0 THEN a - 1
                                          ELSE b
                                          ENDIF")
     (("1"
       (replace -1)
       (name "tlow2"
             "IF v * e2 > 0 THEN ((p - w) * e2) / (v * e2)
                                            ELSIF v * e2 = 0 AND (w - p) * e2 < 0 THEN 2 + b
                                            ELSE a
                                            ENDIF")
       (("1"
         (replace -1)
         (name "thigh2"
               "IF v * e2 < 0 THEN ((p - w) * e2) / (v * e2)
                                                  ELSIF v * e2 = 0 AND (w - p) * e2 < 0 THEN a - 2
                                                  ELSE b
                                                  ENDIF")
         (("1"
           (replace -1)
           (case "v = zero")
           (("1"
             (replace -1)
             (assert)
             (replace "mspisdef" :dir rl)
             (split +)
             (("1"
               (flatten)
               (expand "on_segment_in_wedge?")
               (assert)
               (expand "intersects_segment?")
               (skeep -1)
               (assert)
               (inst + "t")
               (assert))
              ("2"
               (skeep)
               (expand "on_segment_in_wedge?")
               (skeep -1)
               (assert))))
            ("2"
             (label "vnz" 1)
             (hide "vnz")
             (name "tlow" "max(max(tlow1,tlow2),a)")
             (("1"
               (replace -1)
               (name "thigh" "min(min(thigh1,thigh2),b)")
               (("1"
                 (replace -1)
                 (name "aa" "sqv(v)")
                 (replace -1)
                 (name "bb" "2*(v*(w-p))")
                 (copy -1)
                 (mult-by -1 "tlow")
                 (replace -1)
                 (copy -2)
                 (mult-by -1 "thigh")
                 (replace -1)
                 (hide (-1 -2))
                 (name "cc" "sqv(w-p)")
                 (case "NOT (FORALL (t:real): (a<=t AND t<=b AND (w+t*v-p)*e1>=0 AND (w+t*v-p)*e2>=0) IFF (tlow <= t AND t<=thigh))")
                 (("1"
                   (hide-all-but 1)
                   (skeep)
                   (ground)
                   (("1"
                     (expand "tlow")
                     (case "t>=tlow1 AND t>=tlow2")
                     (("1"
                       (flatten)
                       (expand "max")
                       (lift-if)
                       (lift-if)
                       (lift-if)
                       (assert))
                      ("2"
                       (hide 2)
                       (split +)
                       (("1"
                         (expand "tlow1")
                         (lift-if)
                         (assert)
                         (ground)
                         (("1"
                           (cross-mult 1)
                           (hide-all-but (-4 1))
                           (grind))
                          ("2" (hide-all-but (-1 -2 -5)) (grind))))
                        ("2"
                         (expand "tlow2")
                         (lift-if)
                         (assert)
                         (ground)
                         (("1"
                           (cross-mult 1)
                           (hide-all-but (-5 1))
                           (grind))
                          ("2" (hide-all-but (-1 -2 -6)) (grind))))))
                      ("3"
                       (assert)
                       (flatten)
                       (expand "tlow2" 1)
                       (ground))))
                    ("2"
                     (expand "thigh")
                     (case "t<=thigh1 AND t<=thigh2")
                     (("1"
                       (flatten)
                       (expand "min")
                       (lift-if)
                       (lift-if)
                       (lift-if)
                       (assert))
                      ("2"
                       (hide 2)
                       (split +)
                       (("1"
                         (expand "thigh1")
                         (lift-if)
                         (assert)
                         (ground)
                         (("1"
                           (cross-mult 1)
                           (hide-all-but (-4 1))
                           (grind))
                          ("2" (hide-all-but (-1 -2 -5)) (grind))))
                        ("2"
                         (expand "thigh2")
                         (lift-if)
                         (assert)
                         (ground)
                         (("1"
                           (cross-mult 1)
                           (hide-all-but (-5 1))
                           (grind))
                          ("2" (hide-all-but (-1 -2 -6)) (grind))))))
                      ("3"
                       (flatten)
                       (hide 2)
                       (expand "thigh2" 1)
                       (ground))))
                    ("3"
                     (expand "tlow")
                     (expand "thigh")
                     (case "t>=tlow1 AND t<=thigh1")
                     (("1"
                       (hide (-2 -3))
                       (flatten)
                       (expand "thigh1")
                       (expand "tlow1")
                       (lift-if)
                       (split -)
                       (("1"
                         (flatten)
                         (cross-mult -2)
                         (hide-all-but (-2 1))
                         (grind))
                        ("2"
                         (flatten)
                         (split -)
                         (("1" (flatten) (assert))
                          ("2"
                           (flatten)
                           (assert)
                           (split -)
                           (("1"
                             (flatten)
                             (cross-mult -2)
                             (hide-all-but (-2 3))
                             (grind))
                            ("2"
                             (flatten)
                             (assert)
                             (split -)
                             (("1" (propax))
                              ("2"
                               (case "v*e1 = 0")
                               (("1"
                                 (mult-by -1 "t")
                                 (hide-all-but (-1 1 5))
                                 (grind))
                                ("2" (assert))))))))))))
                      ("2"
                       (expand "min")
                       (expand "max")
                       (lift-if)
                       (lift-if)
                       (lift-if)
                       (assert)
                       (ground))
                      ("3" (flatten) (expand "thigh1" +) (ground))))
                    ("4"
                     (expand "thigh")
                     (expand "tlow")
                     (case "tlow2 <= t AND t<=thigh2")
                     (("1"
                       (hide (-2 -3))
                       (flatten)
                       (expand "thigh2")
                       (expand "tlow2")
                       (lift-if)
                       (split -)
                       (("1"
                         (flatten)
                         (cross-mult -2)
                         (hide-all-but (-2 1))
                         (grind))
                        ("2"
                         (flatten)
                         (split -)
                         (("1" (flatten) (assert))
                          ("2"
                           (flatten)
                           (assert)
                           (split -)
                           (("1"
                             (flatten)
                             (cross-mult -2)
                             (hide-all-but (-2 3))
                             (grind))
                            ("2"
                             (flatten)
                             (ground)
                             (case "v*e2 = 0")
                             (("1"
                               (mult-by -1 "t")
                               (hide-all-but (-1 1 5))
                               (grind))
                              ("2" (assert))))))))))
                      ("2"
                       (expand "min")
                       (expand "max")
                       (lift-if)
                       (lift-if)
                       (lift-if)
                       (assert)
                       (ground))
                      ("3" (flatten) (expand "thigh2" +) (ground))))))
                  ("2"
                   (label "intdef" -1)
                   (name "ff" "quadratic(aa,bb,cc)")
                   (label "ffdef" -1)
                   (case "aa * tlow ^ 2 + bb * tlow <= aa * thigh ^ 2 + bb * thigh IFF ff(tlow)<=ff(thigh)")
                   (("1"
                     (replace -1)
                     (name "maxt"
                           "IF ff(tlow) <= ff(thigh) THEN thigh ELSE tlow ENDIF")
                     (label "maxtname" -1)
                     (replace -1)
                     (split +)
                     (("1"
                       (flatten)
                       (expand "intersects_segment?")
                       (skeep -1)
                       (copy "intdef")
                       (inst - "t")
                       (assert)
                       (flatten)
                       (expand "on_segment_in_wedge?")
                       (inst + "maxt")
                       (inst - "maxt")
                       (assert)
                       (case "tlow <= maxt AND maxt <= thigh")
                       (("1" (replace -1) (assert) (flatten) (ground))
                        ("2"
                         (hide 2)
                         (hide (-8 -9))
                         (expand "maxt" +)
                         (lift-if +)
                         (ground))))
                      ("2"
                       (skeep)
                       (expand "on_segment_in_wedge?")
                       (skeep -1)
                       (copy "intdef")
                       (inst - "t")
                       (assert)
                       (flatten)
                       (case "ff(t)<=ff(maxt)")
                       (("1"
                         (rewrite "sq_le" 1 :dir rl)
                         (rewrite "sq_norm")
                         (rewrite "sq_norm")
                         (replace -6 +)
                         (replace "mspisdef" 1 :dir rl)
                         (hide-all-but (-1 1))
                         (expand "ff")
                         (expand "aa")
                         (expand "bb")
                         (expand "cc")
                         (grind))
                        ("2"
                         (hide-all-but (-1 -2 "maxtname" 1))
                         (case "tlow <= maxt AND maxt <= thigh")
                         (("1"
                           (lemma "quad_intv_max_at_endpoint")
                           (inst - "aa" "bb" "cc" "tlow" "thigh")
                           (("1"
                             (assert)
                             (case "aa > 0")
                             (("1"
                               (assert)
                               (flatten)
                               (split -)
                               (("1"
                                 (inst - "t")
                                 (assert)
                                 (expand "ff")
                                 (lift-if)
                                 (ground))
                                ("2"
                                 (inst - "t")
                                 (assert)
                                 (expand "ff")
                                 (lift-if)
                                 (ground))))
                              ("2"
                               (reveal "vnz")
                               (expand "aa" +)
                               (lemma "sqv_eq_0")
                               (inst?)
                               (assert))))
                            ("2"
                             (reveal "vnz")
                             (expand "aa" +)
                             (lemma "sqv_eq_0")
                             (inst?)
                             (assert))))
                          ("2" (lift-if) (ground))))))))
                    ("2" (hide-all-but 1) (expand "ff") (grind))))))
                ("2"
                 (hide 2)
                 (hide "mspisdef")
                 (expand "thigh2" +)
                 (ground))
                ("3" (hide 2) (expand "thigh1" +) (ground))))
              ("2" (hide 2) (expand "tlow2" +) (ground))
              ("3" (hide 2) (expand "tlow1" +) (ground))))))
          ("2" (hide-all-but 1) (ground))))
        ("2" (hide-all-but 1) (ground))))
      ("2" (hide-all-but 1) (ground))))
    ("2" (hide-all-but 1) (ground))))


