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 goal48 (t_8 : addr -> addr) (a_2 : addr) (i_3 : Z) (i : Z) (i_2 : Z) (a_1 : addr) (t_6 : addr -> addr) (i_4 : Z) (a : addr) (i_5 : Z) (t_5 : addr -> addr) (i_6 : Z) (t : Z -> Z) (i_1 : Z) (t_7 : addr -> addr) (t_1 : Z -> Z) (t_4 : addr -> addr) (t_2 : addr -> R) (t_3 : addr -> addr) : let a_3 : addr := t_8 (shift a_2 i_3) in let x : Z := i + i_2 in let a_4 : addr := shift a_2 0%Z in let a_5 : addr := t_8 a_1 in let a_6 : addr := t_6 a_1 in let a_7 : addr := shift a_6 0%Z in let a_8 : addr := shift a_2 i_2 in let x_1 : Z := i - 1%Z in let a_9 : addr := t_8 a_8 in let x_2 : Z := i + i_4 in let a_10 : addr := shift a 0%Z in let a_11 : addr := t_8 a_10 in let x_4 : Z := i_5 - i_4 in let x_5 : Z := 1%Z + i_5 in let a_12 : addr := t_5 a_1 in let a_13 : addr := shift (t_5 a_10) 0%Z in let x_7 : Z := i + i_4 - 2%Z - i_5 in let x_8 : Z := to_sint32 x_4 in let a_14 : addr := t_8 (shift a_2 i_4) in let x_9 : Z := 1%Z + i_5 - i_4 in let a_15 : addr := t_5 (shift (t_5 (shift a_2 (i_5 - 1%Z))) 0%Z) in let a_16 : addr := t_5 (shift a_15 0%Z) in ¬ a_3 = Mk_addr 0%Z 0%Z -> 0%Z ≤ i -> 0%Z ≤ i_2 -> i_2 ≤ i_3 -> i_2 ≤ i_6 -> i_3 < x -> region (base a_1) ≤ 0%Z -> region (base a_2) ≤ 0%Z -> region (base a_3) ≤ 0%Z -> i ≤ 2147483645%Z -> 2%Z + i_6 ≤ x -> framed t_8 -> linked t -> is_sint32 i -> is_sint32 i_1 -> is_sint32 i_2 -> is_sint32 i_5 -> 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_8 a_5 a_2 i_2 i (Mk_addr 0%Z 0%Z) -> is_sint32 (l_index_of t_8 a_3 a_2 i_2 x) -> (if decide (a_5 = Mk_addr 0%Z 0%Z) then t_8 = t_7 else t_1 = t ∧ (if decide (a_3 = a_5) then a_5 = a_6 ∧ fun_updt t_6 a_1 (t_6 a_7) = t_7 ∧ havoc t_4 t_8 a_8 x_1 = t_6 ∧ 0%Z < i ∧ valid_rd t_1 a_1 1%Z ∧ valid_rw t_1 a_1 1%Z ∧ valid_rd t_1 a_7 1%Z ∧ valid_rw t_1 a_4 2147483646%Z ∧ separated a_6 4%Z a_4 2147483646%Z ∧ p_linked_n t_1 t_8 a_5 a_2 i_2 i (Mk_addr 0%Z 0%Z) ∧ p_unchanged t_1 t_6 t_2 t_1 t_8 t_2 a_2 i_2 i_2 ∧ p_array_swipe_left t_6 t_8 a_2 i_2 (i + i_2 - 1%Z) ∧ p_linked_n t_1 t_6 (t_6 (shift a_5 0%Z)) a_2 i_2 x_1 (Mk_addr 0%Z 0%Z) ∧ p_linked_n t_1 t_6 a_9 a_2 i_2 0%Z a_5 ∧ p_linked_n t_1 t_8 a_9 a_2 i_2 0%Z a_5 ∧ (∀(i_7 : Z), i_2 ≤ i_7 -> 2%Z + i_7 ≤ x -> ¬ t_6 (shift a_2 i_7) = a_5) ∧ (∀(i_7 : Z), i_2 ≤ i_7 -> 2%Z + i_7 ≤ x -> separated a_1 1%Z (t_6 (shift a_2 i_7)) 4%Z) ∧ (∀(i_7 : Z), i_2 ≤ i_7 -> 2%Z + i_7 ≤ x -> separated a_5 4%Z (t_6 (shift a_2 i_7)) 4%Z) ∧ (∀(i_7 : Z), i_2 ≤ i_7 -> 2%Z + i_7 ≤ x -> separated (t_6 (shift a_2 i_7)) 4%Z a_4 2147483646%Z) ∧ (∀(i_8 : Z) (i_7 : Z), ¬ i_8 = i_7 -> i_2 ≤ i_7 -> i_2 ≤ i_8 -> 2%Z + i_7 ≤ x -> 2%Z + i_8 ≤ x -> ¬ t_6 (shift a_2 i_8) = t_6 (shift a_2 i_7)) ∧ (∀(i_8 : Z) (i_7 : Z), ¬ i_8 = i_7 -> i_2 ≤ i_7 -> i_2 ≤ i_8 -> 2%Z + i_7 ≤ x -> 2%Z + i_8 ≤ x -> separated (t_6 (shift a_2 i_8)) 4%Z (t_6 (shift a_2 i_7)) 4%Z) else i_4 = i_1 ∧ i_4 = i_2 ∧ i_4 ≤ i_5 ∧ i_5 ≤ x_2 ∧ valid_rd t_1 a_10 1%Z ∧ p_unchanged t_1 t_8 t_2 t_1 t_8 t_2 a_2 i_4 i_5 ∧ p_linked_n t_1 t_8 a a_2 i_5 1%Z a_11 ∧ p_linked_n t_1 t_8 a_5 a_2 i_4 x_4 a ∧ p_linked_n t_1 t_8 a_11 a_2 x_5 (i + i_4 - 1%Z - i_5) (Mk_addr 0%Z 0%Z) ∧ (if decide (a_3 = a_11) then a_5 = a_12 ∧ fun_updt t_5 a_10 (t_5 a_13) = t_7 ∧ havoc t_3 t_8 (shift a_2 x_5) x_7 = t_5 ∧ 0%Z ≤ i_4 ∧ i_5 ≤ 2147483646%Z ∧ i_4 ≤ x_5 ∧ i_4 ≤ 2147483648%Z + i_5 ∧ i_5 ≤ 2147483647%Z + i_4 ∧ 2%Z + i_5 ≤ x_2 ∧ x_8 ≤ 2147483648%Z + i ∧ i ≤ 2147483647%Z + x_8 ∧ - 2147483647%Z ≤ to_sint32 (i - x_8) ∧ valid_rw t_1 a_10 1%Z ∧ valid_rw t_1 a_4 2147483646%Z ∧ separated a_12 4%Z a_4 2147483646%Z ∧ valid_rd t_1 a_13 1%Z ∧ p_array_swipe_left t_5 t_8 a_2 x_5 (i + i_4 - 1%Z) ∧ p_linked_n t_1 t_5 a_14 a_2 i_4 x_9 a_11 ∧ p_linked_n t_1 t_8 a_14 a_2 i_4 x_9 a_11 ∧ p_unchanged t_1 t_5 t_2 t_1 t_8 t_2 a_2 i_4 x_5 ∧ p_linked_n t_1 t_5 (t_5 (shift a_11 0%Z)) a_2 x_5 x_7 (Mk_addr 0%Z 0%Z) ∧ (i_5 ≤ i_4 ∨ a_15 = a ∧ valid_rd t_1 a_1 1%Z ∧ p_linked_n t_1 t_5 a_12 a_2 i_4 x_4 a_15 ∧ p_linked_n t_1 t_5 a_12 a_2 i_4 x_9 a_16 ∧ p_linked_n t_1 t_5 a_15 a_2 i_5 1%Z a_16) ∧ (∀(i_7 : Z), i_4 ≤ i_7 -> 2%Z + i_7 ≤ x_2 -> ¬ t_5 (shift a_2 i_7) = a_11) ∧ (∀(i_7 : Z), i_4 ≤ i_7 -> 2%Z + i_7 ≤ x_2 -> separated a_1 1%Z (t_5 (shift a_2 i_7)) 4%Z) ∧ (∀(i_7 : Z), i_4 ≤ i_7 -> i_7 < x_2 -> separated a_1 1%Z (t_8 (shift a_2 i_7)) 4%Z) ∧ (∀(i_7 : Z), i_4 ≤ i_7 -> 2%Z + i_7 ≤ x_2 -> separated a_11 4%Z (t_5 (shift a_2 i_7)) 4%Z) ∧ (∀(i_7 : Z), i_4 ≤ i_7 -> 2%Z + i_7 ≤ x_2 -> separated (t_5 (shift a_2 i_7)) 4%Z a_4 2147483646%Z) ∧ (∀(i_7 : Z), i_4 ≤ i_7 -> i_7 < x_2 -> separated (t_8 (shift a_2 i_7)) 4%Z a_4 2147483646%Z) ∧ (∀(i_8 : Z) (i_7 : Z), ¬ i_8 = i_7 -> i_4 ≤ i_7 -> i_4 ≤ i_8 -> 2%Z + i_7 ≤ x_2 -> 2%Z + i_8 ≤ x_2 -> ¬ t_5 (shift a_2 i_8) = t_5 (shift a_2 i_7)) ∧ (∀(i_8 : Z) (i_7 : Z), ¬ i_8 = i_7 -> i_4 ≤ i_7 -> i_4 ≤ i_8 -> i_7 < x_2 -> i_8 < x_2 -> ¬ t_8 (shift a_2 i_8) = t_8 (shift a_2 i_7)) ∧ (∀(i_8 : Z) (i_7 : Z), ¬ i_8 = i_7 -> i_4 ≤ i_7 -> i_4 ≤ i_8 -> 2%Z + i_7 ≤ x_2 -> 2%Z + i_8 ≤ x_2 -> separated (t_5 (shift a_2 i_8)) 4%Z (t_5 (shift a_2 i_7)) 4%Z) ∧ (∀(i_8 : Z) (i_7 : Z), ¬ i_8 = i_7 -> i_4 ≤ i_7 -> i_4 ≤ i_8 -> i_7 < x_2 -> i_8 < x_2 -> separated (t_8 (shift a_2 i_8)) 4%Z (t_8 (shift a_2 i_7)) 4%Z) else t_8 = t_7 ∧ a_11 = Mk_addr 0%Z 0%Z) ∧ (∀(i_7 : Z), i_4 ≤ i_7 -> i_7 ≤ i_5 -> ¬ a_3 = t_8 (shift a_2 i_7)) ∧ (∀(i_7 : Z), i_4 ≤ i_7 -> i_7 < i_5 -> separated a_3 4%Z (t_8 (shift a_2 i_7)) 4%Z))) -> (∀(i_7 : Z), i_2 ≤ i_7 -> i_7 < x -> separated a_1 1%Z (t_8 (shift a_2 i_7)) 4%Z) -> (∀(i_7 : Z), i_2 ≤ i_7 -> i_7 < x -> separated (t_8 (shift a_2 i_7)) 4%Z a_4 2147483646%Z) -> (∀(i_7 : Z), let a_17 : addr := t_8 (shift a_2 i_7) in ¬ a_3 = a_17 -> i_2 ≤ i_7 -> i_7 < x -> separated a_3 4%Z a_17 4%Z) -> (∀(i_8 : Z) (i_7 : Z), ¬ i_8 = i_7 -> i_2 ≤ i_7 -> i_2 ≤ i_8 -> i_7 < x -> i_8 < x -> ¬ t_8 (shift a_2 i_8) = t_8 (shift a_2 i_7)) -> (∀(i_8 : Z) (i_7 : Z), ¬ i_8 = i_7 -> i_2 ≤ i_7 -> i_2 ≤ i_8 -> i_7 < x -> i_8 < x -> separated (t_8 (shift a_2 i_8)) 4%Z (t_8 (shift a_2 i_7)) 4%Z) -> separated a_3 4%Z (t_7 (shift a_2 i_6)) 4%Z.
Admitted.
