From Stdlib Require Import Strings.String.
From Stdlib Require Import String Ascii.
From Stdlib Require Arith.
From stdpp Require Import base.
From stdpp Require Import fin_maps.
From stdpp Require Import gmap.
From stdpp Require Import base gmultiset.
From Stdlib Require Classical.
From Stdlib Require Import ZArith.
From stdpp.bitvector Require Import definitions tactics.
From Stdlib Require Import Sorting.Sorted.
From Stdlib Require Import Reals.Rbasic_fun.
From Stdlib Require Import Reals.Abstract.ConstructiveAbs.
From Stdlib Require Import Reals.Rdefinitions.
From stdpp Require Import list_relations.
From stdpp Require Import list_numbers.
From stdpp Require Import functions.
From Stdlib Require Import ClassicalEpsilon.
From stdpp Require Import base decidable.
From Stdlib Require Import ZArith.Zeuclid.
From Stdlib Require Import ZArith.Znumtheory.
From stdpp Require Import propset.
From Stdlib Require Import Reals.
Require Import Why3.Base.
Require Import Why3.Qed.Qed.
Require Import Why3.Memory.Memory.
Require Import Why3.Cint.Cint.
Require Import contiki_list.Compound.Compound.
Require Import contiki_list.S1_list.S1_list.
Require Import contiki_list.Axiomatic.Axiomatic.
Require Import contiki_list.A_Index_of_item.A_Index_of_item.
Require Import contiki_list.Axiomatic1.Axiomatic1.
Open Scope Z_scope.
Theorem goal53 (t_6 : addr -> addr) (a_2 : addr) (i_2 : Z) (i : Z) (i_1 : Z) (a_1 : addr) (t_5 : addr -> addr) (a : addr) (i_3 : Z) (t_4 : addr -> addr) (t : Z -> Z) (t_7 : addr -> addr) (t_3 : addr -> addr) (t_1 : addr -> R) (t_2 : addr -> addr) : let a_3 : addr := t_6 (shift a_2 i_2) in let x : Z := i + i_1 in let a_4 : addr := shift a_2 0%Z in let a_5 : addr := t_6 a_1 in let x_1 : Z := l_index_of t_6 a_3 a_2 i_1 x in let a_6 : addr := t_5 a_1 in let a_7 : addr := shift a_6 0%Z in let a_8 : addr := shift a_2 i_1 in let x_2 : Z := i - 1%Z in let x_3 : Z := i + i_1 - 1%Z in let a_9 : addr := t_6 a_8 in let a_10 : addr := shift a 0%Z in let a_11 : addr := t_6 a_10 in let x_5 : Z := i_3 - i_1 in let x_6 : Z := 1%Z + i_3 in let a_12 : addr := t_4 a_1 in let a_13 : addr := shift (t_4 a_10) 0%Z in let x_8 : Z := i + i_1 - 2%Z - i_3 in let x_9 : Z := to_sint32 x_5 in let x_10 : Z := 1%Z + i_3 - i_1 in let a_14 : addr := t_4 (shift (t_4 (shift a_2 (i_3 - 1%Z))) 0%Z) in let a_15 : addr := t_4 (shift a_14 0%Z) in ¬ a_3 = Mk_addr 0%Z 0%Z -> 0%Z ≤ i -> 0%Z ≤ i_1 -> i_1 ≤ i_2 -> i_2 < x -> region (base a_1) ≤ 0%Z -> region (base a_2) ≤ 0%Z -> region (base a_3) ≤ 0%Z -> i ≤ 2147483645%Z -> framed t_6 -> linked t -> is_sint32 i -> is_sint32 i_1 -> is_sint32 i_3 -> valid_rd t a_1 1%Z -> valid_rw t a_1 1%Z -> valid_rw t a_4 2147483646%Z -> separated a_1 1%Z a_4 2147483646%Z -> separated a_5 4%Z a_4 2147483646%Z -> p_linked_n t t_6 a_5 a_2 i_1 i (Mk_addr 0%Z 0%Z) -> is_sint32 x_1 -> (if decide (a_5 = Mk_addr 0%Z 0%Z) then t_7 = t_6 else if decide (a_3 = a_5) then a_5 = a_6 ∧ fun_updt t_5 a_1 (t_5 a_7) = t_7 ∧ havoc t_3 t_6 a_8 x_2 = t_5 ∧ 0%Z < i ∧ valid_rd t a_7 1%Z ∧ separated a_6 4%Z a_4 2147483646%Z ∧ p_unchanged t t_5 t_1 t t_6 t_1 a_2 i_1 i_1 ∧ p_array_swipe_left t_5 t_6 a_2 i_1 x_3 ∧ p_linked_n t t_5 (t_5 (shift a_5 0%Z)) a_2 i_1 x_2 (Mk_addr 0%Z 0%Z) ∧ p_linked_n t t_5 a_9 a_2 i_1 0%Z a_5 ∧ p_linked_n t t_6 a_9 a_2 i_1 0%Z a_5 ∧ (∀(i_4 : Z), i_1 ≤ i_4 -> 2%Z + i_4 ≤ x -> ¬ t_5 (shift a_2 i_4) = a_5) ∧ (∀(i_4 : Z), i_1 ≤ i_4 -> 2%Z + i_4 ≤ x -> separated a_1 1%Z (t_5 (shift a_2 i_4)) 4%Z) ∧ (∀(i_4 : Z), i_1 ≤ i_4 -> 2%Z + i_4 ≤ x -> separated a_5 4%Z (t_5 (shift a_2 i_4)) 4%Z) ∧ (∀(i_4 : Z), i_1 ≤ i_4 -> 2%Z + i_4 ≤ x -> separated (t_5 (shift a_2 i_4)) 4%Z a_4 2147483646%Z) ∧ (∀(i_5 : Z) (i_4 : Z), ¬ i_5 = i_4 -> i_1 ≤ i_4 -> i_1 ≤ i_5 -> 2%Z + i_4 ≤ x -> 2%Z + i_5 ≤ x -> ¬ t_5 (shift a_2 i_5) = t_5 (shift a_2 i_4)) ∧ (∀(i_5 : Z) (i_4 : Z), ¬ i_5 = i_4 -> i_1 ≤ i_4 -> i_1 ≤ i_5 -> 2%Z + i_4 ≤ x -> 2%Z + i_5 ≤ x -> separated (t_5 (shift a_2 i_5)) 4%Z (t_5 (shift a_2 i_4)) 4%Z) else i_1 ≤ i_3 ∧ i_3 ≤ x ∧ valid_rd t a_10 1%Z ∧ p_unchanged t t_6 t_1 t t_6 t_1 a_2 i_1 i_3 ∧ p_linked_n t t_6 a a_2 i_3 1%Z a_11 ∧ p_linked_n t t_6 a_5 a_2 i_1 x_5 a ∧ p_linked_n t t_6 a_11 a_2 x_6 (i + i_1 - 1%Z - i_3) (Mk_addr 0%Z 0%Z) ∧ (if decide (a_3 = a_11) then a_5 = a_12 ∧ fun_updt t_4 a_10 (t_4 a_13) = t_7 ∧ havoc t_2 t_6 (shift a_2 x_6) x_8 = t_4 ∧ i_3 ≤ 2147483646%Z ∧ i_1 ≤ x_6 ∧ i_1 ≤ 2147483648%Z + i_3 ∧ i_3 ≤ 2147483647%Z + i_1 ∧ 2%Z + i_3 ≤ x ∧ x_9 ≤ 2147483648%Z + i ∧ i ≤ 2147483647%Z + x_9 ∧ - 2147483647%Z ≤ to_sint32 (i - x_9) ∧ valid_rw t a_10 1%Z ∧ separated a_12 4%Z a_4 2147483646%Z ∧ valid_rd t a_13 1%Z ∧ p_array_swipe_left t_4 t_6 a_2 x_6 x_3 ∧ p_linked_n t t_4 a_9 a_2 i_1 x_10 a_11 ∧ p_linked_n t t_6 a_9 a_2 i_1 x_10 a_11 ∧ p_unchanged t t_4 t_1 t t_6 t_1 a_2 i_1 x_6 ∧ p_linked_n t t_4 (t_4 (shift a_11 0%Z)) a_2 x_6 x_8 (Mk_addr 0%Z 0%Z) ∧ (i_3 ≤ i_1 ∨ a_14 = a ∧ p_linked_n t t_4 a_12 a_2 i_1 x_5 a_14 ∧ p_linked_n t t_4 a_12 a_2 i_1 x_10 a_15 ∧ p_linked_n t t_4 a_14 a_2 i_3 1%Z a_15) ∧ (∀(i_4 : Z), i_1 ≤ i_4 -> 2%Z + i_4 ≤ x -> ¬ t_4 (shift a_2 i_4) = a_11) ∧ (∀(i_4 : Z), i_1 ≤ i_4 -> 2%Z + i_4 ≤ x -> separated a_1 1%Z (t_4 (shift a_2 i_4)) 4%Z) ∧ (∀(i_4 : Z), i_1 ≤ i_4 -> 2%Z + i_4 ≤ x -> separated a_11 4%Z (t_4 (shift a_2 i_4)) 4%Z) ∧ (∀(i_4 : Z), i_1 ≤ i_4 -> 2%Z + i_4 ≤ x -> separated (t_4 (shift a_2 i_4)) 4%Z a_4 2147483646%Z) ∧ (∀(i_5 : Z) (i_4 : Z), ¬ i_5 = i_4 -> i_1 ≤ i_4 -> i_1 ≤ i_5 -> 2%Z + i_4 ≤ x -> 2%Z + i_5 ≤ x -> ¬ t_4 (shift a_2 i_5) = t_4 (shift a_2 i_4)) ∧ (∀(i_5 : Z) (i_4 : Z), ¬ i_5 = i_4 -> i_1 ≤ i_4 -> i_1 ≤ i_5 -> 2%Z + i_4 ≤ x -> 2%Z + i_5 ≤ x -> separated (t_4 (shift a_2 i_5)) 4%Z (t_4 (shift a_2 i_4)) 4%Z) else t_7 = t_6 ∧ t_7 a_10 = Mk_addr 0%Z 0%Z) ∧ (∀(i_4 : Z), i_1 ≤ i_4 -> i_4 ≤ i_3 -> ¬ a_3 = t_6 (shift a_2 i_4)) ∧ (∀(i_4 : Z), i_1 ≤ i_4 -> i_4 < i_3 -> separated a_3 4%Z (t_6 (shift a_2 i_4)) 4%Z)) -> (∀(i_4 : Z), i_1 ≤ i_4 -> i_4 < x -> separated a_1 1%Z (t_6 (shift a_2 i_4)) 4%Z) -> (∀(i_4 : Z), i_1 ≤ i_4 -> i_4 < x -> separated (t_6 (shift a_2 i_4)) 4%Z a_4 2147483646%Z) -> (∀(i_4 : Z), let a_16 : addr := t_6 (shift a_2 i_4) in ¬ a_3 = a_16 -> i_1 ≤ i_4 -> i_4 < x -> separated a_3 4%Z a_16 4%Z) -> (∀(i_5 : Z) (i_4 : Z), ¬ i_5 = i_4 -> i_1 ≤ i_4 -> i_1 ≤ i_5 -> i_4 < x -> i_5 < x -> ¬ t_6 (shift a_2 i_5) = t_6 (shift a_2 i_4)) -> (∀(i_5 : Z) (i_4 : Z), ¬ i_5 = i_4 -> i_1 ≤ i_4 -> i_1 ≤ i_5 -> i_4 < x -> i_5 < x -> separated (t_6 (shift a_2 i_5)) 4%Z (t_6 (shift a_2 i_4)) 4%Z) -> p_unchanged t t_7 t_1 t t_6 t_1 a_2 i_1 (x_1 - 1%Z).
Admitted.
