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 contiki_list.Compound.Compound.
Require Import contiki_list.S1_list.S1_list.
Require Import contiki_list.A_Index_of_item.A_Index_of_item.
Require Import Why3.Cint.Cint.
Require Import contiki_list.Axiomatic.Axiomatic.
Require Import contiki_list.Axiomatic1.Axiomatic1.
Open Scope Z_scope.
Theorem goal40 (i_1 : Z) (i_2 : Z) (t_3 : addr -> addr) (a_6 : addr) (a_7 : addr) (a_4 : addr) (a : addr) (t_2 : addr -> addr) (a_1 : addr) (i : Z) (i_3 : Z) (a_5 : addr) (t_4 : addr -> addr) (a_2 : addr) (a_3 : addr) (t : Z -> Z) (t_1 : addr -> R) (p : bool) (p_1 : bool) (p_2 : bool) (p_3 : bool) (p_4 : bool) (p_5 : bool) (t_5 : addr -> addr) : let x : Z := i_1 + i_2 in let x_1 : Z := l_index_of t_3 a_6 a_7 i_2 x in let a_8 : addr := shift a_6 0%Z in let a_9 : addr := shift a_7 0%Z in let a_10 : addr := shift a_7 i_2 in let a_11 : addr := t_3 a_4 in let m : addr -> addr := fun_updt t_3 a_4 a in let a_12 : addr -> addr := havoc t_2 (fun_updt m (shift (t_3 (shift a_7 (x_1 - 1%Z))) 0%Z) a_1) (shift a_7 x_1) (i_1 + i_2 - x_1) in let a_13 : addr := a_12 a_4 in let x_2 : Z := 1%Z + i in let a_14 : addr := t_3 (shift a_7 i_3) in let x_3 : Z := l_index_of t_3 a_14 a_7 i_2 x in let a_15 : addr -> addr := fun_updt a_12 a_8 (Mk_addr 0%Z 0%Z) in let x_4 : Z := i + i_2 in let a_16 : addr := shift a_7 x_4 in let a_17 : addr := shift a_5 0%Z in let m_1 : addr -> addr := fun_updt (fun_updt t_4 a_16 a_2) a_17 a_3 in let a_18 : addr := m_1 a_16 in let x_5 : Z := i + i_2 - 1%Z in let a_19 : addr := shift a_7 x_5 in let a_20 : addr := t_4 a_19 in let a_21 : addr := shift a_18 0%Z in let a_22 : addr := t_4 a_21 in let x_6 : Z := l_index_of t_3 a_18 a_7 i_2 x in let a_23 : addr := t_4 a_4 in let a_24 : addr := m_1 a_4 in let a_25 : addr := shift a_7 (i_1 + i_2 - 1%Z) in ¬ Mk_addr 0%Z 0%Z = a_6 -> 0%Z < i_1 -> 0%Z ≤ i_2 -> region (base a_4) ≤ 0%Z -> region (base a_6) ≤ 0%Z -> region (base a_7) ≤ 0%Z -> i_2 ≤ x_1 -> x_1 ≤ x -> i_1 ≤ 2147483645%Z -> i_2 ≤ 2147483645%Z -> - 2147483648%Z ≤ x -> x ≤ 2147483645%Z -> x ≤ 2147483647%Z -> framed t_3 -> linked t -> is_sint32 i -> is_sint32 i_1 -> is_sint32 i_2 -> valid_rd t a_4 1%Z -> valid_rw t a_4 1%Z -> valid_rw t a_6 4%Z -> separated a_4 1%Z a_6 4%Z -> valid_rw t a_8 1%Z -> valid_rw t a_9 2147483646%Z -> valid_rw t a_10 i_1 -> separated a_4 1%Z a_9 2147483646%Z -> separated a_6 4%Z a_9 2147483646%Z -> separated a_11 4%Z a_9 2147483646%Z -> p_linked_n t t_3 a_11 a_7 i_2 i_1 (Mk_addr 0%Z 0%Z) -> is_sint32 x_1 -> separated a_13 4%Z a_9 2147483646%Z -> eqs1_list (load_s1_list a_6 t_1 a_12) (load_s1_list a_6 t_1 t_3) -> p_linked_n t a_12 a_13 a_7 i_2 i_1 (Mk_addr 0%Z 0%Z) -> p_unchanged t a_12 t_1 t t_3 t_1 a_7 i_2 x -> (if decide (x = x_1) then i_1 = i else x_2 = i_1 ∧ - 2147483648%Z ≤ i) -> (if decide (i_1 = i) then p = true ∧ p_1 = true ∧ p_2 = true ∧ p_3 = true ∧ p_4 = true ∧ p_5 = true ∧ x = x_1 ∧ (∀(i_4 : Z), i_2 ≤ i_4 -> i_4 < x -> is_sint32 i_4 -> ¬ t_3 (shift a_7 i_4) = a_6) else p = true ∧ p_1 = true ∧ p_2 = true ∧ p_3 = true ∧ p_4 = true ∧ p_5 = true ∧ a_14 = a_6 ∧ i_2 ≤ i_3 ∧ i_3 < x ∧ i_2 ≤ x_3 ∧ x_3 < x) -> (if decide (a_15 a_4 = Mk_addr 0%Z 0%Z) then p = true ∧ p_1 = true ∧ p_2 = true ∧ p_3 = true ∧ p_4 = true ∧ p_5 = true ∧ fun_updt (fun_updt a_15 a_4 a_6) a_10 a_6 = t_5 ∧ valid_rw t a_10 1%Z else p = true ∧ p_1 = true ∧ p_2 = true ∧ p_3 = true ∧ p_4 = true ∧ p_5 = true ∧ m_1 = t_5 ∧ a_18 = a_6 ∧ m_1 a_19 = a_20 ∧ a_22 = Mk_addr 0%Z 0%Z ∧ fun_updt (havoc t_2 (fun_updt m (shift (t_3 (shift a_7 (x_6 - 1%Z))) 0%Z) a_1) (shift a_7 x_6) (i_1 + i_2 - x_6)) a_21 a_22 = t_4 ∧ 0%Z < x_4 ∧ x_4 ≤ 2147483645%Z ∧ valid_rw t a_5 4%Z ∧ separated a_4 1%Z a_5 4%Z ∧ separated a_23 4%Z a_9 2147483646%Z ∧ p_linked_n t t_4 a_23 a_7 i_2 (i - 1%Z) a_5 ∧ p_linked_n t t_4 a_5 a_7 x_5 1%Z (t_4 a_17) ∧ valid_rw t a_18 4%Z ∧ separated a_4 1%Z a_18 4%Z ∧ separated a_5 4%Z a_18 4%Z ∧ separated a_24 4%Z a_9 2147483646%Z ∧ separated a_18 4%Z a_9 2147483646%Z ∧ p_unchanged t m_1 t_1 t t_4 t_1 a_7 i_2 x_5 ∧ p_linked_n t t_4 a_23 a_7 i_2 i a_22 ∧ p_linked_n t m_1 a_24 a_7 i_2 x_2 a_22 ∧ (¬ a_22 = a_23 -> a_20 = a_5) ∧ (a_22 = a_23 -> a_22 = a_5) ∧ (¬ a_22 = a_23 -> ¬ a_22 = a_5) ∧ (∀(i_4 : Z), i_2 ≤ i_4 -> i_4 < x_4 -> separated a_4 1%Z (t_4 (shift a_7 i_4)) 4%Z) ∧ (∀(i_4 : Z), i_2 ≤ i_4 -> i_4 < x_4 -> separated (t_4 (shift a_7 i_4)) 4%Z a_9 2147483646%Z) ∧ (∀(i_5 : Z) (i_4 : Z), ¬ i_5 = i_4 -> i_2 ≤ i_4 -> i_2 ≤ i_5 -> i_4 < x_4 -> i_5 < x_4 -> ¬ t_4 (shift a_7 i_5) = t_4 (shift a_7 i_4)) ∧ (∀(i_4 : Z), i_2 ≤ i_4 -> i_4 ≤ x_4 -> separated a_4 1%Z (m_1 (shift a_7 i_4)) 4%Z) ∧ (∀(i_4 : Z), i_2 ≤ i_4 -> i_4 ≤ x_4 -> separated (m_1 (shift a_7 i_4)) 4%Z a_9 2147483646%Z) ∧ (∀(i_4 : Z), i_2 ≤ i_4 -> i_4 < x_4 -> separated a_18 4%Z (t_4 (shift a_7 i_4)) 4%Z) ∧ (∀(i_5 : Z) (i_4 : Z), ¬ i_5 = i_4 -> i_2 ≤ i_4 -> i_2 ≤ i_5 -> i_4 < x_4 -> i_5 < x_4 -> separated (t_4 (shift a_7 i_5)) 4%Z (t_4 (shift a_7 i_4)) 4%Z) ∧ (∀(i_5 : Z) (i_4 : Z), ¬ i_5 = i_4 -> i_2 ≤ i_4 -> i_2 ≤ i_5 -> i_4 ≤ x_4 -> i_5 ≤ x_4 -> ¬ m_1 (shift a_7 i_5) = m_1 (shift a_7 i_4)) ∧ (∀(i_5 : Z) (i_4 : Z), ¬ i_5 = i_4 -> i_2 ≤ i_4 -> i_2 ≤ i_5 -> i_4 ≤ x_4 -> i_5 ≤ x_4 -> separated (m_1 (shift a_7 i_5)) 4%Z (m_1 (shift a_7 i_4)) 4%Z)) -> (∀(i_4 : Z), i_2 ≤ i_4 -> i_4 < x -> ¬ t_3 (shift a_7 i_4) = a_6) -> (∀(i_4 : Z), i_2 ≤ i_4 -> i_4 < x -> separated a_4 1%Z (t_3 (shift a_7 i_4)) 4%Z) -> (∀(i_4 : Z), i_2 ≤ i_4 -> i_4 < x -> separated (t_3 (shift a_7 i_4)) 4%Z a_9 2147483646%Z) -> (∀(i_4 : Z), let a_26 : addr := t_3 (shift a_7 i_4) in ¬ a_26 = a_6 -> i_2 ≤ i_4 -> i_4 < x -> separated a_6 4%Z a_26 4%Z) -> (∀(i_5 : Z) (i_4 : Z), ¬ i_5 = i_4 -> i_2 ≤ i_4 -> i_2 ≤ i_5 -> i_4 < x -> i_5 < x -> ¬ t_3 (shift a_7 i_5) = t_3 (shift a_7 i_4)) -> (∀(i_5 : Z) (i_4 : Z), ¬ i_5 = i_4 -> i_2 ≤ i_4 -> i_2 ≤ i_5 -> i_4 < x -> i_5 < x -> separated (t_3 (shift a_7 i_5)) 4%Z (t_3 (shift a_7 i_4)) 4%Z) -> (∀(i_4 : Z), i_2 ≤ i_4 -> i_4 < x -> ¬ a_12 (shift a_7 i_4) = a_6) -> (∀(i_4 : Z), i_2 ≤ i_4 -> i_4 < x -> separated a_4 1%Z (a_12 (shift a_7 i_4)) 4%Z) -> (∀(i_4 : Z), i_2 ≤ i_4 -> i_4 < x -> separated a_6 4%Z (a_12 (shift a_7 i_4)) 4%Z) -> (∀(i_4 : Z), i_2 ≤ i_4 -> i_4 < x -> separated (a_12 (shift a_7 i_4)) 4%Z a_9 2147483646%Z) -> (∀(i_5 : Z) (i_4 : Z), ¬ i_5 = i_4 -> i_2 ≤ i_4 -> i_2 ≤ i_5 -> i_4 < x -> i_5 < x -> ¬ a_12 (shift a_7 i_5) = a_12 (shift a_7 i_4)) -> (∀(i_5 : Z) (i_4 : Z), ¬ i_5 = i_4 -> i_2 ≤ i_4 -> i_2 ≤ i_5 -> i_4 < x -> i_5 < x -> separated (a_12 (shift a_7 i_5)) 4%Z (a_12 (shift a_7 i_4)) 4%Z) -> t_5 a_25 = t_3 a_25.
Admitted.
