Recursion, Induction and Rewriting

In this notebook, we're going to use Imandra to prove some interesting properties of functional programs. We'll learn a bit about induction, lemmas and rewrite rules along the way.

Let's start by defining our own append function on lists. It should take two lists as input, and compute the result of appending (concatenating) the elements of the first list with those of the second list.

Note: Imandra contains a List module with predefined functions like List.append (i.e., (@)), List.rev, etc. However, we define our own versions of these functions by hand in this notebook so that all definitions and proofs are illustrated from scratch.

In [1]:
let rec append x y = 
 match x with
  | [] -> y
  | x :: xs -> x :: append xs y
Out[1]:
val append : 'a list -> 'a list -> 'a list = <fun>
termination proof

Termination proof

call `append (List.tl x) y` from `append x y`
originalappend x y
subappend (List.tl x) y
original ordinalOrdinal.Int (Ordinal.count x)
sub ordinalOrdinal.Int (Ordinal.count (List.tl x))
path[not (x = [])]
proof
detailed proof
ground_instances3
definitions0
inductions0
search_time
0.014s
details
Expand
smt_stats
num checks7
arith assert lower5
arith pivots3
rlimit count1821
mk clause3
datatype occurs check21
mk bool var50
arith assert upper5
datatype splits3
decisions7
arith add rows7
propagations2
conflicts7
arith fixed eqs4
datatype accessor ax5
arith conflicts1
datatype constructor ax8
num allocs1365204134
final checks6
added eqs33
del clause1
arith eq adapter3
memory16.090000
max memory18.750000
Expand
  • start[0.014s]
      not (x = []) && Ordinal.count x >= 0 && Ordinal.count (List.tl x) >= 0
      ==> List.tl x = []
          || Ordinal.Int (Ordinal.count (List.tl x)) Ordinal.<<
             Ordinal.Int (Ordinal.count x)
  • simplify
    into
    (not
     ((not (x = []) && Ordinal.count x >= 0) && Ordinal.count (List.tl x) >= 0)
     || List.tl x = [])
    || Ordinal.Int (Ordinal.count (List.tl x)) Ordinal.<<
       Ordinal.Int (Ordinal.count x)
    expansions
    []
    rewrite_steps
      forward_chaining
      • unroll
        expr
        (|Ordinal.<<_121| (|Ordinal.Int_112|
                            (|count_`ty_0 list`_2454| (|get.::.1_2437| …
        expansions
        • unroll
          expr
          (|count_`ty_0 list`_2454| (|get.::.1_2437| x_2443))
          expansions
          • unroll
            expr
            (|count_`ty_0 list`_2454| x_2443)
            expansions
            • unsat
              (let ((a!1 (= (|count_`ty_0 list`_2454| x_2443)
                            (+ 1 (|count_`ty_0 list`_2454| (|get.:…

            Let's compute a bit with this function to understand how it works.

            In [2]:
            append [1;2;3] [4;5;6]
            
            Out[2]:
            - : Z.t list = [1; 2; 3; 4; 5; 6]
            
            In [3]:
            append [] [4;5;6]
            
            Out[3]:
            - : Z.t list = [4; 5; 6]
            
            In [4]:
            append [1;2;3] []
            
            Out[4]:
            - : Z.t list = [1; 2; 3]
            

            We can ask Imandra some questions about append. For example, do there exist lists x and y such that append x y = [1;2;3;4;5;6;7;8]?

            In [5]:
            verify (fun x y -> append x y <> [1;2;3;4;5;6;7;8])
            
            Out[5]:
            - : Z.t list -> Z.t list -> bool = <fun>
            module CX : sig val x : 'a list val y : Z.t list end
            
            Counterexample (after 1 steps, 0.012s):
             let x = []
             let y = [1; 2; 3; 4; 5; 6; 7; 8]
            
            Refuted
            proof attempt
            ground_instances1
            definitions0
            inductions0
            search_time
            0.012s
            details
            Expand
            smt_stats
            num checks3
            rlimit count594
            mk clause3
            datatype occurs check28
            mk bool var28
            datatype splits1
            decisions2
            propagations2
            conflicts1
            datatype accessor ax10
            datatype constructor ax1
            num allocs1407709332
            final checks3
            added eqs24
            memory16.470000
            max memory18.750000
            Expand
            • start[0.012s] not (append :var_0: :var_1: = 1 :: (2 :: (3 :: (4 :: …))))
            • unroll
              expr
              (append_2465 x_2457 y_2458)
              expansions
              • Sat (Some let x = [] let y = [1; 2; 3; 4; 5; 6; 7; 8] )

              Ah, of course! What if we make the problem a little harder -- perhaps we want x and y to be the same length:

              In [6]:
              verify (fun x y -> List.length x = List.length y ==> append x y <> [1;2;3;4;5;6;7;8])
              
              Out[6]:
              - : Z.t list -> Z.t list -> bool = <fun>
              module CX : sig val x : Z.t list val y : Z.t list end
              
              Counterexample (after 15 steps, 0.051s):
               let x = [1; 2; 3; 4]
               let y = [5; 6; 7; 8]
              
              Refuted
              proof attempt
              ground_instances15
              definitions0
              inductions0
              search_time
              0.051s
              details
              Expand
              smt_stats
              arith offset eqs73
              num checks31
              arith assert lower159
              arith pivots128
              rlimit count25063
              mk clause358
              datatype occurs check607
              mk bool var1131
              arith assert upper165
              datatype splits143
              decisions501
              arith add rows489
              arith bound prop51
              propagations1740
              interface eqs1
              conflicts102
              arith fixed eqs239
              datatype accessor ax113
              minimized lits30
              arith assert diseq17
              datatype constructor ax146
              num allocs1455491123
              final checks64
              added eqs2940
              del clause155
              arith eq adapter208
              memory17.230000
              max memory18.750000
              Expand
              • start[0.051s]
                  List.length :var_0: = List.length :var_1:
                  ==> not (append :var_0: :var_1: = 1 :: (2 :: (3 :: (4 :: …))))
              • simplify

                into
                not (List.length :var_0: = List.length :var_1:)
                || not (append :var_0: :var_1: = 1 :: (2 :: (3 :: (4 :: …))))
                expansions
                []
                rewrite_steps
                  forward_chaining
                  • unroll
                    expr
                    (append_2490 x_2479 y_2480)
                    expansions
                    • unroll
                      expr
                      (|List.length_2487| y_2480)
                      expansions
                      • unroll
                        expr
                        (|List.length_2487| x_2479)
                        expansions
                        • unroll
                          expr
                          (append_2490 (|get.::.1_2486| x_2479) y_2480)
                          expansions
                          • unroll
                            expr
                            (|List.length_2487| (|get.::.1_2486| y_2480))
                            expansions
                            • unroll
                              expr
                              (|List.length_2487| (|get.::.1_2486| x_2479))
                              expansions
                              • unroll
                                expr
                                (append_2490 (|get.::.1_2486| (|get.::.1_2486| x_2479)) y_2480)
                                expansions
                                • unroll
                                  expr
                                  (|List.length_2487| (|get.::.1_2486| (|get.::.1_2486| y_2480)))
                                  expansions
                                  • unroll
                                    expr
                                    (|List.length_2487| (|get.::.1_2486| (|get.::.1_2486| x_2479)))
                                    expansions
                                    • unroll
                                      expr
                                      (append_2490 (|get.::.1_2486| (|get.::.1_2486| (|get.::.1_2486| x_2479)))
                                                   y_2480)
                                      expansions
                                      • unroll
                                        expr
                                        (|List.length_2487|
                                          (|get.::.1_2486| (|get.::.1_2486| (|get.::.1_2486| y_2480))))
                                        expansions
                                        • unroll
                                          expr
                                          (|List.length_2487|
                                            (|get.::.1_2486| (|get.::.1_2486| (|get.::.1_2486| x_2479))))
                                          expansions
                                          • unroll
                                            expr
                                            (let ((a!1 (|get.::.1_2486| (|get.::.1_2486| (|get.::.1_2486| (|get.::.1_2486| x_2479))))))
                                              (appen…
                                            expansions
                                            • unroll
                                              expr
                                              (let ((a!1 (|get.::.1_2486| (|get.::.1_2486| (|get.::.1_2486| (|get.::.1_2486| y_2480))))))
                                                (|List…
                                              expansions
                                              • unroll
                                                expr
                                                (let ((a!1 (|get.::.1_2486| (|get.::.1_2486| (|get.::.1_2486| (|get.::.1_2486| x_2479))))))
                                                  (|List…
                                                expansions
                                                • Sat (Some let x = [1; 2; 3; 4] let y = [5; 6; 7; 8] )

                                                Nice! Remember that counterexamples are always reflected into the runtime in a module called CX. So, we can compute with this counterexample and see that it indeed refutes our conjecture:

                                                In [7]:
                                                append CX.x CX.y
                                                
                                                Out[7]:
                                                - : Z.t list = [1; 2; 3; 4; 5; 6; 7; 8]
                                                

                                                Let's now investigate a more interesting conjecture: That append is associative.

                                                That is,

                                                (forall (x,y,z) : 'a list. append x (append y z) = append (append x y) z).

                                                Is this property true? Let's ask Imandra.

                                                In [8]:
                                                verify (fun x y z -> append x (append y z) = append (append x y) z)
                                                
                                                Out[8]:
                                                - : 'a list -> 'a list -> 'a list -> bool = <fun>
                                                
                                                Unknown (Verified up to bound 100)
                                                Expand
                                                expanded
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x))))))))))))))))))))))) y
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x))))))))))))))) y
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x))))))) y
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl y))))))) z
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (append x y))))))))))))))))))))) z
                                                • append (List.tl (List.tl (List.tl (List.tl (append x y))))) z
                                                • append y z
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x)))))))))))))))))))))))) (append y z)
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x)))))))))))))))) (append y z)
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x)))))))) (append y z)
                                                • append x (append y z)
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl y))))) z
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (append x y)))))))))))) z
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x)))))))))))))))))))))))))) y
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x)))))))))))))))))) y
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x)))))))))) y
                                                • append (List.tl (List.tl x)) y
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl y))))))))))))))))))) z
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (append x y))))))))))))))) z
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x))))))))))))))))))))))) (append y z)
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x))))))))))))))) (append y z)
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x))))))) (append y z)
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl y))))))))))))))))) z
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (append x y)))))))))))))) z
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl y)))))))))))))))))) z
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x))))))))))))))))))))))))) y
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x))))))))))))))))) y
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x))))))))) y
                                                • append (List.tl x) y
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (append x y))))))))))))))))))))))))) z
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (append x y))))))))) z
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x)))))))))))))))))))))))))) (append y z)
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x)))))))))))))))))) (append y z)
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x)))))))))) (append y z)
                                                • append (List.tl (List.tl x)) (append y z)
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (append x y)))))))))))))))) z
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl y)))))))))))))) z
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x)))))))))))))))))))) y
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x)))))))))))) y
                                                • append (List.tl (List.tl (List.tl (List.tl x)))) y
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl y))))))))))) z
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (append x y))))))))))))))))))) z
                                                • append (List.tl (List.tl (append x y))) z
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x))))))))))))))))))))))))) (append y z)
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x))))))))))))))))) (append y z)
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x))))))))) (append y z)
                                                • append (List.tl x) (append y z)
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl y))))))))) z
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (append x y)))))))))))))))))) z
                                                • append (List.tl (append x y)) z
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl y)))))))))) z
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x))))))))))))))))))) y
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x))))))))))) y
                                                • append (List.tl (List.tl (List.tl x))) y
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (append x y))))))))))))) z
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl y)))))))))))))))) z
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x)))))))))))))))))))) (append y z)
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x)))))))))))) (append y z)
                                                • append (List.tl (List.tl (List.tl (List.tl x)))) (append y z)
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (append x y)))))))))))))))))))) z
                                                • append (List.tl (List.tl (List.tl (append x y)))) z
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl y)))))) z
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x)))))))))))))))))))))) y
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x)))))))))))))) y
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x)))))) y
                                                • append (List.tl (List.tl (List.tl y))) z
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (append x y))))))))))))))))))))))) z
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (append x y))))))) z
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl y)))))))))))) z
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x))))))))))))))))))) (append y z)
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x))))))))))) (append y z)
                                                • append (List.tl (List.tl (List.tl x))) (append y z)
                                                • append (List.tl y) z
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (append x y)))))))))))))))))))))) z
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl (append x y)))))) z
                                                • append (List.tl (List.tl y)) z
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x))))))))))))))))))))) y
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x))))))))))))) y
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl x))))) y
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl y))))))))))))))) z
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (append x y))))))))))))))))) z
                                                • append (append x y) z
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl y)))))))) z
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x)))))))))))))))))))))) (append y z)
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x)))))))))))))) (append y z)
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x)))))) (append y z)
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl y))))))))))))) z
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (append x y)))))))))))))))))))))))) z
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (append x y)))))))) z
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x)))))))))))))))))))))))) y
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x)))))))))))))))) y
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x)))))))) y
                                                • append x y
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (append x y))))))))))) z
                                                • append (List.tl (List.tl (List.tl (List.tl y)))) z
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x))))))))))))))))))))) (append y z)
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x))))))))))))) (append y z)
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl x))))) (append y z)
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (append x y)))))))))))))))))))))))))) z
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (append x y)))))))))) z
                                                blocked
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl y)))))))))))))))))))) z
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x))))))))))))))))))))))))))) y
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x))))))))))))))))))))))))))) (append y z)
                                                • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (append x y))))))))))))))))))))))))))) z
                                                proof attempt
                                                ground_instances100
                                                definitions0
                                                inductions0
                                                search_time
                                                0.501s
                                                Expand
                                                • start[0.501s]
                                                    append :var_0: (append :var_1: :var_2:) =
                                                    append (append :var_0: :var_1:) :var_2:
                                                • unroll
                                                  expr
                                                  (append_2545 x_2538 y_2539)
                                                  expansions
                                                  • unroll
                                                    expr
                                                    (append_2545 (append_2545 x_2538 y_2539) z_2540)
                                                    expansions
                                                    • unroll
                                                      expr
                                                      (append_2545 y_2539 z_2540)
                                                      expansions
                                                      • unroll
                                                        expr
                                                        (append_2545 x_2538 (append_2545 y_2539 z_2540))
                                                        expansions
                                                        • unroll
                                                          expr
                                                          (append_2545 (|get.::.1_2537| x_2538) y_2539)
                                                          expansions
                                                          • unroll
                                                            expr
                                                            (append_2545 (|get.::.1_2537| (append_2545 x_2538 y_2539)) z_2540)
                                                            expansions
                                                            • unroll
                                                              expr
                                                              (append_2545 (|get.::.1_2537| x_2538) (append_2545 y_2539 z_2540))
                                                              expansions
                                                              • unroll
                                                                expr
                                                                (append_2545 (|get.::.1_2537| y_2539) z_2540)
                                                                expansions
                                                                • unroll
                                                                  expr
                                                                  (append_2545 (|get.::.1_2537| (|get.::.1_2537| x_2538)) y_2539)
                                                                  expansions
                                                                  • unroll
                                                                    expr
                                                                    (append_2545 (|get.::.1_2537| (|get.::.1_2537| (append_2545 x_2538 y_2539)))
                                                                                 z_2540)
                                                                    expansions
                                                                    • unroll
                                                                      expr
                                                                      (append_2545 (|get.::.1_2537| (|get.::.1_2537| x_2538))
                                                                                   (append_2545 y_2539 z_2540))
                                                                      expansions
                                                                      • unroll
                                                                        expr
                                                                        (append_2545 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| x_2538)))
                                                                                     y_2539)
                                                                        expansions
                                                                        • unroll
                                                                          expr
                                                                          (append_2545 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| x_2538)))
                                                                                       (append_2545 …
                                                                          expansions
                                                                          • unroll
                                                                            expr
                                                                            (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (append_2545 x_2538
                                                                                              …
                                                                            expansions
                                                                            • unroll
                                                                              expr
                                                                              (append_2545 (|get.::.1_2537| (|get.::.1_2537| y_2539)) z_2540)
                                                                              expansions
                                                                              • unroll
                                                                                expr
                                                                                (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| x_2538))))))
                                                                                  (appen…
                                                                                expansions
                                                                                • unroll
                                                                                  expr
                                                                                  (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| x_2538))))))
                                                                                    (appen…
                                                                                  expansions
                                                                                  • unroll
                                                                                    expr
                                                                                    (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (append_2545 x_2538
                                                                                                      …
                                                                                    expansions
                                                                                    • unroll
                                                                                      expr
                                                                                      (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| x_2538))))))
                                                                                        (appen…
                                                                                      expansions
                                                                                      • unroll
                                                                                        expr
                                                                                        (append_2545 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| y_2539)))
                                                                                                     z_2540)
                                                                                        expansions
                                                                                        • unroll
                                                                                          expr
                                                                                          (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| x_2538))))))
                                                                                            (appen…
                                                                                          expansions
                                                                                          • unroll
                                                                                            expr
                                                                                            (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (append_2545 x_2538
                                                                                                              …
                                                                                            expansions
                                                                                            • unroll
                                                                                              expr
                                                                                              (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| x_2538))))))
                                                                                                (appen…
                                                                                              expansions
                                                                                              • unroll
                                                                                                expr
                                                                                                (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| x_2538))))))
                                                                                                  (appen…
                                                                                                expansions
                                                                                                • unroll
                                                                                                  expr
                                                                                                  (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| y_2539))))))
                                                                                                    (appen…
                                                                                                  expansions
                                                                                                  • unroll
                                                                                                    expr
                                                                                                    (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (append_2545 x_2538
                                                                                                                      …
                                                                                                    expansions
                                                                                                    • unroll
                                                                                                      expr
                                                                                                      (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| x_2538))))))
                                                                                                        (appen…
                                                                                                      expansions
                                                                                                      • unroll
                                                                                                        expr
                                                                                                        (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| x_2538))))))
                                                                                                          (appen…
                                                                                                        expansions
                                                                                                        • unroll
                                                                                                          expr
                                                                                                          (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (append_2545 x_2538
                                                                                                                            …
                                                                                                          expansions
                                                                                                          • unroll
                                                                                                            expr
                                                                                                            (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| y_2539))))))
                                                                                                              (appen…
                                                                                                            expansions
                                                                                                            • unroll
                                                                                                              expr
                                                                                                              (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| x_2538))))))
                                                                                                              (let ((a…
                                                                                                              expansions
                                                                                                              • unroll
                                                                                                                expr
                                                                                                                (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| x_2538))))))
                                                                                                                (let ((a…
                                                                                                                expansions
                                                                                                                • unroll
                                                                                                                  expr
                                                                                                                  (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (append_2545 x_2538
                                                                                                                                    …
                                                                                                                  expansions
                                                                                                                  • unroll
                                                                                                                    expr
                                                                                                                    (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| x_2538))))))
                                                                                                                    (let ((a…
                                                                                                                    expansions
                                                                                                                    • unroll
                                                                                                                      expr
                                                                                                                      (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| y_2539))))))
                                                                                                                        (appen…
                                                                                                                      expansions
                                                                                                                      • unroll
                                                                                                                        expr
                                                                                                                        (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| x_2538))))))
                                                                                                                        (let ((a…
                                                                                                                        expansions
                                                                                                                        • unroll
                                                                                                                          expr
                                                                                                                          (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (append_2545 x_2538
                                                                                                                                            …
                                                                                                                          expansions
                                                                                                                          • unroll
                                                                                                                            expr
                                                                                                                            (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| x_2538))))))
                                                                                                                            (let ((a…
                                                                                                                            expansions
                                                                                                                            • unroll
                                                                                                                              expr
                                                                                                                              (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| x_2538))))))
                                                                                                                              (let ((a…
                                                                                                                              expansions
                                                                                                                              • unroll
                                                                                                                                expr
                                                                                                                                (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| y_2539))))))
                                                                                                                                  (appen…
                                                                                                                                expansions
                                                                                                                                • unroll
                                                                                                                                  expr
                                                                                                                                  (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (append_2545 x_2538
                                                                                                                                                    …
                                                                                                                                  expansions
                                                                                                                                  • unroll
                                                                                                                                    expr
                                                                                                                                    (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| x_2538))))))
                                                                                                                                    (let ((a…
                                                                                                                                    expansions
                                                                                                                                    • unroll
                                                                                                                                      expr
                                                                                                                                      (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| x_2538))))))
                                                                                                                                      (let ((a…
                                                                                                                                      expansions
                                                                                                                                      • unroll
                                                                                                                                        expr
                                                                                                                                        (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (append_2545 x_2538
                                                                                                                                                          …
                                                                                                                                        expansions
                                                                                                                                        • unroll
                                                                                                                                          expr
                                                                                                                                          (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| y_2539))))))
                                                                                                                                          (let ((a…
                                                                                                                                          expansions
                                                                                                                                          • unroll
                                                                                                                                            expr
                                                                                                                                            (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| x_2538))))))
                                                                                                                                            (let ((a…
                                                                                                                                            expansions
                                                                                                                                            • unroll
                                                                                                                                              expr
                                                                                                                                              (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| x_2538))))))
                                                                                                                                              (let ((a…
                                                                                                                                              expansions
                                                                                                                                              • unroll
                                                                                                                                                expr
                                                                                                                                                (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (append_2545 x_2538
                                                                                                                                                                  …
                                                                                                                                                expansions
                                                                                                                                                • unroll
                                                                                                                                                  expr
                                                                                                                                                  (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| x_2538))))))
                                                                                                                                                  (let ((a…
                                                                                                                                                  expansions
                                                                                                                                                  • unroll
                                                                                                                                                    expr
                                                                                                                                                    (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| y_2539))))))
                                                                                                                                                    (let ((a…
                                                                                                                                                    expansions
                                                                                                                                                    • unroll
                                                                                                                                                      expr
                                                                                                                                                      (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| x_2538))))))
                                                                                                                                                      (let ((a…
                                                                                                                                                      expansions
                                                                                                                                                      • unroll
                                                                                                                                                        expr
                                                                                                                                                        (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (append_2545 x_2538
                                                                                                                                                                          …
                                                                                                                                                        expansions
                                                                                                                                                        • unroll
                                                                                                                                                          expr
                                                                                                                                                          (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| x_2538))))))
                                                                                                                                                          (let ((a…
                                                                                                                                                          expansions
                                                                                                                                                          • unroll
                                                                                                                                                            expr
                                                                                                                                                            (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| x_2538))))))
                                                                                                                                                            (let ((a…
                                                                                                                                                            expansions
                                                                                                                                                            • unroll
                                                                                                                                                              expr
                                                                                                                                                              (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| y_2539))))))
                                                                                                                                                              (let ((a…
                                                                                                                                                              expansions
                                                                                                                                                              • unroll
                                                                                                                                                                expr
                                                                                                                                                                (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (append_2545 x_2538
                                                                                                                                                                                  …
                                                                                                                                                                expansions
                                                                                                                                                                • unroll
                                                                                                                                                                  expr
                                                                                                                                                                  (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| x_2538))))))
                                                                                                                                                                  (let ((a…
                                                                                                                                                                  expansions
                                                                                                                                                                  • unroll
                                                                                                                                                                    expr
                                                                                                                                                                    (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| x_2538))))))
                                                                                                                                                                    (let ((a…
                                                                                                                                                                    expansions
                                                                                                                                                                    • unroll
                                                                                                                                                                      expr
                                                                                                                                                                      (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (append_2545 x_2538
                                                                                                                                                                                        …
                                                                                                                                                                      expansions
                                                                                                                                                                      • unroll
                                                                                                                                                                        expr
                                                                                                                                                                        (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| y_2539))))))
                                                                                                                                                                        (let ((a…
                                                                                                                                                                        expansions
                                                                                                                                                                        • unroll
                                                                                                                                                                          expr
                                                                                                                                                                          (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| x_2538))))))
                                                                                                                                                                          (let ((a…
                                                                                                                                                                          expansions
                                                                                                                                                                          • unroll
                                                                                                                                                                            expr
                                                                                                                                                                            (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| x_2538))))))
                                                                                                                                                                            (let ((a…
                                                                                                                                                                            expansions
                                                                                                                                                                            • unroll
                                                                                                                                                                              expr
                                                                                                                                                                              (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (append_2545 x_2538
                                                                                                                                                                                                …
                                                                                                                                                                              expansions
                                                                                                                                                                              • unroll
                                                                                                                                                                                expr
                                                                                                                                                                                (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| x_2538))))))
                                                                                                                                                                                (let ((a…
                                                                                                                                                                                expansions
                                                                                                                                                                                • unroll
                                                                                                                                                                                  expr
                                                                                                                                                                                  (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| y_2539))))))
                                                                                                                                                                                  (let ((a…
                                                                                                                                                                                  expansions
                                                                                                                                                                                  • unroll
                                                                                                                                                                                    expr
                                                                                                                                                                                    (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| x_2538))))))
                                                                                                                                                                                    (let ((a…
                                                                                                                                                                                    expansions
                                                                                                                                                                                    • unroll
                                                                                                                                                                                      expr
                                                                                                                                                                                      (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (append_2545 x_2538
                                                                                                                                                                                                        …
                                                                                                                                                                                      expansions
                                                                                                                                                                                      • unroll
                                                                                                                                                                                        expr
                                                                                                                                                                                        (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| x_2538))))))
                                                                                                                                                                                        (let ((a…
                                                                                                                                                                                        expansions
                                                                                                                                                                                        • unroll
                                                                                                                                                                                          expr
                                                                                                                                                                                          (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| x_2538))))))
                                                                                                                                                                                          (let ((a…
                                                                                                                                                                                          expansions
                                                                                                                                                                                          • unroll
                                                                                                                                                                                            expr
                                                                                                                                                                                            (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| y_2539))))))
                                                                                                                                                                                            (let ((a…
                                                                                                                                                                                            expansions
                                                                                                                                                                                            • unroll
                                                                                                                                                                                              expr
                                                                                                                                                                                              (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (append_2545 x_2538
                                                                                                                                                                                                                …
                                                                                                                                                                                              expansions
                                                                                                                                                                                              • unroll
                                                                                                                                                                                                expr
                                                                                                                                                                                                (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| x_2538))))))
                                                                                                                                                                                                (let ((a…
                                                                                                                                                                                                expansions
                                                                                                                                                                                                • unroll
                                                                                                                                                                                                  expr
                                                                                                                                                                                                  (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| x_2538))))))
                                                                                                                                                                                                  (let ((a…
                                                                                                                                                                                                  expansions
                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                    expr
                                                                                                                                                                                                    (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (append_2545 x_2538
                                                                                                                                                                                                                      …
                                                                                                                                                                                                    expansions
                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                      expr
                                                                                                                                                                                                      (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| y_2539))))))
                                                                                                                                                                                                      (let ((a…
                                                                                                                                                                                                      expansions
                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                        expr
                                                                                                                                                                                                        (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| x_2538))))))
                                                                                                                                                                                                        (let ((a…
                                                                                                                                                                                                        expansions
                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                          expr
                                                                                                                                                                                                          (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| x_2538))))))
                                                                                                                                                                                                          (let ((a…
                                                                                                                                                                                                          expansions
                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                            expr
                                                                                                                                                                                                            (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (append_2545 x_2538
                                                                                                                                                                                                                              …
                                                                                                                                                                                                            expansions
                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                              expr
                                                                                                                                                                                                              (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| x_2538))))))
                                                                                                                                                                                                              (let ((a…
                                                                                                                                                                                                              expansions
                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                expr
                                                                                                                                                                                                                (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| y_2539))))))
                                                                                                                                                                                                                (let ((a…
                                                                                                                                                                                                                expansions
                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                  expr
                                                                                                                                                                                                                  (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| x_2538))))))
                                                                                                                                                                                                                  (let ((a…
                                                                                                                                                                                                                  expansions
                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                    expr
                                                                                                                                                                                                                    (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (append_2545 x_2538
                                                                                                                                                                                                                                      …
                                                                                                                                                                                                                    expansions
                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                      expr
                                                                                                                                                                                                                      (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| x_2538))))))
                                                                                                                                                                                                                      (let ((a…
                                                                                                                                                                                                                      expansions
                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                        expr
                                                                                                                                                                                                                        (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| x_2538))))))
                                                                                                                                                                                                                        (let ((a…
                                                                                                                                                                                                                        expansions
                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                          expr
                                                                                                                                                                                                                          (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| y_2539))))))
                                                                                                                                                                                                                          (let ((a…
                                                                                                                                                                                                                          expansions
                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                            expr
                                                                                                                                                                                                                            (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (append_2545 x_2538
                                                                                                                                                                                                                                              …
                                                                                                                                                                                                                            expansions
                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                              expr
                                                                                                                                                                                                                              (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| x_2538))))))
                                                                                                                                                                                                                              (let ((a…
                                                                                                                                                                                                                              expansions
                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                expr
                                                                                                                                                                                                                                (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| x_2538))))))
                                                                                                                                                                                                                                (let ((a…
                                                                                                                                                                                                                                expansions
                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                  expr
                                                                                                                                                                                                                                  (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (append_2545 x_2538
                                                                                                                                                                                                                                                    …
                                                                                                                                                                                                                                  expansions
                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                    expr
                                                                                                                                                                                                                                    (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| y_2539))))))
                                                                                                                                                                                                                                    (let ((a…
                                                                                                                                                                                                                                    expansions
                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                      expr
                                                                                                                                                                                                                                      (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| x_2538))))))
                                                                                                                                                                                                                                      (let ((a…
                                                                                                                                                                                                                                      expansions
                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                        expr
                                                                                                                                                                                                                                        (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| x_2538))))))
                                                                                                                                                                                                                                        (let ((a…
                                                                                                                                                                                                                                        expansions
                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                          expr
                                                                                                                                                                                                                                          (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (append_2545 x_2538
                                                                                                                                                                                                                                                            …
                                                                                                                                                                                                                                          expansions
                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                            expr
                                                                                                                                                                                                                                            (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| x_2538))))))
                                                                                                                                                                                                                                            (let ((a…
                                                                                                                                                                                                                                            expansions
                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                              expr
                                                                                                                                                                                                                                              (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| y_2539))))))
                                                                                                                                                                                                                                              (let ((a…
                                                                                                                                                                                                                                              expansions
                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                expr
                                                                                                                                                                                                                                                (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| x_2538))))))
                                                                                                                                                                                                                                                (let ((a…
                                                                                                                                                                                                                                                expansions
                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                  expr
                                                                                                                                                                                                                                                  (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (append_2545 x_2538
                                                                                                                                                                                                                                                                    …
                                                                                                                                                                                                                                                  expansions
                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                    expr
                                                                                                                                                                                                                                                    (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| x_2538))))))
                                                                                                                                                                                                                                                    (let ((a…
                                                                                                                                                                                                                                                    expansions
                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                      expr
                                                                                                                                                                                                                                                      (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| x_2538))))))
                                                                                                                                                                                                                                                      (let ((a…
                                                                                                                                                                                                                                                      expansions
                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                        expr
                                                                                                                                                                                                                                                        (let ((a!1 (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| (|get.::.1_2537| y_2539))))))
                                                                                                                                                                                                                                                        (let ((a…
                                                                                                                                                                                                                                                        expansions

                                                                                                                                                                                                                                                        Imandra tells us that there are no counterexamples to this conjecture up to our current recursion unrolling bound (100).

                                                                                                                                                                                                                                                        This gives us some confidence that this conjecture is true. Let's now ask Imandra to prove it for all possible cases by induction.

                                                                                                                                                                                                                                                        In [9]:
                                                                                                                                                                                                                                                        verify (fun x y z -> append x (append y z) = append (append x y) z) [@@induct]
                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                        Out[9]:
                                                                                                                                                                                                                                                        - : 'a list -> 'a list -> 'a list -> bool = <fun>
                                                                                                                                                                                                                                                        Goal:
                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                        append x (append y z) = append (append x y) z.
                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                        1 nontautological subgoal.
                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                        Subgoal 1:
                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                        |---------------------------------------------------------------------------
                                                                                                                                                                                                                                                         append x (append y z) = append (append x y) z
                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                        Verified up to bound 10 (after 0.033s).
                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                        Must try induction.
                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                        The recursive terms in the conjecture suggest 3 inductions.
                                                                                                                                                                                                                                                        Subsumption and merging reduces this to 2.
                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                        Only 1 of those schemes are unflawed.
                                                                                                                                                                                                                                                        We shall induct according to a scheme derived from append.
                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                        Induction scheme:
                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                         (x = [] ==> φ z y x) && (not (x = []) && φ z y (List.tl x) ==> φ z y x).
                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                        2 nontautological subgoals.
                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                        Subgoal 1.2:
                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                         H0. x = []
                                                                                                                                                                                                                                                        |---------------------------------------------------------------------------
                                                                                                                                                                                                                                                         append x (append y z) = append (append x y) z
                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                        But simplification reduces this to true, using the definition of append.
                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                        Subgoal 1.1:
                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                         H0. not (x = [])
                                                                                                                                                                                                                                                         H1. append (List.tl x) (append y z) = append (append (List.tl x) y) z
                                                                                                                                                                                                                                                        |---------------------------------------------------------------------------
                                                                                                                                                                                                                                                         append x (append y z) = append (append x y) z
                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                        But simplification reduces this to true, using the definition of append.
                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                        Proved
                                                                                                                                                                                                                                                        proof
                                                                                                                                                                                                                                                        ground_instances0
                                                                                                                                                                                                                                                        definitions5
                                                                                                                                                                                                                                                        inductions1
                                                                                                                                                                                                                                                        search_time
                                                                                                                                                                                                                                                        0.087s
                                                                                                                                                                                                                                                        Expand
                                                                                                                                                                                                                                                        • start[0.087s, "Goal"]
                                                                                                                                                                                                                                                            append :var_0: (append :var_1: :var_2:) =
                                                                                                                                                                                                                                                            append (append :var_0: :var_1:) :var_2:
                                                                                                                                                                                                                                                        • subproof

                                                                                                                                                                                                                                                          append x (append y z) = append (append x y) z
                                                                                                                                                                                                                                                          • start[0.086s, "1"] append x (append y z) = append (append x y) z
                                                                                                                                                                                                                                                          • induction on (functional )
                                                                                                                                                                                                                                                            :scheme (x = [] ==> φ z y x)
                                                                                                                                                                                                                                                                    && (not (x = []) && φ z y (List.tl x) ==> φ z y x)
                                                                                                                                                                                                                                                          • Split ((not (x = []) || append x (append y z) = append (append x y) z)
                                                                                                                                                                                                                                                                   && (not
                                                                                                                                                                                                                                                                       (not (x = [])
                                                                                                                                                                                                                                                                        && append (List.tl x) (append y z) =
                                                                                                                                                                                                                                                                           append (append (List.tl x) y) z)
                                                                                                                                                                                                                                                                       || append x (append y z) = append (append x y) z)
                                                                                                                                                                                                                                                                   :cases [not (x = []) || append x (append y z) = append (append x y) z;
                                                                                                                                                                                                                                                                           (x = []
                                                                                                                                                                                                                                                                            || not
                                                                                                                                                                                                                                                                               (append (List.tl x) (append y z) =
                                                                                                                                                                                                                                                                                append (append (List.tl x) y) z))
                                                                                                                                                                                                                                                                           || append x (append y z) = append (append x y) z])
                                                                                                                                                                                                                                                            • subproof
                                                                                                                                                                                                                                                              (x = [] || not (append (List.tl x) (append y z) = append (append (List.tl x) y) z)) || append x (append y z) = append (append x y) z
                                                                                                                                                                                                                                                              • start[0.036s, "1.1"]
                                                                                                                                                                                                                                                                  (x = []
                                                                                                                                                                                                                                                                   || not (append (List.tl x) (append y z) = append (append (List.tl x) y) z))
                                                                                                                                                                                                                                                                  || append x (append y z) = append (append x y) z
                                                                                                                                                                                                                                                              • simplify
                                                                                                                                                                                                                                                                into
                                                                                                                                                                                                                                                                true
                                                                                                                                                                                                                                                                expansions
                                                                                                                                                                                                                                                                [append, append, append]
                                                                                                                                                                                                                                                                rewrite_steps
                                                                                                                                                                                                                                                                  forward_chaining
                                                                                                                                                                                                                                                                • subproof
                                                                                                                                                                                                                                                                  not (x = []) || append x (append y z) = append (append x y) z
                                                                                                                                                                                                                                                                  • start[0.036s, "1.2"]
                                                                                                                                                                                                                                                                      not (x = []) || append x (append y z) = append (append x y) z
                                                                                                                                                                                                                                                                  • simplify
                                                                                                                                                                                                                                                                    into
                                                                                                                                                                                                                                                                    true
                                                                                                                                                                                                                                                                    expansions
                                                                                                                                                                                                                                                                    [append, append]
                                                                                                                                                                                                                                                                    rewrite_steps
                                                                                                                                                                                                                                                                      forward_chaining

                                                                                                                                                                                                                                                                Beautiful! So, we see Imandra proved our goal by induction on x, using a structural induction principle derived from the 'a list datatype. We now know the property holds for all possible inputs (of which there are infinitely many!).

                                                                                                                                                                                                                                                                By the way, we can always view Imandra's current session configuration with the #config directive:

                                                                                                                                                                                                                                                                In [10]:
                                                                                                                                                                                                                                                                #config
                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                Out[10]:
                                                                                                                                                                                                                                                                ----------------------------------------------------------------------------
                                                                                                                                                                                                                                                                Imandra session configuration
                                                                                                                                                                                                                                                                ----------------------------------------------------------------------------
                                                                                                                                                                                                                                                                 0. Timeout: 60000
                                                                                                                                                                                                                                                                 1. Mode: Logic
                                                                                                                                                                                                                                                                 2. Allow redefinition: true
                                                                                                                                                                                                                                                                 3. Load path: []
                                                                                                                                                                                                                                                                 4. Recursion unroll depth: 100
                                                                                                                                                                                                                                                                 5. Disabled functions: None
                                                                                                                                                                                                                                                                 6. Random testing: false
                                                                                                                                                                                                                                                                 7. Dash seed: 23712789; 321838921; 92316278
                                                                                                                                                                                                                                                                 8. Dash depth: 100
                                                                                                                                                                                                                                                                 9. SAT seed: 0
                                                                                                                                                                                                                                                                10. SMT seed: 0
                                                                                                                                                                                                                                                                11. Solver seed: 0
                                                                                                                                                                                                                                                                12. Eager goal-based GC: false
                                                                                                                                                                                                                                                                13. Print settings: 
                                                                                                                                                                                                                                                                14. Undo (implicit push): false
                                                                                                                                                                                                                                                                15. Console print: false
                                                                                                                                                                                                                                                                16. Top results: true
                                                                                                                                                                                                                                                                17. Interactive hints: true
                                                                                                                                                                                                                                                                18. Validate definitions: true
                                                                                                                                                                                                                                                                19. Max induction depth: 3
                                                                                                                                                                                                                                                                20. Induction unroll depth: 10
                                                                                                                                                                                                                                                                21. Enable all definitions when unrolling: true
                                                                                                                                                                                                                                                                ----------------------------------------------------------------------------
                                                                                                                                                                                                                                                                

                                                                                                                                                                                                                                                                Lemmas and Rules

                                                                                                                                                                                                                                                                When we use the verify command, we give it a closed formula (e.g., a lambda term such as (fun x y z -> foo x y z) and ask Imandra to prove that the goal always evaluates to true. Notice that the verify command does not give the verification goal a name.

                                                                                                                                                                                                                                                                Once we've proved a goal, we often want to record it as a theorem. This is both to document our verification progress and to make it possible for our proved goal to be used as a lemma in subsequent verification efforts.

                                                                                                                                                                                                                                                                This can be done by the theorem command.

                                                                                                                                                                                                                                                                For example, we could name our result assoc_append and install it as a theorem as follows:

                                                                                                                                                                                                                                                                theorem assoc_append x y z = append x (append y z) = append (append x y) z) [@@induct]
                                                                                                                                                                                                                                                                

                                                                                                                                                                                                                                                                By default, a theorem is not installed as a rule that will be used automatically in subsequent verification efforts. To install the theorem as a rule, we can use the [@@rewrite] or [@@forward_chaining] attributes.

                                                                                                                                                                                                                                                                Let's focus in this notebook on the use of theorems as rewrite rules.

                                                                                                                                                                                                                                                                Rewrite Rules

                                                                                                                                                                                                                                                                A rewrite rule is a theorem of the form (H1 && ... && Hk ==> LHS = RHS). It instructs Imandra's simplifier to replace terms it matches with the LHS with the suitably instantiated RHS, provided that the corresponding instantiations of the hypotheses H1, ..., Hk can be proved.

                                                                                                                                                                                                                                                                It is also allowed for the conclusion of the rule to be a boolean term, e.g., (H1 && ... && Hk ==> foo) is interpreted with an RHS of true, i.e., (H1 && ... && Hk ==> foo = true).

                                                                                                                                                                                                                                                                Good rewrite rules can have a powerful normalising effect on formulas. We usually want to orient them so that the RHS is a better (i.e., simpler or more canonical) term than the LHS.

                                                                                                                                                                                                                                                                Let us see the use of rewrite rules through a prove about the function reverse.

                                                                                                                                                                                                                                                                Reverse

                                                                                                                                                                                                                                                                Let's define a function to reverse a list. Note how it uses our append function we defined above:

                                                                                                                                                                                                                                                                In [11]:
                                                                                                                                                                                                                                                                let rec reverse x = 
                                                                                                                                                                                                                                                                 match x with
                                                                                                                                                                                                                                                                  | [] -> []
                                                                                                                                                                                                                                                                  | x :: xs -> append (reverse xs) [x]
                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                Out[11]:
                                                                                                                                                                                                                                                                val reverse : 'a list -> 'a list = <fun>
                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                termination proof

                                                                                                                                                                                                                                                                Termination proof

                                                                                                                                                                                                                                                                call `reverse (List.tl x)` from `reverse x`
                                                                                                                                                                                                                                                                originalreverse x
                                                                                                                                                                                                                                                                subreverse (List.tl x)
                                                                                                                                                                                                                                                                original ordinalOrdinal.Int (Ordinal.count x)
                                                                                                                                                                                                                                                                sub ordinalOrdinal.Int (Ordinal.count (List.tl x))
                                                                                                                                                                                                                                                                path[not (x = [])]
                                                                                                                                                                                                                                                                proof
                                                                                                                                                                                                                                                                detailed proof
                                                                                                                                                                                                                                                                ground_instances3
                                                                                                                                                                                                                                                                definitions0
                                                                                                                                                                                                                                                                inductions0
                                                                                                                                                                                                                                                                search_time
                                                                                                                                                                                                                                                                0.016s
                                                                                                                                                                                                                                                                details
                                                                                                                                                                                                                                                                Expand
                                                                                                                                                                                                                                                                smt_stats
                                                                                                                                                                                                                                                                num checks7
                                                                                                                                                                                                                                                                arith assert lower5
                                                                                                                                                                                                                                                                arith pivots3
                                                                                                                                                                                                                                                                rlimit count16623
                                                                                                                                                                                                                                                                mk clause3
                                                                                                                                                                                                                                                                datatype occurs check21
                                                                                                                                                                                                                                                                mk bool var50
                                                                                                                                                                                                                                                                arith assert upper5
                                                                                                                                                                                                                                                                datatype splits3
                                                                                                                                                                                                                                                                decisions7
                                                                                                                                                                                                                                                                arith add rows7
                                                                                                                                                                                                                                                                propagations2
                                                                                                                                                                                                                                                                conflicts7
                                                                                                                                                                                                                                                                arith fixed eqs4
                                                                                                                                                                                                                                                                datatype accessor ax5
                                                                                                                                                                                                                                                                arith conflicts1
                                                                                                                                                                                                                                                                datatype constructor ax8
                                                                                                                                                                                                                                                                num allocs1968503028
                                                                                                                                                                                                                                                                final checks6
                                                                                                                                                                                                                                                                added eqs33
                                                                                                                                                                                                                                                                del clause1
                                                                                                                                                                                                                                                                arith eq adapter3
                                                                                                                                                                                                                                                                memory25.640000
                                                                                                                                                                                                                                                                max memory27.920000
                                                                                                                                                                                                                                                                Expand
                                                                                                                                                                                                                                                                • start[0.016s]
                                                                                                                                                                                                                                                                    not (x = []) && Ordinal.count x >= 0 && Ordinal.count (List.tl x) >= 0
                                                                                                                                                                                                                                                                    ==> List.tl x = []
                                                                                                                                                                                                                                                                        || Ordinal.Int (Ordinal.count (List.tl x)) Ordinal.<<
                                                                                                                                                                                                                                                                           Ordinal.Int (Ordinal.count x)
                                                                                                                                                                                                                                                                • simplify
                                                                                                                                                                                                                                                                  into
                                                                                                                                                                                                                                                                  (not
                                                                                                                                                                                                                                                                   ((not (x = []) && Ordinal.count x >= 0) && Ordinal.count (List.tl x) >= 0)
                                                                                                                                                                                                                                                                   || List.tl x = [])
                                                                                                                                                                                                                                                                  || Ordinal.Int (Ordinal.count (List.tl x)) Ordinal.<<
                                                                                                                                                                                                                                                                     Ordinal.Int (Ordinal.count x)
                                                                                                                                                                                                                                                                  expansions
                                                                                                                                                                                                                                                                  []
                                                                                                                                                                                                                                                                  rewrite_steps
                                                                                                                                                                                                                                                                    forward_chaining
                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                      expr
                                                                                                                                                                                                                                                                      (|Ordinal.<<_121| (|Ordinal.Int_112|
                                                                                                                                                                                                                                                                                          (|count_`ty_0 list`_2646| (|get.::.1_2627| …
                                                                                                                                                                                                                                                                      expansions
                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                        expr
                                                                                                                                                                                                                                                                        (|count_`ty_0 list`_2646| (|get.::.1_2627| x_2637))
                                                                                                                                                                                                                                                                        expansions
                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                          expr
                                                                                                                                                                                                                                                                          (|count_`ty_0 list`_2646| x_2637)
                                                                                                                                                                                                                                                                          expansions
                                                                                                                                                                                                                                                                          • unsat
                                                                                                                                                                                                                                                                            (let ((a!1 (= (|count_`ty_0 list`_2646| x_2637)
                                                                                                                                                                                                                                                                                          (+ 1 (|count_`ty_0 list`_2646| (|get.:…

                                                                                                                                                                                                                                                                          Let's compute with reverse to help gain confidence we defined it correctly.

                                                                                                                                                                                                                                                                          In [12]:
                                                                                                                                                                                                                                                                          reverse [1;2;3;4;5]
                                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                          Out[12]:
                                                                                                                                                                                                                                                                          - : Z.t list = [5; 4; 3; 2; 1]
                                                                                                                                                                                                                                                                          

                                                                                                                                                                                                                                                                          Let's ask Imandra, are there any lists that are their own reverse?

                                                                                                                                                                                                                                                                          In [13]:
                                                                                                                                                                                                                                                                          instance (fun x -> reverse x = x)
                                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                          Out[13]:
                                                                                                                                                                                                                                                                          - : 'a list -> bool = <fun>
                                                                                                                                                                                                                                                                          module CX : sig type t = C_t_0 val x : 'a list end
                                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                          Instance (after 1 steps, 0.011s):
                                                                                                                                                                                                                                                                           type t = C_t_0
                                                                                                                                                                                                                                                                           let x = []
                                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                          Instance
                                                                                                                                                                                                                                                                          proof attempt
                                                                                                                                                                                                                                                                          ground_instances1
                                                                                                                                                                                                                                                                          definitions0
                                                                                                                                                                                                                                                                          inductions0
                                                                                                                                                                                                                                                                          search_time
                                                                                                                                                                                                                                                                          0.011s
                                                                                                                                                                                                                                                                          details
                                                                                                                                                                                                                                                                          Expand
                                                                                                                                                                                                                                                                          smt_stats
                                                                                                                                                                                                                                                                          num checks3
                                                                                                                                                                                                                                                                          rlimit count401
                                                                                                                                                                                                                                                                          mk clause4
                                                                                                                                                                                                                                                                          datatype occurs check2
                                                                                                                                                                                                                                                                          mk bool var11
                                                                                                                                                                                                                                                                          decisions1
                                                                                                                                                                                                                                                                          propagations2
                                                                                                                                                                                                                                                                          conflicts1
                                                                                                                                                                                                                                                                          datatype accessor ax2
                                                                                                                                                                                                                                                                          num allocs2027640834
                                                                                                                                                                                                                                                                          final checks2
                                                                                                                                                                                                                                                                          added eqs7
                                                                                                                                                                                                                                                                          memory25.990000
                                                                                                                                                                                                                                                                          max memory27.920000
                                                                                                                                                                                                                                                                          Expand
                                                                                                                                                                                                                                                                          • start[0.011s] reverse :var_0: = :var_0:
                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                            expr
                                                                                                                                                                                                                                                                            (reverse_2677 x_2674)
                                                                                                                                                                                                                                                                            expansions
                                                                                                                                                                                                                                                                            • Sat (Some type t = C_t_0 let x = [] )

                                                                                                                                                                                                                                                                            Ah! Of course, the empty list is its own reverse. What about longer lists, such as those of length 5?

                                                                                                                                                                                                                                                                            Note that here we use the keyword instance, which tries to find values that satisfy the given property, instead of trying to prove the property.

                                                                                                                                                                                                                                                                            In [14]:
                                                                                                                                                                                                                                                                            instance (fun x -> List.length x >= 5 && reverse x = x)
                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                            Out[14]:
                                                                                                                                                                                                                                                                            - : 'a list -> bool = <fun>
                                                                                                                                                                                                                                                                            module CX :
                                                                                                                                                                                                                                                                              sig
                                                                                                                                                                                                                                                                                type t = C_t_0 | C_t_1 | C_t_2 | C_t_3 | C_t_4 | C_t_5
                                                                                                                                                                                                                                                                                val x : t list
                                                                                                                                                                                                                                                                              end
                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                            Instance (after 27 steps, 0.081s):
                                                                                                                                                                                                                                                                             type t = C_t_0 | C_t_1 | C_t_2 | C_t_3 | C_t_4 | C_t_5
                                                                                                                                                                                                                                                                             let x = [C_t_5; C_t_1; C_t_0; C_t_1; C_t_5]
                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                            Instance
                                                                                                                                                                                                                                                                            proof attempt
                                                                                                                                                                                                                                                                            ground_instances27
                                                                                                                                                                                                                                                                            definitions0
                                                                                                                                                                                                                                                                            inductions0
                                                                                                                                                                                                                                                                            search_time
                                                                                                                                                                                                                                                                            0.081s
                                                                                                                                                                                                                                                                            details
                                                                                                                                                                                                                                                                            Expand
                                                                                                                                                                                                                                                                            smt_stats
                                                                                                                                                                                                                                                                            arith offset eqs2
                                                                                                                                                                                                                                                                            num checks55
                                                                                                                                                                                                                                                                            arith assert lower196
                                                                                                                                                                                                                                                                            arith pivots106
                                                                                                                                                                                                                                                                            rlimit count41776
                                                                                                                                                                                                                                                                            mk clause322
                                                                                                                                                                                                                                                                            datatype occurs check1065
                                                                                                                                                                                                                                                                            mk bool var2058
                                                                                                                                                                                                                                                                            arith assert upper143
                                                                                                                                                                                                                                                                            datatype splits391
                                                                                                                                                                                                                                                                            decisions984
                                                                                                                                                                                                                                                                            arith add rows525
                                                                                                                                                                                                                                                                            arith bound prop2
                                                                                                                                                                                                                                                                            propagations2093
                                                                                                                                                                                                                                                                            conflicts126
                                                                                                                                                                                                                                                                            arith fixed eqs137
                                                                                                                                                                                                                                                                            datatype accessor ax256
                                                                                                                                                                                                                                                                            minimized lits13
                                                                                                                                                                                                                                                                            arith conflicts14
                                                                                                                                                                                                                                                                            arith assert diseq44
                                                                                                                                                                                                                                                                            datatype constructor ax378
                                                                                                                                                                                                                                                                            num allocs2093788838
                                                                                                                                                                                                                                                                            final checks121
                                                                                                                                                                                                                                                                            added eqs4679
                                                                                                                                                                                                                                                                            del clause264
                                                                                                                                                                                                                                                                            arith eq adapter195
                                                                                                                                                                                                                                                                            memory26.910000
                                                                                                                                                                                                                                                                            max memory27.920000
                                                                                                                                                                                                                                                                            Expand
                                                                                                                                                                                                                                                                            • start[0.081s] List.length :var_0: >= 5 && reverse :var_0: = :var_0:
                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                              expr
                                                                                                                                                                                                                                                                              (reverse_2723 x_2717)
                                                                                                                                                                                                                                                                              expansions
                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                expr
                                                                                                                                                                                                                                                                                (|List.length_2720| x_2717)
                                                                                                                                                                                                                                                                                expansions
                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                  expr
                                                                                                                                                                                                                                                                                  (reverse_2723 (|get.::.1_2716| x_2717))
                                                                                                                                                                                                                                                                                  expansions
                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                    expr
                                                                                                                                                                                                                                                                                    (append_2727 (reverse_2723 (|get.::.1_2716| x_2717))
                                                                                                                                                                                                                                                                                                 (|::_3| (|get.::.0_2715| x_2717) |…
                                                                                                                                                                                                                                                                                    expansions
                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                      expr
                                                                                                                                                                                                                                                                                      (|List.length_2720| (|get.::.1_2716| x_2717))
                                                                                                                                                                                                                                                                                      expansions
                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                        expr
                                                                                                                                                                                                                                                                                        (reverse_2723 (|get.::.1_2716| (|get.::.1_2716| x_2717)))
                                                                                                                                                                                                                                                                                        expansions
                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                          expr
                                                                                                                                                                                                                                                                                          (append_2727 (reverse_2723 (|get.::.1_2716| (|get.::.1_2716| x_2717)))
                                                                                                                                                                                                                                                                                                       (|::_3| (|get.::…
                                                                                                                                                                                                                                                                                          expansions
                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                            expr
                                                                                                                                                                                                                                                                                            (|List.length_2720| (|get.::.1_2716| (|get.::.1_2716| x_2717)))
                                                                                                                                                                                                                                                                                            expansions
                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                              expr
                                                                                                                                                                                                                                                                                              (append_2727 (|get.::.1_2716| (reverse_2723 (|get.::.1_2716| x_2717)))
                                                                                                                                                                                                                                                                                                           (|::_3| (|get.::…
                                                                                                                                                                                                                                                                                              expansions
                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                expr
                                                                                                                                                                                                                                                                                                (reverse_2723 (|get.::.1_2716| (|get.::.1_2716| (|get.::.1_2716| x_2717))))
                                                                                                                                                                                                                                                                                                expansions
                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                  expr
                                                                                                                                                                                                                                                                                                  (let ((a!1 (reverse_2723 (|get.::.1_2716| (|get.::.1_2716| (|get.::.1_2716| x_2717)))))
                                                                                                                                                                                                                                                                                                        (a!2 (…
                                                                                                                                                                                                                                                                                                  expansions
                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                    expr
                                                                                                                                                                                                                                                                                                    (|List.length_2720|
                                                                                                                                                                                                                                                                                                      (|get.::.1_2716| (|get.::.1_2716| (|get.::.1_2716| x_2717))))
                                                                                                                                                                                                                                                                                                    expansions
                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                      expr
                                                                                                                                                                                                                                                                                                      (let ((a!1 (|get.::.1_2716| (reverse_2723 (|get.::.1_2716| (|get.::.1_2716| x_2717))))))
                                                                                                                                                                                                                                                                                                        (append_2…
                                                                                                                                                                                                                                                                                                      expansions
                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                        expr
                                                                                                                                                                                                                                                                                                        (let ((a!1 (|get.::.1_2716| (|get.::.1_2716| (reverse_2723 (|get.::.1_2716| x_2717))))))
                                                                                                                                                                                                                                                                                                          (append_2…
                                                                                                                                                                                                                                                                                                        expansions
                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                          expr
                                                                                                                                                                                                                                                                                                          (let ((a!1 (|get.::.1_2716| (|get.::.1_2716| (|get.::.1_2716| (|get.::.1_2716| x_2717))))))
                                                                                                                                                                                                                                                                                                            (rever…
                                                                                                                                                                                                                                                                                                          expansions
                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                            expr
                                                                                                                                                                                                                                                                                                            (let ((a!1 (|get.::.1_2716| (|get.::.1_2716| (|get.::.1_2716| (|get.::.1_2716| x_2717))))))
                                                                                                                                                                                                                                                                                                              (|List…
                                                                                                                                                                                                                                                                                                            expansions
                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                              expr
                                                                                                                                                                                                                                                                                                              (let ((a!1 (|get.::.1_2716| (|get.::.1_2716| (|get.::.1_2716| (|get.::.1_2716| x_2717)))))
                                                                                                                                                                                                                                                                                                                    (a!…
                                                                                                                                                                                                                                                                                                              expansions
                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                expr
                                                                                                                                                                                                                                                                                                                (let ((a!1 (reverse_2723 (|get.::.1_2716| (|get.::.1_2716| (|get.::.1_2716| x_2717)))))
                                                                                                                                                                                                                                                                                                                      (a!2 (…
                                                                                                                                                                                                                                                                                                                expansions
                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                  expr
                                                                                                                                                                                                                                                                                                                  (let ((a!1 (|get.::.1_2716| (|get.::.1_2716| (|get.::.1_2716| (|get.::.1_2716| x_2717))))))
                                                                                                                                                                                                                                                                                                                    (|List…
                                                                                                                                                                                                                                                                                                                  expansions
                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                    expr
                                                                                                                                                                                                                                                                                                                    (let ((a!1 (|get.::.1_2716| (reverse_2723 (|get.::.1_2716| (|get.::.1_2716| x_2717))))))
                                                                                                                                                                                                                                                                                                                      (append_2…
                                                                                                                                                                                                                                                                                                                    expansions
                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                      expr
                                                                                                                                                                                                                                                                                                                      (let ((a!1 (|get.::.1_2716| (|get.::.1_2716| (|get.::.1_2716| (|get.::.1_2716| x_2717))))))
                                                                                                                                                                                                                                                                                                                        (appen…
                                                                                                                                                                                                                                                                                                                      expansions
                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                        expr
                                                                                                                                                                                                                                                                                                                        (let ((a!1 (|get.::.1_2716| (|get.::.1_2716| (|get.::.1_2716| (|get.::.1_2716| x_2717))))))
                                                                                                                                                                                                                                                                                                                          (rever…
                                                                                                                                                                                                                                                                                                                        expansions
                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                          expr
                                                                                                                                                                                                                                                                                                                          (let ((a!1 (|get.::.1_2716| (|get.::.1_2716| (reverse_2723 (|get.::.1_2716| x_2717))))))
                                                                                                                                                                                                                                                                                                                            (append_2…
                                                                                                                                                                                                                                                                                                                          expansions
                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                            expr
                                                                                                                                                                                                                                                                                                                            (let ((a!1 (|get.::.1_2716| (|get.::.1_2716| (|get.::.1_2716| (|get.::.1_2716| x_2717)))))
                                                                                                                                                                                                                                                                                                                                  (a!…
                                                                                                                                                                                                                                                                                                                            expansions
                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                              expr
                                                                                                                                                                                                                                                                                                                              (let ((a!1 (reverse_2723 (|get.::.1_2716| (|get.::.1_2716| (|get.::.1_2716| x_2717)))))
                                                                                                                                                                                                                                                                                                                                    (a!2 (…
                                                                                                                                                                                                                                                                                                                              expansions
                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                expr
                                                                                                                                                                                                                                                                                                                                (let ((a!1 (|get.::.1_2716| (|get.::.1_2716| (reverse_2723 (|get.::.1_2716| x_2717))))))
                                                                                                                                                                                                                                                                                                                                  (append_2…
                                                                                                                                                                                                                                                                                                                                expansions
                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                  expr
                                                                                                                                                                                                                                                                                                                                  (let ((a!1 (|get.::.1_2716| (reverse_2723 (|get.::.1_2716| (|get.::.1_2716| x_2717))))))
                                                                                                                                                                                                                                                                                                                                    (append_2…
                                                                                                                                                                                                                                                                                                                                  expansions
                                                                                                                                                                                                                                                                                                                                  • Sat (Some type t = C_t_0 | C_t_1 | C_t_2 | C_t_3 | C_t_4 | C_t_5 let x = [C_t_5; C_t_1; C_t_0; C_t_1; C_t_5] )

                                                                                                                                                                                                                                                                                                                                  Ah! Of course, palindromes! This counterexample is also interesting because, in addition to giving us a concrete value CX.x, this counterexample also involves the synthesis of an algebraic datatype. This is because our goal was polymorphic. If we want, for example, an int list counterexample, we can simply annotate our goal with types:

                                                                                                                                                                                                                                                                                                                                  In [15]:
                                                                                                                                                                                                                                                                                                                                  instance (fun (x : int list) -> List.length x >= 5 && reverse x = x)
                                                                                                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                                                                                  Out[15]:
                                                                                                                                                                                                                                                                                                                                  - : int list -> bool = <fun>
                                                                                                                                                                                                                                                                                                                                  module CX : sig val x : Z.t list end
                                                                                                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                                                                                  Instance (after 27 steps, 0.099s):
                                                                                                                                                                                                                                                                                                                                   let x = [6; 8; 7; 8; 6]
                                                                                                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                                                                                  Instance
                                                                                                                                                                                                                                                                                                                                  proof attempt
                                                                                                                                                                                                                                                                                                                                  ground_instances27
                                                                                                                                                                                                                                                                                                                                  definitions0
                                                                                                                                                                                                                                                                                                                                  inductions0
                                                                                                                                                                                                                                                                                                                                  search_time
                                                                                                                                                                                                                                                                                                                                  0.099s
                                                                                                                                                                                                                                                                                                                                  details
                                                                                                                                                                                                                                                                                                                                  Expand
                                                                                                                                                                                                                                                                                                                                  smt_stats
                                                                                                                                                                                                                                                                                                                                  arith offset eqs2
                                                                                                                                                                                                                                                                                                                                  num checks55
                                                                                                                                                                                                                                                                                                                                  arith assert lower196
                                                                                                                                                                                                                                                                                                                                  arith pivots106
                                                                                                                                                                                                                                                                                                                                  rlimit count41766
                                                                                                                                                                                                                                                                                                                                  mk clause322
                                                                                                                                                                                                                                                                                                                                  datatype occurs check1065
                                                                                                                                                                                                                                                                                                                                  mk bool var2058
                                                                                                                                                                                                                                                                                                                                  arith assert upper143
                                                                                                                                                                                                                                                                                                                                  datatype splits391
                                                                                                                                                                                                                                                                                                                                  decisions984
                                                                                                                                                                                                                                                                                                                                  arith add rows525
                                                                                                                                                                                                                                                                                                                                  arith bound prop2
                                                                                                                                                                                                                                                                                                                                  propagations2093
                                                                                                                                                                                                                                                                                                                                  conflicts126
                                                                                                                                                                                                                                                                                                                                  arith fixed eqs137
                                                                                                                                                                                                                                                                                                                                  datatype accessor ax256
                                                                                                                                                                                                                                                                                                                                  minimized lits13
                                                                                                                                                                                                                                                                                                                                  arith conflicts14
                                                                                                                                                                                                                                                                                                                                  arith assert diseq44
                                                                                                                                                                                                                                                                                                                                  datatype constructor ax378
                                                                                                                                                                                                                                                                                                                                  num allocs2209665054
                                                                                                                                                                                                                                                                                                                                  final checks121
                                                                                                                                                                                                                                                                                                                                  added eqs4679
                                                                                                                                                                                                                                                                                                                                  del clause264
                                                                                                                                                                                                                                                                                                                                  arith eq adapter195
                                                                                                                                                                                                                                                                                                                                  memory27.520000
                                                                                                                                                                                                                                                                                                                                  max memory30.260000
                                                                                                                                                                                                                                                                                                                                  Expand
                                                                                                                                                                                                                                                                                                                                  • start[0.099s] List.length :var_0: >= 5 && reverse :var_0: = :var_0:
                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                    expr
                                                                                                                                                                                                                                                                                                                                    (reverse_2749 x_2740)
                                                                                                                                                                                                                                                                                                                                    expansions
                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                      expr
                                                                                                                                                                                                                                                                                                                                      (|List.length_2746| x_2740)
                                                                                                                                                                                                                                                                                                                                      expansions
                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                        expr
                                                                                                                                                                                                                                                                                                                                        (reverse_2749 (|get.::.1_2745| x_2740))
                                                                                                                                                                                                                                                                                                                                        expansions
                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                          expr
                                                                                                                                                                                                                                                                                                                                          (append_2753 (reverse_2749 (|get.::.1_2745| x_2740))
                                                                                                                                                                                                                                                                                                                                                       (|::_3| (|get.::.0_2744| x_2740) |…
                                                                                                                                                                                                                                                                                                                                          expansions
                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                            expr
                                                                                                                                                                                                                                                                                                                                            (|List.length_2746| (|get.::.1_2745| x_2740))
                                                                                                                                                                                                                                                                                                                                            expansions
                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                              expr
                                                                                                                                                                                                                                                                                                                                              (reverse_2749 (|get.::.1_2745| (|get.::.1_2745| x_2740)))
                                                                                                                                                                                                                                                                                                                                              expansions
                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                expr
                                                                                                                                                                                                                                                                                                                                                (append_2753 (reverse_2749 (|get.::.1_2745| (|get.::.1_2745| x_2740)))
                                                                                                                                                                                                                                                                                                                                                             (|::_3| (|get.::…
                                                                                                                                                                                                                                                                                                                                                expansions
                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                  expr
                                                                                                                                                                                                                                                                                                                                                  (|List.length_2746| (|get.::.1_2745| (|get.::.1_2745| x_2740)))
                                                                                                                                                                                                                                                                                                                                                  expansions
                                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                                    expr
                                                                                                                                                                                                                                                                                                                                                    (append_2753 (|get.::.1_2745| (reverse_2749 (|get.::.1_2745| x_2740)))
                                                                                                                                                                                                                                                                                                                                                                 (|::_3| (|get.::…
                                                                                                                                                                                                                                                                                                                                                    expansions
                                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                                      expr
                                                                                                                                                                                                                                                                                                                                                      (reverse_2749 (|get.::.1_2745| (|get.::.1_2745| (|get.::.1_2745| x_2740))))
                                                                                                                                                                                                                                                                                                                                                      expansions
                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                        expr
                                                                                                                                                                                                                                                                                                                                                        (let ((a!1 (reverse_2749 (|get.::.1_2745| (|get.::.1_2745| (|get.::.1_2745| x_2740)))))
                                                                                                                                                                                                                                                                                                                                                              (a!2 (…
                                                                                                                                                                                                                                                                                                                                                        expansions
                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                          expr
                                                                                                                                                                                                                                                                                                                                                          (|List.length_2746|
                                                                                                                                                                                                                                                                                                                                                            (|get.::.1_2745| (|get.::.1_2745| (|get.::.1_2745| x_2740))))
                                                                                                                                                                                                                                                                                                                                                          expansions
                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                            expr
                                                                                                                                                                                                                                                                                                                                                            (let ((a!1 (|get.::.1_2745| (reverse_2749 (|get.::.1_2745| (|get.::.1_2745| x_2740))))))
                                                                                                                                                                                                                                                                                                                                                              (append_2…
                                                                                                                                                                                                                                                                                                                                                            expansions
                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                              expr
                                                                                                                                                                                                                                                                                                                                                              (let ((a!1 (|get.::.1_2745| (|get.::.1_2745| (reverse_2749 (|get.::.1_2745| x_2740))))))
                                                                                                                                                                                                                                                                                                                                                                (append_2…
                                                                                                                                                                                                                                                                                                                                                              expansions
                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                expr
                                                                                                                                                                                                                                                                                                                                                                (let ((a!1 (|get.::.1_2745| (|get.::.1_2745| (|get.::.1_2745| (|get.::.1_2745| x_2740))))))
                                                                                                                                                                                                                                                                                                                                                                  (rever…
                                                                                                                                                                                                                                                                                                                                                                expansions
                                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                                  expr
                                                                                                                                                                                                                                                                                                                                                                  (let ((a!1 (|get.::.1_2745| (|get.::.1_2745| (|get.::.1_2745| (|get.::.1_2745| x_2740))))))
                                                                                                                                                                                                                                                                                                                                                                    (|List…
                                                                                                                                                                                                                                                                                                                                                                  expansions
                                                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                                                    expr
                                                                                                                                                                                                                                                                                                                                                                    (let ((a!1 (|get.::.1_2745| (|get.::.1_2745| (|get.::.1_2745| (|get.::.1_2745| x_2740)))))
                                                                                                                                                                                                                                                                                                                                                                          (a!…
                                                                                                                                                                                                                                                                                                                                                                    expansions
                                                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                                                      expr
                                                                                                                                                                                                                                                                                                                                                                      (let ((a!1 (reverse_2749 (|get.::.1_2745| (|get.::.1_2745| (|get.::.1_2745| x_2740)))))
                                                                                                                                                                                                                                                                                                                                                                            (a!2 (…
                                                                                                                                                                                                                                                                                                                                                                      expansions
                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                        expr
                                                                                                                                                                                                                                                                                                                                                                        (let ((a!1 (|get.::.1_2745| (|get.::.1_2745| (|get.::.1_2745| (|get.::.1_2745| x_2740))))))
                                                                                                                                                                                                                                                                                                                                                                          (|List…
                                                                                                                                                                                                                                                                                                                                                                        expansions
                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                          expr
                                                                                                                                                                                                                                                                                                                                                                          (let ((a!1 (|get.::.1_2745| (reverse_2749 (|get.::.1_2745| (|get.::.1_2745| x_2740))))))
                                                                                                                                                                                                                                                                                                                                                                            (append_2…
                                                                                                                                                                                                                                                                                                                                                                          expansions
                                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                                            expr
                                                                                                                                                                                                                                                                                                                                                                            (let ((a!1 (|get.::.1_2745| (|get.::.1_2745| (|get.::.1_2745| (|get.::.1_2745| x_2740))))))
                                                                                                                                                                                                                                                                                                                                                                              (appen…
                                                                                                                                                                                                                                                                                                                                                                            expansions
                                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                                              expr
                                                                                                                                                                                                                                                                                                                                                                              (let ((a!1 (|get.::.1_2745| (|get.::.1_2745| (|get.::.1_2745| (|get.::.1_2745| x_2740))))))
                                                                                                                                                                                                                                                                                                                                                                                (rever…
                                                                                                                                                                                                                                                                                                                                                                              expansions
                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                expr
                                                                                                                                                                                                                                                                                                                                                                                (let ((a!1 (|get.::.1_2745| (|get.::.1_2745| (reverse_2749 (|get.::.1_2745| x_2740))))))
                                                                                                                                                                                                                                                                                                                                                                                  (append_2…
                                                                                                                                                                                                                                                                                                                                                                                expansions
                                                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                                                  expr
                                                                                                                                                                                                                                                                                                                                                                                  (let ((a!1 (|get.::.1_2745| (|get.::.1_2745| (|get.::.1_2745| (|get.::.1_2745| x_2740)))))
                                                                                                                                                                                                                                                                                                                                                                                        (a!…
                                                                                                                                                                                                                                                                                                                                                                                  expansions
                                                                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                                                                    expr
                                                                                                                                                                                                                                                                                                                                                                                    (let ((a!1 (reverse_2749 (|get.::.1_2745| (|get.::.1_2745| (|get.::.1_2745| x_2740)))))
                                                                                                                                                                                                                                                                                                                                                                                          (a!2 (…
                                                                                                                                                                                                                                                                                                                                                                                    expansions
                                                                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                                                                      expr
                                                                                                                                                                                                                                                                                                                                                                                      (let ((a!1 (|get.::.1_2745| (|get.::.1_2745| (reverse_2749 (|get.::.1_2745| x_2740))))))
                                                                                                                                                                                                                                                                                                                                                                                        (append_2…
                                                                                                                                                                                                                                                                                                                                                                                      expansions
                                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                                        expr
                                                                                                                                                                                                                                                                                                                                                                                        (let ((a!1 (|get.::.1_2745| (reverse_2749 (|get.::.1_2745| (|get.::.1_2745| x_2740))))))
                                                                                                                                                                                                                                                                                                                                                                                          (append_2…
                                                                                                                                                                                                                                                                                                                                                                                        expansions
                                                                                                                                                                                                                                                                                                                                                                                        • Sat (Some let x = [6; 8; 7; 8; 6] )

                                                                                                                                                                                                                                                                                                                                                                                        Excellent! And we can of course compute with our counterexample:

                                                                                                                                                                                                                                                                                                                                                                                        In [16]:
                                                                                                                                                                                                                                                                                                                                                                                        reverse CX.x
                                                                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                                                                        Out[16]:
                                                                                                                                                                                                                                                                                                                                                                                        - : Z.t list = [6; 8; 7; 8; 6]
                                                                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                                                                        In [17]:
                                                                                                                                                                                                                                                                                                                                                                                        reverse CX.x = CX.x
                                                                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                                                                        Out[17]:
                                                                                                                                                                                                                                                                                                                                                                                        - : bool = true
                                                                                                                                                                                                                                                                                                                                                                                        

                                                                                                                                                                                                                                                                                                                                                                                        Reverse of Reverse is the Identity

                                                                                                                                                                                                                                                                                                                                                                                        Now that we've defined our reverse function and experimented a bit with it, let's try to prove an interesting theorem. Let's prove that

                                                                                                                                                                                                                                                                                                                                                                                        (forall x, (reverse (reverse x)) = x).

                                                                                                                                                                                                                                                                                                                                                                                        That is, if we take an arbitrary list x and we reverse it twice, we always get our original x back unscathed.

                                                                                                                                                                                                                                                                                                                                                                                        As usual, let's start by asking Imandra to verify this via bounded checking (a.k.a. recursive unrolling).

                                                                                                                                                                                                                                                                                                                                                                                        In [18]:
                                                                                                                                                                                                                                                                                                                                                                                        verify (fun x -> reverse (reverse x) = x)
                                                                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                                                                        Out[18]:
                                                                                                                                                                                                                                                                                                                                                                                        - : 'a list -> bool = <fun>
                                                                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                                                                        Unknown (Verified up to bound 100)
                                                                                                                                                                                                                                                                                                                                                                                        Expand
                                                                                                                                                                                                                                                                                                                                                                                        expanded
                                                                                                                                                                                                                                                                                                                                                                                        • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (reverse (List.tl x)))))))))) [List.hd x]
                                                                                                                                                                                                                                                                                                                                                                                        • append (List.tl (reverse (List.tl (reverse x)))) [List.hd (reverse x)]
                                                                                                                                                                                                                                                                                                                                                                                        • append (List.tl (List.tl (reverse (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x))))))))) [List.hd (List.tl (List.tl (List.tl (List.tl (List.tl x)))))]
                                                                                                                                                                                                                                                                                                                                                                                        • append (List.tl (List.tl (List.tl (List.tl (List.tl (reverse (List.tl x))))))) [List.hd x]
                                                                                                                                                                                                                                                                                                                                                                                        • append (List.tl (List.tl (reverse (List.tl (List.tl (List.tl (List.tl (List.tl x)))))))) [List.hd (List.tl (List.tl (List.tl (List.tl x))))]
                                                                                                                                                                                                                                                                                                                                                                                        • reverse (List.tl (List.tl (List.tl (List.tl x))))
                                                                                                                                                                                                                                                                                                                                                                                        • append (List.tl (List.tl (List.tl (reverse (List.tl x))))) [List.hd x]
                                                                                                                                                                                                                                                                                                                                                                                        • append (List.tl (List.tl (reverse (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x)))))))))) [List.hd (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x))))))]
                                                                                                                                                                                                                                                                                                                                                                                        • append (List.tl (List.tl (List.tl (List.tl (List.tl (reverse (List.tl (List.tl x)))))))) [List.hd (List.tl x)]
                                                                                                                                                                                                                                                                                                                                                                                        • append (List.tl (List.tl (List.tl (List.tl (reverse (List.tl x)))))) [List.hd x]
                                                                                                                                                                                                                                                                                                                                                                                        • append (List.tl (List.tl (List.tl (List.tl (reverse (List.tl (List.tl (List.tl (List.tl x))))))))) [List.hd (List.tl (List.tl (List.tl x)))]
                                                                                                                                                                                                                                                                                                                                                                                        • append (List.tl (List.tl (List.tl (reverse (List.tl (List.tl (reverse x))))))) [List.hd (List.tl (reverse x))]
                                                                                                                                                                                                                                                                                                                                                                                        • append (List.tl (reverse (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (reverse x)))))))))) [List.hd (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (reverse x)))))))]
                                                                                                                                                                                                                                                                                                                                                                                        • append (List.tl (reverse (List.tl (List.tl (reverse x))))) [List.hd (List.tl (reverse x))]
                                                                                                                                                                                                                                                                                                                                                                                        • reverse (reverse x)
                                                                                                                                                                                                                                                                                                                                                                                        • append (reverse (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (reverse x)))))))))) [List.hd (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (reverse x))))))))]
                                                                                                                                                                                                                                                                                                                                                                                        • append (reverse (List.tl x)) [List.hd x]
                                                                                                                                                                                                                                                                                                                                                                                        • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (reverse (List.tl x)))))))) [List.hd x]
                                                                                                                                                                                                                                                                                                                                                                                        • append (reverse (List.tl (List.tl (List.tl (List.tl (List.tl (reverse x))))))) [List.hd (List.tl (List.tl (List.tl (List.tl (reverse x)))))]
                                                                                                                                                                                                                                                                                                                                                                                        • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (reverse (List.tl (List.tl (List.tl x)))))))))) [List.hd (List.tl (List.tl x))]
                                                                                                                                                                                                                                                                                                                                                                                        • reverse (List.tl (reverse x))
                                                                                                                                                                                                                                                                                                                                                                                        • append (List.tl (List.tl (List.tl (reverse (List.tl (List.tl (List.tl x))))))) [List.hd (List.tl (List.tl x))]
                                                                                                                                                                                                                                                                                                                                                                                        • reverse (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x))))))))
                                                                                                                                                                                                                                                                                                                                                                                        • append (reverse (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x)))))))) [List.hd (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x))))))]
                                                                                                                                                                                                                                                                                                                                                                                        • append (List.tl (List.tl (reverse (List.tl (List.tl (List.tl (reverse x))))))) [List.hd (List.tl (List.tl (reverse x)))]
                                                                                                                                                                                                                                                                                                                                                                                        • append (List.tl (reverse (List.tl (List.tl (List.tl x))))) [List.hd (List.tl (List.tl x))]
                                                                                                                                                                                                                                                                                                                                                                                        • append (List.tl (List.tl (List.tl (List.tl (reverse (List.tl (List.tl (List.tl (List.tl (reverse x)))))))))) [List.hd (List.tl (List.tl (List.tl (reverse x))))]
                                                                                                                                                                                                                                                                                                                                                                                        • reverse (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x))))))
                                                                                                                                                                                                                                                                                                                                                                                        • append (List.tl (List.tl (reverse (List.tl (List.tl (List.tl x)))))) [List.hd (List.tl (List.tl x))]
                                                                                                                                                                                                                                                                                                                                                                                        • append (reverse (List.tl (List.tl (List.tl (reverse x))))) [List.hd (List.tl (List.tl (reverse x)))]
                                                                                                                                                                                                                                                                                                                                                                                        • append (List.tl (List.tl (List.tl (reverse (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x)))))))))) [List.hd (List.tl (List.tl (List.tl (List.tl (List.tl x)))))]
                                                                                                                                                                                                                                                                                                                                                                                        • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (reverse (List.tl (reverse x)))))))))) [List.hd (reverse x)]
                                                                                                                                                                                                                                                                                                                                                                                        • append (reverse (List.tl (List.tl (reverse x)))) [List.hd (List.tl (reverse x))]
                                                                                                                                                                                                                                                                                                                                                                                        • append (reverse (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x))))))) [List.hd (List.tl (List.tl (List.tl (List.tl (List.tl x)))))]
                                                                                                                                                                                                                                                                                                                                                                                        • append (reverse (List.tl (List.tl (List.tl (List.tl (reverse x)))))) [List.hd (List.tl (List.tl (List.tl (reverse x))))]
                                                                                                                                                                                                                                                                                                                                                                                        • append (reverse (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (reverse x))))))))) [List.hd (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (reverse x)))))))]
                                                                                                                                                                                                                                                                                                                                                                                        • append (List.tl (List.tl (List.tl (List.tl (List.tl (reverse (List.tl (List.tl (List.tl (List.tl x)))))))))) [List.hd (List.tl (List.tl (List.tl x)))]
                                                                                                                                                                                                                                                                                                                                                                                        • append (List.tl (List.tl (List.tl (List.tl (reverse (List.tl (List.tl (List.tl x)))))))) [List.hd (List.tl (List.tl x))]
                                                                                                                                                                                                                                                                                                                                                                                        • append (List.tl (List.tl (List.tl (reverse (List.tl (reverse x)))))) [List.hd (reverse x)]
                                                                                                                                                                                                                                                                                                                                                                                        • append (List.tl (List.tl (reverse (List.tl (List.tl (List.tl (List.tl x))))))) [List.hd (List.tl (List.tl (List.tl x)))]
                                                                                                                                                                                                                                                                                                                                                                                        • append (reverse (List.tl (List.tl (List.tl (List.tl x))))) [List.hd (List.tl (List.tl (List.tl x)))]
                                                                                                                                                                                                                                                                                                                                                                                        • append (List.tl (List.tl (reverse (List.tl (List.tl (List.tl (List.tl (reverse x)))))))) [List.hd (List.tl (List.tl (List.tl (reverse x))))]
                                                                                                                                                                                                                                                                                                                                                                                        • append (List.tl (reverse (List.tl (List.tl (List.tl (List.tl x)))))) [List.hd (List.tl (List.tl (List.tl x)))]
                                                                                                                                                                                                                                                                                                                                                                                        • reverse (List.tl (List.tl (List.tl (List.tl (List.tl x)))))
                                                                                                                                                                                                                                                                                                                                                                                        • append (List.tl (List.tl (reverse (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (reverse x)))))))))) [List.hd (List.tl (List.tl (List.tl (List.tl (List.tl (reverse x))))))]
                                                                                                                                                                                                                                                                                                                                                                                        • append (List.tl (reverse (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x)))))))) [List.hd (List.tl (List.tl (List.tl (List.tl (List.tl x)))))]
                                                                                                                                                                                                                                                                                                                                                                                        • append (List.tl (List.tl (List.tl (List.tl (List.tl (reverse (List.tl (reverse x)))))))) [List.hd (reverse x)]
                                                                                                                                                                                                                                                                                                                                                                                        • append (reverse (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x))))))))) [List.hd (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x)))))))]
                                                                                                                                                                                                                                                                                                                                                                                        • append (List.tl (List.tl (List.tl (reverse (List.tl (List.tl (List.tl (List.tl (reverse x))))))))) [List.hd (List.tl (List.tl (List.tl (reverse x))))]
                                                                                                                                                                                                                                                                                                                                                                                        • append (List.tl (List.tl (List.tl (reverse (List.tl (List.tl (List.tl (List.tl x)))))))) [List.hd (List.tl (List.tl (List.tl x)))]
                                                                                                                                                                                                                                                                                                                                                                                        • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (reverse (List.tl (reverse x))))))))) [List.hd (reverse x)]
                                                                                                                                                                                                                                                                                                                                                                                        • reverse (List.tl (List.tl (List.tl (List.tl (reverse x)))))
                                                                                                                                                                                                                                                                                                                                                                                        • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (reverse (List.tl (List.tl (reverse x)))))))))) [List.hd (List.tl (reverse x))]
                                                                                                                                                                                                                                                                                                                                                                                        • reverse (List.tl (List.tl x))
                                                                                                                                                                                                                                                                                                                                                                                        • append (reverse (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (reverse x)))))))) [List.hd (List.tl (List.tl (List.tl (List.tl (List.tl (reverse x))))))]
                                                                                                                                                                                                                                                                                                                                                                                        • append (List.tl (List.tl (List.tl (reverse (List.tl (List.tl (List.tl (List.tl (List.tl x))))))))) [List.hd (List.tl (List.tl (List.tl (List.tl x))))]
                                                                                                                                                                                                                                                                                                                                                                                        • append (reverse (List.tl (reverse x))) [List.hd (reverse x)]
                                                                                                                                                                                                                                                                                                                                                                                        • append (List.tl (List.tl (reverse (List.tl (List.tl (reverse x)))))) [List.hd (List.tl (reverse x))]
                                                                                                                                                                                                                                                                                                                                                                                        • append (List.tl (reverse (List.tl (List.tl x)))) [List.hd (List.tl x)]
                                                                                                                                                                                                                                                                                                                                                                                        • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (reverse (List.tl (List.tl x))))))))) [List.hd (List.tl x)]
                                                                                                                                                                                                                                                                                                                                                                                        • append (List.tl (List.tl (List.tl (reverse (List.tl (List.tl (List.tl (List.tl (List.tl (reverse x)))))))))) [List.hd (List.tl (List.tl (List.tl (List.tl (reverse x)))))]
                                                                                                                                                                                                                                                                                                                                                                                        • reverse (List.tl (List.tl (List.tl (reverse x))))
                                                                                                                                                                                                                                                                                                                                                                                        • append (List.tl (reverse (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (reverse x))))))))) [List.hd (List.tl (List.tl (List.tl (List.tl (List.tl (reverse x))))))]
                                                                                                                                                                                                                                                                                                                                                                                        • append (List.tl (reverse (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x)))))))))) [List.hd (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x)))))))]
                                                                                                                                                                                                                                                                                                                                                                                        • append (List.tl (List.tl (List.tl (List.tl (List.tl (reverse (List.tl (List.tl (List.tl (reverse x)))))))))) [List.hd (List.tl (List.tl (reverse x)))]
                                                                                                                                                                                                                                                                                                                                                                                        • append (List.tl (List.tl (List.tl (List.tl (reverse (List.tl (List.tl (reverse x)))))))) [List.hd (List.tl (reverse x))]
                                                                                                                                                                                                                                                                                                                                                                                        • append (List.tl (List.tl (reverse (List.tl x)))) [List.hd x]
                                                                                                                                                                                                                                                                                                                                                                                        • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (reverse (List.tl x))))))))) [List.hd x]
                                                                                                                                                                                                                                                                                                                                                                                        • append (reverse (List.tl (List.tl x))) [List.hd (List.tl x)]
                                                                                                                                                                                                                                                                                                                                                                                        • append (reverse (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x)))))))))) [List.hd (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x))))))))]
                                                                                                                                                                                                                                                                                                                                                                                        • reverse (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x)))))))
                                                                                                                                                                                                                                                                                                                                                                                        • append (List.tl (reverse (List.tl (List.tl (List.tl (List.tl (reverse x))))))) [List.hd (List.tl (List.tl (List.tl (reverse x))))]
                                                                                                                                                                                                                                                                                                                                                                                        • append (List.tl (reverse (List.tl (List.tl (List.tl (reverse x)))))) [List.hd (List.tl (List.tl (reverse x)))]
                                                                                                                                                                                                                                                                                                                                                                                        • append (List.tl (reverse (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x))))))))) [List.hd (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x))))))]
                                                                                                                                                                                                                                                                                                                                                                                        • append (List.tl (List.tl (List.tl (List.tl (List.tl (reverse (List.tl (List.tl (reverse x))))))))) [List.hd (List.tl (reverse x))]
                                                                                                                                                                                                                                                                                                                                                                                        • append (List.tl (List.tl (List.tl (List.tl (reverse (List.tl (reverse x))))))) [List.hd (reverse x)]
                                                                                                                                                                                                                                                                                                                                                                                        • append (List.tl (reverse (List.tl (List.tl (List.tl (List.tl (List.tl (reverse x)))))))) [List.hd (List.tl (List.tl (List.tl (List.tl (reverse x)))))]
                                                                                                                                                                                                                                                                                                                                                                                        • append (List.tl (List.tl (reverse (List.tl (reverse x))))) [List.hd (reverse x)]
                                                                                                                                                                                                                                                                                                                                                                                        • reverse (List.tl (List.tl (List.tl x)))
                                                                                                                                                                                                                                                                                                                                                                                        • append (List.tl (reverse (List.tl x))) [List.hd x]
                                                                                                                                                                                                                                                                                                                                                                                        • reverse (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (reverse x))))))))
                                                                                                                                                                                                                                                                                                                                                                                        • reverse x
                                                                                                                                                                                                                                                                                                                                                                                        • reverse (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x)))))))))
                                                                                                                                                                                                                                                                                                                                                                                        • append (List.tl (List.tl (List.tl (List.tl (reverse (List.tl (List.tl (List.tl (List.tl (List.tl x)))))))))) [List.hd (List.tl (List.tl (List.tl (List.tl x))))]
                                                                                                                                                                                                                                                                                                                                                                                        • append (List.tl (List.tl (List.tl (reverse (List.tl (List.tl (List.tl (reverse x)))))))) [List.hd (List.tl (List.tl (reverse x)))]
                                                                                                                                                                                                                                                                                                                                                                                        • reverse (List.tl (List.tl (List.tl (List.tl (List.tl (reverse x))))))
                                                                                                                                                                                                                                                                                                                                                                                        • append (List.tl (List.tl (reverse (List.tl (List.tl (List.tl (List.tl (List.tl (reverse x))))))))) [List.hd (List.tl (List.tl (List.tl (List.tl (reverse x)))))]
                                                                                                                                                                                                                                                                                                                                                                                        • reverse (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (reverse x)))))))
                                                                                                                                                                                                                                                                                                                                                                                        • append (List.tl (reverse (List.tl (List.tl (List.tl (List.tl (List.tl x))))))) [List.hd (List.tl (List.tl (List.tl (List.tl x))))]
                                                                                                                                                                                                                                                                                                                                                                                        • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (reverse (List.tl (List.tl x)))))))))) [List.hd (List.tl x)]
                                                                                                                                                                                                                                                                                                                                                                                        • append (reverse (List.tl (List.tl (List.tl x)))) [List.hd (List.tl (List.tl x))]
                                                                                                                                                                                                                                                                                                                                                                                        • append (List.tl (List.tl (List.tl (List.tl (List.tl (reverse (List.tl (List.tl (List.tl x))))))))) [List.hd (List.tl (List.tl x))]
                                                                                                                                                                                                                                                                                                                                                                                        • append (List.tl (List.tl (List.tl (List.tl (reverse (List.tl (List.tl x))))))) [List.hd (List.tl x)]
                                                                                                                                                                                                                                                                                                                                                                                        • append (reverse (List.tl (List.tl (List.tl (List.tl (List.tl x)))))) [List.hd (List.tl (List.tl (List.tl (List.tl x))))]
                                                                                                                                                                                                                                                                                                                                                                                        • append (List.tl (List.tl (List.tl (List.tl (reverse (List.tl (List.tl (List.tl (reverse x))))))))) [List.hd (List.tl (List.tl (reverse x)))]
                                                                                                                                                                                                                                                                                                                                                                                        • append (List.tl (List.tl (reverse (List.tl (List.tl x))))) [List.hd (List.tl x)]
                                                                                                                                                                                                                                                                                                                                                                                        • reverse (List.tl (List.tl (reverse x)))
                                                                                                                                                                                                                                                                                                                                                                                        • append (List.tl (List.tl (List.tl (reverse (List.tl (List.tl x)))))) [List.hd (List.tl x)]
                                                                                                                                                                                                                                                                                                                                                                                        • reverse (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (reverse x)))))))))
                                                                                                                                                                                                                                                                                                                                                                                        • reverse (List.tl x)
                                                                                                                                                                                                                                                                                                                                                                                        blocked
                                                                                                                                                                                                                                                                                                                                                                                        • append (List.tl (List.tl (List.tl (List.tl (List.tl (reverse (List.tl (List.tl (List.tl (List.tl (List.tl x))))))))))) [List.hd (List.tl (List.tl (List.tl (List.tl x))))]
                                                                                                                                                                                                                                                                                                                                                                                        • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (reverse (List.tl (List.tl x))))))))))) [List.hd (List.tl x)]
                                                                                                                                                                                                                                                                                                                                                                                        • append (List.tl (List.tl (List.tl (reverse (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (reverse x))))))))))) [List.hd (List.tl (List.tl (List.tl (List.tl (List.tl (reverse x))))))]
                                                                                                                                                                                                                                                                                                                                                                                        • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (reverse (List.tl x))))))))))) [List.hd x]
                                                                                                                                                                                                                                                                                                                                                                                        • append (List.tl (List.tl (List.tl (reverse (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x))))))))))) [List.hd (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x))))))]
                                                                                                                                                                                                                                                                                                                                                                                        • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (reverse (List.tl (List.tl (reverse x))))))))))) [List.hd (List.tl (reverse x))]
                                                                                                                                                                                                                                                                                                                                                                                        • append (List.tl (List.tl (List.tl (List.tl (reverse (List.tl (List.tl (List.tl (List.tl (List.tl (reverse x))))))))))) [List.hd (List.tl (List.tl (List.tl (List.tl (reverse x)))))]
                                                                                                                                                                                                                                                                                                                                                                                        • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (reverse (List.tl (List.tl (List.tl x))))))))))) [List.hd (List.tl (List.tl x))]
                                                                                                                                                                                                                                                                                                                                                                                        • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (reverse (List.tl (List.tl (List.tl (reverse x))))))))))) [List.hd (List.tl (List.tl (reverse x)))]
                                                                                                                                                                                                                                                                                                                                                                                        • append (List.tl (List.tl (List.tl (List.tl (reverse (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x))))))))))) [List.hd (List.tl (List.tl (List.tl (List.tl (List.tl x)))))]
                                                                                                                                                                                                                                                                                                                                                                                        • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (reverse (List.tl (List.tl (List.tl (List.tl x))))))))))) [List.hd (List.tl (List.tl (List.tl x)))]
                                                                                                                                                                                                                                                                                                                                                                                        • reverse (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (reverse x))))))))))
                                                                                                                                                                                                                                                                                                                                                                                        • append (reverse (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (reverse x))))))))))) [List.hd (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (reverse x)))))))))]
                                                                                                                                                                                                                                                                                                                                                                                        • append (List.tl (List.tl (reverse (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (reverse x))))))))))) [List.hd (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (reverse x)))))))]
                                                                                                                                                                                                                                                                                                                                                                                        • append (List.tl (reverse (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (reverse x))))))))))) [List.hd (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (reverse x))))))))]
                                                                                                                                                                                                                                                                                                                                                                                        • append (reverse (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x))))))))))) [List.hd (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x)))))))))]
                                                                                                                                                                                                                                                                                                                                                                                        • append (List.tl (List.tl (reverse (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x))))))))))) [List.hd (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x)))))))]
                                                                                                                                                                                                                                                                                                                                                                                        • reverse (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x))))))))))
                                                                                                                                                                                                                                                                                                                                                                                        • append (List.tl (reverse (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x))))))))))) [List.hd (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x))))))))]
                                                                                                                                                                                                                                                                                                                                                                                        • append (List.tl (List.tl (List.tl (List.tl (List.tl (reverse (List.tl (List.tl (List.tl (List.tl (reverse x))))))))))) [List.hd (List.tl (List.tl (List.tl (reverse x))))]
                                                                                                                                                                                                                                                                                                                                                                                        • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (reverse (List.tl (reverse x))))))))))) [List.hd (reverse x)]
                                                                                                                                                                                                                                                                                                                                                                                        proof attempt
                                                                                                                                                                                                                                                                                                                                                                                        ground_instances100
                                                                                                                                                                                                                                                                                                                                                                                        definitions0
                                                                                                                                                                                                                                                                                                                                                                                        inductions0
                                                                                                                                                                                                                                                                                                                                                                                        search_time
                                                                                                                                                                                                                                                                                                                                                                                        0.581s
                                                                                                                                                                                                                                                                                                                                                                                        Expand
                                                                                                                                                                                                                                                                                                                                                                                        • start[0.581s] reverse (reverse :var_0:) = :var_0:
                                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                                          expr
                                                                                                                                                                                                                                                                                                                                                                                          (reverse_2792 x_2789)
                                                                                                                                                                                                                                                                                                                                                                                          expansions
                                                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                                                            expr
                                                                                                                                                                                                                                                                                                                                                                                            (reverse_2792 (reverse_2792 x_2789))
                                                                                                                                                                                                                                                                                                                                                                                            expansions
                                                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                                                              expr
                                                                                                                                                                                                                                                                                                                                                                                              (reverse_2792 (|get.::.1_2788| x_2789))
                                                                                                                                                                                                                                                                                                                                                                                              expansions
                                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                                expr
                                                                                                                                                                                                                                                                                                                                                                                                (append_2796 (reverse_2792 (|get.::.1_2788| x_2789))
                                                                                                                                                                                                                                                                                                                                                                                                             (|::_3| (|get.::.0_2787| x_2789) |…
                                                                                                                                                                                                                                                                                                                                                                                                expansions
                                                                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                                                                  expr
                                                                                                                                                                                                                                                                                                                                                                                                  (reverse_2792 (|get.::.1_2788| (reverse_2792 x_2789)))
                                                                                                                                                                                                                                                                                                                                                                                                  expansions
                                                                                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                                                                                    expr
                                                                                                                                                                                                                                                                                                                                                                                                    (append_2796 (reverse_2792 (|get.::.1_2788| (reverse_2792 x_2789)))
                                                                                                                                                                                                                                                                                                                                                                                                                 (|::_3| (|get.::.0_…
                                                                                                                                                                                                                                                                                                                                                                                                    expansions
                                                                                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                                                                                      expr
                                                                                                                                                                                                                                                                                                                                                                                                      (reverse_2792 (|get.::.1_2788| (|get.::.1_2788| x_2789)))
                                                                                                                                                                                                                                                                                                                                                                                                      expansions
                                                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                                                        expr
                                                                                                                                                                                                                                                                                                                                                                                                        (append_2796 (reverse_2792 (|get.::.1_2788| (|get.::.1_2788| x_2789)))
                                                                                                                                                                                                                                                                                                                                                                                                                     (|::_3| (|get.::…
                                                                                                                                                                                                                                                                                                                                                                                                        expansions
                                                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                                                          expr
                                                                                                                                                                                                                                                                                                                                                                                                          (append_2796 (|get.::.1_2788| (reverse_2792 (|get.::.1_2788| x_2789)))
                                                                                                                                                                                                                                                                                                                                                                                                                       (|::_3| (|get.::…
                                                                                                                                                                                                                                                                                                                                                                                                          expansions
                                                                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                                                                            expr
                                                                                                                                                                                                                                                                                                                                                                                                            (reverse_2792 (|get.::.1_2788| (|get.::.1_2788| (reverse_2792 x_2789))))
                                                                                                                                                                                                                                                                                                                                                                                                            expansions
                                                                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                                                                              expr
                                                                                                                                                                                                                                                                                                                                                                                                              (let ((a!1 (reverse_2792 (|get.::.1_2788| (|get.::.1_2788| (reverse_2792 x_2789)))))
                                                                                                                                                                                                                                                                                                                                                                                                                    (a!2 (|::…
                                                                                                                                                                                                                                                                                                                                                                                                              expansions
                                                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                expr
                                                                                                                                                                                                                                                                                                                                                                                                                (let ((a!1 (|get.::.1_2788| (reverse_2792 (|get.::.1_2788| (reverse_2792 x_2789))))))
                                                                                                                                                                                                                                                                                                                                                                                                                  (append_2796…
                                                                                                                                                                                                                                                                                                                                                                                                                expansions
                                                                                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                  expr
                                                                                                                                                                                                                                                                                                                                                                                                                  (reverse_2792 (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| x_2789))))
                                                                                                                                                                                                                                                                                                                                                                                                                  expansions
                                                                                                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                    expr
                                                                                                                                                                                                                                                                                                                                                                                                                    (let ((a!1 (reverse_2792 (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| x_2789)))))
                                                                                                                                                                                                                                                                                                                                                                                                                          (a!2 (…
                                                                                                                                                                                                                                                                                                                                                                                                                    expansions
                                                                                                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                      expr
                                                                                                                                                                                                                                                                                                                                                                                                                      (let ((a!1 (|get.::.1_2788| (reverse_2792 (|get.::.1_2788| (|get.::.1_2788| x_2789))))))
                                                                                                                                                                                                                                                                                                                                                                                                                        (append_2…
                                                                                                                                                                                                                                                                                                                                                                                                                      expansions
                                                                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                        expr
                                                                                                                                                                                                                                                                                                                                                                                                                        (let ((a!1 (|get.::.1_2788| (|get.::.1_2788| (reverse_2792 (|get.::.1_2788| x_2789))))))
                                                                                                                                                                                                                                                                                                                                                                                                                          (append_2…
                                                                                                                                                                                                                                                                                                                                                                                                                        expansions
                                                                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                          expr
                                                                                                                                                                                                                                                                                                                                                                                                                          (let ((a!1 (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| (reverse_2792 x_2789))))))
                                                                                                                                                                                                                                                                                                                                                                                                                            (reverse_…
                                                                                                                                                                                                                                                                                                                                                                                                                          expansions
                                                                                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                            expr
                                                                                                                                                                                                                                                                                                                                                                                                                            (let ((a!1 (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| (reverse_2792 x_2789)))))
                                                                                                                                                                                                                                                                                                                                                                                                                                  (a!2 (…
                                                                                                                                                                                                                                                                                                                                                                                                                            expansions
                                                                                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                              expr
                                                                                                                                                                                                                                                                                                                                                                                                                              (let ((a!1 (reverse_2792 (|get.::.1_2788| (|get.::.1_2788| (reverse_2792 x_2789)))))
                                                                                                                                                                                                                                                                                                                                                                                                                                    (a!2 (|::…
                                                                                                                                                                                                                                                                                                                                                                                                                              expansions
                                                                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                expr
                                                                                                                                                                                                                                                                                                                                                                                                                                (let ((a!1 (|get.::.1_2788| (reverse_2792 (|get.::.1_2788| (reverse_2792 x_2789))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                  (append_2796…
                                                                                                                                                                                                                                                                                                                                                                                                                                expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                  expr
                                                                                                                                                                                                                                                                                                                                                                                                                                  (let ((a!1 (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| x_2789))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                    (rever…
                                                                                                                                                                                                                                                                                                                                                                                                                                  expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                    expr
                                                                                                                                                                                                                                                                                                                                                                                                                                    (let ((a!1 (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| x_2789)))))
                                                                                                                                                                                                                                                                                                                                                                                                                                          (a!…
                                                                                                                                                                                                                                                                                                                                                                                                                                    expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                      expr
                                                                                                                                                                                                                                                                                                                                                                                                                                      (let ((a!1 (reverse_2792 (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| x_2789)))))
                                                                                                                                                                                                                                                                                                                                                                                                                                            (a!2 (…
                                                                                                                                                                                                                                                                                                                                                                                                                                      expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                        expr
                                                                                                                                                                                                                                                                                                                                                                                                                                        (let ((a!1 (|get.::.1_2788| (reverse_2792 (|get.::.1_2788| (|get.::.1_2788| x_2789))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                          (append_2…
                                                                                                                                                                                                                                                                                                                                                                                                                                        expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                          expr
                                                                                                                                                                                                                                                                                                                                                                                                                                          (let ((a!1 (|get.::.1_2788| (|get.::.1_2788| (reverse_2792 (|get.::.1_2788| x_2789))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                            (append_2…
                                                                                                                                                                                                                                                                                                                                                                                                                                          expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                            expr
                                                                                                                                                                                                                                                                                                                                                                                                                                            (let ((a!1 (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| (reverse_2792 x_2789))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                              (reverse_…
                                                                                                                                                                                                                                                                                                                                                                                                                                            expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                              expr
                                                                                                                                                                                                                                                                                                                                                                                                                                              (let ((a!1 (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| (reverse_2792 x_2789))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                (append_2…
                                                                                                                                                                                                                                                                                                                                                                                                                                              expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                (let ((a!1 (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| (reverse_2792 x_2789)))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                      (a!2 (…
                                                                                                                                                                                                                                                                                                                                                                                                                                                expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                  expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                  (let ((a!1 (reverse_2792 (|get.::.1_2788| (|get.::.1_2788| (reverse_2792 x_2789)))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                        (a!2 (|::…
                                                                                                                                                                                                                                                                                                                                                                                                                                                  expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                    expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                    (let ((a!1 (|get.::.1_2788| (reverse_2792 (|get.::.1_2788| (reverse_2792 x_2789))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                      (append_2796…
                                                                                                                                                                                                                                                                                                                                                                                                                                                    expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                      expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                      (let ((a!1 (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| x_2789))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                        (rever…
                                                                                                                                                                                                                                                                                                                                                                                                                                                      expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                        expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                        (let ((a!1 (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| x_2789))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                          (appen…
                                                                                                                                                                                                                                                                                                                                                                                                                                                        expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                          expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                          (let ((a!1 (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| x_2789)))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                (a!…
                                                                                                                                                                                                                                                                                                                                                                                                                                                          expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                            expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                            (let ((a!1 (reverse_2792 (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| x_2789)))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (a!2 (…
                                                                                                                                                                                                                                                                                                                                                                                                                                                            expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                              expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                              (let ((a!1 (|get.::.1_2788| (reverse_2792 (|get.::.1_2788| (|get.::.1_2788| x_2789))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                (append_2…
                                                                                                                                                                                                                                                                                                                                                                                                                                                              expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                (let ((a!1 (|get.::.1_2788| (|get.::.1_2788| (reverse_2792 (|get.::.1_2788| x_2789))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (append_2…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (let ((a!1 (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| (reverse_2792 x_2789))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (reverse_…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (let ((a!1 (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| (reverse_2792 x_2789))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (append_2…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (let ((a!1 (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| (reverse_2792 x_2789))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (append_2…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (let ((a!1 (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| (reverse_2792 x_2789)))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (a!2 (…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (let ((a!1 (reverse_2792 (|get.::.1_2788| (|get.::.1_2788| (reverse_2792 x_2789)))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (a!2 (|::…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (let ((a!1 (|get.::.1_2788| (reverse_2792 (|get.::.1_2788| (reverse_2792 x_2789))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (append_2796…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (let ((a!1 (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| x_2789))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (rever…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (let ((a!1 (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| x_2789))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (appen…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (let ((a!1 (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| x_2789))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (appen…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (let ((a!1 (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| x_2789)))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (a!…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (let ((a!1 (reverse_2792 (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| x_2789)))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (a!2 (…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (let ((a!1 (|get.::.1_2788| (reverse_2792 (|get.::.1_2788| (|get.::.1_2788| x_2789))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (append_2…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (let ((a!1 (|get.::.1_2788| (|get.::.1_2788| (reverse_2792 (|get.::.1_2788| x_2789))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (append_2…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (let ((a!1 (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| (reverse_2792 x_2789))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (reverse_…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (let ((a!1 (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| (reverse_2792 x_2789))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (let ((a!2 …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (let ((a!1 (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| (reverse_2792 x_2789))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (let ((a!2 …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (let ((a!1 (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| (reverse_2792 x_2789))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (let ((a!2 …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (let ((a!1 (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| (reverse_2792 x_2789)))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (a!3 (…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (let ((a!1 (reverse_2792 (|get.::.1_2788| (|get.::.1_2788| (reverse_2792 x_2789)))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (a!3 (|::…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (let ((a!1 (|get.::.1_2788| (reverse_2792 (|get.::.1_2788| (reverse_2792 x_2789))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (let ((a!2 (|g…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (let ((a!1 (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| x_2789))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (rever…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (let ((a!1 (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| x_2789))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (let ((a…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (let ((a!1 (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| x_2789))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (let ((a…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (let ((a!1 (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| x_2789))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (let ((a…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (let ((a!1 (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| x_2789)))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (a!…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (let ((a!1 (reverse_2792 (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| x_2789)))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (a!3 (…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (let ((a!1 (|get.::.1_2788| (reverse_2792 (|get.::.1_2788| (|get.::.1_2788| x_2789))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (let ((a!2 …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (let ((a!1 (|get.::.1_2788| (|get.::.1_2788| (reverse_2792 (|get.::.1_2788| x_2789))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (let ((a!2 …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (let ((a!1 (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| (reverse_2792 x_2789))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (let ((a!2 …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (let ((a!1 (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| (reverse_2792 x_2789))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (let ((a!2 …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (let ((a!1 (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| (reverse_2792 x_2789))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (let ((a!2 …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (let ((a!1 (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| (reverse_2792 x_2789))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (let ((a!2 …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (let ((a!1 (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| (reverse_2792 x_2789))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (let ((a!2 …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (let ((a!1 (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| (reverse_2792 x_2789)))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (a!3 (…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (let ((a!1 (reverse_2792 (|get.::.1_2788| (|get.::.1_2788| (reverse_2792 x_2789)))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (a!3 (|::…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (let ((a!1 (|get.::.1_2788| (reverse_2792 (|get.::.1_2788| (reverse_2792 x_2789))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (let ((a!2 (|g…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (let ((a!1 (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| x_2789))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (let ((a…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (let ((a!1 (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| x_2789))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (let ((a…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (let ((a!1 (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| x_2789))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (let ((a…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (let ((a!1 (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| x_2789))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (let ((a…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (let ((a!1 (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| x_2789))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (let ((a…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (let ((a!1 (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| x_2789)))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (a!…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (let ((a!1 (reverse_2792 (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| x_2789)))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (a!3 (…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (let ((a!1 (|get.::.1_2788| (reverse_2792 (|get.::.1_2788| (|get.::.1_2788| x_2789))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (let ((a!2 …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (let ((a!1 (|get.::.1_2788| (|get.::.1_2788| (reverse_2792 (|get.::.1_2788| x_2789))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (let ((a!2 …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (let ((a!1 (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| (reverse_2792 x_2789))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (let ((a!2 …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (let ((a!1 (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| (reverse_2792 x_2789))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (let ((a!2 …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (let ((a!1 (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| (reverse_2792 x_2789))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (let ((a!2 …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (let ((a!1 (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| (reverse_2792 x_2789))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (let ((a!2 …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (let ((a!1 (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| (reverse_2792 x_2789))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (let ((a!2 …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (let ((a!1 (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| (reverse_2792 x_2789))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (let ((a!2 …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (let ((a!1 (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| (reverse_2792 x_2789)))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (a!3 (…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (let ((a!1 (reverse_2792 (|get.::.1_2788| (|get.::.1_2788| (reverse_2792 x_2789)))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (a!3 (|::…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (let ((a!1 (|get.::.1_2788| (reverse_2792 (|get.::.1_2788| (reverse_2792 x_2789))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (let ((a!2 (|g…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (let ((a!1 (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| x_2789))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (let ((a…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (let ((a!1 (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| x_2789))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (let ((a…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (let ((a!1 (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| x_2789))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (let ((a…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (let ((a!1 (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| x_2789))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (let ((a…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (let ((a!1 (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| x_2789))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (let ((a…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (let ((a!1 (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| x_2789))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (let ((a…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (let ((a!1 (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| x_2789)))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (a!…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (let ((a!1 (reverse_2792 (|get.::.1_2788| (|get.::.1_2788| (|get.::.1_2788| x_2789)))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (a!3 (…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (let ((a!1 (|get.::.1_2788| (reverse_2792 (|get.::.1_2788| (|get.::.1_2788| x_2789))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (let ((a!2 …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (let ((a!1 (|get.::.1_2788| (|get.::.1_2788| (reverse_2792 (|get.::.1_2788| x_2789))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (let ((a!2 …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expansions

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Imandra tells us that there are no counterexamples up to our current unrolling bound (100).

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                So, our conjecture seems like a good candidate for proof by induction.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                In [19]:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                verify (fun x -> reverse (reverse x) = x) [@@induct]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Out[19]:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                - : 'a list -> bool = <fun>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Goal:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                reverse (reverse x) = x.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                1 nontautological subgoal.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Subgoal 1:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |---------------------------------------------------------------------------
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 reverse (reverse x) = x
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Verified up to bound 10 (after 0.025s).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Must try induction.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                We shall induct according to a scheme derived from reverse.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Induction scheme:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 (x = [] ==> φ x) && (not (x = []) && φ (List.tl x) ==> φ x).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                2 nontautological subgoals.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Subgoal 1.2:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 H0. x = []
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |---------------------------------------------------------------------------
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 reverse (reverse x) = x
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                But simplification reduces this to true, using the definition of reverse.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Subgoal 1.1:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 H0. not (x = [])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 H1. reverse (reverse (List.tl x)) = List.tl x
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |---------------------------------------------------------------------------
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 reverse (reverse x) = x
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                This simplifies, using the definition of reverse to:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Subgoal 1.1':
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 H0. reverse (reverse (List.tl x)) = List.tl x
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 H1. x <> []
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |---------------------------------------------------------------------------
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 reverse (append (reverse (List.tl x)) [List.hd x]) = x
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Verified up to bound 10 (after 0.029s).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                We can eliminate destructors by the following substitution:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 x -> x1 :: x2
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                This produces the modified subgoal:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Subgoal 1.1'':
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 H0. reverse (reverse x2) = x2
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |---------------------------------------------------------------------------
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 reverse (append (reverse x2) [x1]) = x1 :: x2
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Verified up to bound 10 (after 0.026s).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Applying fertilizer:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 reverse (reverse x2) = x2
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                for conclusion:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 reverse (append (reverse x2) [x1]) = x1 :: x2
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                This produces the modified subgoal:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Subgoal 1.1''':
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |---------------------------------------------------------------------------
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 reverse (append (reverse x2) [x1]) = x1 :: (reverse (reverse x2))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Verified up to bound 10 (after 0.030s).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Candidates for generalization:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 reverse x2
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Verified up to bound 10 (after 0.032s).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                This produces the modified subgoal:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Subgoal 1.1'''':
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |---------------------------------------------------------------------------
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 reverse (append gen_1 [x1]) = x1 :: (reverse gen_1)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Verified up to bound 10 (after 0.034s).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Must try induction.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                The recursive terms in the conjecture suggest 2 inductions.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Subsumption and merging reduces this to 1.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                We shall induct according to a scheme derived from append.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Induction scheme:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 (gen_1 = [] ==> φ gen_1 x1)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 && (not (gen_1 = []) && φ (List.tl gen_1) x1 ==> φ gen_1 x1).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                2 nontautological subgoals.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Subgoal 1.1''''.2:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 H0. gen_1 = []
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |---------------------------------------------------------------------------
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 reverse (append gen_1 [x1]) = x1 :: (reverse gen_1)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                But simplification reduces this to true, using the definitions of append and
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                reverse.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Subgoal 1.1''''.1:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 H0. not (gen_1 = [])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 H1. reverse (append (List.tl gen_1) [x1]) = x1 :: (reverse (List.tl gen_1))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |---------------------------------------------------------------------------
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 reverse (append gen_1 [x1]) = x1 :: (reverse gen_1)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                This simplifies, using the definitions of append and reverse to:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Subgoal 1.1''''.1':
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 H0. reverse (append (List.tl gen_1) [x1]) = x1 :: (reverse (List.tl gen_1))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 H1. gen_1 <> []
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |---------------------------------------------------------------------------
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 append (reverse (append (List.tl gen_1) [x1])) [List.hd gen_1] =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 x1 :: (append (reverse (List.tl gen_1)) [List.hd gen_1])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                But we verify Subgoal 1.1''''.1' by recursive unrolling.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Proved
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                proof
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ground_instances2
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                definitions10
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                inductions2
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                search_time
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                0.614s
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                details
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Expand
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                smt_stats
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                num checks5
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                rlimit count123349
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                mk clause7
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                datatype occurs check18
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                mk bool var48
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                datatype splits5
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                decisions16
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                propagations2
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                conflicts6
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                datatype accessor ax8
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                datatype constructor ax12
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                final checks4
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                added eqs50
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                memory39.200000
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                max memory41.580000
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                num allocs5783903525.000000
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Expand
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • start[0.614s, "Goal"] reverse (reverse :var_0:) = :var_0:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • subproof

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  reverse (reverse x) = x
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • start[0.614s, "1"] reverse (reverse x) = x
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • induction on (functional )
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    :scheme (x = [] ==> φ x) && (not (x = []) && φ (List.tl x) ==> φ x)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Split ((not (x = []) || reverse (reverse x) = x)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           && (not (not (x = []) && reverse (reverse (List.tl x)) = List.tl x)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               || reverse (reverse x) = x)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           :cases [not (x = []) || reverse (reverse x) = x;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   (x = [] || not (reverse (reverse (List.tl x)) = List.tl x))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   || reverse (reverse x) = x])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • subproof
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (x = [] || not (reverse (reverse (List.tl x)) = List.tl x)) || reverse (reverse x) = x
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • start[0.570s, "1.1"]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (x = [] || not (reverse (reverse (List.tl x)) = List.tl x))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          || reverse (reverse x) = x
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • simplify
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        into
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (reverse (append (reverse (List.tl x)) [List.hd x]) = x
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         || not (reverse (reverse (List.tl x)) = List.tl x))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        || x = []
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        reverse
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        rewrite_steps
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          forward_chaining
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • Elim_destructor (:cstor :: :replace x1 :: x2 :context [])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • Fertilize(reverse (append (reverse x2) [x1]) = x1 :: x2)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • Generalize (reverse (append (reverse x2) [x1]) = x1 :: (reverse (reverse x2))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        :as (gen_1 : sko_ty_0 list))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • induction on (functional )
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            :scheme (gen_1 = [] ==> φ gen_1 x1)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    && (not (gen_1 = []) && φ (List.tl gen_1) x1 ==> φ gen_1 x1)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • Split ((not (gen_1 = [])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    || reverse (append gen_1 [x1]) = x1 :: (reverse gen_1))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   && (not
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       (not (gen_1 = [])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        && reverse (append (List.tl gen_1) [x1]) =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           x1 :: (reverse (List.tl gen_1)))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       || reverse (append gen_1 [x1]) = x1 :: (reverse gen_1))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   :cases [not (gen_1 = [])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           || reverse (append gen_1 [x1]) = x1 :: (reverse gen_1);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           (gen_1 = []
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            || not
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               (reverse (append (List.tl gen_1) [x1]) =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                x1 :: (reverse (List.tl gen_1))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           || reverse (append gen_1 [x1]) = x1 :: (reverse gen_1)])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • Subproof
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • Subproof
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • subproof
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          not (x = []) || reverse (reverse x) = x
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • start[0.570s, "1.2"] not (x = []) || reverse (reverse x) = x
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • simplify
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            into
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            true
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            [reverse, reverse]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            rewrite_steps
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              forward_chaining

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Success!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Imandra proves this fact automatically, and its inductive proof actually involves a nested subinduction.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Imandra has powerful techniques for automating complex inductions, involving simplification, destructor elimination, generalisation and more. But it's often the case that nested inductions actually suggest lemmas that could be of general use.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        To illustrate this, let's take a look at one of the interesting subgoals in our proof:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        reverse (append gen_1 (x1 :: [])) = x1 :: (reverse gen_1)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        This looks like a very nice fact. Instead of Imandra having to derive this fact as a subinduction, let's prove it as a theorem itself and install it as a rewrite rule. Then we will be able to apply it later and shorten our subsequent proofs.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        In [20]:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        theorem rev_app_single x y = reverse (append x [y]) = y :: (reverse x) [@@induct] [@@rewrite]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Out[20]:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        val rev_app_single : 'a list -> 'a -> bool = <fun>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Goal:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        reverse (append x [y]) = y :: (reverse x).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        1 nontautological subgoal.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Subgoal 1:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |---------------------------------------------------------------------------
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         reverse (append x [y]) = y :: (reverse x)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Verified up to bound 10 (after 0.035s).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Must try induction.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        The recursive terms in the conjecture suggest 2 inductions.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Subsumption and merging reduces this to 1.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        We shall induct according to a scheme derived from append.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Induction scheme:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         (x = [] ==> φ y x) && (not (x = []) && φ y (List.tl x) ==> φ y x).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        2 nontautological subgoals.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Subgoal 1.2:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         H0. x = []
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |---------------------------------------------------------------------------
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         reverse (append x [y]) = y :: (reverse x)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        But simplification reduces this to true, using the definitions of append and
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        reverse.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Subgoal 1.1:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         H0. not (x = [])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         H1. reverse (append (List.tl x) [y]) = y :: (reverse (List.tl x))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |---------------------------------------------------------------------------
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         reverse (append x [y]) = y :: (reverse x)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        This simplifies, using the definitions of append and reverse to:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Subgoal 1.1':
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         H0. reverse (append (List.tl x) [y]) = y :: (reverse (List.tl x))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         H1. x <> []
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |---------------------------------------------------------------------------
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         append (reverse (append (List.tl x) [y])) [List.hd x] =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         y :: (append (reverse (List.tl x)) [List.hd x])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        But we verify Subgoal 1.1' by recursive unrolling.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Proved
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        proof
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        ground_instances2
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        definitions7
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        inductions1
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        search_time
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        0.221s
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        details
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Expand
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        smt_stats
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        num checks5
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        rlimit count43620
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        mk clause7
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        datatype occurs check17
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        mk bool var48
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        datatype splits5
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        decisions16
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        propagations2
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        conflicts6
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        datatype accessor ax8
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        datatype constructor ax12
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        final checks4
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        added eqs50
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        memory18.860000
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        max memory41.580000
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        num allocs7210217031.000000
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Expand
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • start[0.221s, "Goal"]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            reverse (append :var_0: [:var_1:]) = :var_1: :: (reverse :var_0:)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • subproof

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          reverse (append x [y]) = y :: (reverse x)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • start[0.221s, "1"] reverse (append x [y]) = y :: (reverse x)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • induction on (functional )
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            :scheme (x = [] ==> φ y x) && (not (x = []) && φ y (List.tl x) ==> φ y x)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • Split ((not (x = []) || reverse (append x [y]) = y :: (reverse x))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   && (not
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       (not (x = [])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        && reverse (append (List.tl x) [y]) = y :: (reverse (List.tl x)))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       || reverse (append x [y]) = y :: (reverse x))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   :cases [not (x = []) || reverse (append x [y]) = y :: (reverse x);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           (x = []
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            || not
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               (reverse (append (List.tl x) [y]) =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                y :: (reverse (List.tl x))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           || reverse (append x [y]) = y :: (reverse x)])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • subproof
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (x = [] || not (reverse (append (List.tl x) [y]) = y :: (reverse (List.tl x)))) || reverse (append x [y]) = y :: (reverse x)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • start[0.158s, "1.1"]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (x = []
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   || not (reverse (append (List.tl x) [y]) = y :: (reverse (List.tl x))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  || reverse (append x [y]) = y :: (reverse x)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • simplify
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                into
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (append (reverse (append (List.tl x) (… :: …))) ((List.hd x) :: …) =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 … :: (append (reverse (List.tl x)) ((List.hd x) :: …))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 || not
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (reverse (append (List.tl x) (… :: …)) = … :: (reverse (List.tl x))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                || x = …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                [reverse, reverse, append]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                rewrite_steps
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  forward_chaining
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • subproof
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (not (reverse (append (List.tl :var_0:) [:var_1:]) = :var_1: :: (reverse (List.tl :var_0:))) || not (:var_0: <> [])) || append (reverse (append (List.tl :var_0:) [:var_1:])) [List.hd :var_0:] = :var_1: :: (append (reverse (List.tl :var_0:)) [List.hd :var_0:])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Start ((not
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (reverse (append (List.tl :var_0:) [:var_1:]) =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             :var_1: :: (reverse (List.tl :var_0:)))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            || not (:var_0: <> []))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           || append (reverse (append (List.tl :var_0:) [:var_1:]))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              [List.hd :var_0:] =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              :var_1: :: (append (reverse (List.tl :var_0:)) [List.hd :var_0:])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           :time 0.013s)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • subproof
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  not (x = []) || reverse (append x [y]) = y :: (reverse x)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • start[0.158s, "1.2"]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      not (x = []) || reverse (append x [y]) = y :: (reverse x)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • simplify
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    into
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    true
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    [reverse, append, reverse, append]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    rewrite_steps
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      forward_chaining

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Now, if we were to try to prove our original reverse (reverse x) goal again, we'd get a shorter proof that makes use of our new lemma:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                In [21]:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                verify (fun x -> reverse (reverse x) = x) [@@induct]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Out[21]:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                - : 'a list -> bool = <fun>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Goal:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                reverse (reverse x) = x.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                1 nontautological subgoal.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Subgoal 1:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |---------------------------------------------------------------------------
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 reverse (reverse x) = x
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Verified up to bound 10 (after 0.032s).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Must try induction.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                We shall induct according to a scheme derived from reverse.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Induction scheme:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 (x = [] ==> φ x) && (not (x = []) && φ (List.tl x) ==> φ x).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                2 nontautological subgoals.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Subgoal 1.2:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 H0. x = []
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |---------------------------------------------------------------------------
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 reverse (reverse x) = x
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                But simplification reduces this to true, using the definition of reverse.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Subgoal 1.1:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 H0. not (x = [])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 H1. reverse (reverse (List.tl x)) = List.tl x
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |---------------------------------------------------------------------------
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 reverse (reverse x) = x
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                This simplifies, using the definition of reverse to:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Subgoal 1.1':
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 H0. reverse (reverse (List.tl x)) = List.tl x
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 H1. x <> []
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |---------------------------------------------------------------------------
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 reverse (append (reverse (List.tl x)) [List.hd x]) = x
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                But simplification reduces this to true, using the rewrite rule
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                rev_app_single.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Proved
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                proof
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ground_instances0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                definitions3
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                inductions1
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                search_time
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                0.170s
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Expand
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • start[0.170s, "Goal"] reverse (reverse :var_0:) = :var_0:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • subproof

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  reverse (reverse x) = x
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • start[0.170s, "1"] reverse (reverse x) = x
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • induction on (functional )
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    :scheme (x = [] ==> φ x) && (not (x = []) && φ (List.tl x) ==> φ x)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Split ((not (x = []) || reverse (reverse x) = x)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           && (not (not (x = []) && reverse (reverse (List.tl x)) = List.tl x)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               || reverse (reverse x) = x)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           :cases [not (x = []) || reverse (reverse x) = x;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   (x = [] || not (reverse (reverse (List.tl x)) = List.tl x))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   || reverse (reverse x) = x])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • subproof
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (x = [] || not (reverse (reverse (List.tl x)) = List.tl x)) || reverse (reverse x) = x
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • start[0.115s, "1.1"]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (x = [] || not (reverse (reverse (List.tl x)) = List.tl x))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          || reverse (reverse x) = x
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • simplify
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        into
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (reverse (append (reverse (List.tl x)) [List.hd x]) = x
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         || not (reverse (reverse (List.tl x)) = List.tl x))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        || x = []
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        reverse
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        rewrite_steps
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          forward_chaining
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • simplify
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            into
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            true
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            []
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            rewrite_steps
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            rev_app_single
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            forward_chaining
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • subproof
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            not (x = []) || reverse (reverse x) = x
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • start[0.115s, "1.2"] not (x = []) || reverse (reverse x) = x
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • simplify
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              into
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              true
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              [reverse, reverse]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              rewrite_steps
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                forward_chaining

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Excellent!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Reverse Append

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Now, let's try to prove another interesting conjecture about our functions append and reverse:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          reverse (append x y) = append (reverse y) (reverse x)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Actually, first let's pretend we made a mistake in formulating this conjecture, and accidentally swapped the x and y on the RHS (Right Hand Side) of the equality. Let's constrain the types of lists involved to make the counterexample especially easy to read:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          In [22]:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          verify (fun (x : int list) y -> reverse (append x y) = append (reverse x) (reverse y))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Out[22]:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          - : int list -> int list -> bool = <fun>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          module CX : sig val x : Z.t list val y : Z.t list end
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Counterexample (after 21 steps, 0.069s):
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           let x = [1]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           let y = [0]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Refuted
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          proof attempt
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          ground_instances21
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          definitions0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          inductions0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          search_time
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          0.069s
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          details
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Expand
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          smt_stats
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          num checks43
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          rlimit count24218
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          mk clause129
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          datatype occurs check1216
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          mk bool var1620
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          datatype splits477
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          decisions950
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          propagations1128
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          conflicts81
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          datatype accessor ax263
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          minimized lits12
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          datatype constructor ax460
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          final checks98
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          added eqs3670
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          del clause11
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          memory21.670000
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          max memory41.580000
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          num allocs8649603181.000000
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Expand
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • start[0.069s]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              reverse (append :var_0: :var_1:) =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              append (reverse :var_0:) (reverse :var_1:)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (reverse_3093 y_3081)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (reverse_3093 x_3080)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (append_3088 (reverse_3093 x_3080) (reverse_3093 y_3081))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (append_3088 x_3080 y_3081)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (reverse_3093 (append_3088 x_3080 y_3081))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (reverse_3093 (|get.::.1_3087| x_3080))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (append_3088 (reverse_3093 (|get.::.1_3087| x_3080))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     (|::_3| (|get.::.0_3086| x_3080) |…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (append_3088 (|get.::.1_3087| x_3080) y_3081)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (reverse_3093 (|get.::.1_3087| (append_3088 x_3080 y_3081)))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (reverse_3093 (|get.::.1_3087| y_3081))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (append_3088 (reverse_3093 (|get.::.1_3087| (append_3088 x_3080 y_3081)))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             (|::_3| (|get…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (append_3088 (|get.::.1_3087| (reverse_3093 x_3080)) (reverse_3093 y_3081))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (append_3088 (reverse_3093 (|get.::.1_3087| y_3081))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 (|::_3| (|get.::.0_3086| y_3081) |…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (reverse_3093 (|get.::.1_3087| (|get.::.1_3087| x_3080)))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (append_3088 (reverse_3093 (|get.::.1_3087| (|get.::.1_3087| x_3080)))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     (|::_3| (|get.::…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (append_3088 (|get.::.1_3087| (reverse_3093 (|get.::.1_3087| x_3080)))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       (|::_3| (|get.::…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (append_3088 (|get.::.1_3087| (|get.::.1_3087| x_3080)) y_3081)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (reverse_3093 (|get.::.1_3087| (|get.::.1_3087| (append_3088 x_3080 y_3081))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (let ((a!1 (reverse_3093 (|get.::.1_3087| (|get.::.1_3087| (append_3088 x_3080
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (reverse_3093 (|get.::.1_3087| (|get.::.1_3087| y_3081)))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (let ((a!1 (|get.::.1_3087| (reverse_3093 (|get.::.1_3087| (append_3088 x_3080
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • Sat (Some let x = [1] let y = [0] )

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Ah! Let's do it right this time:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    In [23]:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    verify (fun (x : int list) y -> reverse (append x y) = append (reverse y) (reverse x))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Out[23]:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    - : int list -> int list -> bool = <fun>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Unknown (Verified up to bound 100)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Expand
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expanded
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (List.tl (List.tl (reverse (List.tl (List.tl (List.tl y)))))) [List.hd (List.tl (List.tl y))]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (List.tl (reverse (List.tl (List.tl (List.tl (append x y)))))) [List.hd (List.tl (List.tl (append x y)))]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (reverse (List.tl (List.tl (append x y)))) [List.hd (List.tl (append x y))]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (List.tl (List.tl (reverse (List.tl (List.tl y))))) [List.hd (List.tl y)]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • reverse (List.tl (List.tl y))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (reverse (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x)))))))) [List.hd (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x))))))]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (List.tl (List.tl (List.tl (reverse (List.tl (List.tl x)))))) [List.hd (List.tl x)]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (List.tl (List.tl (reverse (List.tl x)))) [List.hd x]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • reverse x
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (List.tl (reverse (List.tl (List.tl (List.tl (List.tl (append x y))))))) [List.hd (List.tl (List.tl (List.tl (append x y))))]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (reverse (List.tl (List.tl (List.tl (append x y))))) [List.hd (List.tl (List.tl (append x y)))]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (List.tl (List.tl (List.tl (List.tl x)))) y
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (List.tl (reverse (List.tl (List.tl (List.tl x))))) [List.hd (List.tl (List.tl x))]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (reverse (List.tl (List.tl x))) [List.hd (List.tl x)]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (reverse y))))))) (reverse x)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (List.tl (List.tl (List.tl (List.tl (reverse (List.tl y)))))) [List.hd y]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (List.tl (reverse (List.tl (append x y)))) [List.hd (append x y)]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (List.tl (List.tl (List.tl (reverse y)))) (reverse x)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • reverse (List.tl (List.tl (append x y)))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (List.tl (List.tl (reverse (List.tl (List.tl (List.tl x)))))) [List.hd (List.tl (List.tl x))]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (List.tl (List.tl (List.tl (reverse (List.tl (List.tl y)))))) [List.hd (List.tl y)]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (List.tl (List.tl (reverse (List.tl (List.tl (List.tl (append x y))))))) [List.hd (List.tl (List.tl (append x y)))]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (List.tl (reverse y)) (reverse x)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • reverse (List.tl (append x y))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (List.tl (List.tl (List.tl (List.tl (List.tl (reverse (List.tl x))))))) [List.hd x]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (List.tl (List.tl (reverse y))) (reverse x)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • reverse (List.tl y)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (List.tl (List.tl (List.tl (List.tl (reverse (List.tl (List.tl (append x y)))))))) [List.hd (List.tl (append x y))]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x))))))) y
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • reverse (List.tl (List.tl (List.tl (append x y))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append x y
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (reverse (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x))))))) [List.hd (List.tl (List.tl (List.tl (List.tl (List.tl x)))))]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (List.tl (List.tl (List.tl (reverse (List.tl x))))) [List.hd x]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • reverse (List.tl (List.tl (List.tl (List.tl (List.tl x)))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (List.tl (List.tl (List.tl (List.tl (List.tl (reverse (List.tl (append x y)))))))) [List.hd (append x y)]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • reverse (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (append x y)))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (List.tl (List.tl (List.tl (List.tl (List.tl x))))) y
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (reverse (List.tl (List.tl (List.tl (List.tl y))))) [List.hd (List.tl (List.tl (List.tl y)))]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (List.tl (List.tl (List.tl (List.tl (reverse (List.tl x)))))) [List.hd x]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (List.tl (List.tl (List.tl (List.tl (reverse y))))) (reverse x)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (reverse (List.tl (List.tl (List.tl (List.tl (List.tl (append x y))))))) [List.hd (List.tl (List.tl (List.tl (List.tl (append x y)))))]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x)))))) y
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • reverse (List.tl (List.tl (List.tl (List.tl (List.tl (append x y))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (List.tl (reverse (List.tl x))) [List.hd x]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (List.tl (List.tl (reverse (List.tl (List.tl (List.tl (List.tl (append x y)))))))) [List.hd (List.tl (List.tl (List.tl (append x y))))]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (List.tl (List.tl (List.tl x))) y
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • reverse (append x y)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (List.tl (List.tl (List.tl (reverse (List.tl (List.tl (List.tl y))))))) [List.hd (List.tl (List.tl y))]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (reverse y) (reverse x)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (List.tl (reverse (List.tl (List.tl (List.tl (List.tl y)))))) [List.hd (List.tl (List.tl (List.tl y)))]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (reverse (List.tl (List.tl (List.tl y)))) [List.hd (List.tl (List.tl y))]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (List.tl (List.tl (List.tl (List.tl (List.tl (reverse y)))))) (reverse x)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • reverse (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (append x y))))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (List.tl (List.tl (reverse (List.tl (List.tl (List.tl (List.tl x))))))) [List.hd (List.tl (List.tl (List.tl x)))]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • reverse (List.tl x)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • reverse (List.tl (List.tl (List.tl (List.tl (List.tl y)))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (List.tl (List.tl (List.tl (reverse (List.tl (List.tl (List.tl (append x y)))))))) [List.hd (List.tl (List.tl (append x y)))]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (List.tl (List.tl (reverse (List.tl (List.tl (append x y)))))) [List.hd (List.tl (append x y))]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (List.tl x) y
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (List.tl (List.tl (List.tl (List.tl (List.tl (reverse (List.tl y))))))) [List.hd y]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (List.tl (reverse (List.tl (List.tl x)))) [List.hd (List.tl x)]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (reverse (List.tl x)) [List.hd x]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • reverse (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (List.tl (List.tl (reverse (List.tl y)))) [List.hd y]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • reverse (List.tl (List.tl (List.tl y)))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (List.tl (reverse (List.tl (List.tl (append x y))))) [List.hd (List.tl (append x y))]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (reverse (List.tl (append x y))) [List.hd (append x y)]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (List.tl (List.tl x)) y
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (List.tl (List.tl (List.tl (List.tl (reverse (List.tl (List.tl y))))))) [List.hd (List.tl y)]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • reverse (List.tl (List.tl (List.tl (List.tl y))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (List.tl (reverse (List.tl (List.tl (List.tl (List.tl (List.tl x))))))) [List.hd (List.tl (List.tl (List.tl (List.tl x))))]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (reverse (List.tl (List.tl (List.tl (List.tl x))))) [List.hd (List.tl (List.tl (List.tl x)))]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • reverse (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x)))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (List.tl (reverse (List.tl (List.tl y)))) [List.hd (List.tl y)]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (reverse (List.tl y)) [List.hd y]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (reverse (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (append x y)))))))) [List.hd (List.tl (List.tl (List.tl (List.tl (List.tl (append x y))))))]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (List.tl (List.tl (List.tl (reverse (List.tl (append x y)))))) [List.hd (append x y)]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • reverse (List.tl (List.tl (List.tl (List.tl (append x y)))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (List.tl (reverse (List.tl y))) [List.hd y]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (List.tl (reverse (List.tl (List.tl (List.tl (List.tl x)))))) [List.hd (List.tl (List.tl (List.tl x)))]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (reverse (List.tl (List.tl (List.tl x)))) [List.hd (List.tl (List.tl x))]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • reverse (List.tl (List.tl (List.tl (List.tl x))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (reverse (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (append x y))))))))) [List.hd (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (append x y)))))))]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (List.tl (List.tl (List.tl (reverse (List.tl (List.tl (append x y))))))) [List.hd (List.tl (append x y))]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (List.tl (List.tl (reverse (List.tl (append x y))))) [List.hd (append x y)]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (List.tl (reverse (List.tl (List.tl (List.tl y))))) [List.hd (List.tl (List.tl y))]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (reverse (List.tl (List.tl y))) [List.hd (List.tl y)]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • reverse y
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (List.tl (List.tl (List.tl (List.tl (reverse (List.tl (List.tl x))))))) [List.hd (List.tl x)]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (reverse (List.tl (List.tl (List.tl (List.tl (List.tl y)))))) [List.hd (List.tl (List.tl (List.tl (List.tl y))))]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (List.tl (reverse (List.tl (List.tl (List.tl (List.tl (List.tl (append x y)))))))) [List.hd (List.tl (List.tl (List.tl (List.tl (append x y)))))]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (reverse (List.tl (List.tl (List.tl (List.tl (append x y)))))) [List.hd (List.tl (List.tl (List.tl (append x y))))]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (List.tl (reverse (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x)))))))) [List.hd (List.tl (List.tl (List.tl (List.tl (List.tl x)))))]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (reverse (List.tl (List.tl (List.tl (List.tl (List.tl x)))))) [List.hd (List.tl (List.tl (List.tl (List.tl x))))]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • reverse (List.tl (List.tl x))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (List.tl (List.tl (List.tl (List.tl (reverse (List.tl (append x y))))))) [List.hd (append x y)]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (List.tl (List.tl (List.tl (reverse (List.tl y))))) [List.hd y]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (List.tl (List.tl (List.tl (reverse (List.tl (List.tl (List.tl x))))))) [List.hd (List.tl (List.tl x))]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (List.tl (List.tl (reverse (List.tl (List.tl x))))) [List.hd (List.tl x)]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • reverse (List.tl (List.tl (List.tl x)))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    blocked
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • reverse (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (append x y)))))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (reverse (List.tl y)))))))) [List.hd y]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (reverse (List.tl (append x y))))))))) [List.hd (append x y)]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (List.tl (List.tl (reverse (List.tl (List.tl (List.tl (List.tl y))))))) [List.hd (List.tl (List.tl (List.tl y)))]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (List.tl (List.tl (List.tl (List.tl (List.tl (reverse (List.tl (List.tl y)))))))) [List.hd (List.tl y)]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (List.tl (List.tl (List.tl (reverse (List.tl (List.tl (List.tl (List.tl x)))))))) [List.hd (List.tl (List.tl (List.tl x)))]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (List.tl (List.tl (List.tl (reverse (List.tl (List.tl (List.tl (List.tl (append x y))))))))) [List.hd (List.tl (List.tl (List.tl (append x y))))]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (List.tl (List.tl (reverse (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x))))))))) [List.hd (List.tl (List.tl (List.tl (List.tl (List.tl x)))))]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (List.tl (List.tl (reverse (List.tl (List.tl (List.tl (List.tl (List.tl x)))))))) [List.hd (List.tl (List.tl (List.tl (List.tl x))))]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (List.tl (List.tl (List.tl (List.tl (reverse (List.tl (List.tl (List.tl (append x y))))))))) [List.hd (List.tl (List.tl (append x y)))]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (List.tl (reverse (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x))))))))) [List.hd (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x))))))]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (List.tl (reverse (List.tl (List.tl (List.tl (List.tl (List.tl y))))))) [List.hd (List.tl (List.tl (List.tl (List.tl y))))]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (List.tl (List.tl (List.tl (List.tl (List.tl (reverse (List.tl (List.tl x)))))))) [List.hd (List.tl x)]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (List.tl (reverse (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (append x y))))))))) [List.hd (List.tl (List.tl (List.tl (List.tl (List.tl (append x y))))))]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (reverse (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl y))))))) [List.hd (List.tl (List.tl (List.tl (List.tl (List.tl y)))))]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (reverse y)))))))) (reverse x)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (List.tl (List.tl (List.tl (List.tl (reverse (List.tl (List.tl (List.tl x)))))))) [List.hd (List.tl (List.tl x))]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • reverse (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x))))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (List.tl (List.tl (reverse (List.tl (List.tl (List.tl (List.tl (List.tl (append x y))))))))) [List.hd (List.tl (List.tl (List.tl (List.tl (append x y)))))]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (reverse (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (append x y)))))))))) [List.hd (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (append x y))))))))]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (List.tl (reverse (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (append x y)))))))))) [List.hd (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (append x y)))))))]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (reverse (List.tl x)))))))) [List.hd x]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x)))))))) y
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • reverse (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl y))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (List.tl (List.tl (List.tl (List.tl (reverse (List.tl (List.tl (List.tl y)))))))) [List.hd (List.tl (List.tl y))]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (List.tl (List.tl (List.tl (List.tl (List.tl (reverse (List.tl (List.tl (append x y))))))))) [List.hd (List.tl (append x y))]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • append (reverse (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x))))))))) [List.hd (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl (List.tl x)))))))]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    proof attempt
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ground_instances100
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    definitions0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    inductions0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    search_time
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    0.574s
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Expand
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • start[0.574s]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        reverse (append :var_0: :var_1:) =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        append (reverse :var_1:) (reverse :var_0:)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (reverse_3117 x_3104)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (reverse_3117 y_3105)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (append_3112 (reverse_3117 y_3105) (reverse_3117 x_3104))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (append_3112 x_3104 y_3105)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (reverse_3117 (append_3112 x_3104 y_3105))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (reverse_3117 (|get.::.1_3111| x_3104))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (append_3112 (reverse_3117 (|get.::.1_3111| x_3104))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               (|::_3| (|get.::.0_3110| x_3104) |…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (append_3112 (|get.::.1_3111| (reverse_3117 y_3105)) (reverse_3117 x_3104))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (reverse_3117 (|get.::.1_3111| y_3105))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (append_3112 (reverse_3117 (|get.::.1_3111| y_3105))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     (|::_3| (|get.::.0_3110| y_3105) |…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (append_3112 (|get.::.1_3111| x_3104) y_3105)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (reverse_3117 (|get.::.1_3111| (append_3112 x_3104 y_3105)))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (append_3112 (reverse_3117 (|get.::.1_3111| (append_3112 x_3104 y_3105)))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           (|::_3| (|get…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (reverse_3117 (|get.::.1_3111| (|get.::.1_3111| x_3104)))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (append_3112 (reverse_3117 (|get.::.1_3111| (|get.::.1_3111| x_3104)))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               (|::_3| (|get.::…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (append_3112 (|get.::.1_3111| (reverse_3117 (|get.::.1_3111| x_3104)))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 (|::_3| (|get.::…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (append_3112 (|get.::.1_3111| (|get.::.1_3111| x_3104)) y_3105)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (reverse_3117 (|get.::.1_3111| (|get.::.1_3111| (append_3112 x_3104 y_3105))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (let ((a!1 (reverse_3117 (|get.::.1_3111| (|get.::.1_3111| (append_3112 x_3104
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (append_3112 (|get.::.1_3111| (|get.::.1_3111| (reverse_3117 y_3105)))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         (reverse_3117 x_…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (let ((a!1 (|get.::.1_3111| (reverse_3117 (|get.::.1_3111| (append_3112 x_3104
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (reverse_3117 (|get.::.1_3111| (|get.::.1_3111| y_3105)))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (append_3112 (reverse_3117 (|get.::.1_3111| (|get.::.1_3111| y_3105)))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               (|::_3| (|get.::…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (append_3112 (|get.::.1_3111| (reverse_3117 (|get.::.1_3111| y_3105)))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 (|::_3| (|get.::…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (reverse_3117 (|get.::.1_3111| (|get.::.1_3111| (|get.::.1_3111| x_3104))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (let ((a!1 (reverse_3117 (|get.::.1_3111| (|get.::.1_3111| (|get.::.1_3111| x_3104)))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (a!2 (…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (let ((a!1 (|get.::.1_3111| (reverse_3117 (|get.::.1_3111| (|get.::.1_3111| x_3104))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (append_3…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (let ((a!1 (|get.::.1_3111| (|get.::.1_3111| (reverse_3117 (|get.::.1_3111| x_3104))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (append_3…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (append_3112 (|get.::.1_3111| (|get.::.1_3111| (|get.::.1_3111| x_3104)))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           y_3105)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (let ((a!1 (|get.::.1_3111| (|get.::.1_3111| (|get.::.1_3111| (append_3112 x_3104
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (let ((a!1 (|get.::.1_3111| (|get.::.1_3111| (|get.::.1_3111| (append_3112 x_3104
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (let ((a!1 (reverse_3117 (|get.::.1_3111| (|get.::.1_3111| (append_3112 x_3104
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (let ((a!1 (|get.::.1_3111| (reverse_3117 (|get.::.1_3111| (append_3112 x_3104
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (let ((a!1 (|get.::.1_3111| (|get.::.1_3111| (reverse_3117 (|get.::.1_3111| y_3105))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (append_3…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (let ((a!1 (|get.::.1_3111| (|get.::.1_3111| (|get.::.1_3111| (reverse_3117 y_3105))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (append_3…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (let ((a!1 (|get.::.1_3111| (reverse_3117 (|get.::.1_3111| (|get.::.1_3111| y_3105))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (append_3…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (reverse_3117 (|get.::.1_3111| (|get.::.1_3111| (|get.::.1_3111| y_3105))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (let ((a!1 (reverse_3117 (|get.::.1_3111| (|get.::.1_3111| (|get.::.1_3111| y_3105)))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (a!2 (…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (let ((a!1 (|get.::.1_3111| (|get.::.1_3111| (|get.::.1_3111| (|get.::.1_3111| x_3104)))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (a!…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (let ((a!1 (|get.::.1_3111| (|get.::.1_3111| (|get.::.1_3111| (|get.::.1_3111| x_3104))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (rever…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (let ((a!1 (reverse_3117 (|get.::.1_3111| (|get.::.1_3111| (|get.::.1_3111| x_3104)))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (a!2 (…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (let ((a!1 (|get.::.1_3111| (|get.::.1_3111| (|get.::.1_3111| (|get.::.1_3111| x_3104))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (appen…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (let ((a!1 (|get.::.1_3111| (|get.::.1_3111| (|get.::.1_3111| (append_3112 x_3104
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (let ((a!1 (|get.::.1_3111| (|get.::.1_3111| (|get.::.1_3111| (append_3112 x_3104
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (let ((a!1 (|get.::.1_3111| (reverse_3117 (|get.::.1_3111| (|get.::.1_3111| x_3104))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (append_3…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (let ((a!1 (|get.::.1_3111| (|get.::.1_3111| (|get.::.1_3111| (append_3112 x_3104
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (let ((a!1 (reverse_3117 (|get.::.1_3111| (|get.::.1_3111| (append_3112 x_3104
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (let ((a!1 (|get.::.1_3111| (reverse_3117 (|get.::.1_3111| (append_3112 x_3104
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (let ((a!1 (|get.::.1_3111| (|get.::.1_3111| (reverse_3117 (|get.::.1_3111| y_3105))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (append_3…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (let ((a!1 (|get.::.1_3111| (|get.::.1_3111| (reverse_3117 (|get.::.1_3111| x_3104))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (append_3…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (let ((a!1 (|get.::.1_3111| (reverse_3117 (|get.::.1_3111| (|get.::.1_3111| y_3105))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (append_3…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (let ((a!1 (reverse_3117 (|get.::.1_3111| (|get.::.1_3111| (|get.::.1_3111| y_3105)))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (a!2 (…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (let ((a!1 (|get.::.1_3111| (|get.::.1_3111| (|get.::.1_3111| (|get.::.1_3111| y_3105))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (rever…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (let ((a!1 (|get.::.1_3111| (|get.::.1_3111| (|get.::.1_3111| (|get.::.1_3111| y_3105)))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (a!…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (let ((a!1 (|get.::.1_3111| (|get.::.1_3111| (|get.::.1_3111| (reverse_3117 y_3105))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (append_3…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (let ((a!1 (|get.::.1_3111| (|get.::.1_3111| (|get.::.1_3111| (|get.::.1_3111| x_3104)))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (a!…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (let ((a!1 (|get.::.1_3111| (|get.::.1_3111| (|get.::.1_3111| (|get.::.1_3111| x_3104))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (appen…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (let ((a!1 (|get.::.1_3111| (|get.::.1_3111| (|get.::.1_3111| (|get.::.1_3111| x_3104))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (rever…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (let ((a!1 (|get.::.1_3111| (|get.::.1_3111| (|get.::.1_3111| (|get.::.1_3111| x_3104))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (appen…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (let ((a!1 (reverse_3117 (|get.::.1_3111| (|get.::.1_3111| (|get.::.1_3111| x_3104)))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (a!2 (…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (let ((a!1 (|get.::.1_3111| (|get.::.1_3111| (|get.::.1_3111| (append_3112 x_3104
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (let ((a!1 (|get.::.1_3111| (|get.::.1_3111| (|get.::.1_3111| (append_3112 x_3104
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (let ((a!1 (|get.::.1_3111| (|get.::.1_3111| (|get.::.1_3111| (append_3112 x_3104
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (let ((a!1 (|get.::.1_3111| (|get.::.1_3111| (|get.::.1_3111| (append_3112 x_3104
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (let ((a!1 (|get.::.1_3111| (reverse_3117 (|get.::.1_3111| (|get.::.1_3111| x_3104))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (append_3…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (let ((a!1 (reverse_3117 (|get.::.1_3111| (|get.::.1_3111| (append_3112 x_3104
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (let ((a!1 (|get.::.1_3111| (reverse_3117 (|get.::.1_3111| (append_3112 x_3104
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (let ((a!1 (|get.::.1_3111| (|get.::.1_3111| (reverse_3117 (|get.::.1_3111| y_3105))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (append_3…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (let ((a!1 (reverse_3117 (|get.::.1_3111| (|get.::.1_3111| (|get.::.1_3111| y_3105)))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (a!2 (…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (let ((a!1 (|get.::.1_3111| (|get.::.1_3111| (reverse_3117 (|get.::.1_3111| x_3104))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (append_3…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (let ((a!1 (|get.::.1_3111| (|get.::.1_3111| (|get.::.1_3111| (reverse_3117 y_3105))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (append_3…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (let ((a!1 (|get.::.1_3111| (reverse_3117 (|get.::.1_3111| (|get.::.1_3111| y_3105))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (append_3…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (let ((a!1 (|get.::.1_3111| (|get.::.1_3111| (|get.::.1_3111| (|get.::.1_3111| y_3105))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (rever…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (let ((a!1 (|get.::.1_3111| (|get.::.1_3111| (|get.::.1_3111| (|get.::.1_3111| y_3105))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (appen…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (let ((a!1 (|get.::.1_3111| (|get.::.1_3111| (|get.::.1_3111| (|get.::.1_3111| y_3105)))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (a!…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (let ((a!1 (|get.::.1_3111| (|get.::.1_3111| (|get.::.1_3111| (|get.::.1_3111| x_3104))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (appen…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (let ((a!1 (|get.::.1_3111| (|get.::.1_3111| (|get.::.1_3111| (|get.::.1_3111| x_3104))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (appen…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (let ((a!1 (|get.::.1_3111| (|get.::.1_3111| (|get.::.1_3111| (|get.::.1_3111| x_3104))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (appen…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (let ((a!1 (|get.::.1_3111| (|get.::.1_3111| (|get.::.1_3111| (|get.::.1_3111| x_3104))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (rever…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (let ((a!1 (|get.::.1_3111| (|get.::.1_3111| (|get.::.1_3111| (|get.::.1_3111| x_3104)))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (a!…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (let ((a!1 (|get.::.1_3111| (|get.::.1_3111| (|get.::.1_3111| (append_3112 x_3104
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (let ((a!1 (|get.::.1_3111| (|get.::.1_3111| (|get.::.1_3111| (append_3112 x_3104
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (let ((a!1 (|get.::.1_3111| (|get.::.1_3111| (|get.::.1_3111| (append_3112 x_3104
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (let ((a!1 (|get.::.1_3111| (|get.::.1_3111| (|get.::.1_3111| (append_3112 x_3104
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (let ((a!1 (reverse_3117 (|get.::.1_3111| (|get.::.1_3111| (|get.::.1_3111| x_3104)))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (a!2 (…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (let ((a!1 (|get.::.1_3111| (|get.::.1_3111| (|get.::.1_3111| (append_3112 x_3104
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (let ((a!1 (reverse_3117 (|get.::.1_3111| (|get.::.1_3111| (append_3112 x_3104
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (let ((a!1 (|get.::.1_3111| (reverse_3117 (|get.::.1_3111| (append_3112 x_3104
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (let ((a!1 (|get.::.1_3111| (|get.::.1_3111| (|get.::.1_3111| (reverse_3117 y_3105))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (append_3…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (let ((a!1 (|get.::.1_3111| (reverse_3117 (|get.::.1_3111| (|get.::.1_3111| x_3104))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (append_3…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (let ((a!1 (|get.::.1_3111| (|get.::.1_3111| (reverse_3117 (|get.::.1_3111| y_3105))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (append_3…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (let ((a!1 (|get.::.1_3111| (reverse_3117 (|get.::.1_3111| (|get.::.1_3111| y_3105))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (append_3…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (let ((a!1 (|get.::.1_3111| (|get.::.1_3111| (|get.::.1_3111| (|get.::.1_3111| x_3104))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (let ((a…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (let ((a!1 (|get.::.1_3111| (|get.::.1_3111| (|get.::.1_3111| (|get.::.1_3111| x_3104))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (appen…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (let ((a!1 (reverse_3117 (|get.::.1_3111| (|get.::.1_3111| (|get.::.1_3111| y_3105)))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (a!2 (…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (let ((a!1 (|get.::.1_3111| (|get.::.1_3111| (|get.::.1_3111| (|get.::.1_3111| x_3104))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (let ((a…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (let ((a!1 (|get.::.1_3111| (|get.::.1_3111| (|get.::.1_3111| (|get.::.1_3111| x_3104))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (rever…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (let ((a!1 (|get.::.1_3111| (|get.::.1_3111| (|get.::.1_3111| (append_3112 x_3104
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (let ((a!1 (|get.::.1_3111| (|get.::.1_3111| (|get.::.1_3111| (append_3112 x_3104
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (let ((a!1 (|get.::.1_3111| (|get.::.1_3111| (reverse_3117 (|get.::.1_3111| x_3104))))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (append_3…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expansions

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Our conjecture has passed through to depth 100 recursive unrolling, so we feel pretty confident it is true. Let's try to prove it by induction:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            In [24]:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            verify (fun x y -> reverse (append x y) = append (reverse y) (reverse x)) [@@induct]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Out[24]:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            - : 'a list -> 'a list -> bool = <fun>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Goal:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            reverse (append x y) = append (reverse y) (reverse x).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            1 nontautological subgoal.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Subgoal 1:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |---------------------------------------------------------------------------
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             reverse (append x y) = append (reverse y) (reverse x)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Verified up to bound 10 (after 0.036s).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Must try induction.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            The recursive terms in the conjecture suggest 3 inductions.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Subsumption and merging reduces this to 2.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Only 1 of those schemes are unflawed.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            We shall induct according to a scheme derived from append.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Induction scheme:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             (x = [] ==> φ y x) && (not (x = []) && φ y (List.tl x) ==> φ y x).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            2 nontautological subgoals.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Subgoal 1.2:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             H0. x = []
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |---------------------------------------------------------------------------
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             reverse (append x y) = append (reverse y) (reverse x)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            This simplifies, using the definitions of append and reverse to:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Subgoal 1.2':
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |---------------------------------------------------------------------------
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             reverse y = append (reverse y) []
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Verified up to bound 10 (after 0.033s).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Candidates for generalization:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             reverse y
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Verified up to bound 10 (after 0.033s).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            This produces the modified subgoal:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Subgoal 1.2'':
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |---------------------------------------------------------------------------
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             gen_1 = append gen_1 []
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Verified up to bound 10 (after 0.030s).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Must try induction.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            We shall induct according to a scheme derived from append.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Induction scheme:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             (gen_1 = [] ==> φ gen_1)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             && (not (gen_1 = []) && φ (List.tl gen_1) ==> φ gen_1).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            2 nontautological subgoals.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Subgoal 1.2''.2:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             H0. gen_1 = []
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |---------------------------------------------------------------------------
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             gen_1 = append gen_1 []
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            But simplification reduces this to true, using the definition of append.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Subgoal 1.2''.1:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             H0. not (gen_1 = [])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             H1. List.tl gen_1 = append (List.tl gen_1) []
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |---------------------------------------------------------------------------
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             gen_1 = append gen_1 []
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            But simplification reduces this to true, using the definition of append.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Subgoal 1.1:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             H0. not (x = [])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             H1. reverse (append (List.tl x) y) =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 append (reverse y) (reverse (List.tl x))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |---------------------------------------------------------------------------
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             reverse (append x y) = append (reverse y) (reverse x)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            This simplifies, using the definitions of append and reverse to:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Subgoal 1.1':
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             H0. reverse (append (List.tl x) y) =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 append (reverse y) (reverse (List.tl x))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             H1. x <> []
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |---------------------------------------------------------------------------
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             append (reverse (append (List.tl x) y)) [List.hd x] =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             append (reverse y) (append (reverse (List.tl x)) [List.hd x])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Verified up to bound 10 (after 0.026s).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            We can eliminate destructors by the following substitution:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             x -> x1 :: x2
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            This produces the modified subgoal:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Subgoal 1.1'':
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             H0. reverse (append x2 y) = append (reverse y) (reverse x2)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |---------------------------------------------------------------------------
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             append (reverse (append x2 y)) [x1] =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             append (reverse y) (append (reverse x2) [x1])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Verified up to bound 10 (after 0.025s).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Applying fertilizer:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             reverse (append x2 y) = append (reverse y) (reverse x2)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            for conclusion:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             append (reverse (append x2 y)) [x1] =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             append (reverse y) (append (reverse x2) [x1])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            This produces the modified subgoal:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Subgoal 1.1''':
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |---------------------------------------------------------------------------
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             append (append (reverse y) (reverse x2)) [x1] =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             append (reverse y) (append (reverse x2) [x1])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Verified up to bound 10 (after 0.021s).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Candidates for generalization:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             reverse y
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             reverse x2
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Verified up to bound 10 (after 0.021s).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            This produces the modified subgoal:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Subgoal 1.1'''':
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |---------------------------------------------------------------------------
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             append (append gen_2 gen_3) [x1] = append gen_2 (append gen_3 [x1])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Verified up to bound 10 (after 0.022s).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Must try induction.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            The recursive terms in the conjecture suggest 3 inductions.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Subsumption and merging reduces this to 2.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Only 1 of those schemes are unflawed.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            We shall induct according to a scheme derived from append.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Induction scheme:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             (gen_2 = [] ==> φ gen_3 gen_2 x1)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             && (not (gen_2 = []) && φ gen_3 (List.tl gen_2) x1 ==> φ gen_3 gen_2 x1).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            2 nontautological subgoals.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Subgoal 1.1''''.2:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             H0. gen_2 = []
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |---------------------------------------------------------------------------
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             append (append gen_2 gen_3) [x1] = append gen_2 (append gen_3 [x1])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            But simplification reduces this to true, using the definition of append.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Subgoal 1.1''''.1:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             H0. not (gen_2 = [])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             H1. append (append (List.tl gen_2) gen_3) [x1] =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 append (List.tl gen_2) (append gen_3 [x1])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |---------------------------------------------------------------------------
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             append (append gen_2 gen_3) [x1] = append gen_2 (append gen_3 [x1])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            But simplification reduces this to true, using the definition of append.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Proved
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            proof
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            ground_instances0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            definitions12
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            inductions3
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            search_time
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            0.821s
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Expand
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • start[0.821s, "Goal"]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                reverse (append :var_0: :var_1:) =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                append (reverse :var_1:) (reverse :var_0:)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • subproof

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              reverse (append x y) = append (reverse y) (reverse x)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • start[0.821s, "1"] reverse (append x y) = append (reverse y) (reverse x)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • induction on (functional )
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                :scheme (x = [] ==> φ y x) && (not (x = []) && φ y (List.tl x) ==> φ y x)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Split ((not (x = []) || reverse (append x y) = append (reverse y) (reverse x))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       && (not
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           (not (x = [])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            && reverse (append (List.tl x) y) =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               append (reverse y) (reverse (List.tl x)))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           || reverse (append x y) = append (reverse y) (reverse x))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       :cases [not (x = [])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               || reverse (append x y) = append (reverse y) (reverse x);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               (x = []
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                || not
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   (reverse (append (List.tl x) y) =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    append (reverse y) (reverse (List.tl x))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               || reverse (append x y) = append (reverse y) (reverse x)])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • subproof
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (x = [] || not (reverse (append (List.tl x) y) = append (reverse y) (reverse (List.tl x)))) || reverse (append x y) = append (reverse y) (reverse x)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • start[0.746s, "1.1"]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (x = []
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       || not
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (reverse (append (List.tl x) y) =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           append (reverse y) (reverse (List.tl x))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      || reverse (append x y) = append (reverse y) (reverse x)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • simplify
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    into
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (append (reverse (append (List.tl x) y)) [List.hd x] =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     append (reverse y) (append (reverse (List.tl x)) [List.hd x])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     || not
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (reverse (append (List.tl x) y) =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         append (reverse y) (reverse (List.tl x))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    || x = []
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    [reverse, reverse, append]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    rewrite_steps
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      forward_chaining
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Elim_destructor (:cstor :: :replace x1 :: x2 :context [])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Fertilize(append (reverse (append x2 y)) [x1] =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  append (reverse y) (append (reverse x2) [x1]))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Generalize (append (append (reverse y) (reverse x2)) [x1] =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    append (reverse y) (append (reverse x2) [x1])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    :as (gen_2 : sko_ty_0 list))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Generalize (append (append (reverse y) (reverse x2)) [x1] =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    append (reverse y) (append (reverse x2) [x1])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    :as (gen_3 : sko_ty_0 list))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • induction on (functional )
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        :scheme (gen_2 = [] ==> φ gen_3 gen_2 x1)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                && (not (gen_2 = []) && φ gen_3 (List.tl gen_2) x1
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ==> φ gen_3 gen_2 x1)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Split ((not (gen_2 = [])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                || append (append gen_2 gen_3) [x1] =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   append gen_2 (append gen_3 [x1]))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               && (not
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   (not (gen_2 = [])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    && append (append (List.tl gen_2) gen_3) [x1] =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       append (List.tl gen_2) (append gen_3 [x1]))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   || append (append gen_2 gen_3) [x1] =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      append gen_2 (append gen_3 [x1]))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               :cases [not (gen_2 = [])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       || append (append gen_2 gen_3) [x1] =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          append gen_2 (append gen_3 [x1]);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       (gen_2 = []
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        || not
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           (append (append (List.tl gen_2) gen_3) [x1] =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            append (List.tl gen_2) (append gen_3 [x1])))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       || append (append gen_2 gen_3) [x1] =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          append gen_2 (append gen_3 [x1])])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • Subproof
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • Subproof
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • subproof
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      not (x = []) || reverse (append x y) = append (reverse y) (reverse x)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • start[0.746s, "1.2"]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          not (x = []) || reverse (append x y) = append (reverse y) (reverse x)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • simplify
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        into
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        reverse y = append (reverse y) []
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        [reverse, append]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        rewrite_steps
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          forward_chaining
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • Generalize (reverse y = append (reverse y) [] :as (gen_1 : sko_ty_0 list))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • induction on (functional )
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            :scheme (gen_1 = [] ==> φ gen_1)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    && (not (gen_1 = []) && φ (List.tl gen_1) ==> φ gen_1)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • Split ((not (gen_1 = []) || gen_1 = append gen_1 [])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   && (not
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       (not (gen_1 = []) && List.tl gen_1 = append (List.tl gen_1) [])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       || gen_1 = append gen_1 [])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   :cases [not (gen_1 = []) || gen_1 = append gen_1 [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           (gen_1 = [] || not (List.tl gen_1 = append (List.tl gen_1) []))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           || gen_1 = append gen_1 []])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • Subproof
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • Subproof

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Success! And in a proof with three inductions! If we inspect the proof, we'll see that those subsequent inductions actually suggest some very useful lemmas.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    In fact, this phenomenon of goals proved by subinductions suggesting useful lemmas happens so often, that we commonly like to work with a very low #max_induct value. Let's attempt the same proof as above, but instruct Imandra to only perform inductions of depth 1 (i.e., no subinductions allowed):

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    In [25]:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    #max_induct 1
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Out[25]:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    In [26]:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    verify (fun x y -> reverse (append x y) = append (reverse y) (reverse x)) [@@induct]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Out[26]:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    - : 'a list -> 'a list -> bool = <fun>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Goal:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    reverse (append x y) = append (reverse y) (reverse x).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    1 nontautological subgoal.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Subgoal 1:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |---------------------------------------------------------------------------
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     reverse (append x y) = append (reverse y) (reverse x)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Verified up to bound 10 (after 0.022s).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Must try induction.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    The recursive terms in the conjecture suggest 3 inductions.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Subsumption and merging reduces this to 2.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Only 1 of those schemes are unflawed.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    We shall induct according to a scheme derived from append.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Induction scheme:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     (x = [] ==> φ y x) && (not (x = []) && φ y (List.tl x) ==> φ y x).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    2 nontautological subgoals.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Subgoal 1.2:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     H0. x = []
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |---------------------------------------------------------------------------
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     reverse (append x y) = append (reverse y) (reverse x)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    This simplifies, using the definitions of append and reverse to:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Subgoal 1.2':
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |---------------------------------------------------------------------------
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     reverse y = append (reverse y) []
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Verified up to bound 10 (after 0.020s).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Candidates for generalization:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     reverse y
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Verified up to bound 10 (after 0.023s).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    This produces the modified subgoal:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Subgoal 1.2'':
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |---------------------------------------------------------------------------
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     gen_1 = append gen_1 []
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Verified up to bound 10 (after 0.023s).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Must try induction.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Checkpoints:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |---------------------------------------------------------------------------
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     gen_1 = append gen_1 []
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Error: Maximum induction depth reached (1). You can set this with #max_induct.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    We see above that Imandra is unable to prove our theorem with #max_induct set to 1. However, by inspecting the subgoal Imandra was working on before it hit its #max_induct limit (nicely presented to us as a Checkpoint at the end of the proof attempt), we can find a useful lemma we should prove!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    In particular, note this checkpoint:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    gen_1 = append gen_1 []

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    This, oriented as append gen_1 [] = gen_1 is a great rule. Note that it really does require induction, as append recurses on its first argument, not its second.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Let's ask Imandra to prove this as a theorem and to install it as a rewrite rule:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    In [27]:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    theorem append_nil x = append x [] = x [@@induct] [@@rewrite]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Out[27]:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    val append_nil : 'a list -> bool = <fun>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Goal:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    append x [] = x.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    1 nontautological subgoal.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Subgoal 1:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |---------------------------------------------------------------------------
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     append x [] = x
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Verified up to bound 10 (after 0.022s).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Must try induction.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    We shall induct according to a scheme derived from append.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Induction scheme:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     (x = [] ==> φ x) && (not (x = []) && φ (List.tl x) ==> φ x).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    2 nontautological subgoals.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Subgoal 1.2:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     H0. x = []
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |---------------------------------------------------------------------------
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     append x [] = x
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    But simplification reduces this to true, using the definition of append.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Subgoal 1.1:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     H0. not (x = [])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     H1. append (List.tl x) [] = List.tl x
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |---------------------------------------------------------------------------
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     append x [] = x
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    But simplification reduces this to true, using the definition of append.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Proved
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    proof
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ground_instances0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    definitions2
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    inductions1
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    search_time
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    0.039s
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Expand
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • start[0.039s, "Goal"] append :var_0: [] = :var_0:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • subproof

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      append x [] = x
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • start[0.039s, "1"] append x [] = x
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • induction on (functional )
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        :scheme (x = [] ==> φ x) && (not (x = []) && φ (List.tl x) ==> φ x)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Split ((not (x = []) || append x [] = x)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               && (not (not (x = []) && append (List.tl x) [] = List.tl x)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   || append x [] = x)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               :cases [not (x = []) || append x [] = x;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       (x = [] || not (append (List.tl x) [] = List.tl x))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       || append x [] = x])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • subproof
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (x = [] || not (append (List.tl x) [] = List.tl x)) || append x [] = x
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • start[0.011s, "1.1"]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (x = [] || not (append (List.tl x) [] = List.tl x)) || append x [] = x
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • simplify
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            into
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            true
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            append
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            rewrite_steps
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              forward_chaining
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • subproof
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              not (x = []) || append x [] = x
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • start[0.011s, "1.2"] not (x = []) || append x [] = x
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • simplify
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                into
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                true
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                append
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                rewrite_steps
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  forward_chaining

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Success! Now, let's return to our main goal and see if we progress any further (still with #max_induct 1) now that we have append_nil available as a rewrite rule:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            In [28]:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            verify (fun x y -> reverse (append x y) = append (reverse y) (reverse x)) [@@induct]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Out[28]:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            - : 'a list -> 'a list -> bool = <fun>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Goal:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            reverse (append x y) = append (reverse y) (reverse x).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            1 nontautological subgoal.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Subgoal 1:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |---------------------------------------------------------------------------
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             reverse (append x y) = append (reverse y) (reverse x)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Verified up to bound 10 (after 0.021s).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Must try induction.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            The recursive terms in the conjecture suggest 3 inductions.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Subsumption and merging reduces this to 2.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Only 1 of those schemes are unflawed.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            We shall induct according to a scheme derived from append.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Induction scheme:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             (x = [] ==> φ y x) && (not (x = []) && φ y (List.tl x) ==> φ y x).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            2 nontautological subgoals.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Subgoal 1.2:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             H0. x = []
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |---------------------------------------------------------------------------
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             reverse (append x y) = append (reverse y) (reverse x)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            But simplification reduces this to true, using the definitions of append and
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            reverse, and the rewrite rule append_nil.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Subgoal 1.1:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             H0. not (x = [])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             H1. reverse (append (List.tl x) y) =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 append (reverse y) (reverse (List.tl x))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |---------------------------------------------------------------------------
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             reverse (append x y) = append (reverse y) (reverse x)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            This simplifies, using the definitions of append and reverse to:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Subgoal 1.1':
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             H0. reverse (append (List.tl x) y) =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 append (reverse y) (reverse (List.tl x))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             H1. x <> []
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |---------------------------------------------------------------------------
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             append (reverse (append (List.tl x) y)) [List.hd x] =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             append (reverse y) (append (reverse (List.tl x)) [List.hd x])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Verified up to bound 10 (after 0.021s).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            We can eliminate destructors by the following substitution:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             x -> x1 :: x2
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            This produces the modified subgoal:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Subgoal 1.1'':
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             H0. reverse (append x2 y) = append (reverse y) (reverse x2)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |---------------------------------------------------------------------------
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             append (reverse (append x2 y)) [x1] =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             append (reverse y) (append (reverse x2) [x1])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Verified up to bound 10 (after 0.021s).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Applying fertilizer:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             reverse (append x2 y) = append (reverse y) (reverse x2)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            for conclusion:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             append (reverse (append x2 y)) [x1] =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             append (reverse y) (append (reverse x2) [x1])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            This produces the modified subgoal:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Subgoal 1.1''':
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |---------------------------------------------------------------------------
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             append (append (reverse y) (reverse x2)) [x1] =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             append (reverse y) (append (reverse x2) [x1])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Verified up to bound 10 (after 0.020s).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Candidates for generalization:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             reverse y
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             reverse x2
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Verified up to bound 10 (after 0.021s).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            This produces the modified subgoal:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Subgoal 1.1'''':
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |---------------------------------------------------------------------------
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             append (append gen_1 gen_2) [x1] = append gen_1 (append gen_2 [x1])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Verified up to bound 10 (after 0.023s).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Must try induction.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Checkpoints:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |---------------------------------------------------------------------------
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             append (append gen_1 gen_2) [x1] = append gen_1 (append gen_2 [x1])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Error: Maximum induction depth reached (1). You can set this with #max_induct.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Yes! If we inspect Imandra's aborted proof, we see that our rewrite rule append_nil was applied exactly where we wanted it, and we now see another interesting subgoal which looks quite familiar:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            append (append gen_1 gen_2) (x1 :: []) = append gen_1 (append gen_2 (x1 :: []))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            That is, Imandra has derived, as a subgoal to be proved, an instance of the associativity of append!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            If we set our #max_induct to 2, then Imandra would finish this proof automatically.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            But, this fact about append seems very useful and of general purpose, so let's prove it as a rewrite rule and make it available to our subsequent proof efforts.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            In [29]:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            theorem assoc_append x y z = append x (append y z) = append (append x y) z [@@induct] [@@rewrite]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Out[29]:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            val assoc_append : 'a list -> 'a list -> 'a list -> bool = <fun>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Goal:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            append x (append y z) = append (append x y) z.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            1 nontautological subgoal.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Subgoal 1:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |---------------------------------------------------------------------------
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             append x (append y z) = append (append x y) z
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Verified up to bound 10 (after 0.020s).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Must try induction.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            The recursive terms in the conjecture suggest 3 inductions.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Subsumption and merging reduces this to 2.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Only 1 of those schemes are unflawed.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            We shall induct according to a scheme derived from append.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Induction scheme:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             (x = [] ==> φ x z y) && (not (x = []) && φ (List.tl x) z y ==> φ x z y).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            2 nontautological subgoals.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Subgoal 1.2:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             H0. x = []
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |---------------------------------------------------------------------------
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             append x (append y z) = append (append x y) z
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            But simplification reduces this to true, using the definition of append.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Subgoal 1.1:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             H0. not (x = [])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             H1. append (List.tl x) (append y z) = append (append (List.tl x) y) z
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |---------------------------------------------------------------------------
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             append x (append y z) = append (append x y) z
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            But simplification reduces this to true, using the definition of append.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Proved
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            proof
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            ground_instances0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            definitions5
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            inductions1
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            search_time
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            0.068s
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Expand
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • start[0.068s, "Goal"]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                append :var_0: (append :var_1: :var_2:) =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                append (append :var_0: :var_1:) :var_2:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • subproof

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              append x (append y z) = append (append x y) z
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • start[0.068s, "1"] append x (append y z) = append (append x y) z
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • induction on (functional )
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                :scheme (x = [] ==> φ x z y)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        && (not (x = []) && φ (List.tl x) z y ==> φ x z y)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Split ((not (x = []) || append x (append y z) = append (append x y) z)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       && (not
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           (not (x = [])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            && append (List.tl x) (append y z) =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               append (append (List.tl x) y) z)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           || append x (append y z) = append (append x y) z)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       :cases [not (x = []) || append x (append y z) = append (append x y) z;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               (x = []
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                || not
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   (append (List.tl x) (append y z) =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    append (append (List.tl x) y) z))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               || append x (append y z) = append (append x y) z])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • subproof
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (x = [] || not (append (List.tl x) (append y z) = append (append (List.tl x) y) z)) || append x (append y z) = append (append x y) z
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • start[0.034s, "1.1"]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (x = []
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       || not (append (List.tl x) (append y z) = append (append (List.tl x) y) z))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      || append x (append y z) = append (append x y) z
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • simplify
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    into
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    true
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    [append, append, append]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    rewrite_steps
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      forward_chaining
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • subproof
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      not (x = []) || append x (append y z) = append (append x y) z
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • start[0.034s, "1.2"]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          not (x = []) || append x (append y z) = append (append x y) z
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • simplify
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        into
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        true
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        [append, append]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        rewrite_steps
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          forward_chaining

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Success! Now, let's go back to our original goal and see if we can prove it with the help of our proved rules (still with max_induct 1):

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    In [30]:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    verify (fun x y -> reverse (append x y) = append (reverse y) (reverse x)) [@@induct]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Out[30]:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    - : 'a list -> 'a list -> bool = <fun>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Goal:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    reverse (append x y) = append (reverse y) (reverse x).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    1 nontautological subgoal.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Subgoal 1:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |---------------------------------------------------------------------------
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     reverse (append x y) = append (reverse y) (reverse x)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Verified up to bound 10 (after 0.022s).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Must try induction.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    The recursive terms in the conjecture suggest 3 inductions.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Subsumption and merging reduces this to 2.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Only 1 of those schemes are unflawed.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    We shall induct according to a scheme derived from append.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Induction scheme:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     (x = [] ==> φ y x) && (not (x = []) && φ y (List.tl x) ==> φ y x).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    2 nontautological subgoals.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Subgoal 1.2:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     H0. x = []
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |---------------------------------------------------------------------------
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     reverse (append x y) = append (reverse y) (reverse x)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    But simplification reduces this to true, using the definitions of append and
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    reverse, and the rewrite rule append_nil.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Subgoal 1.1:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     H0. not (x = [])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     H1. reverse (append (List.tl x) y) =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         append (reverse y) (reverse (List.tl x))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |---------------------------------------------------------------------------
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     reverse (append x y) = append (reverse y) (reverse x)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    This simplifies, using the definitions of append and reverse to:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Subgoal 1.1':
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     H0. reverse (append (List.tl x) y) =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         append (reverse y) (reverse (List.tl x))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     H1. x <> []
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |---------------------------------------------------------------------------
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     append (reverse (append (List.tl x) y)) [List.hd x] =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     append (reverse y) (append (reverse (List.tl x)) [List.hd x])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    But simplification reduces this to true, using the rewrite rule assoc_append.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Proved
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    proof
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ground_instances0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    definitions6
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    inductions1
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    search_time
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    0.285s
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Expand
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • start[0.285s, "Goal"]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        reverse (append :var_0: :var_1:) =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        append (reverse :var_1:) (reverse :var_0:)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • subproof

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      reverse (append x y) = append (reverse y) (reverse x)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • start[0.284s, "1"] reverse (append x y) = append (reverse y) (reverse x)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • induction on (functional )
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        :scheme (x = [] ==> φ y x) && (not (x = []) && φ y (List.tl x) ==> φ y x)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Split ((not (x = []) || reverse (append x y) = append (reverse y) (reverse x))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               && (not
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   (not (x = [])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    && reverse (append (List.tl x) y) =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       append (reverse y) (reverse (List.tl x)))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   || reverse (append x y) = append (reverse y) (reverse x))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               :cases [not (x = [])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       || reverse (append x y) = append (reverse y) (reverse x);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       (x = []
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        || not
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           (reverse (append (List.tl x) y) =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            append (reverse y) (reverse (List.tl x))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       || reverse (append x y) = append (reverse y) (reverse x)])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • subproof
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (x = [] || not (reverse (append (List.tl x) y) = append (reverse y) (reverse (List.tl x)))) || reverse (append x y) = append (reverse y) (reverse x)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • start[0.232s, "1.1"]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (x = []
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               || not
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (reverse (append (List.tl x) y) =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   append (reverse y) (reverse (List.tl x))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              || reverse (append x y) = append (reverse y) (reverse x)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • simplify
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            into
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (append (reverse (append (List.tl x) y)) [List.hd x] =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             append (reverse y) (append (reverse (List.tl x)) [List.hd x])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             || not
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (reverse (append (List.tl x) y) =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 append (reverse y) (reverse (List.tl x))))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            || x = []
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            [reverse, reverse, append]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            rewrite_steps
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              forward_chaining
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • simplify
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                into
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                true
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                []
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                rewrite_steps
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                assoc_append
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                forward_chaining
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • subproof
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                not (x = []) || reverse (append x y) = append (reverse y) (reverse x)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • start[0.234s, "1.2"]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    not (x = []) || reverse (append x y) = append (reverse y) (reverse x)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • simplify
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  into
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  true
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expansions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  [append, reverse, append]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  rewrite_steps
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  append_nil
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  forward_chaining

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Success! And our rewrite rules were used exactly where we'd hoped.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Happy proving!