



(* This file is generated by Why3's Coq driver *)
(* Beware! Only edit allowed sections below *)
Require Import BuiltIn.
Require BuiltIn.
Require int.Int.
Require int.Power.
Require bool.Bool.

Axiom us_private : Type.
Parameter us_private_WhyType : WhyType us_private.
Existing Instance us_private_WhyType.

(* Why3 assumption *)
Definition us_fixed := Numbers.BinNums.Z.

Parameter private__bool_eq: us_private -> us_private -> Init.Datatypes.bool.

Parameter us_null_ext__: us_private.

Axiom us_type_of_heap : Type.
Parameter us_type_of_heap_WhyType : WhyType us_type_of_heap.
Existing Instance us_type_of_heap_WhyType.

(* Why3 assumption *)
Inductive us_type_of_heap__ref :=
  | us_type_of_heap__ref'mk : us_type_of_heap -> us_type_of_heap__ref.
Axiom us_type_of_heap__ref_WhyType : WhyType us_type_of_heap__ref.
Existing Instance us_type_of_heap__ref_WhyType.

(* Why3 assumption *)
Definition us_type_of_heap__content (v:us_type_of_heap__ref) :
    us_type_of_heap :=
  match v with
  | us_type_of_heap__ref'mk x => x
  end.

Axiom us_image : Type.
Parameter us_image_WhyType : WhyType us_image.
Existing Instance us_image_WhyType.

(* Why3 assumption *)
Inductive int__ref :=
  | int__ref'mk : Numbers.BinNums.Z -> int__ref.
Axiom int__ref_WhyType : WhyType int__ref.
Existing Instance int__ref_WhyType.

(* Why3 assumption *)
Definition int__content (v:int__ref) : Numbers.BinNums.Z :=
  match v with
  | int__ref'mk x => x
  end.

(* Why3 assumption *)
Inductive bool__ref :=
  | bool__ref'mk : Init.Datatypes.bool -> bool__ref.
Axiom bool__ref_WhyType : WhyType bool__ref.
Existing Instance bool__ref_WhyType.

(* Why3 assumption *)
Definition bool__content (v:bool__ref) : Init.Datatypes.bool :=
  match v with
  | bool__ref'mk x => x
  end.

(* Why3 assumption *)
Inductive us_fixed__ref :=
  | us_fixed__ref'mk : Numbers.BinNums.Z -> us_fixed__ref.
Axiom us_fixed__ref_WhyType : WhyType us_fixed__ref.
Existing Instance us_fixed__ref_WhyType.

(* Why3 assumption *)
Definition us_fixed__content (v:us_fixed__ref) : Numbers.BinNums.Z :=
  match v with
  | us_fixed__ref'mk x => x
  end.

(* Why3 assumption *)
Inductive real__ref :=
  | real__ref'mk : Reals.Rdefinitions.R -> real__ref.
Axiom real__ref_WhyType : WhyType real__ref.
Existing Instance real__ref_WhyType.

(* Why3 assumption *)
Definition real__content (v:real__ref) : Reals.Rdefinitions.R :=
  match v with
  | real__ref'mk x => x
  end.

(* Why3 assumption *)
Inductive us_private__ref :=
  | us_private__ref'mk : us_private -> us_private__ref.
Axiom us_private__ref_WhyType : WhyType us_private__ref.
Existing Instance us_private__ref_WhyType.

(* Why3 assumption *)
Definition us_private__content (v:us_private__ref) : us_private :=
  match v with
  | us_private__ref'mk x => x
  end.

(* Why3 assumption *)
Definition int__ref___projection (a:int__ref) : Numbers.BinNums.Z :=
  int__content a.

(* Why3 assumption *)
Definition us_fixed__ref___projection (a:us_fixed__ref) : Numbers.BinNums.Z :=
  us_fixed__content a.

(* Why3 assumption *)
Definition bool__ref___projection (a:bool__ref) : Init.Datatypes.bool :=
  bool__content a.

(* Why3 assumption *)
Definition real__ref___projection (a:real__ref) : Reals.Rdefinitions.R :=
  real__content a.

(* Why3 assumption *)
Definition us_private__ref___projection (a:us_private__ref) : us_private :=
  us_private__content a.

Parameter bool_eq:
  Numbers.BinNums.Z -> Numbers.BinNums.Z -> Init.Datatypes.bool.

Parameter bool_ne:
  Numbers.BinNums.Z -> Numbers.BinNums.Z -> Init.Datatypes.bool.

Parameter bool_lt:
  Numbers.BinNums.Z -> Numbers.BinNums.Z -> Init.Datatypes.bool.

Parameter bool_le:
  Numbers.BinNums.Z -> Numbers.BinNums.Z -> Init.Datatypes.bool.

Parameter bool_gt:
  Numbers.BinNums.Z -> Numbers.BinNums.Z -> Init.Datatypes.bool.

Parameter bool_ge:
  Numbers.BinNums.Z -> Numbers.BinNums.Z -> Init.Datatypes.bool.

Axiom bool_eq_axiom :
  forall (x:Numbers.BinNums.Z), forall (y:Numbers.BinNums.Z),
  ((bool_eq x y) = Init.Datatypes.true) <-> (x = y).

Axiom bool_ne_axiom :
  forall (x:Numbers.BinNums.Z), forall (y:Numbers.BinNums.Z),
  ((bool_ne x y) = Init.Datatypes.true) <-> ~ (x = y).

Axiom bool_lt_axiom :
  forall (x:Numbers.BinNums.Z), forall (y:Numbers.BinNums.Z),
  ((bool_lt x y) = Init.Datatypes.true) <-> (x < y)%Z.

Axiom bool_int__le_axiom :
  forall (x:Numbers.BinNums.Z), forall (y:Numbers.BinNums.Z),
  ((bool_le x y) = Init.Datatypes.true) <-> (x <= y)%Z.

Axiom bool_gt_axiom :
  forall (x:Numbers.BinNums.Z), forall (y:Numbers.BinNums.Z),
  ((bool_gt x y) = Init.Datatypes.true) <-> (y < x)%Z.

Axiom bool_ge_axiom :
  forall (x:Numbers.BinNums.Z), forall (y:Numbers.BinNums.Z),
  ((bool_ge x y) = Init.Datatypes.true) <-> (y <= x)%Z.

Parameter length:
  Numbers.BinNums.Z -> Numbers.BinNums.Z -> Numbers.BinNums.Z.

Axiom length'def :
  forall (x:Numbers.BinNums.Z) (y:Numbers.BinNums.Z),
  ((x <= y)%Z -> ((length x y) = ((y - x)%Z + 1%Z)%Z)) /\ (* non escaped EOL for cpp parsing *)
  (~ (x <= y)%Z -> ((length x y) = 0%Z)).

Axiom natural : Type.
Parameter natural_WhyType : WhyType natural.
Existing Instance natural_WhyType.

Parameter natural'int: natural -> Numbers.BinNums.Z.

Axiom natural'axiom :
  forall (i:natural),
  (0%Z <= (natural'int i))%Z /\ ((natural'int i) <= 2147483647%Z)%Z.

(* Why3 assumption *)
Definition in_range (x:Numbers.BinNums.Z) : Prop :=
  (0%Z <= x)%Z /\ (x <= 2147483647%Z)%Z.

Parameter bool_eq1:
  Numbers.BinNums.Z -> Numbers.BinNums.Z -> Init.Datatypes.bool.

Axiom bool_eq'def :
  forall (x:Numbers.BinNums.Z) (y:Numbers.BinNums.Z),
  ((x = y) -> ((bool_eq1 x y) = Init.Datatypes.true)) /\ (* non escaped EOL for cpp parsing *)
  (~ (x = y) -> ((bool_eq1 x y) = Init.Datatypes.false)).

Parameter attr__ATTRIBUTE_IMAGE: Numbers.BinNums.Z -> us_image.

Parameter attr__ATTRIBUTE_VALUE__pre_check: us_image -> Prop.

Parameter attr__ATTRIBUTE_VALUE: us_image -> Numbers.BinNums.Z.

Parameter user_eq: natural -> natural -> Init.Datatypes.bool.

Parameter dummy: natural.

(* Why3 assumption *)
Inductive natural__ref :=
  | natural__ref'mk : natural -> natural__ref.
Axiom natural__ref_WhyType : WhyType natural__ref.
Existing Instance natural__ref_WhyType.

(* Why3 assumption *)
Definition natural__content (v:natural__ref) : natural :=
  match v with
  | natural__ref'mk x => x
  end.

(* Why3 assumption *)
Definition natural__ref_natural__content__projection (a:natural__ref) :
    natural :=
  natural__content a.

(* Why3 assumption *)
Definition dynamic_invariant (temp___expr_46:Numbers.BinNums.Z)
    (temp___is_init_42:Init.Datatypes.bool)
    (temp___skip_constant_43:Init.Datatypes.bool)
    (temp___do_toplevel_44:Init.Datatypes.bool)
    (temp___do_typ_inv_45:Init.Datatypes.bool) : Prop :=
  (temp___is_init_42 = Init.Datatypes.true) \/ (0%Z <= 2147483647%Z)%Z ->
  in_range temp___expr_46.

(* Why3 assumption *)
Definition us_rep := Numbers.BinNums.Z.

Parameter bool_eq2:
  Numbers.BinNums.Z -> Numbers.BinNums.Z -> Init.Datatypes.bool.

(* Why3 assumption *)
Definition big_integer := Numbers.BinNums.Z.

Parameter value__size: Numbers.BinNums.Z.

Parameter object__size: Numbers.BinNums.Z.

Parameter alignment: Numbers.BinNums.Z.

Axiom value__size_axiom : (0%Z <= value__size)%Z.

Axiom object__size_axiom : (0%Z <= object__size)%Z.

Axiom alignment_axiom : (0%Z <= alignment)%Z.

Parameter user_eq1:
  Numbers.BinNums.Z -> Numbers.BinNums.Z -> Init.Datatypes.bool.

Parameter dummy1: Numbers.BinNums.Z.

(* Why3 assumption *)
Inductive big_integer__ref :=
  | big_integer__ref'mk : Numbers.BinNums.Z -> big_integer__ref.
Axiom big_integer__ref_WhyType : WhyType big_integer__ref.
Existing Instance big_integer__ref_WhyType.

(* Why3 assumption *)
Definition big_integer__content (v:big_integer__ref) : Numbers.BinNums.Z :=
  match v with
  | big_integer__ref'mk x => x
  end.

(* Why3 assumption *)
Definition big_integer__ref_big_integer__content__projection
    (a:big_integer__ref) : Numbers.BinNums.Z :=
  big_integer__content a.

(* Why3 assumption *)
Definition valid_big_integer := Numbers.BinNums.Z.

(* Why3 assumption *)
Inductive valid_big_integer__ref :=
  | valid_big_integer__ref'mk : Numbers.BinNums.Z -> valid_big_integer__ref.
Axiom valid_big_integer__ref_WhyType : WhyType valid_big_integer__ref.
Existing Instance valid_big_integer__ref_WhyType.

(* Why3 assumption *)
Definition valid_big_integer__content (v:valid_big_integer__ref) :
    Numbers.BinNums.Z :=
  match v with
  | valid_big_integer__ref'mk x => x
  end.

(* Why3 assumption *)
Definition valid_big_integer__ref_valid_big_integer__content__projection
    (a:valid_big_integer__ref) : Numbers.BinNums.Z :=
  valid_big_integer__content a.

Parameter val1: Numbers.BinNums.Z.

Parameter attr__ATTRIBUTE_ADDRESS: Numbers.BinNums.Z.

Parameter val2: Numbers.BinNums.Z.

Parameter attr__ATTRIBUTE_ADDRESS1: Numbers.BinNums.Z.

Parameter exp: Numbers.BinNums.Z.

Parameter attr__ATTRIBUTE_ADDRESS2: Numbers.BinNums.Z.

Axiom nat : Type.
Parameter nat_WhyType : WhyType nat.
Existing Instance nat_WhyType.

Parameter nat'int: nat -> Numbers.BinNums.Z.

Axiom nat'axiom :
  forall (i:nat),
  (0%Z <= (nat'int i))%Z /\ ((nat'int i) <= 9223372036854775807%Z)%Z.

(* Why3 assumption *)
Definition in_range1 (x:Numbers.BinNums.Z) : Prop :=
  (0%Z <= x)%Z /\ (x <= 9223372036854775807%Z)%Z.

Parameter bool_eq3:
  Numbers.BinNums.Z -> Numbers.BinNums.Z -> Init.Datatypes.bool.

Axiom bool_eq'def1 :
  forall (x:Numbers.BinNums.Z) (y:Numbers.BinNums.Z),
  ((x = y) -> ((bool_eq3 x y) = Init.Datatypes.true)) /\ (* non escaped EOL for cpp parsing *)
  (~ (x = y) -> ((bool_eq3 x y) = Init.Datatypes.false)).

Parameter attr__ATTRIBUTE_IMAGE1: Numbers.BinNums.Z -> us_image.

Parameter attr__ATTRIBUTE_VALUE__pre_check1: us_image -> Prop.

Parameter attr__ATTRIBUTE_VALUE1: us_image -> Numbers.BinNums.Z.

Parameter user_eq2: nat -> nat -> Init.Datatypes.bool.

Parameter dummy2: nat.

(* Why3 assumption *)
Inductive nat__ref :=
  | nat__ref'mk : nat -> nat__ref.
Axiom nat__ref_WhyType : WhyType nat__ref.
Existing Instance nat__ref_WhyType.

(* Why3 assumption *)
Definition nat__content (v:nat__ref) : nat :=
  match v with
  | nat__ref'mk x => x
  end.

(* Why3 assumption *)
Definition nat__ref_nat__content__projection (a:nat__ref) : nat :=
  nat__content a.

(* Why3 assumption *)
Definition dynamic_invariant1 (temp___expr_166:Numbers.BinNums.Z)
    (temp___is_init_162:Init.Datatypes.bool)
    (temp___skip_constant_163:Init.Datatypes.bool)
    (temp___do_toplevel_164:Init.Datatypes.bool)
    (temp___do_typ_inv_165:Init.Datatypes.bool) : Prop :=
  (temp___is_init_162 = Init.Datatypes.true) \/
  (0%Z <= 9223372036854775807%Z)%Z -> in_range1 temp___expr_166.

(* Why3 assumption *)
Definition dynamic_invariant2 (temp___expr_188:Numbers.BinNums.Z)
    (temp___is_init_184:Init.Datatypes.bool)
    (temp___skip_constant_185:Init.Datatypes.bool)
    (temp___do_toplevel_186:Init.Datatypes.bool)
    (temp___do_typ_inv_187:Init.Datatypes.bool) : Prop :=
  True.

(* Why3 assumption *)
Definition dynamic_predicate (temp___192:Numbers.BinNums.Z) : Prop := True.

(* Why3 goal *)
Theorem def'vc :
  dynamic_invariant1 val1 Init.Datatypes.true Init.Datatypes.false
  Init.Datatypes.true Init.Datatypes.true ->
  dynamic_invariant1 val2 Init.Datatypes.true Init.Datatypes.false
  Init.Datatypes.true Init.Datatypes.true ->
  dynamic_invariant exp Init.Datatypes.true Init.Datatypes.false
  Init.Datatypes.true Init.Datatypes.true -> (val1 <= val2)%Z ->
  ((bool_le (int.Power.power val1 exp) (int.Power.power val2 exp)) =
   Init.Datatypes.true).
Proof.

unfold in_range, in_range1.
intros.

(* apply theorem about monotonicity of power *)
apply Z.pow_le_mono_l.

(* remaining goals can be proved automatically *)
intuition.
Qed.

