(* This file is generated by Why3's Coq driver *)
(* Beware! Only edit allowed sections below    *)
Require Import BuiltIn.
Require Reals.R_sqrt.
Require BuiltIn.
Require HighOrd.
Require int.Int.
Require int.Abs.
Require int.EuclideanDivision.
Require real.Real.
Require real.FromInt.
Require real.Square.
Require map.Map.

Parameter infix_eqeq: forall {a:Type} {a_WT:WhyType a}, a -> a -> Prop.

Axiom infix_eqeq_spec :
  forall {a:Type} {a_WT:WhyType a},
  forall (a1:a) (b:a), (infix_eqeq a1 b) -> (a1 = b).

Axiom infix_eqeq_spec1 :
  forall {a:Type} {a_WT:WhyType a},
  forall (a1:a) (b:a), (a1 = b) -> infix_eqeq a1 b.

Axiom assert_equal : True.

Axiom goal_comm :
  forall {a:Type} {a_WT:WhyType a},
  forall (a1:a) (b:a), (a1 = b) -> (b = a1).

Axiom t : Type.
Parameter t_WhyType : WhyType t.
Existing Instance t_WhyType.

Parameter teq: t -> t -> Prop.

Axiom teq_def : forall (x:t) (y:t), (teq x y) -> infix_eqeq x y.

Axiom teq_def1 : forall (x:t) (y:t), (infix_eqeq x y) -> teq x y.

Axiom teq_spec : forall (x:t) (y:t), (teq x y) -> (x = y).

Axiom teq_spec1 : forall (x:t) (y:t), (x = y) -> teq x y.

Parameter tzero: t.

Parameter tone: t.

Parameter prefix_mndt: t -> t.

Parameter infix_pldt: t -> t -> t.

Parameter infix_asdt: t -> t -> t.

Parameter inv: t -> t.

Axiom Assoc :
  forall (x:t) (y:t) (z:t),
  ((infix_pldt (infix_pldt x y) z) = (infix_pldt x (infix_pldt y z))).

Axiom Unit_def_l : forall (x:t), ((infix_pldt tzero x) = x).

Axiom Unit_def_r : forall (x:t), ((infix_pldt x tzero) = x).

Axiom Inv_def_l : forall (x:t), ((infix_pldt (prefix_mndt x) x) = tzero).

Axiom Inv_def_r : forall (x:t), ((infix_pldt x (prefix_mndt x)) = tzero).

Axiom Comm : forall (x:t) (y:t), ((infix_pldt x y) = (infix_pldt y x)).

Axiom Assoc1 :
  forall (x:t) (y:t) (z:t),
  ((infix_asdt (infix_asdt x y) z) = (infix_asdt x (infix_asdt y z))).

Axiom Mul_distr_l :
  forall (x:t) (y:t) (z:t),
  ((infix_asdt x (infix_pldt y z)) =
   (infix_pldt (infix_asdt x y) (infix_asdt x z))).

Axiom Mul_distr_r :
  forall (x:t) (y:t) (z:t),
  ((infix_asdt (infix_pldt y z) x) =
   (infix_pldt (infix_asdt y x) (infix_asdt z x))).

Axiom Comm1 : forall (x:t) (y:t), ((infix_asdt x y) = (infix_asdt y x)).

Axiom Unitary : forall (x:t), ((infix_asdt tone x) = x).

Axiom NonTrivialRing : ~ (tzero = tone).

Axiom Inverse :
  forall (x:t), ~ (x = tzero) -> ((infix_asdt x (inv x)) = tone).

Parameter infix_mn: t -> t -> t.

Axiom infix_mn_def :
  forall (x:t) (y:t), ((infix_mn x y) = (infix_pldt x (prefix_mndt y))).

Parameter infix_sl: t -> t -> t.

Axiom infix_sl_def :
  forall (x:t) (y:t), ((infix_sl x y) = (infix_asdt x (inv y))).

Axiom add_div :
  forall (x:t) (y:t) (z:t), ~ (z = tzero) ->
  ((infix_sl (infix_pldt x y) z) =
   (infix_pldt (infix_sl x z) (infix_sl y z))).

Axiom sub_div :
  forall (x:t) (y:t) (z:t), ~ (z = tzero) ->
  ((infix_sl (infix_mn x y) z) = (infix_mn (infix_sl x z) (infix_sl y z))).

Axiom neg_div :
  forall (x:t) (y:t), ~ (y = tzero) ->
  ((infix_sl (prefix_mndt x) y) = (prefix_mndt (infix_sl x y))).

Axiom assoc_mul_div :
  forall (x:t) (y:t) (z:t), ~ (z = tzero) ->
  ((infix_sl (infix_asdt x y) z) = (infix_asdt x (infix_sl y z))).

Axiom assoc_div_mul :
  forall (x:t) (y:t) (z:t), (~ (y = tzero) /\ ~ (z = tzero)) ->
  ((infix_sl (infix_sl x y) z) = (infix_sl x (infix_asdt y z))).

Axiom assoc_div_div :
  forall (x:t) (y:t) (z:t), (~ (y = tzero) /\ ~ (z = tzero)) ->
  ((infix_sl x (infix_sl y z)) = (infix_sl (infix_asdt x z) y)).

Parameter infix_mndt: t -> t -> t.

Axiom infix_mndt_def :
  forall (x:t) (y:t), ((infix_mndt x y) = (infix_pldt x (prefix_mndt y))).

Parameter infix_sldt: t -> t -> t.

Axiom infix_sldt_def :
  forall (x:t) (y:t), ~ (y = tzero) ->
  ((infix_sldt x y) = (infix_asdt x (inv y))).

Axiom infix_sldt_spec :
  forall (x:t) (y:t), ~ (y = tzero) ->
  ((infix_sldt x y) = (infix_asdt x (inv y))).

Parameter infix_slas: R -> R -> R.

Axiom infix_slas_def :
  forall (x:R) (y:R), ~ (y = 0%R) -> ((infix_slas x y) = (x / y)%R).

Parameter infix_eqas: R -> R -> Prop.

Axiom infix_eqas_def :
  forall (x:R) (y:R), (infix_eqas x y) -> infix_eqeq x y.

Axiom infix_eqas_def1 :
  forall (x:R) (y:R), (infix_eqeq x y) -> infix_eqas x y.

Axiom infix_eqas_spec : forall (x:R) (y:R), (infix_eqas x y) -> (x = y).

Axiom infix_eqas_spec1 : forall (x:R) (y:R), (x = y) -> infix_eqas x y.

Parameter infix_lsgtas: R -> R -> Prop.

Axiom infix_lsgtas_def :
  forall (x:R) (y:R), (infix_lsgtas x y) -> ~ (infix_eqeq x y).

Axiom infix_lsgtas_def1 :
  forall (x:R) (y:R), ~ (infix_eqeq x y) -> infix_lsgtas x y.

Axiom infix_lsgtas_spec :
  forall (x:R) (y:R), (infix_lsgtas x y) -> ~ (x = y).

Axiom infix_lsgtas_spec1 : forall (x:R) (y:R), ~ (x = y) -> infix_lsgtas x y.

Parameter infix_plas: R -> R -> R.

Axiom infix_plas_def : forall (x:R) (y:R), ((infix_plas x y) = (x + y)%R).

Parameter infix_mnas: R -> R -> R.

Axiom infix_mnas_def :
  forall (x:R) (y:R), ((infix_mnas x y) = (x + (-y)%R)%R).

Parameter infix_asas: R -> R -> R.

Axiom infix_asas_def : forall (x:R) (y:R), ((infix_asas x y) = (x * y)%R).

Parameter infix_lseqas: R -> R -> Prop.

Axiom infix_lseqas_def :
  forall (x:R) (y:R), (infix_lseqas x y) -> (x <= y)%R.

Axiom infix_lseqas_def1 : forall (x:R) (y:R), (x <= y)%R -> infix_lseqas x y.

Parameter prefix_mnas: R -> R.

Axiom prefix_mnas_def : forall (y:R), ((prefix_mnas y) = (-y)%R).

Parameter infix_lsas: R -> R -> Prop.

Axiom infix_lsas_def :
  forall (x:R) (y:R), (infix_lsas x y) -> infix_lseqas x y.

Axiom infix_lsas_def1 :
  forall (x:R) (y:R), (infix_lsas x y) -> infix_lsgtas x y.

Axiom infix_lsas_def2 :
  forall (x:R) (y:R), ((infix_lseqas x y) /\ (infix_lsgtas x y)) ->
  infix_lsas x y.

Parameter infix_gtas: R -> R -> Prop.

Axiom infix_gtas_def :
  forall (x:R) (y:R), (infix_gtas x y) -> infix_lsas y x.

Axiom infix_gtas_def1 :
  forall (x:R) (y:R), (infix_lsas y x) -> infix_gtas x y.

Parameter infix_gteqas: R -> R -> Prop.

Axiom infix_gteqas_def :
  forall (x:R) (y:R), (infix_gteqas x y) -> infix_lseqas y x.

Axiom infix_gteqas_def1 :
  forall (x:R) (y:R), (infix_lseqas y x) -> infix_gteqas x y.

Parameter from_int: Z -> R.

Axiom from_int_spec : forall (x:Z), ((from_int x) = (BuiltIn.IZR x)).

Axiom Zero : ((from_int 0%Z) = 0%R).

Axiom Add :
  forall (x:Z) (y:Z),
  ((from_int (x + y)%Z) = (infix_plas (from_int x) (from_int y))).

Axiom One : ((from_int 1%Z) = 1%R).

Axiom Sub :
  forall (x:Z) (y:Z),
  ((from_int (x - y)%Z) = (infix_mnas (from_int x) (from_int y))).

Axiom mul_pos :
  forall (x:Z) (y:Z), (0%Z <= y)%Z ->
  ((from_int (x * y)%Z) = (infix_asas (from_int x) (from_int y))).

Axiom mul :
  forall (x:Z) (y:Z), (0%Z <= y)%Z ->
  ((from_int (x * y)%Z) = (infix_asas (from_int x) (from_int y))).

Axiom mul_rev :
  forall (x:Z) (y:Z), (0%Z <= y)%Z ->
  ((infix_asas (from_int x) (from_int y)) = (from_int (x * y)%Z)).

Axiom neg : forall (x:Z), ((from_int (-x)%Z) = (prefix_mnas (from_int x))).

Axiom injective :
  forall (x:Z) (y:Z), ((from_int x) = (from_int y)) -> (x = y).

Axiom Monotonic :
  forall (x:Z) (y:Z), (x <= y)%Z -> infix_lseqas (from_int x) (from_int y).

Axiom positive_inv :
  forall (x:R), (infix_lsas 0%R x) -> infix_lsas 0%R (infix_slas 1%R x).

Axiom r_zeroLessOne : infix_lseqas 0%R 1%R.

Axiom r_compatOrderAdd :
  forall (x:R) (y:R) (z:R), (infix_lseqas x y) ->
  infix_lseqas (infix_plas x z) (infix_plas y z).

Axiom r_compatOrderMult :
  forall (x:R) (y:R) (z:R), (infix_lseqas x y) -> (infix_lseqas 0%R z) ->
  infix_lseqas (infix_asas x z) (infix_asas y z).

Axiom inv_order :
  forall (a:R) (b:R), (infix_lsas 0%R a) -> (infix_lsas 0%R b) ->
  (infix_lseqas a b) -> infix_lseqas (1%R / b)%R (1%R / a)%R.

Axiom inv_strict_order :
  forall (a:R) (b:R), (infix_lsas 0%R a) -> (infix_lsas 0%R b) ->
  (infix_lsas a b) -> infix_lsas (1%R / b)%R (1%R / a)%R.

Axiom invol_neg : forall (a:t), ((prefix_mndt (prefix_mndt a)) = a).

Axiom injective_neg :
  forall (a:t) (b:t), ((prefix_mndt a) = (prefix_mndt b)) -> (a = b).

Axiom find_opposite :
  forall (a:t) (b:t), ((infix_mndt a b) = tzero) -> (a = b).

Axiom add_opposite : forall (a:t), ((infix_pldt a (prefix_mndt a)) = tzero).

Axiom opposite : forall (a:t), ((infix_mndt a a) = tzero).

Axiom mult_num :
  forall (a:t) (b:t) (c:t), ~ (c = tzero) ->
  ((infix_sldt (infix_asdt a b) c) = (infix_asdt a (infix_sldt b c))).

Axiom div_as_mult_inv :
  forall (a:t) (b:t), ~ (b = tzero) ->
  ((infix_sldt a b) = (infix_asdt a (infix_sldt tone b))).

Axiom div_rev :
  forall (a:t) (b:t), ~ (b = tzero) ->
  ((infix_asdt a (infix_sldt tone b)) = (infix_sldt a b)).

Axiom mult_div_num :
  forall (a:t) (b:t) (c:t), ~ (c = tzero) ->
  ((infix_asdt (infix_sldt a c) b) = (infix_sldt (infix_asdt a b) c)).

Axiom mult_denom :
  forall (a:t) (b:t) (c:t), ~ (c = tzero) -> ~ (b = tzero) ->
  ((infix_sldt a (infix_asdt b c)) =
   (infix_asdt (infix_sldt a b) (infix_sldt tone c))).

Axiom mult_simpl :
  forall (a:t) (b:t) (c:t), ~ (c = tzero) -> ~ (b = tzero) ->
  ((infix_sldt (infix_asdt a b) (infix_asdt c b)) = (infix_sldt a c)).

Axiom dic_simpl :
  forall (a:t) (b:t) (c:t), ~ (c = tzero) -> ~ (b = tzero) ->
  ((infix_asdt (infix_sldt a (infix_asdt c b)) b) = (infix_sldt a c)).

Axiom simpl_with_tone :
  forall (a:t) (b:t), ~ (a = tzero) -> ~ (b = tzero) ->
  ((infix_asdt (infix_sldt a b) (infix_sldt tone a)) = (infix_sldt tone b)).

Axiom add_op :
  forall (a1:t) (a2:t), (a1 = (prefix_mndt a2)) ->
  ((infix_pldt a1 a2) = tzero).

Axiom mult_eq_t :
  forall (a1:t) (a2:t) (b1:t) (b2:t), (a1 = a2) -> (b1 = b2) ->
  ((infix_asdt a1 b1) = (infix_asdt a2 b2)).

Axiom mult_eq_t_rev :
  forall (a1:t) (a2:t) (b1:t) (b2:t), (a1 = a2) -> (b1 = b2) ->
  ((infix_asdt a1 b1) = (infix_asdt b2 a2)).

Axiom mult_comm : forall (a:t) (b:t), ((infix_asdt a b) = (infix_asdt b a)).

Axiom mult_assoc :
  forall (a:t) (b:t) (c:t),
  ((infix_asdt (infix_asdt a b) c) = (infix_asdt a (infix_asdt b c))).

Axiom mult_abc_to_acb :
  forall (a:t) (b:t) (c:t),
  ((infix_asdt (infix_asdt a b) c) = (infix_asdt (infix_asdt a c) b)).

Axiom zero_mult_t :
  forall (a1:t) (a2:t), (a1 = tzero) -> ((infix_asdt a1 a2) = tzero).

Axiom mult_zero_t :
  forall (a1:t) (a2:t), (a1 = tzero) -> ((infix_asdt a2 a1) = tzero).

Axiom mult_one_t :
  forall (a1:t) (a2:t), (a2 = tone) -> ((infix_asdt a1 a2) = a1).

Axiom add_eq_t :
  forall (a1:t) (a2:t) (b1:t) (b2:t), (a1 = a2) -> (b1 = b2) ->
  ((infix_pldt a1 b1) = (infix_pldt a2 b2)).

Axiom add_eq_t_rev :
  forall (a1:t) (a2:t) (b1:t) (b2:t), (a1 = a2) -> (b1 = b2) ->
  ((infix_pldt a1 b1) = (infix_pldt b2 a2)).

Axiom substr_eq_t :
  forall (a1:t) (a2:t) (b1:t) (b2:t), (a1 = a2) -> (b1 = b2) ->
  ((infix_mndt a1 b1) = (infix_mndt a2 b2)).

Parameter im: t.

Axiom im_Def : ((infix_asdt im im) = (prefix_mndt tone)).

Parameter ttwo: t.

Axiom ttwo_def : (ttwo = (infix_pldt tone tone)).

Parameter r_to_t: R -> t.

Axiom r_to_t_zero : ((r_to_t 0%R) = tzero).

Axiom r_to_t_one : ((r_to_t 1%R) = tone).

Axiom r_to_t_add :
  forall (i:R) (j:R),
  ((infix_pldt (r_to_t i) (r_to_t j)) = (r_to_t (infix_plas i j))).

Axiom r_to_t_add_rev :
  forall (i:R) (j:R),
  ((r_to_t (infix_plas i j)) = (infix_pldt (r_to_t i) (r_to_t j))).

Axiom r_to_t_opp :
  forall (i:R), ((r_to_t (prefix_mnas i)) = (prefix_mndt (r_to_t i))).

Axiom r_to_t_div :
  forall (i:R) (j:R), ~ (j = 0%R) ->
  ((r_to_t (infix_slas i j)) = (infix_sldt (r_to_t i) (r_to_t j))).

Axiom r_to_t_mult :
  forall (i:R) (j:R),
  ((infix_asdt (r_to_t i) (r_to_t j)) = (r_to_t (infix_asas i j))).

Axiom r_to_t_mult_rev :
  forall (i:R) (j:R),
  ((r_to_t (infix_asas i j)) = (infix_asdt (r_to_t i) (r_to_t j))).

Axiom r_to_t_sub :
  forall (i:R) (j:R),
  ((infix_mndt (r_to_t i) (r_to_t j)) = (r_to_t (infix_mnas i j))).

Parameter real_part: t -> R.

Parameter im_part: t -> R.

Axiom Real_part_add :
  forall (i:t) (j:t),
  ((real_part (infix_pldt i j)) = (infix_plas (real_part i) (real_part j))).

Axiom Im_part_add :
  forall (i:t) (j:t),
  ((im_part (infix_pldt i j)) = (infix_plas (im_part i) (im_part j))).

Axiom Real_part_opposite :
  forall (i:t), ((real_part (prefix_mndt i)) = (prefix_mnas (real_part i))).

Axiom Im_part_opposite :
  forall (i:t), ((im_part (prefix_mndt i)) = (prefix_mnas (im_part i))).

Axiom Complex_decomp :
  forall (i:t),
  (i =
   (infix_pldt (r_to_t (real_part i)) (infix_asdt im (r_to_t (im_part i))))).

Axiom Unic_decomp :
  forall (i:t), forall (x:R) (y:R),
  (i = (infix_pldt (r_to_t x) (infix_asdt im (r_to_t y)))) ->
  (x = (real_part i)).

Axiom Unic_decomp1 :
  forall (i:t), forall (x:R) (y:R),
  (i = (infix_pldt (r_to_t x) (infix_asdt im (r_to_t y)))) ->
  (y = (im_part i)).

Parameter real_: t -> Prop.

Axiom real__def : forall (x:t), (real_ x) -> infix_eqeq (im_part x) 0%R.

Axiom real__def1 : forall (x:t), (infix_eqeq (im_part x) 0%R) -> real_ x.

Parameter pure_im_: t -> Prop.

Axiom pure_im__def :
  forall (x:t), (pure_im_ x) -> infix_eqeq (real_part x) 0%R.

Axiom pure_im__def1 :
  forall (x:t), (infix_eqeq (real_part x) 0%R) -> pure_im_ x.

Axiom unic_decomp :
  forall (i:t) (x:R) (y:R),
  (i = (infix_pldt (r_to_t x) (infix_asdt im (r_to_t y)))) ->
  (x = (real_part i)).

Axiom unic_decomp1 :
  forall (i:t) (x:R) (y:R),
  (i = (infix_pldt (r_to_t x) (infix_asdt im (r_to_t y)))) ->
  (y = (im_part i)).

Axiom r_to_t_real : forall (x:t), (real_ x) -> (x = (r_to_t (real_part x))).

Axiom real_r_to_t : forall (x:R), real_ (r_to_t x).

Axiom r_to_t_pure_im :
  forall (x:t), (pure_im_ x) -> (x = (infix_asdt im (r_to_t (im_part x)))).

Axiom decomp_mult :
  forall (a:t) (b:t),
  ((infix_asdt a b) =
   (infix_pldt
    (infix_mndt (infix_asdt (r_to_t (real_part a)) (r_to_t (real_part b)))
     (infix_asdt (r_to_t (im_part a)) (r_to_t (im_part b))))
    (infix_asdt im
     (infix_pldt (infix_asdt (r_to_t (real_part a)) (r_to_t (im_part b)))
      (infix_asdt (r_to_t (real_part b)) (r_to_t (im_part a))))))).

Parameter t_real_part: t -> t.

Axiom t_real_part_def :
  forall (x:t), ((t_real_part x) = (r_to_t (real_part x))).

Axiom t_real_part_spec : forall (x:t), real_ (t_real_part x).

Axiom t_real_part_inv :
  forall (x:t),
  ((t_real_part (prefix_mndt x)) = (prefix_mndt (t_real_part x))).

Parameter t_im_part: t -> t.

Axiom t_im_part_def : forall (x:t), ((t_im_part x) = (r_to_t (im_part x))).

Axiom t_im_part_spec : forall (x:t), real_ (t_im_part x).

Axiom t_im_part_inv :
  forall (x:t), ((t_im_part (prefix_mndt x)) = (prefix_mndt (t_im_part x))).

Axiom decomp_mult_as_reals :
  forall (a:t) (b:t),
  ((infix_asdt a b) =
   (infix_pldt
    (infix_mndt (infix_asdt (t_real_part a) (t_real_part b))
     (infix_asdt (t_im_part a) (t_im_part b)))
    (infix_asdt im
     (infix_pldt (infix_asdt (t_real_part a) (t_im_part b))
      (infix_asdt (t_real_part b) (t_im_part a)))))).

Axiom decomp_mult_real_part :
  forall (a:t) (b:t),
  ((real_part (infix_asdt a b)) =
   (infix_mnas (infix_asas (real_part a) (real_part b))
    (infix_asas (im_part a) (im_part b)))).

Axiom decomp_mult_im_part :
  forall (a:t) (b:t),
  ((im_part (infix_asdt a b)) =
   (infix_plas (infix_asas (real_part a) (im_part b))
    (infix_asas (real_part b) (im_part a)))).

Axiom t_mult_real :
  forall (a:t) (b:t),
  ((t_real_part (infix_asdt a b)) =
   (infix_mndt (infix_asdt (t_real_part a) (t_real_part b))
    (infix_asdt (t_im_part a) (t_im_part b)))).

Axiom t_mult_im :
  forall (a:t) (b:t),
  ((t_im_part (infix_asdt a b)) =
   (infix_pldt (infix_asdt (t_real_part a) (t_im_part b))
    (infix_asdt (t_im_part a) (t_real_part b)))).

Axiom mult_real_real :
  forall (a:t) (b:t), (real_ a) -> (real_ b) ->
  ((infix_asdt a b) =
   (infix_asdt (r_to_t (real_part a)) (r_to_t (real_part b)))).

Axiom mult_real_real1 :
  forall (a:t) (b:t), (real_ a) -> (real_ b) ->
  ((infix_asdt (r_to_t (real_part a)) (r_to_t (real_part b))) =
   (r_to_t (infix_asas (real_part a) (real_part b)))).

Axiom mult_real_real2 :
  forall (a:t) (b:t), (real_ a) -> (real_ b) ->
  ((real_part (infix_asdt a b)) = (infix_asas (real_part a) (real_part b))).

Axiom mult_real_real3 :
  forall (a:t) (b:t), (real_ a) -> (real_ b) ->
  ((im_part (infix_asdt a b)) = 0%R).

Axiom complex_squared :
  forall (a:t),
  ((infix_asdt a a) =
   (infix_pldt
    (infix_mndt (infix_asdt (t_real_part a) (t_real_part a))
     (infix_asdt (t_im_part a) (t_im_part a)))
    (infix_asdt (infix_asdt (infix_asdt im ttwo) (t_real_part a))
     (t_im_part a)))).

Axiom complex_squared1 :
  forall (a:t),
  ((t_real_part (infix_asdt a a)) =
   (infix_mndt (infix_asdt (t_real_part a) (t_real_part a))
    (infix_asdt (t_im_part a) (t_im_part a)))).

Axiom complex_squared2 :
  forall (a:t),
  ((t_im_part (infix_asdt a a)) =
   (infix_asdt (infix_asdt ttwo (t_real_part a)) (t_im_part a))).

Axiom complex_real_squared :
  forall (a:t), (real_ a) ->
  ((infix_asdt a a) = (infix_asdt (t_real_part a) (t_real_part a))).

Axiom decomp_div :
  forall (a:t) (b:t), ~ (b = tzero) ->
  ((infix_sldt a b) =
   (infix_pldt (infix_sldt (t_real_part (infix_asdt a b)) (infix_asdt b b))
    (infix_asdt im
     (infix_sldt (t_im_part (infix_asdt a b)) (infix_asdt b b))))).

Axiom decomp_div_real :
  forall (a:t) (b:t), (real_ b) -> ~ (b = tzero) ->
  ((infix_sldt a b) =
   (infix_pldt (infix_sldt (infix_asdt (t_real_part a) b) (infix_asdt b b))
    (infix_asdt im
     (infix_sldt (infix_asdt (t_im_part a) b) (infix_asdt b b))))).

Axiom complex_prod_fact :
  forall (a:t) (b:t),
  ((infix_asdt a b) =
   (infix_pldt (infix_asdt (r_to_t (real_part a)) b)
    (infix_asdt (infix_asdt im (r_to_t (im_part a))) b))).

Axiom non_zero_prod_pre :
  forall (a:t) (b:t), ~ (a = tzero) -> ((infix_asdt a b) = tzero) ->
  ((im_part b) = (real_part b)).

Axiom non_zero_prod_pre1 :
  forall (a:t) (b:t), ~ (a = tzero) -> ((infix_asdt a b) = tzero) ->
  ((real_part b) = 0%R).

Axiom non_zero_prod :
  forall (a:t) (b:t), ~ (a = tzero) -> ~ (b = tzero) ->
  ~ ((infix_asdt a b) = tzero).

Axiom minus_tone :
  forall (a:t), ((prefix_mndt a) = (infix_asdt (prefix_mndt tone) a)).

Axiom mult_neg_l :
  forall (a:t) (b:t),
  ((infix_asdt (prefix_mndt a) b) = (prefix_mndt (infix_asdt a b))).

Axiom mult_neg_r :
  forall (a:t) (b:t),
  ((infix_asdt a (prefix_mndt b)) = (prefix_mndt (infix_asdt a b))).

Axiom neg_neg_out : forall (a:t), ((prefix_mndt (prefix_mndt a)) = a).

Axiom div_neg_l :
  forall (a:t) (b:t), ~ (b = tzero) ->
  ((infix_sldt (prefix_mndt a) b) = (prefix_mndt (infix_sldt a b))).

Axiom eq_to_real :
  forall (a:t) (b:t), (real_ a) -> (real_ b) -> (a = b) ->
  ((real_part a) = (real_part b)).

Axiom eq_by_real :
  forall (a:t) (b:t), (real_ a) -> (real_ b) ->
  ((real_part a) = (real_part b)) -> (a = b).

Axiom div_neg_r :
  forall (a:t) (b:t), ~ (b = tzero) ->
  ((infix_sldt a (prefix_mndt b)) = (prefix_mndt (infix_sldt a b))).

Axiom invadd :
  forall (i:t), ((prefix_mndt i) = (infix_asdt (prefix_mndt tone) i)).

Axiom notZeroAdd :
  forall (x:t) (y:t), ~ (x = tzero) -> ~ ((infix_pldt x y) = y).

Axiom Absorbing_zero :
  forall (a:t) (b:t), ((infix_asdt a b) = tzero) -> ~ (a = tzero) ->
  (b = tzero).

Axiom Absorbing_zero1 :
  forall (a:t) (b:t), (a = tzero) -> ((infix_asdt a b) = tzero).

Axiom Absorbing_zero2 :
  forall (a:t) (b:t), (b = tzero) -> ((infix_asdt a b) = tzero).

Axiom real_part_add :
  forall (i:t) (j:t),
  ((real_part (infix_pldt i j)) = (infix_plas (real_part i) (real_part j))).

Axiom mult_im_rev : forall (a:t), ((infix_asdt a im) = (infix_asdt im a)).

Axiom im_im_elim :
  forall (a:t), ((infix_asdt im (infix_asdt im a)) = (prefix_mndt a)).

Axiom im_im_fact :
  forall (a:t) (b:t),
  ((infix_asdt (infix_asdt im a) (infix_asdt im b)) =
   (prefix_mndt (infix_asdt a b))).

Axiom minus_minus_fact :
  forall (a:t) (b:t),
  ((infix_asdt (prefix_mndt a) (prefix_mndt b)) = (infix_asdt a b)).

Axiom minus_minus_add :
  forall (a:t) (b:t),
  ((infix_pldt (prefix_mndt a) (prefix_mndt b)) =
   (prefix_mndt (infix_pldt a b))).

Axiom minus_minus_add_rev :
  forall (a:t) (b:t),
  ((prefix_mndt (infix_pldt a b)) =
   (infix_pldt (prefix_mndt a) (prefix_mndt b))).

Axiom minus_out_left :
  forall (a:t) (b:t),
  ((infix_asdt (prefix_mndt a) b) = (prefix_mndt (infix_asdt a b))).

Axiom minus_out_right :
  forall (a:t) (b:t),
  ((infix_asdt a (prefix_mndt b)) = (prefix_mndt (infix_asdt a b))).

Axiom minus_in_left :
  forall (a:t) (b:t),
  ((prefix_mndt (infix_asdt a b)) = (infix_asdt (prefix_mndt a) b)).

Axiom minus_in_right :
  forall (a:t) (b:t),
  ((prefix_mndt (infix_asdt a b)) = (infix_asdt a (prefix_mndt b))).

Axiom minus_add_out_left :
  forall (a:t) (b:t),
  ((infix_pldt (prefix_mndt a) b) =
   (prefix_mndt (infix_pldt a (prefix_mndt b)))).

Axiom minus_as_add_opp :
  forall (a:t) (b:t), ((infix_mndt a b) = (infix_pldt a (prefix_mndt b))).

Axiom minus_add_out_right :
  forall (a:t) (b:t),
  ((infix_pldt a (prefix_mndt b)) =
   (prefix_mndt (infix_pldt (prefix_mndt a) b))).

Axiom minus_add_in :
  forall (a:t) (b:t),
  ((prefix_mndt (infix_pldt a b)) =
   (infix_pldt (prefix_mndt a) (prefix_mndt b))).

Axiom minus_add_out :
  forall (a:t) (b:t),
  ((infix_pldt (prefix_mndt a) (prefix_mndt b)) =
   (prefix_mndt (infix_pldt a b))).

Axiom minus_eq :
  forall (a:t) (b:t), (a = b) -> ((prefix_mndt a) = (prefix_mndt b)).

Axiom im_out_right :
  forall (a:t) (b:t),
  ((infix_asdt (infix_asdt im a) b) = (infix_asdt im (infix_asdt a b))).

Axiom im_out_left :
  forall (a:t) (b:t),
  ((infix_asdt a (infix_asdt im b)) = (infix_asdt im (infix_asdt a b))).

Axiom im_part_add :
  forall (i:t) (j:t),
  ((im_part (infix_pldt i j)) = (infix_plas (im_part i) (im_part j))).

Axiom injective_real_part :
  forall (i:t) (j:t), ~ ((real_part i) = (real_part j)) -> ~ (i = j).

Axiom injective_im_part :
  forall (i:t) (j:t), ~ ((im_part i) = (im_part j)) -> ~ (i = j).

Axiom minus_distr_four :
  forall (a:t) (b:t) (c:t) (d:t),
  ((infix_pldt (infix_asdt a b)
    (infix_asdt (infix_asdt (prefix_mndt b) c) d))
   = (infix_asdt (infix_mndt a (infix_asdt c d)) b)).

Axiom complex_decomp :
  forall (i:t),
  (i =
   (infix_pldt (r_to_t (real_part i)) (infix_asdt im (r_to_t (im_part i))))).

Axiom simpl_frac :
  forall (x:t) (y:t), ~ (y = tzero) -> ((infix_sldt (infix_asdt x y) y) = x).

Axiom simpl_frac_ :
  forall (x:t) (y:t) (z:t), ~ (y = tzero) -> ~ (z = tzero) ->
  ((infix_sldt (infix_asdt x y) (infix_asdt z y)) = (infix_sldt x z)).

Axiom fact_frac :
  forall (x:t) (y:t) (z:t), ~ (z = tzero) ->
  ((infix_sldt (infix_asdt x y) z) = (infix_asdt x (infix_sldt y z))).

Axiom fact_frac_rev :
  forall (x:t) (y:t) (z:t), ~ (z = tzero) ->
  ((infix_asdt x (infix_sldt y z)) = (infix_sldt (infix_asdt x y) z)).

Axiom mult_sym : forall (x:t) (y:t), ((infix_asdt x y) = (infix_asdt y x)).

Axiom inv_mult :
  forall (x:t) (y:t), ~ (x = tzero) -> ~ (y = tzero) ->
  ((infix_asdt (infix_sldt tone x) (infix_sldt tone y)) =
   (infix_sldt tone (infix_asdt x y))).

Axiom div_div :
  forall (x:t) (y:t) (z:t), ~ (y = tzero) -> ~ (z = tzero) ->
  ((infix_sldt (infix_sldt x y) z) = (infix_sldt x (infix_asdt y z))).

Axiom div_div_rev :
  forall (x:t) (y:t) (z:t), ~ (y = tzero) -> ~ (z = tzero) ->
  ((infix_sldt x (infix_asdt y z)) = (infix_sldt (infix_sldt x y) z)).

Axiom involutive_inv :
  forall (a:t), ~ (a = tzero) -> ((infix_sldt tone (infix_sldt tone a)) = a).

Axiom twice : forall (i:t), ((infix_asdt ttwo i) = (infix_pldt i i)).

Axiom twice_half : ((infix_asdt ttwo (infix_sldt tone ttwo)) = tone).

Axiom half_plus_half :
  forall (i:t), ((infix_pldt (infix_sldt i ttwo) (infix_sldt i ttwo)) = i).

Axiom decomp_inv_real :
  forall (a:t), (real_ a) -> ~ (a = tzero) ->
  ((infix_sldt tone a) = (infix_sldt tone (t_real_part a))).

Axiom decomp_inv_real1 :
  forall (a:t), (real_ a) -> ~ (a = tzero) -> real_ (infix_sldt tone a).

Axiom decomp_inv_real2 :
  forall (a:t), (real_ a) -> ~ (a = tzero) ->
  ((t_real_part (infix_sldt tone a)) = (infix_sldt tone (t_real_part a))).

Axiom decomp_inv_real3 :
  forall (a:t), (real_ a) -> ~ (a = tzero) ->
  ((real_part (infix_sldt tone a)) = (infix_slas 1%R (real_part a))).

Axiom mult_div_comm :
  forall (x:t) (y:t) (z:t) (t1:t), ~ (z = tzero) -> ~ (t1 = tzero) ->
  ((infix_sldt (infix_asdt x y) (infix_asdt z t1)) =
   (infix_asdt (infix_sldt x z) (infix_sldt y t1))).

Axiom mult_div_comm_rev :
  forall (x:t) (y:t) (z:t) (t1:t), ~ (z = tzero) -> ~ (t1 = tzero) ->
  ((infix_asdt (infix_sldt x z) (infix_sldt y t1)) =
   (infix_sldt (infix_asdt x y) (infix_asdt z t1))).

Parameter infix_lseqdt: t -> t -> Prop.

Axiom infix_lseqdt_def :
  forall (x:t) (y:t), (infix_lseqdt x y) -> (real_ x) \/ (infix_eqeq x y).

Axiom infix_lseqdt_def1 :
  forall (x:t) (y:t), (infix_lseqdt x y) -> (real_ y) \/ (infix_eqeq x y).

Axiom infix_lseqdt_def2 :
  forall (x:t) (y:t), (infix_lseqdt x y) ->
  (infix_lseqas (real_part x) (real_part y)) \/ (infix_eqeq x y).

Axiom infix_lseqdt_def3 :
  forall (x:t) (y:t),
  ((real_ x) /\ ((real_ y) /\ (infix_lseqas (real_part x) (real_part y)))) ->
  infix_lseqdt x y.

Axiom infix_lseqdt_def4 :
  forall (x:t) (y:t), (infix_eqeq x y) -> infix_lseqdt x y.

Parameter infix_lsdt: t -> t -> Prop.

Axiom infix_lsdt_def :
  forall (x:t) (y:t), (infix_lsdt x y) -> infix_lseqdt x y.

Axiom infix_lsdt_def1 :
  forall (x:t) (y:t), (infix_lsdt x y) -> ~ (infix_eqeq x y).

Axiom infix_lsdt_def2 :
  forall (x:t) (y:t), ((infix_lseqdt x y) /\ ~ (infix_eqeq x y)) ->
  infix_lsdt x y.

Parameter infix_gteqdt: t -> t -> Prop.

Axiom infix_gteqdt_def :
  forall (x:t) (y:t), (infix_gteqdt x y) -> infix_lseqdt y x.

Axiom infix_gteqdt_def1 :
  forall (x:t) (y:t), (infix_lseqdt y x) -> infix_gteqdt x y.

Parameter infix_gtdt: t -> t -> Prop.

Axiom infix_gtdt_def :
  forall (x:t) (y:t), (infix_gtdt x y) -> infix_gteqdt x y.

Axiom infix_gtdt_def1 :
  forall (x:t) (y:t), (infix_gtdt x y) -> ~ (infix_eqeq x y).

Axiom infix_gtdt_def2 :
  forall (x:t) (y:t), ((infix_gteqdt x y) /\ ~ (infix_eqeq x y)) ->
  infix_gtdt x y.

Axiom leq_left_real :
  forall (a:t) (b:t), (infix_lseqdt a b) -> (real_ a) -> real_ b.

Axiom leq_right_real :
  forall (a:t) (b:t), (infix_lseqdt a b) -> (real_ b) -> real_ a.

Axiom inf_left_real : forall (a:t) (b:t), (infix_lsdt a b) -> real_ a.

Axiom inf_right_real : forall (a:t) (b:t), (infix_lsdt a b) -> real_ b.

Axiom inf_from_real :
  forall (a:t) (b:t), (real_ a) -> (real_ b) ->
  (infix_lsas (real_part a) (real_part b)) -> infix_lsdt a b.

Axiom inf_to_real :
  forall (a:t) (b:t), (infix_lsdt a b) ->
  infix_lsas (real_part a) (real_part b).

Axiom leq_left_not_real_a :
  forall (a:t) (b:t), (infix_lseqdt a b) -> ~ (real_ a) -> (a = b).

Axiom leq_left_not_real_b :
  forall (a:t) (b:t), (infix_lseqdt a b) -> ~ (real_ b) -> (a = b).

Axiom Refl : forall (x:t), infix_lseqdt x x.

Axiom Trans :
  forall (x:t) (y:t) (z:t), (infix_lseqdt x y) -> (infix_lseqdt y z) ->
  infix_lseqdt x z.

Axiom Antisymm :
  forall (x:t) (y:t), (infix_lseqdt x y) -> (infix_lseqdt y x) -> (x = y).

Axiom Refl1 : forall (x:t), infix_gteqdt x x.

Axiom Trans1 :
  forall (x:t) (y:t) (z:t), (infix_gteqdt x y) -> (infix_gteqdt y z) ->
  infix_gteqdt x z.

Axiom Antisymm1 :
  forall (x:t) (y:t), (infix_gteqdt x y) -> (infix_gteqdt y x) -> (x = y).

Axiom Trans2 :
  forall (x:t) (y:t) (z:t), (infix_lsdt x y) -> (infix_lsdt y z) ->
  infix_lsdt x z.

Axiom Asymm : forall (x:t) (y:t), (infix_lsdt x y) -> ~ (infix_lsdt y x).

Axiom Trans3 :
  forall (x:t) (y:t) (z:t), (infix_gtdt x y) -> (infix_gtdt y z) ->
  infix_gtdt x z.

Axiom Asymm1 : forall (x:t) (y:t), (infix_gtdt x y) -> ~ (infix_gtdt y x).

Axiom r_to_t_inf :
  forall (i:R) (j:R), (infix_lseqdt (r_to_t i) (r_to_t j)) ->
  infix_lseqas i j.

Axiom r_to_t_inf1 :
  forall (i:R) (j:R), (infix_lseqas i j) ->
  infix_lseqdt (r_to_t i) (r_to_t j).

Axiom reali_is_its_real_part :
  forall (a:t), (real_ a) -> (a = (r_to_t (real_part a))).

Axiom inf_from_r :
  forall (a:t) (b:t), (real_ a) -> (real_ b) ->
  (infix_lseqas (real_part a) (real_part b)) -> infix_lseqdt a b.

Axiom strict_inf_from_r :
  forall (a:t) (b:t), (real_ a) -> (real_ b) ->
  (infix_lsas (real_part a) (real_part b)) -> infix_lsdt a b.

Axiom positive_inv_t :
  forall (x:t), (infix_lsdt tzero x) -> infix_lsdt tzero (infix_sldt tone x).

Parameter pi: t.

Axiom pi_def : infix_lsdt (r_to_t 3%R) pi.

Axiom real_pi : real_ pi.

Axiom pi_sup_one : infix_lsdt tone pi.

Axiom pi_sup_zero : infix_lsdt tzero pi.

Axiom compat_order_mult :
  forall (x:t) (y:t) (z:t), (infix_lseqdt x y) -> (real_ x) -> (real_ y) ->
  (real_ z) -> (infix_lseqdt tzero z) ->
  infix_lseqdt (infix_asdt x z) (infix_asdt y z).

Axiom compat_order_add :
  forall (x:t) (y:t) (z:t), (infix_lseqdt x y) -> (real_ x) -> (real_ y) ->
  (real_ z) -> infix_lseqdt (infix_pldt x z) (infix_pldt y z).

Axiom compat_order_substr :
  forall (x:t) (y:t) (z:t), (infix_lseqdt x y) -> (real_ x) -> (real_ y) ->
  (real_ z) -> infix_lseqdt (infix_mndt x z) (infix_mndt y z).

Axiom compat_inf_mult :
  forall (x:t) (y:t) (z:t), (infix_lsdt x y) -> (real_ x) -> (real_ y) ->
  (real_ z) -> (infix_lsdt tzero z) ->
  infix_lsdt (infix_asdt x z) (infix_asdt y z).

Axiom transitive_infeq :
  forall (a:t) (b:t) (c:t), (infix_lseqdt a b) -> (infix_lseqdt b c) ->
  infix_lseqdt a c.

Axiom transitive_infeq_inf :
  forall (a:t) (b:t) (c:t), (infix_lseqdt a b) -> (infix_lsdt b c) ->
  infix_lsdt a c.

Axiom transitive_inf_infeq :
  forall (a:t) (b:t) (c:t), (infix_lsdt a b) -> (infix_lseqdt b c) ->
  infix_lsdt a c.

Axiom transitive_inf :
  forall (a:t) (b:t) (c:t), (infix_lsdt a b) -> (infix_lsdt b c) ->
  infix_lsdt a c.

Axiom pi_sup_ttwo : infix_lsdt ttwo pi.

Axiom transitive_leq_inv_r :
  forall (a:t) (b:t) (c:t), (real_ a) -> (real_ b) -> (real_ c) ->
  (infix_lseqdt a b) -> (infix_lseqdt b (infix_sldt tone c)) ->
  (infix_lseqdt tone c) -> infix_lseqdt a b.

Axiom transitive_leq_inv_r1 :
  forall (a:t) (b:t) (c:t), (real_ a) -> (real_ b) -> (real_ c) ->
  (infix_lseqdt a b) -> (infix_lseqdt b (infix_sldt tone c)) ->
  (infix_lseqdt tone c) -> infix_lseqdt b tone.

Axiom compat_inf_mult_left :
  forall (x:t) (y:t) (z:t), (infix_lsdt x y) -> (real_ x) -> (real_ y) ->
  (real_ z) -> (infix_lsdt tzero z) ->
  infix_lsdt (infix_asdt z x) (infix_asdt z y).

Axiom compat_inf_mult_both :
  forall (x:t) (y:t) (z:t) (t1:t), (infix_lsdt x y) -> (real_ x) ->
  (real_ y) -> (real_ z) -> ((infix_lsdt tzero z) /\ (infix_lsdt z t1)) ->
  (infix_lsdt tzero y) -> infix_lsdt (infix_asdt z x) (infix_asdt t1 y).

Axiom compat_inf_add :
  forall (x:t) (y:t) (z:t), (infix_lsdt x y) -> (real_ x) -> (real_ y) ->
  (real_ z) -> infix_lsdt (infix_pldt x z) (infix_pldt y z).

Axiom compat_inf_substr :
  forall (x:t) (y:t) (z:t), (infix_lsdt x y) -> (real_ x) -> (real_ y) ->
  (real_ z) -> infix_lsdt (infix_mndt x z) (infix_mndt y z).

Axiom real_inv :
  forall (x:t), (real_ x) -> ~ (x = tzero) -> real_ (infix_sldt tone x).

Axiom compat_order_mult_rev :
  forall (x:t) (y:t) (z:t), (real_ x) -> (real_ y) -> (real_ z) ->
  (infix_lsdt tzero z) -> (infix_lseqdt (infix_asdt x z) (infix_asdt y z)) ->
  infix_lseqdt x y.

Axiom compat_order_mult_left :
  forall (x:t) (y:t) (z:t), (infix_lseqdt x y) -> (real_ x) -> (real_ y) ->
  (real_ z) -> (infix_lseqdt tzero z) ->
  infix_lseqdt (infix_asdt z x) (infix_asdt z y).

Axiom strict_compat_order_mult :
  forall (x:t) (y:t) (z:t), (infix_lsdt x y) -> (real_ x) -> (real_ y) ->
  (real_ z) -> (infix_lsdt tzero z) ->
  infix_lsdt (infix_asdt x z) (infix_asdt y z).

Axiom strict_compat_order_mult_left :
  forall (x:t) (y:t) (z:t), (infix_lsdt x y) -> (real_ x) -> (real_ y) ->
  (real_ z) -> (infix_lsdt tzero z) ->
  infix_lsdt (infix_asdt z x) (infix_asdt z y).

Axiom complete_order_real :
  forall (x:t) (y:t), (real_ x) -> (real_ y) -> ~ (x = y) ->
  ~ (infix_lsdt x y) -> infix_lsdt y x.

Axiom complete_order_real_ :
  forall (x:t) (y:t), (real_ x) -> (real_ y) -> ~ (infix_lsdt x y) ->
  ~ (infix_lsdt y x) -> (y = x).

Axiom compat_order_mult_both :
  forall (x:t) (y:t) (z:t) (t1:t),
  ((infix_lseqdt tzero x) /\ (infix_lseqdt x y)) ->
  ((infix_lseqdt tzero z) /\ (infix_lseqdt z t1)) ->
  infix_lseqdt (infix_asdt z x) (infix_asdt t1 y).

Axiom inf_to_non_sup_eq :
  forall (x:t) (y:t), (real_ x) -> (real_ y) -> (infix_lsdt x y) ->
  ~ (infix_gteqdt x y).

Axiom sup_eq_to_non_inf :
  forall (x:t) (y:t), (real_ x) -> (real_ y) -> (infix_gteqdt x y) ->
  ~ (infix_lsdt x y).

Axiom sup_to_inf :
  forall (x:t) (y:t), (real_ x) -> (real_ y) -> (infix_gtdt x y) ->
  infix_lsdt y x.

Axiom inf_to_sup :
  forall (x:t) (y:t), (real_ x) -> (real_ y) -> (infix_lsdt x y) ->
  infix_gtdt y x.

Axiom sup_to_non_inf_eq :
  forall (x:t) (y:t), (real_ x) -> (real_ y) -> (infix_gtdt x y) ->
  ~ (infix_lseqdt x y).

Axiom inf_eq_to_non_sup :
  forall (x:t) (y:t), (real_ x) -> (real_ y) -> (infix_lseqdt x y) ->
  ~ (infix_gtdt x y).

Axiom non_inf_eq_to_sup :
  forall (x:t) (y:t), (real_ x) -> (real_ y) -> ~ (infix_lseqdt x y) ->
  infix_gtdt x y.

Axiom non_sup_toinf_eq :
  forall (x:t) (y:t), (real_ x) -> (real_ y) -> ~ (infix_gtdt x y) ->
  infix_lseqdt x y.

Axiom real_mult :
  forall (x:t) (y:t), (real_ x) -> (real_ y) -> real_ (infix_asdt x y).

Axiom real_add :
  forall (x:t) (y:t), (real_ x) -> (real_ y) -> real_ (infix_pldt x y).

Axiom inv_pos :
  forall (x:t), (real_ x) -> (infix_lsdt tzero x) ->
  infix_lsdt tzero (infix_sldt tone x).

Axiom lower_over_cons :
  forall (a:t) (b:t) (c:t), (infix_lsdt tzero c) -> (infix_lseqdt tzero a) ->
  (infix_lseqdt a b) -> infix_lseqdt (infix_sldt a c) (infix_sldt b c).

Axiom eq_to_leq_t :
  forall (a:t) (b:t), (real_ a) -> (a = b) -> infix_lseqdt a b.

Axiom real_minus : forall (a:t), (real_ a) -> real_ (prefix_mndt a).

Axiom compat_r_to_t_infeq :
  forall (a:R) (b:R), (infix_lseqas a b) ->
  infix_lseqdt (r_to_t a) (r_to_t b).

Axiom compat_r_to_t_inf :
  forall (a:R) (b:R), (infix_lsas a b) -> infix_lsdt (r_to_t a) (r_to_t b).

Axiom compat_r_to_t_supeq :
  forall (a:R) (b:R), (infix_gteqas a b) ->
  infix_gteqdt (r_to_t a) (r_to_t b).

Axiom compat_r_to_t_sup :
  forall (a:R) (b:R), (infix_gtas a b) -> infix_gtdt (r_to_t a) (r_to_t b).

Axiom unic_inv :
  forall (i:t) (j:t), ~ (i = tzero) -> ((infix_asdt i j) = tone) ->
  (j = (inv i)).

Axiom inf_eq_def :
  forall (x:t) (y:t), (infix_lseqdt x y) -> (real_ x) \/ (x = y).

Axiom inf_eq_def1 :
  forall (x:t) (y:t), (infix_lseqdt x y) -> (real_ y) \/ (x = y).

Axiom inf_eq_def2 :
  forall (x:t) (y:t), (infix_lseqdt x y) ->
  (infix_lseqas (real_part x) (real_part y)) \/ (x = y).

Axiom inf_eq_def3 :
  forall (x:t) (y:t),
  ((real_ x) /\ ((real_ y) /\ (infix_lseqas (real_part x) (real_part y)))) ->
  infix_lseqdt x y.

Axiom inf_eq_def4 : forall (x:t) (y:t), (x = y) -> infix_lseqdt x y.

Axiom inf_minus :
  forall (x:t) (y:t), (infix_lsdt x y) ->
  infix_lsdt (prefix_mndt y) (prefix_mndt x).

Axiom absorbing_zero :
  forall (a:t) (b:t), ((infix_asdt a b) = tzero) -> ~ (a = tzero) ->
  (b = tzero).

Axiom absorbing_zero1 :
  forall (a:t) (b:t), ((infix_asdt a b) = tzero) -> ~ (b = tzero) ->
  (a = tzero).

Axiom inf_zero_inv :
  forall (z:t), (infix_lsdt tzero z) -> infix_lsdt tzero (infix_sldt tone z).

Axiom inf_zero_inv1 :
  forall (z:t), (infix_lsdt tzero z) ->
  infix_lseqdt tzero (infix_sldt tone z).

Axiom mult_pos :
  forall (x:t) (y:t), (infix_lseqdt tzero x) -> (infix_lseqdt tzero y) ->
  infix_lseqdt tzero (infix_asdt x y).

Axiom simpl_leq_mult_div :
  forall (a:t) (b:t) (c:t), (real_ a) -> (infix_lsdt tzero b) ->
  (infix_lseqdt (infix_asdt a b) c) ->
  infix_lseqdt a (infix_asdt (infix_sldt tone b) c).

Axiom mult_leq_tone_leq :
  forall (a:t) (b:t), (infix_lseqdt tzero a) ->
  ((infix_lseqdt tzero b) /\ (infix_lseqdt b tone)) ->
  infix_lseqdt (infix_asdt a b) a.

Axiom mult_leq_tone_leq_gen :
  forall (a:t) (a':t) (b:t), (infix_lseqdt tzero a) ->
  ((infix_lseqdt tzero b) /\ (infix_lseqdt b tone)) -> (a = a') ->
  infix_lseqdt (infix_asdt a b) a'.

Axiom mult_leq_tone :
  forall (a:t) (b:t), (infix_lseqdt tzero a) ->
  (exists c:t, (infix_lseqdt a c) /\ (b = (infix_sldt tone c))) ->
  (infix_lsdt tzero b) -> infix_lseqdt (infix_asdt a b) tone.

Axiom mult_leq_tone_expl :
  forall (a:t) (b:t) (d:t), (infix_lseqdt tzero a) -> (infix_lseqdt a d) ->
  (infix_lsdt tzero d) -> (b = (infix_sldt tone d)) ->
  infix_lseqdt (infix_asdt a b) tone.

Axiom mult_leq_tone_rev :
  forall (a:t) (b:t), (infix_lseqdt tzero a) -> (infix_lsdt tzero b) ->
  (infix_lseqdt (infix_asdt a b) tone) -> infix_lseqdt a (infix_sldt tone b).

Axiom simpl_leq_mult :
  forall (a:t) (b:t) (c:t), (infix_lsdt tzero b) -> (infix_lseqdt a c) ->
  infix_lseqdt (infix_asdt a b) (infix_asdt c b).

Axiom simpl_leq_mult_inv :
  forall (a:t) (b:t) (c:t), (infix_lsdt tzero a) -> (infix_lsdt tzero b) ->
  (infix_lsdt tzero c) ->
  (infix_lseqdt a (infix_sldt tone (infix_asdt b c))) ->
  infix_lseqdt (infix_asdt a b) (infix_sldt tone c).

Axiom mult_to_div_leq :
  forall (a:t) (b:t) (c:t), (real_ a) -> (infix_lsdt tzero b) ->
  (infix_lseqdt (infix_asdt a b) c) ->
  infix_lseqdt a (infix_asdt (infix_sldt tone b) c).

Axiom mult_div :
  forall (x:t) (y:t), (infix_lseqdt tzero x) -> (infix_lsdt tzero y) ->
  infix_lseqdt tzero (infix_sldt x y).

Axiom strict_mult_pos :
  forall (x:t) (y:t), (infix_lsdt tzero x) -> (infix_lsdt tzero y) ->
  infix_lsdt tzero (infix_asdt x y).

Axiom rewrite_supeq :
  forall (x:t) (y:t), (infix_lseqdt x y) -> infix_gteqdt y x.

Axiom rewrite_sup : forall (x:t) (y:t), (infix_lsdt x y) -> infix_gtdt y x.

Axiom inv_order_complex :
  forall (a:t) (b:t), (infix_lsdt tzero a) -> (infix_lsdt tzero b) ->
  (infix_lseqdt a b) -> infix_lseqdt (infix_sldt tone b) (infix_sldt tone a).

Axiom compat_inv_order :
  forall (a:t) (b:t) (c:t), ((infix_lsdt tzero a) /\ (infix_lseqdt a b)) ->
  (infix_lseqdt c (infix_sldt tone b)) -> infix_lseqdt c (infix_sldt tone a).

Axiom leq_by_div_simpl :
  forall (a:t) (b:t) (c:t), (infix_lseqdt tzero a) ->
  ((infix_lsdt tzero b) /\ (infix_lseqdt b c)) ->
  infix_lseqdt (infix_sldt a c) (infix_sldt a b).

Axiom leq_by_div :
  forall (a:t) (b:t) (c:t), (infix_lseqdt tzero a) ->
  ((infix_lsdt tzero b) /\ (infix_lseqdt b c)) ->
  infix_lseqdt (infix_sldt a c) (infix_sldt a b).

Axiom inf_def : forall (x:t) (y:t), (infix_lsdt x y) -> real_ x.

Axiom inf_def1 : forall (x:t) (y:t), (infix_lsdt x y) -> real_ y.

Axiom inf_def2 :
  forall (x:t) (y:t), (infix_lsdt x y) ->
  infix_lsas (real_part x) (real_part y).

Axiom inf_def3 :
  forall (x:t) (y:t),
  ((real_ x) /\ ((real_ y) /\ (infix_lsas (real_part x) (real_part y)))) ->
  infix_lsdt x y.

Axiom sup_eq_def :
  forall (x:t) (y:t), (infix_gteqdt x y) -> (real_ x) \/ (x = y).

Axiom sup_eq_def1 :
  forall (x:t) (y:t), (infix_gteqdt x y) -> (real_ y) \/ (x = y).

Axiom sup_eq_def2 :
  forall (x:t) (y:t), (infix_gteqdt x y) ->
  (infix_gteqas (real_part x) (real_part y)) \/ (x = y).

Axiom sup_eq_def3 :
  forall (x:t) (y:t),
  ((real_ x) /\ ((real_ y) /\ (infix_gteqas (real_part x) (real_part y)))) ->
  infix_gteqdt x y.

Axiom sup_eq_def4 : forall (x:t) (y:t), (x = y) -> infix_gteqdt x y.

Axiom sup_def : forall (x:t) (y:t), (infix_gtdt x y) -> real_ x.

Axiom sup_def1 : forall (x:t) (y:t), (infix_gtdt x y) -> real_ y.

Axiom sup_def2 :
  forall (x:t) (y:t), (infix_gtdt x y) ->
  infix_gtas (real_part x) (real_part y).

Axiom sup_def3 :
  forall (x:t) (y:t),
  ((real_ x) /\ ((real_ y) /\ (infix_gtas (real_part x) (real_part y)))) ->
  infix_gtdt x y.

Axiom assoc_mult_div :
  forall (x:t) (y:t) (z:t), ~ (z = tzero) ->
  ((infix_asdt x (infix_sldt y z)) = (infix_sldt (infix_asdt x y) z)).

Axiom assoc_mult_div_rev :
  forall (x:t) (y:t) (z:t), ~ (z = tzero) ->
  ((infix_sldt (infix_asdt x y) z) = (infix_asdt x (infix_sldt y z))).

Axiom subst_zero : forall (a:t), ((infix_mndt a tzero) = a).

Axiom subst_zero_gen :
  forall (a:t) (b:t), (b = tzero) -> ((infix_mndt a b) = a).

Axiom transitive_inf_inv_r :
  forall (a:t) (b:t) (c:t), (infix_lseqdt a b) ->
  (infix_lseqdt b (infix_sldt tone c)) -> (infix_lsdt tone c) ->
  infix_lseqdt a b.

Axiom transitive_inf_inv_r1 :
  forall (a:t) (b:t) (c:t), (infix_lseqdt a b) ->
  (infix_lseqdt b (infix_sldt tone c)) -> (infix_lsdt tone c) ->
  infix_lsdt b tone.

Axiom infeq_scal_r :
  forall (a:t) (b:t) (c:t), (infix_lseqdt a c) -> (infix_lseqdt tzero b) ->
  infix_lseqdt (infix_asdt a b) (infix_asdt c b).

Axiom infeq_scal_l :
  forall (a:t) (b:t) (c:t), (infix_lseqdt a c) -> (infix_lseqdt tzero b) ->
  infix_lseqdt (infix_asdt b a) (infix_asdt b c).

Axiom transitive_supeq :
  forall (a:t) (b:t) (c:t), (infix_gteqdt a b) -> (infix_gteqdt b c) ->
  infix_gteqdt a c.

Axiom transitive_inf_l :
  forall (a:t) (b:t) (c:t), (infix_lsdt a b) -> (infix_lseqdt b c) ->
  infix_lsdt a c.

Axiom transitive_sup_l :
  forall (a:t) (b:t) (c:t), (infix_gtdt a b) -> (infix_gteqdt b c) ->
  infix_gtdt a c.

Axiom transitive_inf_r :
  forall (a:t) (b:t) (c:t), (infix_lseqdt a b) -> (infix_lsdt b c) ->
  infix_lsdt a c.

Axiom transitive_sup_r :
  forall (a:t) (b:t) (c:t), (infix_gteqdt a b) -> (infix_gtdt b c) ->
  infix_gtdt a c.

Axiom simpl_frac_r :
  forall (x:t) (y:t), ~ (x = tzero) -> ((infix_asdt x (infix_sldt y x)) = y).

Axiom compat_mult_sup_eq_right :
  forall (a:t) (b:t) (c:t), (infix_lseqdt tzero a) -> (infix_gteqdt b c) ->
  infix_gteqdt (infix_asdt a b) (infix_asdt a c).

Axiom compat_mult_sup_right :
  forall (a:t) (b:t) (c:t), (infix_lsdt tzero a) -> (infix_gtdt b c) ->
  infix_gtdt (infix_asdt a b) (infix_asdt a c).

Axiom compat_mult_inf_right :
  forall (a:t) (b:t) (c:t), (infix_lsdt tzero a) -> (infix_lsdt b c) ->
  infix_lsdt (infix_asdt a b) (infix_asdt a c).

Axiom infeq_to_supeq :
  forall (a:t) (b:t), (infix_lseqdt a b) -> infix_gteqdt b a.

Axiom infeq_inv :
  forall (a:t) (b:t), (infix_lseqdt a b) ->
  infix_lseqdt (prefix_mndt b) (prefix_mndt a).

Axiom infeq_inv_add_l :
  forall (a:t) (b:t) (c:t), (infix_lseqdt (infix_pldt a c) b) -> (real_ a) ->
  (real_ c) -> infix_lseqdt a (infix_mndt b c).

Axiom infeq_inv_add_r :
  forall (a:t) (b:t) (c:t), (real_ a) -> (real_ c) ->
  (infix_lseqdt a (infix_pldt b c)) -> infix_lseqdt (infix_mndt a c) b.

Axiom r_to_t_surj :
  forall (x:R) (y:R), ~ (x = y) -> ~ ((r_to_t x) = (r_to_t y)).

Axiom r_to_t_inf_rev :
  forall (x:R) (y:R), (infix_lsas x y) -> infix_lsdt (r_to_t x) (r_to_t y).

Axiom div_simpl :
  forall (a:t) (b:t), (infix_lsdt tzero a) -> (infix_lsdt tzero b) ->
  ((infix_sldt tone b) = (infix_sldt a (infix_asdt a b))).

Axiom infeq_inv_subs_l :
  forall (a:t) (b:t) (c:t), (real_ a) -> (real_ b) -> (real_ c) ->
  (infix_lseqdt (infix_mndt a c) b) -> infix_lseqdt a (infix_pldt b c).

Axiom infeq_inv_subs_r :
  forall (a:t) (b:t) (c:t), (real_ a) -> (real_ b) -> (real_ c) ->
  (infix_lseqdt a (infix_mndt b c)) -> infix_lseqdt (infix_pldt a c) b.

Axiom infeq_pos_elim :
  forall (a:t) (b:t), (real_ a) -> (infix_lseqdt tzero b) ->
  infix_lseqdt a (infix_pldt a b).

Axiom infeq_pos_elim_add :
  forall (a:t) (b:t) (c:t), (real_ a) -> (real_ b) -> (real_ c) ->
  (infix_lseqdt tzero b) -> (infix_lseqdt c a) ->
  infix_lseqdt c (infix_pldt a b).

Axiom supeq_elim_left :
  forall (a:t) (b:t), (real_ a) -> (real_ b) -> (infix_gteqdt a b) ->
  infix_gteqdt tzero (infix_mndt b a).

Axiom sup_elim_left :
  forall (a:t) (b:t), (infix_gtdt a b) -> infix_gtdt tzero (infix_mndt b a).

Axiom infeq_elim_left :
  forall (a:t) (b:t), (real_ a) -> (real_ b) -> (infix_lseqdt a b) ->
  infix_lseqdt tzero (infix_mndt b a).

Axiom inf_elim_left :
  forall (a:t) (b:t), (infix_lsdt a b) -> infix_lsdt tzero (infix_mndt b a).

Axiom t_im_real :
  forall (a:t) (b:t),
  ((t_im_part (infix_asdt a b)) =
   (infix_pldt (infix_asdt (t_real_part a) (t_im_part b))
    (infix_asdt (t_im_part a) (t_real_part b)))).

Axiom t_decomp_mult :
  forall (a:t) (b:t),
  ((infix_asdt a b) =
   (infix_pldt
    (infix_mndt (infix_asdt (t_real_part a) (t_real_part b))
     (infix_asdt (t_im_part a) (t_im_part b)))
    (infix_asdt im
     (infix_pldt (infix_asdt (t_real_part a) (t_im_part b))
      (infix_asdt (t_im_part a) (t_real_part b)))))).

Axiom t_complex_decomp :
  forall (i:t),
  (i = (infix_pldt (t_real_part i) (infix_asdt im (t_im_part i)))).

Axiom t_unic_decomp :
  forall (i:t) (a:t) (b:t), (real_ a) -> (real_ b) ->
  (i = (infix_pldt a (infix_asdt im b))) -> (a = (t_real_part i)).

Axiom t_unic_decomp1 :
  forall (i:t) (a:t) (b:t), (real_ a) -> (real_ b) ->
  (i = (infix_pldt a (infix_asdt im b))) -> (b = (t_im_part i)).

Axiom t_decomp_minus :
  forall (i:t) (a:t) (b:t), (real_ a) -> (real_ b) ->
  (i = (infix_mndt a (infix_asdt im b))) -> (a = (t_real_part i)).

Axiom t_decomp_minus1 :
  forall (i:t) (a:t) (b:t), (real_ a) -> (real_ b) ->
  (i = (infix_mndt a (infix_asdt im b))) -> ((prefix_mndt b) = (t_im_part i)).

Axiom real_sum :
  forall (x:t) (y:t), (real_ x) -> (real_ y) -> real_ (infix_pldt x y).

Axiom set : forall (a:Type), Type.
Parameter set_WhyType : forall (a:Type) {a_WT:WhyType a}, WhyType (set a).
Existing Instance set_WhyType.

Parameter mem: forall {a:Type} {a_WT:WhyType a}, a -> (set a) -> Prop.

Parameter infix_eqeq1:
  forall {a:Type} {a_WT:WhyType a}, (set a) -> (set a) -> Prop.

Axiom infix_eqeq_spec2 :
  forall {a:Type} {a_WT:WhyType a},
  forall (s1:set a) (s2:set a), (infix_eqeq1 s1 s2) -> forall (x:a),
  (mem x s1) -> mem x s2.

Axiom infix_eqeq_spec3 :
  forall {a:Type} {a_WT:WhyType a},
  forall (s1:set a) (s2:set a), (infix_eqeq1 s1 s2) -> forall (x:a),
  (mem x s2) -> mem x s1.

Axiom infix_eqeq_spec4 :
  forall {a:Type} {a_WT:WhyType a},
  forall (s1:set a) (s2:set a), (forall (x:a), (mem x s1) <-> (mem x s2)) ->
  infix_eqeq1 s1 s2.

Axiom extensionality :
  forall {a:Type} {a_WT:WhyType a},
  forall (s1:set a) (s2:set a), (infix_eqeq1 s1 s2) -> (s1 = s2).

Parameter subset:
  forall {a:Type} {a_WT:WhyType a}, (set a) -> (set a) -> Prop.

Axiom subset_spec :
  forall {a:Type} {a_WT:WhyType a},
  forall (s1:set a) (s2:set a), (subset s1 s2) -> forall (x:a), (mem x s1) ->
  mem x s2.

Axiom subset_spec1 :
  forall {a:Type} {a_WT:WhyType a},
  forall (s1:set a) (s2:set a), (forall (x:a), (mem x s1) -> mem x s2) ->
  subset s1 s2.

Axiom subset_refl :
  forall {a:Type} {a_WT:WhyType a}, forall (s:set a), subset s s.

Axiom subset_trans :
  forall {a:Type} {a_WT:WhyType a},
  forall (s1:set a) (s2:set a) (s3:set a), (subset s1 s2) ->
  (subset s2 s3) -> subset s1 s3.

Parameter is_empty: forall {a:Type} {a_WT:WhyType a}, (set a) -> Prop.

Axiom is_empty_spec :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a), (is_empty s) -> forall (x:a), ~ (mem x s).

Axiom is_empty_spec1 :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a), (forall (x:a), ~ (mem x s)) -> is_empty s.

Parameter empty: forall {a:Type} {a_WT:WhyType a}, set a.

Axiom empty_def : forall {a:Type} {a_WT:WhyType a}, is_empty (empty : set a).

Parameter add: forall {a:Type} {a_WT:WhyType a}, a -> (set a) -> set a.

Axiom add_spec :
  forall {a:Type} {a_WT:WhyType a},
  forall (x:a) (s:set a), forall (y:a), (mem y (add x s)) ->
  (y = x) \/ (mem y s).

Axiom add_spec1 :
  forall {a:Type} {a_WT:WhyType a},
  forall (x:a) (s:set a), forall (y:a), (y = x) -> mem y (add x s).

Axiom add_spec2 :
  forall {a:Type} {a_WT:WhyType a},
  forall (x:a) (s:set a), forall (y:a), (mem y s) -> mem y (add x s).

Parameter singleton: forall {a:Type} {a_WT:WhyType a}, a -> set a.

Axiom singleton_def :
  forall {a:Type} {a_WT:WhyType a},
  forall (x:a), ((singleton x) = (add x (empty : set a))).

Parameter remove: forall {a:Type} {a_WT:WhyType a}, a -> (set a) -> set a.

Axiom remove_spec :
  forall {a:Type} {a_WT:WhyType a},
  forall (x:a) (s:set a), forall (y:a), (mem y (remove x s)) -> ~ (y = x).

Axiom remove_spec1 :
  forall {a:Type} {a_WT:WhyType a},
  forall (x:a) (s:set a), forall (y:a), (mem y (remove x s)) -> mem y s.

Axiom remove_spec2 :
  forall {a:Type} {a_WT:WhyType a},
  forall (x:a) (s:set a), forall (y:a), (~ (y = x) /\ (mem y s)) ->
  mem y (remove x s).

Axiom add_remove :
  forall {a:Type} {a_WT:WhyType a},
  forall (x:a) (s:set a), (mem x s) -> ((add x (remove x s)) = s).

Axiom remove_add :
  forall {a:Type} {a_WT:WhyType a},
  forall (x:a) (s:set a), ((remove x (add x s)) = (remove x s)).

Axiom subset_remove :
  forall {a:Type} {a_WT:WhyType a},
  forall (x:a) (s:set a), subset (remove x s) s.

Parameter union:
  forall {a:Type} {a_WT:WhyType a}, (set a) -> (set a) -> set a.

Axiom union_spec :
  forall {a:Type} {a_WT:WhyType a},
  forall (s1:set a) (s2:set a), forall (x:a), (mem x (union s1 s2)) ->
  (mem x s1) \/ (mem x s2).

Axiom union_spec1 :
  forall {a:Type} {a_WT:WhyType a},
  forall (s1:set a) (s2:set a), forall (x:a), (mem x s1) ->
  mem x (union s1 s2).

Axiom union_spec2 :
  forall {a:Type} {a_WT:WhyType a},
  forall (s1:set a) (s2:set a), forall (x:a), (mem x s2) ->
  mem x (union s1 s2).

Parameter inter:
  forall {a:Type} {a_WT:WhyType a}, (set a) -> (set a) -> set a.

Axiom inter_spec :
  forall {a:Type} {a_WT:WhyType a},
  forall (s1:set a) (s2:set a), forall (x:a), (mem x (inter s1 s2)) ->
  mem x s1.

Axiom inter_spec1 :
  forall {a:Type} {a_WT:WhyType a},
  forall (s1:set a) (s2:set a), forall (x:a), (mem x (inter s1 s2)) ->
  mem x s2.

Axiom inter_spec2 :
  forall {a:Type} {a_WT:WhyType a},
  forall (s1:set a) (s2:set a), forall (x:a), ((mem x s1) /\ (mem x s2)) ->
  mem x (inter s1 s2).

Parameter diff:
  forall {a:Type} {a_WT:WhyType a}, (set a) -> (set a) -> set a.

Axiom diff_spec :
  forall {a:Type} {a_WT:WhyType a},
  forall (s1:set a) (s2:set a), forall (x:a), (mem x (diff s1 s2)) ->
  mem x s1.

Axiom diff_spec1 :
  forall {a:Type} {a_WT:WhyType a},
  forall (s1:set a) (s2:set a), forall (x:a), (mem x (diff s1 s2)) ->
  ~ (mem x s2).

Axiom diff_spec2 :
  forall {a:Type} {a_WT:WhyType a},
  forall (s1:set a) (s2:set a), forall (x:a), ((mem x s1) /\ ~ (mem x s2)) ->
  mem x (diff s1 s2).

Axiom subset_diff :
  forall {a:Type} {a_WT:WhyType a},
  forall (s1:set a) (s2:set a), subset (diff s1 s2) s1.

Parameter choose: forall {a:Type} {a_WT:WhyType a}, (set a) -> a.

Axiom choose_spec :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a), ~ (is_empty s) -> mem (choose s) s.

Parameter cardinal: forall {a:Type} {a_WT:WhyType a}, (set a) -> Z.

Axiom cardinal_nonneg :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a), ((cardinal s) >= 0%Z)%Z.

Axiom cardinal_empty :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a), ((cardinal s) = 0%Z) -> is_empty s.

Axiom cardinal_empty1 :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a), (is_empty s) -> ((cardinal s) = 0%Z).

Axiom cardinal_add :
  forall {a:Type} {a_WT:WhyType a},
  forall (x:a), forall (s:set a), ~ (mem x s) ->
  ((cardinal (add x s)) = (1%Z + (cardinal s))%Z).

Axiom cardinal_remove :
  forall {a:Type} {a_WT:WhyType a},
  forall (x:a), forall (s:set a), (mem x s) ->
  ((cardinal s) = (1%Z + (cardinal (remove x s)))%Z).

Axiom cardinal_subset :
  forall {a:Type} {a_WT:WhyType a},
  forall (s1:set a) (s2:set a), (subset s1 s2) ->
  ((cardinal s1) <= (cardinal s2))%Z.

Axiom subset_eq :
  forall {a:Type} {a_WT:WhyType a},
  forall (s1:set a) (s2:set a), (subset s1 s2) ->
  ((cardinal s1) = (cardinal s2)) -> infix_eqeq1 s1 s2.

Axiom cardinal1 :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a), ((cardinal s) = 1%Z) -> forall (x:a), (mem x s) ->
  (x = (choose s)).

Axiom real_diff :
  forall (x:t) (y:t), (real_ x) -> (real_ y) -> real_ (infix_mndt x y).

Axiom pure_im_sum :
  forall (x:t) (y:t), (pure_im_ x) -> (pure_im_ y) ->
  pure_im_ (infix_pldt x y).

Axiom equal_decomp :
  forall (x:t) (y:t), ((real_part x) = (real_part y)) ->
  ((im_part x) = (im_part y)) -> (x = y).

Axiom t_equal_decomp :
  forall (x:t) (y:t), ((t_real_part x) = (t_real_part y)) ->
  ((t_im_part x) = (t_im_part y)) -> (x = y).

Axiom pure_im_diff :
  forall (x:t) (y:t), (pure_im_ x) -> (pure_im_ y) ->
  pure_im_ (infix_mndt x y).

Axiom real_div :
  forall (x:t) (y:t), (real_ x) -> ~ (y = tzero) -> (real_ y) ->
  real_ (infix_sldt x y).

Axiom mult_im_im :
  forall (a:t) (b:t), (pure_im_ a) -> (pure_im_ b) ->
  ((infix_asdt a b) =
   (infix_asdt (infix_asdt im im)
    (infix_asdt (r_to_t (im_part a)) (r_to_t (im_part b))))).

Axiom mult_im_im1 :
  forall (a:t) (b:t), (pure_im_ a) -> (pure_im_ b) ->
  ((infix_asdt a b) =
   (prefix_mndt (r_to_t (infix_asas (im_part a) (im_part b))))).

Axiom mult_im_im2 :
  forall (a:t) (b:t), (pure_im_ a) -> (pure_im_ b) ->
  ((real_part (infix_asdt a b)) =
   (prefix_mnas (infix_asas (im_part a) (im_part b)))).

Axiom mult_im_im3 :
  forall (a:t) (b:t), (pure_im_ a) -> (pure_im_ b) ->
  ((im_part (infix_asdt a b)) = 0%R).

Axiom mult_real_im :
  forall (a:t) (b:t), (real_ a) -> (pure_im_ b) ->
  ((infix_asdt a b) =
   (infix_asdt im (infix_asdt (r_to_t (real_part a)) (r_to_t (im_part b))))).

Axiom mult_real_im1 :
  forall (a:t) (b:t), (real_ a) -> (pure_im_ b) ->
  ((infix_asdt a b) =
   (infix_asdt im (r_to_t (infix_asas (real_part a) (im_part b))))).

Axiom mult_real_im2 :
  forall (a:t) (b:t), (real_ a) -> (pure_im_ b) ->
  ((real_part (infix_asdt a b)) = 0%R).

Axiom mult_real_im3 :
  forall (a:t) (b:t), (real_ a) -> (pure_im_ b) ->
  ((im_part (infix_asdt a b)) = (infix_asas (real_part a) (im_part b))).

Axiom mult_im_real :
  forall (a:t) (b:t), (pure_im_ a) -> (real_ b) ->
  ((infix_asdt a b) =
   (infix_asdt im (infix_asdt (r_to_t (im_part a)) (r_to_t (real_part b))))).

Axiom mult_im_real1 :
  forall (a:t) (b:t), (pure_im_ a) -> (real_ b) ->
  ((infix_asdt a b) =
   (infix_asdt im (r_to_t (infix_asas (im_part a) (real_part b))))).

Axiom mult_im_real2 :
  forall (a:t) (b:t), (pure_im_ a) -> (real_ b) ->
  ((real_part (infix_asdt a b)) = 0%R).

Axiom mult_im_real3 :
  forall (a:t) (b:t), (pure_im_ a) -> (real_ b) ->
  ((im_part (infix_asdt a b)) = (infix_asas (im_part a) (real_part b))).

Axiom decomp_mult_gen :
  forall (a:t) (b:t),
  ((real_part (infix_asdt a b)) =
   (infix_mnas (infix_asas (real_part a) (real_part b))
    (infix_asas (im_part a) (im_part b)))).

Axiom decomp_mult_gen1 :
  forall (a:t) (b:t),
  ((im_part (infix_asdt a b)) =
   (infix_plas (infix_asas (real_part a) (im_part b))
    (infix_asas (im_part a) (real_part b)))).

Axiom inv_real :
  forall (a:t), ~ (a = tzero) -> (real_ a) ->
  ((real_part (infix_sldt tone a)) = (infix_slas 1%R (real_part a))).

Axiom inv_real1 :
  forall (a:t), ~ (a = tzero) -> (real_ a) -> real_ (infix_sldt tone a).

Axiom div_real_real :
  forall (a:t) (b:t), (real_ a) -> (real_ b) -> ~ (b = tzero) ->
  ((real_part (infix_sldt a b)) = (infix_slas (real_part a) (real_part b))).

Axiom zeroLessOne : infix_lseqdt tzero tone.

Axiom compatOrderAdd :
  forall (x:t) (y:t) (z:t), (infix_lseqdt x y) -> (real_ x) -> (real_ y) ->
  (real_ z) -> infix_lseqdt (infix_pldt x z) (infix_pldt y z).

Axiom positive_add :
  forall (x:t) (y:t), (infix_lseqdt tzero x) -> (infix_lseqdt tzero y) ->
  infix_lseqdt tzero (infix_pldt x y).

Axiom strict_positive_add_l :
  forall (x:t) (y:t), (infix_lsdt tzero x) -> (infix_lseqdt tzero y) ->
  infix_lsdt tzero (infix_pldt x y).

Axiom strict_compatOrderAdd :
  forall (x:t) (y:t) (z:t) (t1:t), (infix_lsdt x y) -> (infix_lsdt z t1) ->
  (real_ x) -> (real_ y) -> (real_ z) -> (real_ t1) ->
  infix_lsdt (infix_pldt x z) (infix_pldt y t1).

Axiom compat_sup_add :
  forall (x:t) (y:t) (z:t) (t1:t), (infix_gtdt x y) -> (infix_gtdt z t1) ->
  (real_ x) -> (real_ y) -> (real_ z) -> (real_ t1) ->
  infix_gtdt (infix_pldt x z) (infix_pldt y t1).

Axiom compat_supeq_mult :
  forall (x:t) (y:t) (z:t), (infix_gteqdt x y) -> (real_ x) -> (real_ y) ->
  (real_ z) -> (infix_lseqdt tzero z) ->
  infix_gteqdt (infix_asdt x z) (infix_asdt y z).

Axiom compat_supeq_div :
  forall (x:t) (y:t) (z:t), (infix_gteqdt x y) -> (real_ x) -> (real_ y) ->
  (real_ z) -> (infix_lsdt tzero z) ->
  infix_gteqdt (infix_sldt x z) (infix_sldt y z).

Axiom compat_infeq_div :
  forall (x:t) (y:t) (z:t), (infix_lseqdt x y) -> (real_ x) -> (real_ y) ->
  (real_ z) -> (infix_lsdt tzero z) ->
  infix_lseqdt (infix_sldt x z) (infix_sldt y z).

Axiom compat_sup_div :
  forall (x:t) (y:t) (z:t), (infix_gtdt x y) -> (real_ x) -> (real_ y) ->
  (real_ z) -> (infix_lsdt tzero z) ->
  infix_gtdt (infix_sldt x z) (infix_sldt y z).

Axiom compat_inf_div :
  forall (x:t) (y:t) (z:t), (infix_lsdt x y) -> (real_ x) -> (real_ y) ->
  (real_ z) -> (infix_lsdt tzero z) ->
  infix_lsdt (infix_sldt x z) (infix_sldt y z).

Axiom positive_prod_itself :
  forall (x:t), (real_ x) -> infix_lseqdt tzero (infix_asdt x x).

Axiom strict_positive_prod_itself :
  forall (x:t), (real_ x) -> ~ (x = tzero) ->
  infix_lsdt tzero (infix_asdt x x).

Axiom compat_sup_mult :
  forall (x:t) (y:t) (z:t), (infix_gteqdt x y) -> (real_ x) -> (real_ y) ->
  (real_ z) -> (infix_lseqdt tzero z) ->
  infix_gteqdt (infix_asdt x z) (infix_asdt y z).

Axiom strict_compat_sup_mult :
  forall (x:t) (y:t) (z:t), (infix_gtdt x y) -> (real_ x) -> (real_ y) ->
  (real_ z) -> (infix_lsdt tzero z) ->
  infix_gtdt (infix_asdt x z) (infix_asdt y z).

Axiom compat_sup_mult_left :
  forall (x:t) (y:t) (z:t), (infix_gteqdt x y) -> (real_ x) -> (real_ y) ->
  (real_ z) -> (infix_lseqdt tzero z) ->
  infix_gteqdt (infix_asdt z x) (infix_asdt z y).

Axiom strict_compat_sup_mult_left :
  forall (x:t) (y:t) (z:t), (infix_gtdt x y) -> (real_ x) -> (real_ y) ->
  (real_ z) -> (infix_lsdt tzero z) ->
  infix_gtdt (infix_asdt z x) (infix_asdt z y).

Axiom inv_inf_eq :
  forall (a:t) (b:t), (infix_lsdt tzero a) -> (infix_lsdt tzero b) ->
  (infix_lseqdt a b) -> infix_lseqdt (infix_sldt tone b) (infix_sldt tone a).

Axiom inv_sup_eq :
  forall (a:t) (b:t), (infix_lsdt tzero a) -> (infix_lsdt tzero b) ->
  (infix_gteqdt a b) -> infix_gteqdt (infix_sldt tone b) (infix_sldt tone a).

Axiom inv_sup :
  forall (x:t) (y:t), (real_ x) -> (real_ y) ->
  ((infix_lsdt tzero x) /\ (infix_lsdt x y)) ->
  infix_gtdt (infix_sldt tone x) (infix_sldt tone y).

Axiom inv_eqinf :
  forall (x:t) (y:t), (real_ x) -> (real_ y) ->
  ((infix_lsdt tzero x) /\ (infix_lseqdt x y)) ->
  infix_gteqdt (infix_sldt tone x) (infix_sldt tone y).

Axiom inv_eqsup :
  forall (x:t) (y:t), (real_ x) -> (real_ y) ->
  ((infix_gteqdt x y) /\ (infix_gtdt y tzero)) ->
  infix_lseqdt (infix_sldt tone x) (infix_sldt tone y).

Axiom inv_inf :
  forall (x:t) (y:t), (real_ x) -> (real_ y) ->
  ((infix_gtdt x y) /\ (infix_gtdt y tzero)) ->
  infix_lsdt (infix_sldt tone x) (infix_sldt tone y).

Axiom inv_neg :
  forall (x:t), (real_ x) -> (infix_lsdt x tzero) ->
  infix_lsdt (infix_sldt tone x) tzero.

Axiom lower_inv :
  forall (a:t) (b:t) (c:t), (infix_lsdt tzero b) -> (infix_lseqdt tzero a) ->
  (infix_lseqdt b c) -> infix_gteqdt (infix_sldt a b) (infix_sldt a c).

Axiom lower_inv_ :
  forall (a:t) (b:t) (c:t), (infix_lsdt tzero b) -> (infix_lseqdt tzero a) ->
  (infix_lseqdt b c) -> infix_lseqdt (infix_sldt a c) (infix_sldt a b).

Axiom zero_add_t :
  forall (a1:t) (a2:t), (a1 = tzero) -> ((infix_pldt a1 a2) = a2).

Axiom add_zero_t :
  forall (a1:t) (a2:t), (a2 = tzero) -> ((infix_pldt a1 a2) = a1).

Axiom one_mult_t :
  forall (a1:t) (a2:t), (a1 = tone) -> ((infix_asdt a1 a2) = a2).

Axiom one_mult_t_const : forall (a:t), ((infix_asdt tone a) = a).

Axiom zero_mult_t_const : forall (a:t), ((infix_asdt tzero a) = tzero).

Axiom mult_zero_t_const : forall (a:t), ((infix_asdt a tzero) = tzero).

Axiom subs_eq :
  forall (a1:t) (a2:t) (b1:t) (b2:t), (a1 = a2) -> (b1 = b2) ->
  ((infix_mndt a1 b1) = (infix_mndt a2 b2)).

Axiom subst_itself :
  forall (a1:t) (a2:t), (a1 = a2) -> ((infix_mndt a1 a2) = tzero).

Axiom mult_assoc_four :
  forall (a:t) (b:t) (c:t) (d:t),
  ((infix_asdt (infix_asdt a (infix_asdt b c)) d) =
   (infix_asdt (infix_asdt a b) (infix_asdt c d))).

Axiom mult_assoc_rev :
  forall (a:t) (b:t) (c:t),
  ((infix_asdt a (infix_asdt b c)) = (infix_asdt (infix_asdt a b) c)).

Axiom div_mult :
  forall (a:t) (b:t) (c:t), ~ (c = tzero) ->
  ((infix_asdt a (infix_sldt b c)) = (infix_sldt (infix_asdt a b) c)).

Axiom div_mult_rev :
  forall (a:t) (b:t) (c:t), ~ (c = tzero) ->
  ((infix_sldt (infix_asdt a b) c) = (infix_asdt a (infix_sldt b c))).

Axiom triang_p :
  forall (a:t) (b:t),
  ((infix_asdt (infix_pldt a b) (infix_pldt a b)) =
   (infix_pldt (infix_pldt (infix_asdt a a) (infix_asdt b b))
    (infix_asdt (infix_asdt ttwo a) b))).

Axiom triang_n :
  forall (a:t) (b:t),
  ((infix_asdt (infix_mndt a b) (infix_mndt a b)) =
   (infix_mndt (infix_pldt (infix_asdt a a) (infix_asdt b b))
    (infix_asdt (infix_asdt ttwo a) b))).

Axiom triang_s :
  forall (a:t) (b:t) (c:t) (d:t) (e:t),
  ((infix_pldt (infix_pldt (infix_pldt a b) c)
    (infix_pldt (infix_mndt d b) e))
   = (infix_pldt (infix_pldt a c) (infix_pldt d e))).

Axiom triang_t :
  forall (a:t) (b:t),
  ((infix_asdt (infix_pldt a b) (infix_mndt a b)) =
   (infix_mndt (infix_asdt a a) (infix_asdt b b))).

Axiom triang_sr :
  forall (a:t) (b:t) (c:t) (d:t) (e:t),
  ((infix_pldt (infix_pldt (infix_mndt a b) c)
    (infix_pldt (infix_pldt d b) e))
   = (infix_pldt (infix_pldt a c) (infix_pldt d e))).

Axiom add_pos :
  forall (x:t) (y:t), (infix_lseqdt tzero x) -> (infix_lseqdt tzero y) ->
  infix_lseqdt tzero (infix_pldt x y).

Axiom add_pos_strit_l :
  forall (x:t) (y:t), (infix_lsdt tzero x) -> (infix_lseqdt tzero y) ->
  infix_lsdt tzero (infix_pldt x y).

Axiom add_pos_strit_r :
  forall (x:t) (y:t), (infix_lseqdt tzero x) -> (infix_lsdt tzero y) ->
  infix_lsdt tzero (infix_pldt x y).

Axiom modulus_pre_pre :
  forall (a:t) (b:t) (c:t) (d:t),
  ((infix_pldt (infix_pldt (infix_asdt a b) (infix_asdt c d))
    (infix_pldt (infix_asdt a d) (infix_asdt c b)))
   =
   (infix_pldt (infix_asdt a (infix_pldt b d))
    (infix_asdt c (infix_pldt b d)))).

Axiom modulus_pre_pre1 :
  forall (a:t) (b:t) (c:t) (d:t),
  ((infix_pldt (infix_pldt (infix_asdt a b) (infix_asdt c d))
    (infix_pldt (infix_asdt a d) (infix_asdt c b)))
   = (infix_asdt (infix_pldt a c) (infix_pldt b d))).

Axiom modulus_pre :
  forall (a:t) (b:t) (c:t) (d:t),
  ((infix_pldt
    (infix_pldt (infix_asdt (infix_asdt a b) (infix_asdt a b))
     (infix_asdt (infix_asdt c d) (infix_asdt c d)))
    (infix_pldt (infix_asdt (infix_asdt a d) (infix_asdt a d))
     (infix_asdt (infix_asdt c b) (infix_asdt c b))))
   =
   (infix_asdt (infix_pldt (infix_asdt a a) (infix_asdt c c))
    (infix_pldt (infix_asdt b b) (infix_asdt d d)))).

Parameter real_sqrt: R -> R.

Axiom real_sqrt_spec :
  forall (x:R), (infix_lseqas 0%R x) ->
  ((infix_asas (real_sqrt x) (real_sqrt x)) = x).

Axiom real_sqrt_spec1 :
  forall (x:R), (infix_lseqas 0%R x) ->
  ((real_sqrt x) = (Reals.R_sqrt.sqrt x)).

Parameter square_rt: t -> t.

Axiom square_rt_def :
  forall (x:t), (infix_lseqdt tzero x) ->
  ((square_rt x) = (r_to_t (real_sqrt (real_part x)))).

Axiom square_rt_spec :
  forall (x:t), (infix_lseqdt tzero x) -> real_ (square_rt x).

Axiom square_rt_spec1 :
  forall (x:t), (infix_lseqdt tzero x) ->
  ((infix_asdt (square_rt x) (square_rt x)) = x).

Axiom square_rt_spec2 :
  forall (x:t), (infix_lseqdt tzero x) -> infix_lseqdt tzero (square_rt x).

Axiom square_rt_eq :
  forall (a:t) (b:t), (infix_lseqdt tzero a) -> (infix_lseqdt tzero b) ->
  (a = b) -> ((square_rt a) = (square_rt b)).

Axiom real_square_rt :
  forall (x:t), (real_ x) -> (infix_lseqdt tzero x) -> real_ (square_rt x).

Axiom pos_square_rt :
  forall (x:t), (real_ x) -> (infix_lseqdt tzero x) ->
  infix_gteqdt (square_rt x) tzero.

Axiom square_rt_square :
  forall (x:t), (infix_lseqdt tzero x) ->
  ((infix_asdt (square_rt x) (square_rt x)) = x).

Axiom square_rt_infeq :
  forall (x:t) (y:t), (real_ x) -> (real_ y) ->
  ((infix_lseqdt tzero x) /\ (infix_lseqdt x y)) ->
  infix_lseqdt (square_rt x) (square_rt y).

Axiom square_rt_inf :
  forall (x:t) (y:t), ((infix_lseqdt tzero x) /\ (infix_lsdt x y)) ->
  infix_lsdt (square_rt x) (square_rt y).

Axiom injective_square_rt :
  forall (x:t) (y:t), (real_ x) -> (real_ y) -> (infix_lseqdt tzero x) ->
  (infix_lseqdt tzero y) -> ((square_rt x) = (square_rt y)) -> (x = y).

Axiom injective_square :
  forall (x:t) (y:t), (real_ x) -> (real_ y) -> (infix_lseqdt tzero x) ->
  (infix_lseqdt tzero y) -> ((infix_asdt x x) = (infix_asdt y y)) ->
  (x = y).

Axiom square_rt_tone : ((square_rt tone) = tone).

Axiom square_rt_mult :
  forall (t1:t) (t':t), (real_ t1) -> (infix_lseqdt tzero t1) ->
  (real_ t') -> (infix_lseqdt tzero t') ->
  ((infix_asdt (square_rt t1) (square_rt t')) =
   (square_rt (infix_asdt t1 t'))).

Axiom square_rt_mult_rev :
  forall (t1:t) (t':t), (real_ t1) -> (infix_lseqdt tzero t1) ->
  (real_ t') -> (infix_lseqdt tzero t') ->
  ((square_rt (infix_asdt t1 t')) =
   (infix_asdt (square_rt t1) (square_rt t'))).

Parameter modulus: t -> t.

Axiom modulus_def :
  forall (x:t),
  ((modulus x) =
   (square_rt
    (infix_pldt (infix_asdt (t_real_part x) (t_real_part x))
     (infix_asdt (t_im_part x) (t_im_part x))))).

Axiom modulus_spec : forall (x:t), infix_lseqdt tzero (modulus x).

Parameter tone_modulus: t -> Prop.

Axiom tone_modulus_def :
  forall (x:t), (tone_modulus x) -> ((modulus x) = tone).

Axiom tone_modulus_def1 :
  forall (x:t), ((modulus x) = tone) -> tone_modulus x.

Axiom modulus_eq :
  forall (x:t) (y:t),
  ((infix_asdt (t_real_part x) (t_real_part x)) =
   (infix_asdt (t_real_part y) (t_real_part y))) ->
  ((infix_asdt (t_im_part x) (t_im_part x)) =
   (infix_asdt (t_im_part y) (t_im_part y))) ->
  ((modulus x) = (modulus y)).

Axiom square_rt_simpl :
  forall (x:t), (infix_lsdt tzero x) ->
  ((infix_asdt x (infix_sldt tone (square_rt x))) = (square_rt x)).

Axiom square_rt_simpl_fact :
  forall (x:t) (a:t), (infix_lsdt tzero x) ->
  ((infix_asdt (infix_asdt a (infix_sldt tone (square_rt x))) x) =
   (infix_asdt a (square_rt x))).

Axiom square_rt_simpl_mult :
  forall (x:t) (a:t), (infix_lsdt tzero x) ->
  ((infix_asdt (infix_asdt (square_rt x) a) (infix_sldt tone (square_rt x)))
   = a).

Axiom square_rt_simpl_fact_assoc :
  forall (x:t) (a:t), (infix_lsdt tzero x) ->
  ((infix_asdt x (infix_asdt a (infix_sldt tone (square_rt x)))) =
   (infix_asdt a (square_rt x))).

Axiom modulus_itself :
  forall (x:t) (y:t), (x = y) -> ((modulus x) = (modulus y)).

Axiom modulus_real_pos :
  forall (x:t), (real_ x) -> (infix_lseqdt tzero x) -> ((modulus x) = x).

Axiom modulus_real_pos_inv :
  forall (x:t), (real_ x) -> (infix_lseqdt tzero x) ->
  ((modulus (prefix_mndt x)) = x).

Axiom strict_positive_modulus :
  forall (x:t), ~ (x = tzero) -> infix_lsdt tzero (modulus x).

Axiom not_modulus_zero :
  forall (x:t), ~ (x = tzero) -> ~ ((modulus x) = tzero).

Axiom modulus_real : forall (x:t), real_ (modulus x).

Axiom t_mult_real_square :
  forall (a:t) (b:t),
  ((infix_asdt (t_real_part (infix_asdt a b)) (t_real_part (infix_asdt a b)))
   =
   (infix_mndt
    (infix_pldt
     (infix_asdt (infix_asdt (t_real_part a) (t_real_part a))
      (infix_asdt (t_real_part b) (t_real_part b)))
     (infix_asdt (infix_asdt (t_im_part a) (t_im_part a))
      (infix_asdt (t_im_part b) (t_im_part b))))
    (infix_asdt ttwo
     (infix_asdt
      (infix_asdt (infix_asdt (t_real_part a) (t_real_part b)) (t_im_part a))
      (t_im_part b))))).

Axiom t_mult_im_square :
  forall (a:t) (b:t),
  ((infix_asdt (t_im_part (infix_asdt a b)) (t_im_part (infix_asdt a b))) =
   (infix_pldt
    (infix_pldt
     (infix_asdt (infix_asdt (t_real_part a) (t_real_part a))
      (infix_asdt (t_im_part b) (t_im_part b)))
     (infix_asdt (infix_asdt (t_im_part a) (t_im_part a))
      (infix_asdt (t_real_part b) (t_real_part b))))
    (infix_asdt ttwo
     (infix_asdt
      (infix_asdt (infix_asdt (t_real_part a) (t_real_part b)) (t_im_part a))
      (t_im_part b))))).

Axiom mult_modulus_pre :
  forall (a:t) (b:t),
  ((infix_pldt
    (infix_asdt (t_real_part (infix_asdt a b))
     (t_real_part (infix_asdt a b)))
    (infix_asdt (t_im_part (infix_asdt a b)) (t_im_part (infix_asdt a b))))
   =
   (infix_asdt
    (infix_pldt (infix_asdt (t_real_part a) (t_real_part a))
     (infix_asdt (t_im_part a) (t_im_part a)))
    (infix_pldt (infix_asdt (t_real_part b) (t_real_part b))
     (infix_asdt (t_im_part b) (t_im_part b))))).

Axiom mult_modulus :
  forall (x:t) (y:t),
  ((modulus (infix_asdt x y)) = (infix_asdt (modulus x) (modulus y))).

Axiom mult_real_modulus :
  forall (x:t) (y:t), (real_ x) -> (infix_lseqdt tzero x) ->
  ((modulus (infix_asdt x y)) = (infix_asdt x (modulus y))).

Axiom mult_modulus_real :
  forall (x:t) (y:t), (real_ y) -> (infix_lseqdt tzero y) ->
  ((modulus (infix_asdt x y)) = (infix_asdt (modulus x) y)).

Axiom mult_modulus_non_null :
  forall (x:t) (y:t), ~ (x = tzero) -> ~ (y = tzero) ->
  ~ ((modulus (infix_asdt x y)) = tzero).

Axiom modulus_to_non_null :
  forall (x:t), (infix_lsdt tzero (modulus x)) -> ~ (x = tzero).

Axiom mult_tone_modulus :
  forall (x:t) (y:t), (tone_modulus x) -> (tone_modulus y) ->
  tone_modulus (infix_asdt x y).

Axiom modulus_pos :
  forall (x:t), ~ (x = tzero) -> infix_lseqdt tzero (modulus x).

Axiom modulus_infeq :
  forall (x:t) (b:t) (c:t), (real_ x) -> (infix_lseqdt b c) ->
  (infix_lseqdt (modulus x) b) -> infix_lseqdt x c.

Axiom modulus_inf :
  forall (x:t) (b:t) (c:t), (real_ x) -> (infix_lsdt b c) ->
  (infix_lseqdt (modulus x) b) -> infix_lsdt x c.

Axiom modulus_diff_rev :
  forall (a:t) (b:t),
  ((modulus (infix_mndt a b)) = (modulus (infix_mndt b a))).

Axiom modulus_simpl_leq :
  forall (a:t) (b:t) (c:t), (real_ a) -> (real_ b) -> (real_ c) ->
  (infix_lsdt tzero c) ->
  (infix_lseqdt (modulus (infix_asdt a c)) (infix_asdt b c)) ->
  infix_lseqdt (modulus a) b.

Axiom modulus_simpl_leq_rev :
  forall (a:t) (b:t) (c:t), (real_ a) -> (real_ b) -> (real_ c) ->
  (infix_lseqdt tzero c) -> (infix_lseqdt (modulus a) b) ->
  infix_lseqdt (modulus (infix_asdt a c)) (infix_asdt b c).

Axiom div_eq :
  forall (a1:t) (a2:t) (b1:t) (b2:t), (a1 = a2) -> (b1 = b2) ->
  ~ (b1 = tzero) -> ((infix_sldt a1 b1) = (infix_sldt a2 b2)).

Axiom add_eq_inv_t :
  forall (a1:t) (a2:t) (b1:t) (b2:t), (a1 = a2) -> (b1 = b2) ->
  ((infix_pldt a1 b1) = (infix_pldt b2 a2)).

Axiom mult_eq_inv_t :
  forall (a1:t) (a2:t) (b1:t) (b2:t), (a1 = a2) -> (b1 = b2) ->
  ((infix_asdt a1 b1) = (infix_asdt b2 a2)).

Axiom sum_frac :
  forall (a1:t) (a2:t) (b:t), ~ (b = tzero) ->
  ((infix_pldt (infix_sldt a1 b) (infix_sldt a2 b)) =
   (infix_sldt (infix_pldt a1 a2) b)).

Axiom sum_frac_rev :
  forall (a1:t) (a2:t) (b:t), ~ (b = tzero) ->
  ((infix_sldt (infix_pldt a1 a2) b) =
   (infix_pldt (infix_sldt a1 b) (infix_sldt a2 b))).

Parameter p_id: forall {a:Type} {a_WT:WhyType a}, a -> a.

Axiom p_id_def :
  forall {a:Type} {a_WT:WhyType a}, forall (a1:a), ((p_id a1) = a1).

Parameter const:
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b}, a -> b -> a.

Axiom const_def :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (a1:a) (b1:b), ((const a1 b1) = a1).

Parameter constant_f:
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b}, (a -> b) ->
  Prop.

Axiom constant_f_def :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:a -> b), (constant_f f) ->
  exists a1:b, (f = ((fun (y0:b) (y1:a) => (const y0 y1)) a1)).

Axiom constant_f_def1 :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:a -> b),
  (exists a1:b, (f = ((fun (y0:b) (y1:a) => (const y0 y1)) a1))) ->
  constant_f f.

Parameter op: forall {im1:Type} {im1_WT:WhyType im1}, im1 -> im1 -> im1.

Parameter po: forall {im1:Type} {im1_WT:WhyType im1}, im1 -> im1 -> im1.

Parameter inver: forall {im1:Type} {im1_WT:WhyType im1}, im1 -> im1.

Parameter filter:
  forall {a:Type} {a_WT:WhyType a}, (a -> bool) -> (set a) -> set a.

Axiom filter_def :
  forall {a:Type} {a_WT:WhyType a},
  forall (p:a -> bool) (u:set a), forall (x:a), (mem x (filter p u)) ->
  ((p x) = true).

Axiom filter_def1 :
  forall {a:Type} {a_WT:WhyType a},
  forall (p:a -> bool) (u:set a), forall (x:a), (mem x (filter p u)) ->
  mem x u.

Axiom filter_def2 :
  forall {a:Type} {a_WT:WhyType a},
  forall (p:a -> bool) (u:set a), forall (x:a),
  (((p x) = true) /\ (mem x u)) -> mem x (filter p u).

Axiom filter_cardinal :
  forall {a:Type} {a_WT:WhyType a},
  forall (p:a -> bool) (u:set a), ((cardinal (filter p u)) <= (cardinal u))%Z.

Parameter map:
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b}, (a -> b) ->
  (set a) -> set b.

Axiom map_def1 :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:a -> b) (u:set a), forall (y:b), (mem y (map f u)) ->
  exists x:a, (mem x u) /\ (y = (f x)).

Axiom map_def11 :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:a -> b) (u:set a), forall (y:b),
  (exists x:a, (mem x u) /\ (y = (f x))) -> mem y (map f u).

Axiom map_def2 :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:a -> b) (u:set a), forall (x:a), (mem x u) -> mem (f x) (map f u).

Axiom map_cardinal :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:a -> b) (u:set a), ((cardinal (map f u)) <= (cardinal u))%Z.

Parameter fir:
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b}, (a* b)%type ->
  a.

Parameter sec:
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b}, (a* b)%type ->
  b.

Axiom projections :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (o:(a* b)%type), (o = (fir o, sec o)).

Axiom get_fir :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (a1:a) (b1:b), ((fir (a1, b1)) = a1).

Axiom get_sec :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (a1:a) (b1:b), ((sec (a1, b1)) = b1).

(* Why3 assumption *)
Inductive ref (a:Type) :=
  | mk_ref : a -> ref a.
Axiom ref_WhyType : forall (a:Type) {a_WT:WhyType a}, WhyType (ref a).
Existing Instance ref_WhyType.
Arguments mk_ref {a}.

(* Why3 assumption *)
Definition contents {a:Type} {a_WT:WhyType a} (v:ref a) : a :=
  match v with
  | mk_ref x => x
  end.

Parameter prefix_ex: forall {a:Type} {a_WT:WhyType a}, (ref a) -> a.

Axiom prefix_ex_def :
  forall {a:Type} {a_WT:WhyType a},
  forall (r:ref a), ((prefix_ex r) = (contents r)).

Parameter eq_e: forall {a:Type} {a_WT:WhyType a}, a -> a -> Prop.

Axiom eq_e_def :
  forall {a:Type} {a_WT:WhyType a},
  forall (a1:a) (a':a), (eq_e a1 a') -> (a1 = a').

Axiom eq_e_def1 :
  forall {a:Type} {a_WT:WhyType a},
  forall (a1:a) (a':a), (a1 = a') -> eq_e a1 a'.

Axiom set_equal :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (s':set a), (forall (e:a), (mem e s) -> mem e s') ->
  (forall (e:a), (mem e s') -> mem e s) -> (s = s').

Axiom set_equal_eqq :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (s':set a), (forall (e:a), (mem e s) -> mem e s') ->
  (forall (e:a), (mem e s') -> mem e s) -> infix_eqeq s s'.

Axiom union_exchange :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (s':set a), ~ (is_empty s') ->
  ((union (add (choose s') s) (remove (choose s') s')) = (union s s')).

Axiom get_filter :
  forall {a:Type} {a_WT:WhyType a},
  forall (p:a -> bool) (s:set a) (x:a), (mem x (filter p s)) ->
  ((p x) = true).

Axiom get_filter1 :
  forall {a:Type} {a_WT:WhyType a},
  forall (p:a -> bool) (s:set a) (x:a), (mem x (filter p s)) -> mem x s.

Axiom set_filter :
  forall {a:Type} {a_WT:WhyType a},
  forall (p:a -> bool) (s:set a) (x:a), ((p x) = true) -> (mem x s) ->
  mem x (filter p s).

Axiom inter_empty :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (s':set a), (is_empty s) -> is_empty (inter s s').

Axiom inter_empty_comm :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (s':set a), (is_empty s') -> is_empty (inter s s').

Axiom inter_empty_elts :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (s':set a), (forall (e:a), (mem e s) -> ~ (mem e s')) ->
  is_empty (inter s s').

Axiom inter_sym :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (s':set a), ((inter s s') = (inter s' s)).

Axiom union_sym :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (s':set a), ((union s s') = (union s' s)).

Axiom union_empty :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (s':set a), (is_empty s) -> ((union s s') = s').

Axiom union_comm :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (s':set a), (is_empty s') -> ((union s s') = s).

Axiom union_members :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (s':set a), forall (a1:a), (mem a1 (union s s')) ->
  ~ (mem a1 s) -> mem a1 s'.

Axiom union_members1 :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (s':set a), forall (a1:a), (mem a1 (union s s')) ->
  ~ (mem a1 s') -> mem a1 s.

Axiom union_alt :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (s':set a) (e:a), (mem e (union s s')) -> ~ (mem e s) ->
  mem e s'.

Axiom union_empty_comm :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (s':set a), (is_empty s') -> ((union s s') = s).

Axiom set_subset :
  forall {a:Type} {a_WT:WhyType a},
  forall (s':set a) (s:set a), (forall (e:a), (mem e s') -> mem e s) ->
  subset s' s.

Axiom set_empty :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a), (forall (e:a), ~ (mem e s)) -> (s = (empty : set a)).

Axiom set_empty1 :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a), (forall (e:a), ~ (mem e s)) -> is_empty s.

Axiom get_empty :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a), (s = (empty : set a)) -> forall (e:a), ~ (mem e s).

Axiom get_empty1 :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a), (s = (empty : set a)) -> is_empty s.

Axiom get_non_empty :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a), ~ (is_empty s) -> exists e:a, mem e s.

Axiom set_non_empty :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a), (exists e:a, mem e s) -> ~ (is_empty s).

Axiom set_non_empty1 :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a), (exists e:a, mem e s) -> ((cardinal s) > 0%Z)%Z.

Axiom set_pos_card_elt :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (a1:a), (mem a1 s) -> ((cardinal s) > 0%Z)%Z.

Axiom union_add :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (s':set a) (x:a), ~ (mem x s') ->
  ((union s (add x s')) = (add x (union s s'))).

Axiom union_add_mem :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (s':set a) (x:a) (y:a), (mem x (add y (union s s'))) ->
  ~ (mem x s') -> ~ (mem x s) -> (x = y).

Axiom union_add_comm :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (s':set a) (x:a), ~ (mem x s') ->
  ((add x (union s s')) = (union s (add x s'))).

Axiom remove_add1 :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (x:a), ~ (mem x s) -> ((remove x (add x s)) = s).

Axiom add_remove1 :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (x:a), (mem x s) -> ((add x (remove x s)) = s).

Parameter p_injective:
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b}, (a -> b) ->
  (set a) -> Prop.

Axiom p_injective_def :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:a -> b) (s:set a), (p_injective f s) -> forall (e:a) (e':a),
  (mem e s) -> (mem e' s) -> ~ (e = e') -> ~ ((f e) = (f e')).

Axiom p_injective_def1 :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:a -> b) (s:set a),
  (forall (e:a) (e':a), (mem e s) -> (mem e' s) -> ~ (e = e') ->
   ~ ((f e) = (f e'))) ->
  p_injective f s.

Axiom set_map_mem :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:a -> b) (s:set a) (b1:b),
  (exists a1:a, (mem a1 s) /\ (b1 = (f a1))) -> mem b1 (map f s).

Axiom map_add :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:a -> b) (s:set a) (x:a), ~ (mem x s) ->
  ((map f (add x s)) = (add (f x) (map f s))).

Axiom map_eq :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:a -> b) (g:a -> b) (s:set a),
  (forall (e:a), (mem e s) -> ((f e) = (g e))) -> ((map f s) = (map g s)).

Axiom remove_mem :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (e:a) (f:a), (mem e (remove f s)) -> mem e s.

Axiom injective_map_cardinal :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:a -> b) (s:set a), (p_injective f s) ->
  ((cardinal (map f s)) = (cardinal s)).

Axiom set_map_mem_el :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:a -> b) (s:set a) (b1:b) (a1:a), (mem a1 s) -> (b1 = (f a1)) ->
  mem b1 (map f s).

Axiom set_map_mem_el_gen :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:a -> b) (s:set a) (b1:b),
  (exists a1:a, (mem a1 s) /\ (b1 = (f a1))) -> mem b1 (map f s).

Axiom map_antec :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:a -> b) (s:set a) (b1:b), (mem b1 (map f s)) ->
  exists a1:a, (mem a1 s) /\ (b1 = (f a1)).

Axiom map_antec_gen :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:a -> b) (s:set a), forall (b1:b), (mem b1 (map f s)) ->
  exists a1:a, (mem a1 s) /\ (b1 = (f a1)).

Axiom map_remove_choose :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (s:set a) (f:a -> b), (p_injective f s) ->
  ((map f (remove (choose s) s)) = (remove (f (choose s)) (map f s))).

Parameter antec_set:
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b}, (set a) ->
  (a -> b) -> b -> set a.

Parameter result:
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b}, (a -> b) ->
  b -> a -> bool.

Axiom result_def :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:a -> b) (b1:b) (e:a),
  (((result f b1) e) = true) <-> (eq_e (f e) b1).

Axiom antec_set_def :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (s:set a) (f:a -> b) (b1:b), (mem b1 (map f s)) ->
  ((antec_set s f b1) = (filter (result f b1) s)).

Parameter remove_s:
  forall {a:Type} {a_WT:WhyType a}, (set a) -> (set a) -> set a.

Parameter result1: forall {a:Type} {a_WT:WhyType a}, (set a) -> a -> bool.

Axiom result_def1 :
  forall {a:Type} {a_WT:WhyType a},
  forall (s':set a) (e:a), (((result1 s') e) = true) <-> ~ (mem e s').

Axiom remove_s_def :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (s':set a), (subset s' s) ->
  ((remove_s s s') = (filter (result1 s') s)).

Axiom remove_s_spec :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (s':set a), (subset s' s) -> forall (e:a),
  (mem e (remove_s s s')) -> mem e s.

Axiom remove_s_spec1 :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (s':set a), (subset s' s) -> forall (e:a),
  (mem e (remove_s s s')) -> ~ (mem e s').

Axiom remove_s_spec2 :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (s':set a), (subset s' s) -> forall (e:a),
  ((mem e s) /\ ~ (mem e s')) -> mem e (remove_s s s').

Parameter remove_antecs:
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b}, (set a) ->
  (a -> b) -> b -> set a.

Axiom remove_antecs_def :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (s:set a) (f:a -> b) (b1:b), (mem b1 (map f s)) ->
  ((remove_antecs s f b1) = (remove_s s (antec_set s f b1))).

Axiom remove_antecs_spec :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (s:set a) (f:a -> b) (b1:b), (mem b1 (map f s)) -> forall (e:a),
  (mem e (remove_antecs s f b1)) -> mem e s.

Axiom remove_antecs_spec1 :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (s:set a) (f:a -> b) (b1:b), (mem b1 (map f s)) -> forall (e:a),
  (mem e (remove_antecs s f b1)) -> ~ ((f e) = b1).

Axiom remove_antecs_spec2 :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (s:set a) (f:a -> b) (b1:b), (mem b1 (map f s)) -> forall (e:a),
  ((mem e s) /\ ~ ((f e) = b1)) -> mem e (remove_antecs s f b1).

Axiom remove_antecs_spec3 :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (s:set a) (f:a -> b) (b1:b), (mem b1 (map f s)) ->
  ((cardinal (remove_antecs s f b1)) < (cardinal s))%Z.

Axiom map_remove_antec :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (s:set a) (f:a -> b) (b1:b), (mem b1 (map f s)) ->
  ((map f (remove_antecs s f b1)) = (remove b1 (map f s))).

Axiom map_non_empty :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:a -> b) (s:set a), ((cardinal s) > 0%Z)%Z ->
  ((cardinal (map f s)) > 0%Z)%Z.

Axiom non_empty_map :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:a -> b) (s:set a), ((cardinal (map f s)) > 0%Z)%Z ->
  ((cardinal s) > 0%Z)%Z.

Parameter right_injections:
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b}, a -> (set b) ->
  set (a* b)%type.

Axiom right_injections_def :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (a1:a) (s:set b), (is_empty s) ->
  ((right_injections a1 s) = (empty : set (a* b)%type)).

Axiom right_injections_def1 :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (a1:a) (s:set b), ~ (is_empty s) ->
  ((right_injections a1 s) =
   (add (a1, choose s) (right_injections a1 (remove (choose s) s)))).

Axiom right_injections_spec :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (a1:a) (s:set b),
  ((cardinal (right_injections a1 s)) = (cardinal s)).

Axiom right_injections_spec1 :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (a1:a) (s:set b), forall (a':a), forall (b1:b),
  (mem (a', b1) (right_injections a1 s)) -> (a' = a1).

Axiom right_injections_spec2 :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (a1:a) (s:set b), forall (a':a), forall (b1:b),
  (mem (a', b1) (right_injections a1 s)) -> mem b1 s.

Axiom right_injections_spec3 :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (a1:a) (s:set b), forall (a':a), forall (b1:b),
  ((a' = a1) /\ (mem b1 s)) -> mem (a', b1) (right_injections a1 s).

Axiom right_injections_spec4 :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (a1:a) (s:set b),
  ((right_injections a1 s) = (map (fun (b1:b) => (a1, b1)) s)).

Parameter left_injections:
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b}, (set a) -> b ->
  set (a* b)%type.

Axiom left_injections_def :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (s:set a) (b1:b), (is_empty s) ->
  ((left_injections s b1) = (empty : set (a* b)%type)).

Axiom left_injections_def1 :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (s:set a) (b1:b), ~ (is_empty s) ->
  ((left_injections s b1) =
   (add (choose s, b1) (left_injections (remove (choose s) s) b1))).

Axiom left_injections_spec :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (s:set a) (b1:b), forall (a1:a), forall (b':b),
  (mem (a1, b') (left_injections s b1)) -> mem a1 s.

Axiom left_injections_spec1 :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (s:set a) (b1:b), forall (a1:a), forall (b':b),
  (mem (a1, b') (left_injections s b1)) -> (b' = b1).

Axiom left_injections_spec2 :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (s:set a) (b1:b), forall (a1:a), forall (b':b),
  ((mem a1 s) /\ (b' = b1)) -> mem (a1, b') (left_injections s b1).

Axiom left_injections_spec3 :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (s:set a) (b1:b), ((cardinal (left_injections s b1)) = (cardinal s)).

Axiom left_injections_spec4 :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (s:set a) (b1:b),
  ((left_injections s b1) = (map (fun (a1:a) => (a1, b1)) s)).

Axiom right_injections_l :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (a1:a) (s:set b),
  ((cardinal (right_injections a1 s)) = (cardinal s)).

Axiom right_injections_l1 :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (a1:a) (s:set b), forall (a':a), forall (b1:b),
  (mem (a', b1) (right_injections a1 s)) -> (a' = a1).

Axiom right_injections_l2 :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (a1:a) (s:set b), forall (a':a), forall (b1:b),
  (mem (a', b1) (right_injections a1 s)) -> mem b1 s.

Axiom right_injections_l3 :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (a1:a) (s:set b), forall (a':a), forall (b1:b),
  ((a' = a1) /\ (mem b1 s)) -> mem (a', b1) (right_injections a1 s).

Axiom right_injections_l4 :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (a1:a) (s:set b),
  ((right_injections a1 s) = (map (fun (b1:b) => (a1, b1)) s)).

Axiom left_injections_l :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (s:set a) (b1:b), forall (a1:a), forall (b':b),
  (mem (a1, b') (left_injections s b1)) -> mem a1 s.

Axiom left_injections_l1 :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (s:set a) (b1:b), forall (a1:a), forall (b':b),
  (mem (a1, b') (left_injections s b1)) -> (b' = b1).

Axiom left_injections_l2 :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (s:set a) (b1:b), forall (a1:a), forall (b':b),
  ((mem a1 s) /\ (b' = b1)) -> mem (a1, b') (left_injections s b1).

Axiom left_injections_l3 :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (s:set a) (b1:b), ((cardinal (left_injections s b1)) = (cardinal s)).

Axiom left_injections_l4 :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (s:set a) (b1:b),
  ((left_injections s b1) = (map (fun (a1:a) => (a1, b1)) s)).

Axiom disjoint_injections :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (s:set a) (b1:b) (c:b), ~ (b1 = c) ->
  is_empty (inter (right_injections b1 s) (right_injections c s)).

Axiom disjoint_injections1 :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (s:set a) (b1:b) (c:b), ~ (b1 = c) ->
  is_empty (inter (left_injections s b1) (left_injections s c)).

Axiom induction :
  forall {a:Type} {a_WT:WhyType a},
  forall (p:(set a) -> bool) (t1:set a),
  (forall (s:set a), (is_empty s) -> ((p s) = true)) ->
  (forall (s:set a), ((p s) = true) -> forall (t2:a), ~ (mem t2 s) ->
   ((p (add t2 s)) = true)) ->
  ((p t1) = true).

Axiom cardinal_sum :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (s':set a),
  ((cardinal (union s s')) =
   (((cardinal s) + (cardinal s'))%Z - (cardinal (inter s s')))%Z).

Axiom cardinal_eq :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (s':set a), (forall (e:a), (mem e s) -> mem e s') ->
  (forall (e:a), (mem e s') -> mem e s) -> ((cardinal s) = (cardinal s')).

Axiom cardinal_sum_empty_inter :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (s':set a), ((inter s s') = (empty : set a)) ->
  ((cardinal (union s s')) = ((cardinal s) + (cardinal s'))%Z).

Parameter cartesian_product:
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b}, (set a) ->
  (set b) -> set (a* b)%type.

Axiom cartesian_product_spec :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (s1:set a) (s2:set b),
  ((cardinal (cartesian_product s1 s2)) = ((cardinal s1) * (cardinal s2))%Z).

Axiom cartesian_product_spec1 :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (s1:set a) (s2:set b), forall (a1:a), forall (b1:b),
  (mem (a1, b1) (cartesian_product s1 s2)) -> mem a1 s1.

Axiom cartesian_product_spec2 :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (s1:set a) (s2:set b), forall (a1:a), forall (b1:b),
  (mem (a1, b1) (cartesian_product s1 s2)) -> mem b1 s2.

Axiom cartesian_product_spec3 :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (s1:set a) (s2:set b), forall (a1:a), forall (b1:b),
  ((mem a1 s1) /\ (mem b1 s2)) -> mem (a1, b1) (cartesian_product s1 s2).

Axiom cartesian_product_spec4 :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (s1:set a) (s2:set b), forall (o:(a* b)%type),
  (mem o (cartesian_product s1 s2)) -> mem (fir o) s1.

Axiom cartesian_product_spec5 :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (s1:set a) (s2:set b), forall (o:(a* b)%type),
  (mem o (cartesian_product s1 s2)) -> mem (sec o) s2.

Axiom cartesian_product_spec6 :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (s1:set a) (s2:set b), forall (o:(a* b)%type),
  ((mem (fir o) s1) /\ (mem (sec o) s2)) -> mem o (cartesian_product s1 s2).

Parameter commute:
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b}, (a* b)%type ->
  (b* a)%type.

Axiom commute_def :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (o:(a* b)%type), forall (x:a) (x1:b), (o = (x, x1)) ->
  ((commute o) = (x1, x)).

Axiom commute_inj :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (a1:a) (a':a) (b1:b) (b':b), ~ (a1 = a') ->
  ~ ((commute (a1, b1)) = (commute (a', b'))).

Axiom commute_inj1 :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (a1:a) (a':a) (b1:b) (b':b), ~ (b1 = b') ->
  ~ ((commute (a1, b1)) = (commute (a', b'))).

Axiom mem_cartesian_product :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (s1:set a) (s2:set b) (a1:a) (b1:b), (mem a1 s1) -> (mem b1 s2) ->
  mem (a1, b1) (cartesian_product s1 s2).

Axiom commute_inj_gen :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (s1:set a) (s2:set b),
  p_injective (fun (y0:(a* b)%type) => (commute y0))
  (cartesian_product s1 s2).

Parameter commute_product:
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b}, (set a) ->
  (set b) -> set (b* a)%type.

Axiom commute_product_def :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (s1:set a) (s2:set b),
  ((commute_product s1 s2) =
   (map (fun (y0:(a* b)%type) => (commute y0)) (cartesian_product s1 s2))).

Axiom commute_product_spec :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (s1:set a) (s2:set b),
  ((commute_product s1 s2) = (cartesian_product s2 s1)).

Parameter commute_product_el:
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b}, (set a) ->
  (set b) -> set (b* a)%type.

Axiom commute_product_el_def :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (s1:set a) (s2:set b),
  ((commute_product_el s1 s2) =
   (map (fun (y0:(a* b)%type) => (commute y0)) (cartesian_product s1 s2))).

Axiom commute_product_el_spec :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (s1:set a) (s2:set b), forall (o:(a* b)%type), forall (x:a) (x1:b),
  (o = (x, x1)) -> (mem o (cartesian_product s1 s2)) -> mem x s1.

Axiom commute_product_el_spec1 :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (s1:set a) (s2:set b), forall (o:(a* b)%type), forall (x:a) (x1:b),
  (o = (x, x1)) -> (mem o (cartesian_product s1 s2)) -> mem x1 s2.

Axiom commute_product_el_spec2 :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (s1:set a) (s2:set b), forall (o:(a* b)%type), forall (x:a) (x1:b),
  (o = (x, x1)) -> ((mem x s1) /\ (mem x1 s2)) ->
  mem o (cartesian_product s1 s2).

Axiom commute_product_el_spec3 :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (s1:set a) (s2:set b), forall (o:(a* b)%type), forall (x:a) (x1:b),
  (o = (x, x1)) -> ((mem x s1) /\ (mem x1 s2)) ->
  mem (x1, x) (commute_product_el s1 s2).

Axiom commute_product_el_spec4 :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (s1:set a) (s2:set b), forall (o:(a* b)%type), forall (x:a) (x1:b),
  (o = (x, x1)) -> (mem (x1, x) (commute_product_el s1 s2)) -> mem x s1.

Axiom commute_product_el_spec5 :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (s1:set a) (s2:set b), forall (o:(a* b)%type), forall (x:a) (x1:b),
  (o = (x, x1)) -> (mem (x1, x) (commute_product_el s1 s2)) -> mem x1 s2.

Axiom cartesian_product_union :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (s1:set a) (s2:set b) (s3:set b),
  ((cartesian_product s1 (union s2 s3)) =
   (union (cartesian_product s1 s2) (cartesian_product s1 s3))).

Axiom cartesian_union_product :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (s1:set a) (s2:set a) (s3:set b),
  ((cartesian_product (union s1 s2) s3) =
   (union (cartesian_product s1 s3) (cartesian_product s2 s3))).

Axiom cartesian_product_cardone_r :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (s1:set a) (s2:set b), ((cardinal s1) = 1%Z) ->
  infix_eqeq (cartesian_product s1 s2) (right_injections (choose s1) s2).

Axiom cartesian_product_cardone_r1 :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (s1:set a) (s2:set b), ((cardinal s1) = 1%Z) ->
  infix_eqeq (cartesian_product s1 s2)
  (map (fun (e2:b) => (choose s1, e2)) s2).

Axiom cartesian_product_cardone_l :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (s1:set a) (s2:set b), ((cardinal s2) = 1%Z) ->
  infix_eqeq (cartesian_product s1 s2) (left_injections s1 (choose s2)).

Axiom cartesian_product_cardone_l1 :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (s1:set a) (s2:set b), ((cardinal s2) = 1%Z) ->
  infix_eqeq (cartesian_product s1 s2)
  (map (fun (e1:a) => (e1, choose s2)) s1).

Axiom disjoint_cartesian_product_l :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (s1:set a) (s2:set a) (s3:set b),
  ((inter s1 s2) = (empty : set a)) ->
  ((inter (cartesian_product s1 s3) (cartesian_product s2 s3)) =
   (empty : set (a* b)%type)).

Axiom disjoint_cartesian_product_r :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (s1:set a) (s2:set b) (s3:set b),
  ((inter s2 s3) = (empty : set b)) ->
  ((inter (cartesian_product s1 s2) (cartesian_product s1 s3)) =
   (empty : set (a* b)%type)).

Parameter iter_union:
  forall {a:Type} {a_WT:WhyType a}, (set (set a)) -> set a.

Axiom iter_union_def :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set (set a)), (is_empty s) -> ((iter_union s) = (empty : set a)).

Axiom iter_union_def1 :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set (set a)), ~ (is_empty s) ->
  ((iter_union s) = (union (choose s) (iter_union (remove (choose s) s)))).

Axiom get_mem_union :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (s':set a) (e:a), (mem e (union s s')) -> ~ (mem e s') ->
  mem e s.

Axiom get_mem_union' :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (s':set a) (e:a), (mem e (union s s')) -> ~ (mem e s) ->
  mem e s'.

Axiom set_mem_union :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (s':set a) (e:a), (mem e s) -> mem e (union s s').

Axiom set_mem_union' :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (s':set a) (e:a), (mem e s') -> mem e (union s s').

Parameter op_neutral_left:
  forall {im1:Type} {im1_WT:WhyType im1}, (im1 -> im1 -> im1) -> im1 -> Prop.

Axiom op_neutral_left_def :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (neutral:im1),
  (op_neutral_left op1 neutral) -> forall (e:im1), (((op1 neutral) e) = e).

Axiom op_neutral_left_def1 :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (neutral:im1),
  (forall (e:im1), (((op1 neutral) e) = e)) -> op_neutral_left op1 neutral.

Parameter op_neutral_right:
  forall {im1:Type} {im1_WT:WhyType im1}, (im1 -> im1 -> im1) -> im1 -> Prop.

Axiom op_neutral_right_def :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (neutral:im1),
  (op_neutral_right op1 neutral) -> forall (e:im1), (((op1 e) neutral) = e).

Axiom op_neutral_right_def1 :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (neutral:im1),
  (forall (e:im1), (((op1 e) neutral) = e)) -> op_neutral_right op1 neutral.

Parameter op_assoc:
  forall {im1:Type} {im1_WT:WhyType im1}, (im1 -> im1 -> im1) -> Prop.

Axiom op_assoc_def :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1), (op_assoc op1) ->
  forall (a:im1) (b:im1) (c:im1),
  (((op1 ((op1 a) b)) c) = ((op1 a) ((op1 b) c))).

Axiom op_assoc_def1 :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1),
  (forall (a:im1) (b:im1) (c:im1),
   (((op1 ((op1 a) b)) c) = ((op1 a) ((op1 b) c)))) ->
  op_assoc op1.

Parameter op_neutral_left_comm:
  forall {im1:Type} {im1_WT:WhyType im1}, (im1 -> im1 -> im1) -> im1 -> Prop.

Axiom op_neutral_left_comm_def :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (neutral:im1),
  (op_neutral_left_comm op1 neutral) -> forall (a:im1),
  (forall (b:im1), (((op1 a) b) = b)) -> (a = neutral).

Axiom op_neutral_left_comm_def1 :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (neutral:im1),
  (forall (a:im1), (forall (b:im1), (((op1 a) b) = b)) -> (a = neutral)) ->
  op_neutral_left_comm op1 neutral.

Parameter commut:
  forall {im1:Type} {im1_WT:WhyType im1}, (im1 -> im1 -> im1) -> Prop.

Axiom commut_def :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1), (commut op1) -> forall (a:im1) (b:im1),
  (((op1 a) b) = ((op1 b) a)).

Axiom commut_def1 :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1),
  (forall (a:im1) (b:im1), (((op1 a) b) = ((op1 b) a))) -> commut op1.

Parameter assoc:
  forall {im1:Type} {im1_WT:WhyType im1}, (im1 -> im1 -> im1) -> Prop.

Axiom assoc_def :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1), (assoc op1) ->
  forall (a:im1) (b:im1) (c:im1),
  (((op1 ((op1 a) b)) c) = ((op1 a) ((op1 b) c))).

Axiom assoc_def1 :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1),
  (forall (a:im1) (b:im1) (c:im1),
   (((op1 ((op1 a) b)) c) = ((op1 a) ((op1 b) c)))) ->
  assoc op1.

Parameter opposite_n:
  forall {im1:Type} {im1_WT:WhyType im1}, (im1 -> im1 -> im1) ->
  (im1 -> im1 -> im1) -> im1 -> Prop.

Axiom opposite_n_def :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (po1:im1 -> im1 -> im1) (neutral:im1),
  (opposite_n op1 po1 neutral) -> forall (a:im1), (((po1 a) a) = neutral).

Axiom opposite_n_def1 :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (po1:im1 -> im1 -> im1) (neutral:im1),
  (forall (a:im1), (((po1 a) a) = neutral)) -> opposite_n op1 po1 neutral.

Parameter inverse:
  forall {im1:Type} {im1_WT:WhyType im1}, (im1 -> im1 -> im1) ->
  (im1 -> im1 -> im1) -> (im1 -> im1) -> Prop.

Axiom inverse_def :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (po1:im1 -> im1 -> im1) (inver1:im1 -> im1),
  (inverse op1 po1 inver1) -> forall (a:im1) (b:im1),
  (((po1 a) b) = ((op1 a) (inver1 b))).

Axiom inverse_def1 :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (po1:im1 -> im1 -> im1) (inver1:im1 -> im1),
  (forall (a:im1) (b:im1), (((po1 a) b) = ((op1 a) (inver1 b)))) ->
  inverse op1 po1 inver1.

Parameter opposite1:
  forall {im1:Type} {im1_WT:WhyType im1}, (im1 -> im1 -> im1) ->
  (im1 -> im1 -> im1) -> Prop.

Axiom opposite_def :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (po1:im1 -> im1 -> im1),
  (opposite1 op1 po1) -> forall (a:im1) (b:im1), (((op1 ((po1 a) b)) b) = a).

Axiom opposite_def1 :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (po1:im1 -> im1 -> im1),
  (forall (a:im1) (b:im1), (((op1 ((po1 a) b)) b) = a)) -> opposite1 op1 po1.

Parameter opposite_com:
  forall {im1:Type} {im1_WT:WhyType im1}, (im1 -> im1 -> im1) ->
  (im1 -> im1 -> im1) -> Prop.

Axiom opposite_com_def :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (po1:im1 -> im1 -> im1),
  (opposite_com op1 po1) -> forall (a:im1) (b:im1),
  (((po1 ((op1 a) b)) b) = a).

Axiom opposite_com_def1 :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (po1:im1 -> im1 -> im1),
  (forall (a:im1) (b:im1), (((po1 ((op1 a) b)) b) = a)) ->
  opposite_com op1 po1.

Axiom refl :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (a:im1) (b:im1), (commut op1) ->
  (((op1 a) b) = ((op1 b) a)).

Parameter neutral:
  forall {im1:Type} {im1_WT:WhyType im1}, (im1 -> im1 -> im1) -> im1 -> Prop.

Axiom neutral_def :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (neut:im1), (neutral op1 neut) ->
  op_neutral_left op1 neut.

Axiom neutral_def1 :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (neut:im1), (neutral op1 neut) ->
  op_neutral_right op1 neut.

Axiom neutral_def2 :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (neut:im1), (neutral op1 neut) ->
  op_assoc op1.

Axiom neutral_def3 :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (neut:im1),
  ((op_neutral_left op1 neut) /\
   ((op_neutral_right op1 neut) /\ (op_assoc op1))) ->
  neutral op1 neut.

Axiom set_neutral :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (neut:im1), (op_neutral_left op1 neut) ->
  (op_neutral_right op1 neut) -> (op_assoc op1) -> neutral op1 neut.

Parameter has_neutral:
  forall {im1:Type} {im1_WT:WhyType im1}, (im1 -> im1 -> im1) -> Prop.

Axiom has_neutral_def :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1), (has_neutral op1) ->
  exists e:im1, neutral op1 e.

Axiom has_neutral_def1 :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1), (exists e:im1, neutral op1 e) ->
  has_neutral op1.

Parameter iterates:
  forall {im1:Type} {im1_WT:WhyType im1}, (im1 -> im1 -> im1) -> im1 -> Prop.

Axiom iterates_def :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (neutral1:im1), (iterates op1 neutral1) ->
  op_neutral_left op1 neutral1.

Axiom iterates_def1 :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (neutral1:im1), (iterates op1 neutral1) ->
  op_neutral_right op1 neutral1.

Axiom iterates_def2 :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (neutral1:im1), (iterates op1 neutral1) ->
  op_assoc op1.

Axiom iterates_def3 :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (neutral1:im1),
  ((op_neutral_left op1 neutral1) /\
   ((op_neutral_right op1 neutral1) /\ (op_assoc op1))) ->
  iterates op1 neutral1.

Parameter iterable:
  forall {im1:Type} {im1_WT:WhyType im1}, (im1 -> im1 -> im1) -> Prop.

Axiom iterable_def :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1), (iterable op1) ->
  exists e:im1, iterates op1 e.

Axiom iterable_def1 :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1), (exists e:im1, iterates op1 e) ->
  iterable op1.

Axiom iterates_ :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (neutral1:im1),
  (op_neutral_left op1 neutral1) -> (op_neutral_right op1 neutral1) ->
  (op_assoc op1) -> iterates op1 neutral1.

Axiom iterates_1 :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (neutral1:im1),
  (op_neutral_left op1 neutral1) -> (op_neutral_right op1 neutral1) ->
  (op_assoc op1) -> iterable op1.

Parameter neutral_elt:
  forall {im1:Type} {im1_WT:WhyType im1}, (im1 -> im1 -> im1) -> im1.

Axiom neutral_elt_spec :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1), forall (e:im1), (neutral op1 e) ->
  ((neutral_elt op1) = e).

Axiom neutral_elt_spec1 :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1), forall (e:im1), ((neutral_elt op1) = e) ->
  neutral op1 e.

Parameter inverse_tuple:
  forall {im1:Type} {im1_WT:WhyType im1}, (im1 -> im1 -> im1) ->
  (im1 -> im1 -> im1) -> im1 -> Prop.

Axiom inverse_tuple_def :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (po1:im1 -> im1 -> im1) (neutral1:im1),
  (inverse_tuple op1 po1 neutral1) -> opposite_n op1 po1 neutral1.

Axiom inverse_tuple_def1 :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (po1:im1 -> im1 -> im1) (neutral1:im1),
  (inverse_tuple op1 po1 neutral1) -> opposite1 op1 po1.

Axiom inverse_tuple_def2 :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (po1:im1 -> im1 -> im1) (neutral1:im1),
  (inverse_tuple op1 po1 neutral1) -> opposite_com op1 po1.

Axiom inverse_tuple_def3 :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (po1:im1 -> im1 -> im1) (neutral1:im1),
  ((opposite_n op1 po1 neutral1) /\
   ((opposite1 op1 po1) /\ (opposite_com op1 po1))) ->
  inverse_tuple op1 po1 neutral1.

Parameter iterate:
  forall {a:Type} {a_WT:WhyType a} {im1:Type} {im1_WT:WhyType im1},
  (im1 -> im1 -> im1) -> (set a) -> (a -> im1) -> im1.

Axiom Iterate_def_empty :
  forall {a:Type} {a_WT:WhyType a} {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1), forall (s:set a), forall (f:a -> im1),
  (commut op1) -> (iterable op1) -> (is_empty s) ->
  ((iterate op1 (empty : set a) f) = (neutral_elt op1)).

Axiom Iterate_one :
  forall {a:Type} {a_WT:WhyType a} {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1), forall (s:set a), forall (f:a -> im1),
  forall (x:a), (is_empty s) -> (commut op1) ->
  ((iterate op1 (add x s) f) = (f x)).

Axiom Iterate_add :
  forall {a:Type} {a_WT:WhyType a} {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1), forall (s:set a), forall (f:a -> im1),
  forall (x:a), ((cardinal s) > 0%Z)%Z -> (commut op1) -> ~ (mem x s) ->
  ((iterate op1 (add x s) f) = ((op1 (f x)) (iterate op1 s f))).

Axiom minus_zero :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (po1:im1 -> im1 -> im1) (a:im1),
  (iterable op1) -> (inverse_tuple op1 po1 (neutral_elt op1)) ->
  (((po1 a) (neutral_elt op1)) = a).

Axiom unic :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (po1:im1 -> im1 -> im1) (a:im1) (b:im1)
    (c:im1),
  (iterable op1) -> (commut op1) -> (((op1 a) b) = ((op1 a) c)) ->
  (inverse_tuple op1 po1 (neutral_elt op1)) -> (b = c).

Axiom substract_comm :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (po1:im1 -> im1 -> im1) (a:im1) (b:im1),
  (iterable op1) -> (commut op1) ->
  (inverse_tuple op1 po1 (neutral_elt op1)) -> (((po1 ((op1 a) b)) a) = b).

Axiom substract_comm1 :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (po1:im1 -> im1 -> im1) (a:im1) (b:im1),
  (iterable op1) -> (commut op1) ->
  (inverse_tuple op1 po1 (neutral_elt op1)) -> (((po1 ((op1 b) a)) a) = b).

Axiom substract_comm2 :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (po1:im1 -> im1 -> im1) (a:im1) (b:im1)
    (c:im1),
  (iterable op1) -> (commut op1) ->
  (inverse_tuple op1 po1 (neutral_elt op1)) ->
  (((po1 a) ((po1 b) c)) = ((op1 ((po1 a) b)) c)).

Axiom substract_comm3 :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (po1:im1 -> im1 -> im1) (a:im1) (b:im1)
    (c:im1),
  (iterable op1) -> (commut op1) ->
  (inverse_tuple op1 po1 (neutral_elt op1)) ->
  (((po1 ((op1 a) b)) c) = ((op1 a) ((po1 b) c))).

Parameter int_iterate:
  forall {im1:Type} {im1_WT:WhyType im1}, (im1 -> im1 -> im1) ->
  (Z -> im1) -> Z -> Z -> im1.

Axiom int_iterate_def :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (f:Z -> im1) (i:Z) (j:Z), ~ (j <= i)%Z ->
  (j <= i)%Z -> ((int_iterate op1 f i j) = (neutral_elt op1)).

Axiom int_iterate_def1 :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (f:Z -> im1) (i:Z) (j:Z), ~ (j <= i)%Z ->
  ~ (j <= i)%Z -> (j = (i + 1%Z)%Z) -> ((int_iterate op1 f i j) = (f i)).

Axiom int_iterate_def2 :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (f:Z -> im1) (i:Z) (j:Z), ~ (j <= i)%Z ->
  ~ (j <= i)%Z -> ~ (j = (i + 1%Z)%Z) ->
  ((int_iterate op1 f i j) = ((op1 (f i)) (int_iterate op1 f (i + 1%Z)%Z j))).

Axiom int_iterate_def3 :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (f:Z -> im1) (i:Z) (j:Z), (iterable op1) ->
  (j <= i)%Z -> ((int_iterate op1 f i j) = (neutral_elt op1)).

Axiom int_iterate_def4 :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (f:Z -> im1) (i:Z) (j:Z), (iterable op1) ->
  ~ (j <= i)%Z -> (j = (i + 1%Z)%Z) -> ((int_iterate op1 f i j) = (f i)).

Axiom int_iterate_def5 :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (f:Z -> im1) (i:Z) (j:Z), (iterable op1) ->
  ~ (j <= i)%Z -> ~ (j = (i + 1%Z)%Z) ->
  ((int_iterate op1 f i j) = ((op1 (f i)) (int_iterate op1 f (i + 1%Z)%Z j))).

Axiom int_iterate_spec :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (f:Z -> im1) (i:Z) (j:Z), ~ (j <= i)%Z ->
  (j <= i)%Z -> ((int_iterate op1 f i j) = (neutral_elt op1)).

Axiom int_iterate_spec1 :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (f:Z -> im1) (i:Z) (j:Z), ~ (j <= i)%Z ->
  (j = (i + 1%Z)%Z) ->
  ((int_iterate op1 f i j) = ((op1 (f i)) (neutral_elt op1))).

Axiom int_iterate_spec2 :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (f:Z -> im1) (i:Z) (j:Z), (iterable op1) ->
  (j <= i)%Z -> ((int_iterate op1 f i j) = (neutral_elt op1)).

Axiom int_iterate_spec3 :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (f:Z -> im1) (i:Z) (j:Z), (iterable op1) ->
  (j = (i + 1%Z)%Z) ->
  ((int_iterate op1 f i j) = ((op1 (f i)) (neutral_elt op1))).

Parameter int_int_iterate:
  forall {im1:Type} {im1_WT:WhyType im1}, (im1 -> im1 -> im1) ->
  (Z -> Z -> im1) -> Z -> Z -> Z -> Z -> im1.

Axiom int_int_iterate_def :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (f:Z -> Z -> im1) (i:Z) (j:Z) (k:Z) (l:Z),
  (iterable op1) -> (j <= i)%Z ->
  ((int_int_iterate op1 f i j k l) = (neutral_elt op1)).

Axiom int_int_iterate_def1 :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (f:Z -> Z -> im1) (i:Z) (j:Z) (k:Z) (l:Z),
  (iterable op1) -> ~ (j <= i)%Z ->
  ((int_int_iterate op1 f i j k l) =
   ((op1 (int_iterate op1 (f i) k l))
    (int_int_iterate op1 f (i + 1%Z)%Z j k l))).

Parameter to_set: forall {a:Type} {a_WT:WhyType a}, a -> set a.

Axiom to_set_def :
  forall {a:Type} {a_WT:WhyType a},
  forall (e:a), ((to_set e) = (add e (empty : set a))).

Axiom to_set_spec :
  forall {a:Type} {a_WT:WhyType a},
  forall (e:a), forall (b:a), (b = e) -> mem b (to_set e).

Axiom to_set_spec1 :
  forall {a:Type} {a_WT:WhyType a},
  forall (e:a), ((cardinal (to_set e)) = 1%Z).

Axiom to_set_spec2 :
  forall {a:Type} {a_WT:WhyType a},
  forall (e:a), forall (b:a), (mem b (to_set e)) -> (b = e).

Parameter to_fset: Z -> Z -> set Z.

Axiom to_fset_spec :
  forall (i:Z) (j:Z), (i < j)%Z -> ((cardinal (to_fset i j)) = (j - i)%Z).

Axiom to_fset_spec1 :
  forall (i:Z) (j:Z), (j <= i)%Z -> is_empty (to_fset i j).

Axiom to_fset_spec2 :
  forall (i:Z) (j:Z), forall (k:Z), (mem k (to_fset i j)) -> (i <= k)%Z.

Axiom to_fset_spec3 :
  forall (i:Z) (j:Z), forall (k:Z), (mem k (to_fset i j)) -> (k < j)%Z.

Axiom to_fset_spec4 :
  forall (i:Z) (j:Z), forall (k:Z), ((i <= k)%Z /\ (k < j)%Z) ->
  mem k (to_fset i j).

Axiom to_fset_bounds :
  forall (i:Z) (k:Z) (j:Z), (i < j)%Z -> (mem k (to_fset i j)) -> (i <= k)%Z.

Axiom to_fset_bounds1 :
  forall (i:Z) (k:Z) (j:Z), (i < j)%Z -> (mem k (to_fset i j)) -> (k < j)%Z.

Axiom to_fset_unit_ext :
  forall (i:Z) (j:Z), (i < j)%Z ->
  ((to_fset i j) = (add i (to_fset (i + 1%Z)%Z j))).

Axiom to_fset_ext :
  forall (i:Z) (i':Z) (j:Z), ((i <= i')%Z /\ (i' <= j)%Z) ->
  ((to_fset i j) = (union (to_fset i i') (to_fset i' j))).

Axiom card_fset :
  forall (n:Z), (0%Z <= n)%Z -> ((cardinal (to_fset 0%Z n)) = n).

Parameter element: forall {a:Type} {a_WT:WhyType a}, (set a) -> a.

Axiom element_def :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a), ((cardinal s) = 1%Z) -> ((element s) = (choose s)).

Axiom cardone :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (a1:a), (forall (b:a), (mem b s) <-> (b = a1)) ->
  ((cardinal s) > 0%Z)%Z -> ((cardinal s) = 1%Z).

Axiom cardone1 :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (a1:a), (forall (b:a), (mem b s) <-> (b = a1)) ->
  ((cardinal s) > 0%Z)%Z -> ((element s) = a1).

Axiom set_cardone :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a), ((cardinal s) > 0%Z)%Z ->
  (exists a1:a, forall (b:a), (mem b s) <-> (b = a1)) -> ((cardinal s) = 1%Z).

Axiom get_cardone :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a), ((cardinal s) = 1%Z) ->
  exists a1:a, forall (b:a), (mem b s) <-> (b = a1).

Axiom get_cardone_elt :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (e:a), ((cardinal s) = 1%Z) -> (mem e s) ->
  (e = (element s)).

Axiom set_cardone_elt :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (a1:a), (forall (b:a), (mem b s) <-> (b = a1)) ->
  ((cardinal s) = 1%Z).

Axiom set_cardone_elt1 :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (a1:a), (forall (b:a), (mem b s) <-> (b = a1)) ->
  ((element s) = a1).

Axiom set_cardone_elt_ :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (a1:a), (forall (b:a), (mem b s) <-> (b = a1)) ->
  ((cardinal s) = 1%Z).

Axiom cardzero :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a), (forall (b:a), ~ (mem b s)) -> ((cardinal s) = 0%Z).

Parameter p_injective_in:
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b}, (a -> b) ->
  (set a) -> (set b) -> Prop.

Axiom p_injective_in_def :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:a -> b) (s:set a) (s':set b), (p_injective_in f s s') ->
  forall (e:a), (mem e s) -> mem (f e) s'.

Axiom p_injective_in_def1 :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:a -> b) (s:set a) (s':set b), (p_injective_in f s s') ->
  forall (e:a), (mem e s) -> forall (e1:a) (e':a), (mem e1 s) ->
  (mem e' s) -> ~ (e1 = e') -> ~ ((f e1) = (f e')).

Axiom p_injective_in_def2 :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:a -> b) (s:set a) (s':set b),
  (forall (e:a), (mem e s) ->
   (mem (f e) s') /\
   forall (e1:a) (e':a), (mem e1 s) -> (mem e' s) -> ~ (e1 = e') ->
   ~ ((f e1) = (f e'))) ->
  p_injective_in f s s'.

Parameter equal_func:
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b}, (a -> b) ->
  (a -> b) -> Prop.

Axiom equal_func_def :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:a -> b) (g:a -> b), (equal_func f g) -> forall (e:a),
  ((f e) = (g e)).

Axiom equal_func_def1 :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:a -> b) (g:a -> b), (forall (e:a), ((f e) = (g e))) ->
  equal_func f g.

Axiom set_equal_func :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:a -> b) (g:a -> b), (forall (e:a), ((f e) = (g e))) -> (f = g).

Axiom get_equal_func :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:a -> b) (g:a -> b), (equal_func f g) -> forall (e:a),
  ((f e) = (g e)).

Axiom set_injective :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:a -> b) (s:set a),
  (forall (e:a) (e':a), (mem e s) -> (mem e' s) -> ~ (e = e') ->
   ~ ((f e) = (f e'))) ->
  p_injective f s.

Parameter image:
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b}, (a -> b) ->
  (set a) -> set b.

Axiom image_def :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:a -> b) (s:set a), ((image f s) = (map f s)).

Axiom image_spec :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:a -> b) (s:set a), forall (a1:b), (mem a1 (image f s)) ->
  exists antec_a:a, (mem antec_a s) /\ (a1 = (f antec_a)).

Axiom image_spec1 :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:a -> b) (s:set a), forall (a1:b),
  (exists antec_a:a, (mem antec_a s) /\ (a1 = (f antec_a))) ->
  mem a1 (image f s).

Axiom card_image :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:a -> b) (s:set a), ((cardinal (image f s)) <= (cardinal s))%Z.

Axiom card_image_injective :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:a -> b) (s:set a), (p_injective f s) ->
  ((cardinal (image f s)) = (cardinal s)).

Axiom get_injective :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:a -> b) (s:set a), (p_injective f s) -> forall (e:a) (e':a),
  (mem e s) -> (mem e' s) -> ~ (e = e') -> ~ ((f e) = (f e')).

Axiom get_not_injective :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:a -> b) (s:set a), ~ (p_injective f s) ->
  exists e:a, exists e':a,
  (mem e s) /\ ((mem e' s) /\ (~ (e = e') /\ ((f e) = (f e')))).

Axiom set_injective_in :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:a -> b) (s:set a) (s':set b),
  (forall (e:a), (mem e s) -> mem (f e) s') ->
  (forall (e:a) (e':a), (mem e s) -> (mem e' s) -> ~ (e = e') ->
   ~ ((f e) = (f e'))) ->
  p_injective f s.

Axiom get_injective_in :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:a -> b) (s:set a) (s':set b), (p_injective_in f s s') ->
  forall (e:a), (mem e s) -> mem (f e) s'.

Axiom get_injective_in1 :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:a -> b) (s:set a) (s':set b), (p_injective_in f s s') ->
  forall (e:a) (e':a), (mem e s) -> (mem e' s) -> ~ (e = e') ->
  ~ ((f e) = (f e')).

Parameter p_surjective:
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b}, (a -> b) ->
  (set a) -> (set b) -> Prop.

Axiom p_surjective_def :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:a -> b) (s:set a) (s':set b), (p_surjective f s s') ->
  forall (e:a), (mem e s) -> mem (f e) s'.

Axiom p_surjective_def1 :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:a -> b) (s:set a) (s':set b), (p_surjective f s s') ->
  forall (e':b), (mem e' s') -> exists e:a, (mem e s) /\ ((f e) = e').

Axiom p_surjective_def2 :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:a -> b) (s:set a) (s':set b),
  ((forall (e:a), (mem e s) -> mem (f e) s') /\
   forall (e':b), (mem e' s') -> exists e:a, (mem e s) /\ ((f e) = e')) ->
  p_surjective f s s'.

Axiom set_surjective :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:a -> b) (s:set a) (s':set b),
  (forall (e:a), (mem e s) -> mem (f e) s') ->
  (forall (e':b), (mem e' s') -> exists e:a, (mem e s) /\ ((f e) = e')) ->
  p_surjective f s s'.

Axiom get_surjective :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:a -> b) (s:set a) (s':set b), (p_surjective f s s') ->
  forall (e:a), (mem e s) -> mem (f e) s'.

Axiom get_surjective1 :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:a -> b) (s:set a) (s':set b), (p_surjective f s s') ->
  forall (e':b), (mem e' s') -> exists e:a, (mem e s) /\ ((f e) = e').

Axiom image_surjective :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:a -> b) (s:set a) (s':set b), (p_surjective f s s') ->
  ((image f s) = s').

Parameter p_bijective:
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b}, (a -> b) ->
  (set a) -> (set b) -> Prop.

Axiom p_bijective_def :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:a -> b) (s:set a) (s':set b), (p_bijective f s s') ->
  p_injective_in f s s'.

Axiom p_bijective_def1 :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:a -> b) (s:set a) (s':set b), (p_bijective f s s') ->
  p_surjective f s s'.

Axiom p_bijective_def2 :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:a -> b) (s:set a) (s':set b),
  ((p_injective_in f s s') /\ (p_surjective f s s')) -> p_bijective f s s'.

Axiom bijective_is_injective :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:a -> b) (s:set a) (s':set b), (p_bijective f s s') ->
  p_injective f s.

Axiom bijective_is_surjective :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:a -> b) (s:set a) (s':set b), (p_bijective f s s') ->
  p_surjective f s s'.

Axiom set_bijective :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:a -> b) (s:set a) (s':set b),
  (forall (e:a), (mem e s) -> mem (f e) s') ->
  (forall (e:a) (e':a), (mem e s) -> (mem e' s) -> ~ (e = e') ->
   ~ ((f e) = (f e'))) ->
  (forall (e':b), (mem e' s') -> exists e:a, (mem e s) /\ ((f e) = e')) ->
  p_bijective f s s'.

Axiom set_bijective1 :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:a -> b) (s:set a) (s':set b),
  (forall (e:a), (mem e s) -> mem (f e) s') ->
  (forall (e:a) (e':a), (mem e s) -> (mem e' s) -> ~ (e = e') ->
   ~ ((f e) = (f e'))) ->
  (forall (e':b), (mem e' s') -> exists e:a, (mem e s) /\ ((f e) = e')) ->
  ((map f s) = s').

Axiom bijectivity_is_transitive :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b}
    {c:Type} {c_WT:WhyType c},
  forall (f:a -> b) (g:b -> c) (s:set a) (s':set b) (s'':set c),
  (p_bijective f s s') -> (p_bijective g s' s'') ->
  p_bijective (fun (k:a) => (g (f k))) s s''.

Axiom bijective_image :
  forall {a:Type} {a_WT:WhyType a},
  forall (f:a -> a) (s:set a) (s':set a), (p_bijective f s s') ->
  ((cardinal s) = (cardinal s')).

Axiom bijective_image1 :
  forall {a:Type} {a_WT:WhyType a},
  forall (f:a -> a) (s:set a) (s':set a), (p_bijective f s s') ->
  (s' = (image f s)).

Axiom get_bijective :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:a -> b) (s:set a) (s':set b), (p_bijective f s s') ->
  forall (e:a), (mem e s) -> mem (f e) s'.

Axiom get_bijective1 :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:a -> b) (s:set a) (s':set b), (p_bijective f s s') ->
  forall (e:a) (e':a), (mem e s) -> (mem e' s) -> ~ (e = e') ->
  ~ ((f e) = (f e')).

Axiom get_bijective2 :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:a -> b) (s:set a) (s':set b), (p_bijective f s s') ->
  forall (e':b), (mem e' s') -> exists e:a, (mem e s) /\ ((f e) = e').

Axiom get_bijective3 :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:a -> b) (s:set a) (s':set b), (p_bijective f s s') ->
  ((cardinal s) = (cardinal s')).

Axiom bijective_eq :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:a -> b) (g:a -> b) (s:set a) (s':set b), (p_bijective f s s') ->
  (forall (e:a), (mem e s) -> ((f e) = (g e))) -> p_bijective g s s'.

Axiom bijective_eq_gen :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:a -> b) (s:set a) (s':set b), (p_bijective f s s') ->
  forall (g:a -> b), (forall (e:a), (mem e s) -> ((f e) = (g e))) ->
  p_bijective g s s'.

Axiom bij_equal_card :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:a -> b) (s:set a), ((cardinal s) = (cardinal (map f s))) ->
  p_bijective f s (map f s).

Axiom set_bijective_auto :
  forall {a:Type} {a_WT:WhyType a},
  forall (f:a -> a) (s:set a), (forall (e:a), (mem e s) -> mem (f e) s) ->
  (forall (e':a), (mem e' s) -> exists e:a, (mem e s) /\ ((f e) = e')) ->
  p_bijective f s s.

Axiom iterate_empty :
  forall {a:Type} {a_WT:WhyType a} {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (s:set a) (t1:a -> im1), (is_empty s) ->
  (commut op1) -> (iterable op1) -> ((iterate op1 s t1) = (neutral_elt op1)).

Axiom iterate_one :
  forall {a:Type} {a_WT:WhyType a} {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (s:set a) (t1:a -> im1),
  ((cardinal s) = 1%Z) -> (commut op1) ->
  ((iterate op1 s t1) = (t1 (choose s))).

Axiom iterate_add :
  forall {a:Type} {a_WT:WhyType a} {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (s:set a) (f:a -> im1) (x:a),
  (commut op1) -> (iterable op1) -> ~ (mem x s) ->
  ((iterate op1 (add x s) f) = ((op1 (f x)) (iterate op1 s f))).

Axiom iterate_add_ :
  forall {a:Type} {a_WT:WhyType a} {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (s:set a) (f:a -> im1) (x:a),
  (commut op1) -> ~ (mem x s) -> ~ (is_empty s) ->
  ((iterate op1 (add x s) f) = ((op1 (f x)) (iterate op1 s f))).

Axiom iterate_remove :
  forall {a:Type} {a_WT:WhyType a} {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (s:set a) (f:a -> im1) (x:a),
  (commut op1) -> (iterable op1) ->
  (inverse_tuple op1 (fun (y0:im1) (y1:im1) => (po y0 y1)) (neutral_elt op1)) ->
  (mem x s) -> ((iterate op1 (remove x s) f) = (po (iterate op1 s f) (f x))).

Axiom iterate_def_choose :
  forall {a:Type} {a_WT:WhyType a} {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (s:set a) (f:a -> im1),
  ~ ((cardinal s) = 1%Z) -> (commut op1) -> ~ (is_empty s) ->
  ((iterate op1 s f) =
   ((op1 (f (choose s))) (iterate op1 (remove (choose s) s) f))).

Axiom iterate_def_choose1 :
  forall {a:Type} {a_WT:WhyType a} {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (s:set a) (f:a -> im1), (iterable op1) ->
  (commut op1) -> ~ (is_empty s) ->
  ((iterate op1 s f) =
   ((op1 (f (choose s))) (iterate op1 (remove (choose s) s) f))).

Axiom choose_any :
  forall {a:Type} {a_WT:WhyType a} {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (s:set a) (f:a -> im1) (t1:a),
  (iterable op1) -> (commut op1) -> (mem t1 s) ->
  ((iterate op1 s f) = ((op1 (f t1)) (iterate op1 (remove t1 s) f))).

Axiom iterate_comp_iterate :
  forall {a:Type} {a_WT:WhyType a} {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (s1:set a) (f:a -> im1) (g:a -> im1),
  (iterable op1) -> (commut op1) -> (assoc op1) ->
  ((iterate op1 s1 (fun (k:a) => ((op1 (f k)) (g k)))) =
   ((op1 (iterate op1 s1 (fun (k:a) => (f k))))
    (iterate op1 s1 (fun (k:a) => (g k))))).

Axiom iterate_comp_iterate_com :
  forall {a:Type} {a_WT:WhyType a} {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (s1:set a) (f:a -> im1) (g:a -> im1),
  (iterable op1) -> (commut op1) ->
  (((op1 (iterate op1 s1 (fun (k:a) => (f k))))
    (iterate op1 s1 (fun (k:a) => (g k))))
   = (iterate op1 s1 (fun (k:a) => ((op1 (f k)) (g k))))).

Axiom iterate_transitivity :
  forall {a:Type} {a_WT:WhyType a} {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (po1:im1 -> im1 -> im1) (s1:set a)
    (s2:set a) (f:a -> im1),
  (iterable op1) -> (commut op1) ->
  (inverse_tuple op1 po1 (neutral_elt op1)) ->
  ((iterate op1 (union s1 s2) f) =
   ((po1 ((op1 (iterate op1 s1 f)) (iterate op1 s2 f)))
    (iterate op1 (inter s1 s2) f))).

Axiom iterate_disjoint_transitivity :
  forall {a:Type} {a_WT:WhyType a} {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (s1:set a) (s2:set a) (t1:a -> im1),
  (iterable op1) -> (commut op1) -> ((inter s1 s2) = (empty : set a)) ->
  ((iterate op1 (union s1 s2) t1) =
   ((op1 (iterate op1 s1 t1)) (iterate op1 s2 t1))).

Axiom iterate_eq :
  forall {a:Type} {a_WT:WhyType a} {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (s:set a) (f:a -> im1) (g:a -> im1),
  (forall (x:a), (mem x s) -> ((f x) = (g x))) -> (commut op1) ->
  ~ (is_empty s) -> ((iterate op1 s f) = (iterate op1 s g)).

Axiom iterate_eq1 :
  forall {a:Type} {a_WT:WhyType a} {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (s:set a) (f:a -> im1) (g:a -> im1),
  (forall (x:a), (mem x s) -> ((f x) = (g x))) -> (commut op1) ->
  (iterable op1) -> ((iterate op1 s f) = (iterate op1 s g)).

Axiom iterate_map :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b}
    {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (s:set b) (f:b -> a) (t1:a -> im1),
  ~ (is_empty s) -> (commut op1) -> (p_injective f s) ->
  ((iterate op1 (map f s) t1) = (iterate op1 s (fun (b1:b) => (t1 (f b1))))).

Axiom iterate_map1 :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b}
    {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (s:set b) (f:b -> a) (t1:a -> im1),
  (iterable op1) -> (commut op1) -> (p_injective f s) ->
  ((iterate op1 (map f s) t1) = (iterate op1 s (fun (b1:b) => (t1 (f b1))))).

Axiom iterate_cardone :
  forall {a:Type} {a_WT:WhyType a} {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (s:set a) (t1:a -> im1), (iterable op1) ->
  (commut op1) -> ((cardinal s) = 1%Z) ->
  ((iterate op1 s t1) = (t1 (element s))).

Axiom iterate_cardzero :
  forall {a:Type} {a_WT:WhyType a} {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (s:set a) (t1:a -> im1), (commut op1) ->
  (iterable op1) -> ((cardinal s) = 0%Z) ->
  ((iterate op1 s t1) = (neutral_elt op1)).

Axiom injec_iterate :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b}
    {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (a1:a) (s:set b) (f:a -> b -> im1),
  (iterable op1) -> (commut op1) ->
  ((iterate op1 s (f a1)) =
   (iterate op1 (cartesian_product (to_set a1) s)
    (fun (o:(a* b)%type) => ((f (fir o)) (sec o))))).

Axiom iterate_cartesian_product :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b}
    {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (s1:set a) (s2:set b) (f:a -> b -> im1),
  (iterable op1) -> (commut op1) ->
  ((iterate op1 s1 (fun (a1:a) => (iterate op1 s2 (f a1)))) =
   (iterate op1 (cartesian_product s1 s2)
    (fun (o:(a* b)%type) => ((f (fir o)) (sec o))))).

Axiom iterate_eq_func :
  forall {a:Type} {a_WT:WhyType a} {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (s:set a) (f1:a -> im1) (f2:a -> im1),
  (commut op1) -> (iterable op1) -> (p_injective f1 s) ->
  (p_injective f2 s) -> ((map f1 s) = (map f2 s)) ->
  ((iterate op1 s f1) = (iterate op1 s f2)).

Axiom int_iterate_def_empty :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (f:Z -> im1) (i:Z) (j:Z), (j <= i)%Z ->
  (iterable op1) -> ((int_iterate op1 f i j) = (neutral_elt op1)).

Axiom int_iterate_def_plus_one :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (f:Z -> im1) (i:Z) (j:Z), (i < j)%Z ->
  ~ ((i + 1%Z)%Z = j) ->
  ((int_iterate op1 f i j) = ((op1 (f i)) (int_iterate op1 f (i + 1%Z)%Z j))).

Axiom int_iterate_def_plus_one1 :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (f:Z -> im1) (i:Z) (j:Z), (i < j)%Z ->
  (iterable op1) ->
  ((int_iterate op1 f i j) = ((op1 (f i)) (int_iterate op1 f (i + 1%Z)%Z j))).

Axiom int_iterate_cardone :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (f:Z -> im1) (i:Z) (j:Z),
  (j = (i + 1%Z)%Z) -> ((int_iterate op1 f i j) = (f i)).

Axiom int_iterate_def_plus_one_com :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (f:Z -> im1) (i:Z) (j:Z), (i < j)%Z ->
  ~ (j = (i + 1%Z)%Z) ->
  (((op1 (f i)) (int_iterate op1 f (i + 1%Z)%Z j)) = (int_iterate op1 f i j)).

Axiom int_iterate_def_plus_one_com1 :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (f:Z -> im1) (i:Z) (j:Z), (i < j)%Z ->
  (iterable op1) ->
  (((op1 (f i)) (int_iterate op1 f (i + 1%Z)%Z j)) = (int_iterate op1 f i j)).

Axiom int_iterate_to_iterate :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (f:Z -> im1) (i:Z) (j:Z), ~ (j <= i)%Z ->
  (commut op1) -> ((int_iterate op1 f i j) = (iterate op1 (to_fset i j) f)).

Axiom int_iterate_to_iterate1 :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (f:Z -> im1) (i:Z) (j:Z), (iterable op1) ->
  (commut op1) -> ((int_iterate op1 f i j) = (iterate op1 (to_fset i j) f)).

Axiom int_iterate_right_extension :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (f:Z -> im1) (i:Z) (j:Z), (iterable op1) ->
  (i < j)%Z ->
  ((int_iterate op1 f i j) =
   ((op1 (int_iterate op1 f i (j - 1%Z)%Z)) (f (j - 1%Z)%Z))).

Axiom int_iterate_right_extension_ :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (f:Z -> im1) (i:Z) (j:Z), (assoc op1) ->
  ((i + 1%Z)%Z < j)%Z ->
  ((int_iterate op1 f i j) =
   ((op1 (int_iterate op1 f i (j - 1%Z)%Z)) (f (j - 1%Z)%Z))).

Axiom int_iterate_transitivity :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (f:Z -> im1) (i:Z) (k:Z) (j:Z),
  (iterable op1) -> (iterable op1) ->
  (op_neutral_left op1 (neutral_elt op1)) -> ((i <= k)%Z /\ (k <= j)%Z) ->
  ((int_iterate op1 f i j) =
   ((op1 (int_iterate op1 f i k)) (int_iterate op1 f k j))).

Axiom int_iterate_transitivity_ :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (f:Z -> im1) (i:Z) (k:Z) (j:Z),
  (op_neutral_left op1 (neutral_elt op1)) -> ((i < k)%Z /\ (k < j)%Z) ->
  ((int_iterate op1 f i j) =
   ((op1 (int_iterate op1 f i k)) (int_iterate op1 f k j))).

Axiom int_iterate_comp_iterate :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (f:Z -> im1) (g:Z -> im1) (i:Z) (j:Z),
  (iterable op1) -> (op_neutral_right op1 (neutral_elt op1)) ->
  (commut op1) ->
  ((int_iterate op1 (fun (k:Z) => ((op1 (f k)) (g k))) i j) =
   ((op1 (int_iterate op1 f i j)) (int_iterate op1 g i j))).

Axiom int_iterate_attr_no_f :
  forall {im1:Type} {im1_WT:WhyType im1} {im2:Type} {im2_WT:WhyType im2},
  forall (op1:im1 -> im1 -> im1) (op2:im2 -> im2 -> im2) (t1:Z -> im1)
    (t2:Z -> im2) (f:im1 -> im2) (i:Z) (j:Z),
  (forall (x:Z), forall (y:im1),
   (((op2 (t2 x)) (f y)) = (f ((op1 (t1 x)) y)))) ->
  ((f (neutral_elt op1)) = (neutral_elt op2)) -> (iterable op1) ->
  (iterable op2) -> (forall (i1:Z), ((f (t1 i1)) = (t2 i1))) ->
  ((int_iterate op2 t2 i j) = (f (int_iterate op1 t1 i j))).

Axiom int_iterate_attr :
  forall {im1:Type} {im1_WT:WhyType im1} {im2:Type} {im2_WT:WhyType im2},
  forall (op1:im1 -> im1 -> im1) (op2:im2 -> im2 -> im2) (t1:Z -> im1)
    (f:im1 -> im2) (i:Z) (j:Z),
  (forall (x:Z), forall (y:im1),
   (((op2 (f (t1 x))) (f y)) = (f ((op1 (t1 x)) y)))) ->
  ((f (neutral_elt op1)) = (neutral_elt op2)) -> (iterable op1) ->
  (iterable op2) ->
  ((int_iterate op2 (fun (e:Z) => (f (t1 e))) i j) =
   (f (int_iterate op1 t1 i j))).

Axiom int_iterate_attr_comm :
  forall {im1:Type} {im1_WT:WhyType im1} {im2:Type} {im2_WT:WhyType im2},
  forall (op1:im1 -> im1 -> im1) (op2:im2 -> im2 -> im2) (t1:Z -> im1)
    (f:im1 -> im2) (i:Z) (j:Z),
  (forall (x:Z), forall (y:im1),
   (((op2 (f (t1 x))) (f y)) = (f ((op1 (t1 x)) y)))) ->
  ((f (neutral_elt op1)) = (neutral_elt op2)) -> (iterable op1) ->
  (iterable op2) ->
  ((f (int_iterate op1 t1 i j)) =
   (int_iterate op2 (fun (e:Z) => (f (t1 e))) i j)).

Axiom int_iterate_eq :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (f:Z -> im1) (g:Z -> im1) (i:Z) (j:Z),
  (forall (k:Z), ((i <= k)%Z /\ (k < j)%Z) -> ((f k) = (g k))) ->
  ~ (j <= i)%Z -> ((int_iterate op1 f i j) = (int_iterate op1 g i j)).

Axiom int_iterate_eq1 :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (f:Z -> im1) (g:Z -> im1) (i:Z) (j:Z),
  (forall (k:Z), ((i <= k)%Z /\ (k < j)%Z) -> ((f k) = (g k))) ->
  (iterable op1) -> ((int_iterate op1 f i j) = (int_iterate op1 g i j)).

Axiom int_iterate_left_right :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (f:Z -> im1) (l:Z) (k:Z) (h:Z),
  (iterable op1) -> (commut op1) -> ((l <= k)%Z /\ (k <= h)%Z) ->
  ((int_iterate op1 f l k) =
   (int_iterate op1 (fun (a:Z) => (f ((h - (a + 1%Z)%Z)%Z + l)%Z))
    ((h - k)%Z + l)%Z h)).

Axiom int_iterate_eq_func :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (i:Z) (j:Z) (f:Z -> im1) (g:Z -> im1),
  (iterable op1) -> (commut op1) -> (p_injective f (to_fset i j)) ->
  (p_injective g (to_fset i j)) ->
  ((map f (to_fset i j)) = (map g (to_fset i j))) ->
  ((int_iterate op1 f i j) = (int_iterate op1 g i j)).

Axiom int_iterate_map :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (i:Z) (j:Z) (k:Z) (l:Z) (f:Z -> Z)
    (t1:Z -> im1),
  ~ (j <= i)%Z -> (commut op1) ->
  (p_bijective f (to_fset i j) (to_fset k l)) ->
  ((int_iterate op1 t1 k l) =
   (int_iterate op1 (fun (b:Z) => (t1 (f b))) i j)).

Axiom int_iterate_map1 :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (i:Z) (j:Z) (k:Z) (l:Z) (f:Z -> Z)
    (t1:Z -> im1),
  (iterable op1) -> (commut op1) ->
  (p_bijective f (to_fset i j) (to_fset k l)) ->
  ((int_iterate op1 t1 k l) =
   (int_iterate op1 (fun (b:Z) => (t1 (f b))) i j)).

Axiom int_iterate_transl :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (f:Z -> im1) (i:Z) (j:Z) (k:Z),
  (iterable op1) ->
  ((int_iterate op1 f i j) =
   (int_iterate op1 (fun (b:Z) => (f (b + k)%Z)) (i - k)%Z (j - k)%Z)).

Axiom int_iterate_map_auto :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (i:Z) (j:Z) (f:Z -> Z) (t1:Z -> im1),
  ~ (j <= i)%Z -> (commut op1) ->
  (p_bijective f (to_fset i j) (to_fset i j)) ->
  ((int_iterate op1 t1 i j) =
   (int_iterate op1 (fun (b:Z) => (t1 (f b))) i j)).

Axiom int_iterate_map_auto1 :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (i:Z) (j:Z) (f:Z -> Z) (t1:Z -> im1),
  (iterable op1) -> (commut op1) ->
  (p_bijective f (to_fset i j) (to_fset i j)) ->
  ((int_iterate op1 t1 i j) =
   (int_iterate op1 (fun (b:Z) => (t1 (f b))) i j)).

Axiom leq_trans :
  forall (a:Z) (b:Z) (c:Z), (a <= b)%Z -> (b <= c)%Z -> (a <= c)%Z.

Axiom leq_trans_add :
  forall (a:Z) (b:Z) (c:Z) (d:Z), (a <= c)%Z -> (b <= d)%Z ->
  ((a + b)%Z <= (c + d)%Z)%Z.

Axiom leq_trans_mult :
  forall (a:Z) (b:Z) (c:Z), (0%Z <= c)%Z -> (a <= b)%Z ->
  ((a * c)%Z <= (b * c)%Z)%Z.

Axiom leq_trans_mult_right :
  forall (a:Z) (b:Z) (c:Z), (0%Z <= c)%Z -> (a <= b)%Z ->
  ((c * a)%Z <= (c * b)%Z)%Z.

Axiom compat_int_order_mult :
  forall (a:Z) (b:Z) (c:Z) (d:Z), ((0%Z <= c)%Z /\ (c <= d)%Z) ->
  ((0%Z <= a)%Z /\ (a <= b)%Z) -> ((c * a)%Z <= (d * b)%Z)%Z.

Axiom leq_trans_fact :
  forall (a:Z) (b:Z) (c:Z) (n:Z), (0%Z <= n)%Z ->
  ((0%Z <= a)%Z /\ (a <= c)%Z) -> ((0%Z <= b)%Z /\ (b <= (c * n)%Z)%Z) ->
  ((a + b)%Z <= (c * (n + 1%Z)%Z)%Z)%Z.

Axiom leq_trans_facrev :
  forall (a:Z) (b:Z) (c:Z) (n:Z), (0%Z <= n)%Z ->
  ((0%Z <= a)%Z /\ (a <= c)%Z) -> ((0%Z <= b)%Z /\ (b <= (c * n)%Z)%Z) ->
  ((b + a)%Z <= (c * (n + 1%Z)%Z)%Z)%Z.

Axiom neutrals : (0%Z = (neutral_elt (fun (y0:Z) (y1:Z) => (y0 + y1)%Z))).

Axiom neutrals1 : (1%Z = (neutral_elt (fun (y0:Z) (y1:Z) => (y0 * y1)%Z))).

Axiom neutrals2 : iterable (fun (y0:Z) (y1:Z) => (y0 + y1)%Z).

Axiom neutrals3 : iterable (fun (y0:Z) (y1:Z) => (y0 * y1)%Z).

Parameter isum: forall {a:Type} {a_WT:WhyType a}, (set a) -> (a -> Z) -> Z.

Axiom isum_def :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (t1:a -> Z),
  ((isum s t1) = (iterate (fun (y0:Z) (y1:Z) => (y0 + y1)%Z) s t1)).

Parameter iproduct:
  forall {a:Type} {a_WT:WhyType a}, (set a) -> (a -> Z) -> Z.

Axiom iproduct_def :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (t1:a -> Z),
  ((iproduct s t1) = (iterate (fun (y0:Z) (y1:Z) => (y0 * y1)%Z) s t1)).

Axiom isum_iter : iterates (fun (y0:Z) (y1:Z) => (y0 + y1)%Z) 0%Z.

Axiom isum_iter__ : iterable (fun (y0:Z) (y1:Z) => (y0 + y1)%Z).

Axiom isum_eq :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (t1:a -> Z) (t':a -> Z),
  (forall (e:a), (mem e s) -> ((t1 e) = (t' e))) ->
  ((isum s t1) = (isum s t')).

Axiom isum_eq_gen :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (s':set a) (t1:a -> Z) (t':a -> Z), (s = s') ->
  (forall (e:a), (mem e s) -> ((t1 e) = (t' e))) ->
  ((isum s t1) = (isum s t')).

Axiom isum_add :
  forall {b:Type} {b_WT:WhyType b},
  forall (s:set b) (f:b -> Z) (x:b), ~ (mem x s) ->
  ((isum (add x s) f) = ((f x) + (isum s f))%Z).

Axiom iproduct_eq :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (t1:a -> Z) (t':a -> Z),
  (forall (e:a), (mem e s) -> ((t1 e) = (t' e))) ->
  ((iproduct s t1) = (iproduct s t')).

Axiom iproduct_eq_gen :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (s':set a) (t1:a -> Z) (t':a -> Z), (s = s') ->
  (forall (e:a), (mem e s) -> ((t1 e) = (t' e))) ->
  ((iproduct s t1) = (iproduct s t')).

Axiom iproduct_add :
  forall {b:Type} {b_WT:WhyType b},
  forall (s:set b) (f:b -> Z) (x:b), ~ (mem x s) ->
  ((iproduct (add x s) f) = ((f x) * (iproduct s f))%Z).

Axiom iproduct_from_choose :
  forall {b:Type} {b_WT:WhyType b},
  forall (s:set b) (f:b -> Z), (0%Z < (cardinal s))%Z ->
  ((iproduct s f) = ((f (choose s)) * (iproduct (remove (choose s) s) f))%Z).

Axiom iproduct_map :
  forall (s:set Z) (f:Z -> Z) (t1:Z -> Z), (p_injective f s) ->
  ((iproduct (map f s) t1) = (iproduct s (fun (b:Z) => (t1 (f b))))).

Axiom iproduct_map_auto :
  forall (s:set Z) (f:Z -> Z) (t1:Z -> Z), (p_bijective f s s) ->
  ((iproduct s t1) = (iproduct s (fun (b:Z) => (t1 (f b))))).

Axiom iproduct_one :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (f:a -> Z), (forall (e:a), (mem e s) -> ((f e) = 1%Z)) ->
  ((iproduct s f) = 1%Z).

Axiom iproduct_one_but_maybe_one_elt :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (f:a -> Z) (e:a), (mem e s) ->
  (forall (e':a), (mem e' s) -> ~ (e' = e) -> ((f e') = 1%Z)) ->
  ((iproduct s f) = (f e)).

Axiom iproduct_one_but_maybe_one_elt1 :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (f:a -> Z) (e:a), (mem e s) ->
  (forall (e':a), (mem e' s) -> ~ (e' = e) -> ((f e') = 1%Z)) ->
  ((iproduct s f) = ((f (choose s)) * (iproduct (remove (choose s) s) f))%Z).

Axiom mul_assoc :
  forall (a:Z) (b:Z) (c:Z), (((a * b)%Z * c)%Z = (a * (b * c)%Z)%Z).

Axiom ad_assoc :
  forall (a:Z) (b:Z) (c:Z), (((a + b)%Z + c)%Z = (a + (b + c)%Z)%Z).

Axiom ad_assoc_rev :
  forall (a:Z) (b:Z) (c:Z), ((a + (b + c)%Z)%Z = ((a + b)%Z + c)%Z).

Axiom ad_seq_switch :
  forall (a:Z) (b:Z) (c:Z) (a':Z) (b':Z) (c':Z), (a = a') -> (b = b') ->
  (c = c') -> ((a' + (b' + c')%Z)%Z = (b + (c + a)%Z)%Z).

Axiom mul_comm : forall (a:Z) (b:Z), ((a * b)%Z = (b * a)%Z).

Axiom add_eq_i :
  forall (a:Z) (a':Z) (b:Z) (b':Z), (a = a') -> (b = b') ->
  ((a + b)%Z = (a' + b')%Z).

Axiom mult_eq_i :
  forall (a:Z) (a':Z) (b:Z) (b':Z), (a = a') -> (b = b') ->
  ((a * b)%Z = (a' * b')%Z).

Axiom mul_assoc_rev :
  forall (a:Z) (b:Z) (c:Z), ((a * (b * c)%Z)%Z = ((a * b)%Z * c)%Z).

Axiom mult_add_distr :
  forall (a:Z) (b:Z) (c:Z) (d:Z),
  (((a + b)%Z * (c + d)%Z)%Z =
   ((((a * c)%Z + (a * d)%Z)%Z + (b * c)%Z)%Z + (b * d)%Z)%Z).

Axiom mult_add_right :
  forall (a:Z) (b:Z) (c:Z), (((a + b)%Z * c)%Z = ((a * c)%Z + (b * c)%Z)%Z).

Axiom mult_add_right_rev :
  forall (a:Z) (b:Z) (c:Z), (((a * c)%Z + (b * c)%Z)%Z = ((a + b)%Z * c)%Z).

Axiom mult_add_left :
  forall (a:Z) (b:Z) (c:Z), ((a * (b + c)%Z)%Z = ((a * b)%Z + (a * c)%Z)%Z).

Axiom mult_add_left_rev :
  forall (a:Z) (b:Z) (c:Z), (((a * b)%Z + (a * c)%Z)%Z = (a * (b + c)%Z)%Z).

Axiom mult_add_distr_rev :
  forall (a:Z) (b:Z) (c:Z) (d:Z),
  (((((a * c)%Z + (a * d)%Z)%Z + (b * c)%Z)%Z + (b * d)%Z)%Z =
   ((a + b)%Z * (c + d)%Z)%Z).

Axiom mul_assoc_comm :
  forall (a:Z) (b:Z) (c:Z), (((a * b)%Z * c)%Z = (b * (a * c)%Z)%Z).

Axiom mul_assoc_rev_comm :
  forall (a:Z) (b:Z) (c:Z), ((a * (b * c)%Z)%Z = ((a * c)%Z * b)%Z).

Axiom add_assoc :
  forall (a:Z) (b:Z) (c:Z), (((a + b)%Z + c)%Z = (a + (b + c)%Z)%Z).

Axiom add_assoc_rev :
  forall (a:Z) (b:Z) (c:Z), ((a + (b + c)%Z)%Z = ((a + b)%Z + c)%Z).

Axiom isum_empty :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (f:a -> Z), (is_empty s) -> ((isum s f) = 0%Z).

Axiom iproduct_empty :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (f:a -> Z), (is_empty s) -> ((iproduct s f) = 1%Z).

Axiom isum_iter_ :
  opposite_n (fun (y0:Z) (y1:Z) => (y0 + y1)%Z)
  (fun (y0:Z) (y1:Z) => (y0 - y1)%Z) 0%Z.

Axiom isum_iter_1 :
  opposite1 (fun (y0:Z) (y1:Z) => (y0 + y1)%Z)
  (fun (y0:Z) (y1:Z) => (y0 - y1)%Z).

Axiom isum_iter_2 :
  opposite_com (fun (y0:Z) (y1:Z) => (y0 + y1)%Z)
  (fun (y0:Z) (y1:Z) => (y0 - y1)%Z).

Axiom isum_iter_3 :
  inverse_tuple (fun (y0:Z) (y1:Z) => (y0 + y1)%Z)
  (fun (y0:Z) (y1:Z) => (y0 - y1)%Z) 0%Z.

Parameter ind_isum: (Z -> Z) -> Z -> Z -> Z.

Axiom ind_isum_def :
  forall (f:Z -> Z) (i:Z) (j:Z),
  ((ind_isum f i j) = (int_iterate (fun (y0:Z) (y1:Z) => (y0 + y1)%Z) f i j)).

Axiom ind_isum_empty :
  forall (f:Z -> Z) (i:Z) (j:Z), (j <= i)%Z -> ((ind_isum f i j) = 0%Z).

Axiom ind_isum_one :
  forall (f:Z -> Z) (i:Z) (j:Z), (j = (i + 1%Z)%Z) ->
  ((ind_isum f i j) = (f i)).

Axiom ind_isum_plus_one :
  forall (f:Z -> Z) (i:Z) (j:Z), (i < j)%Z ->
  ((ind_isum f i j) = ((f i) + (ind_isum f (i + 1%Z)%Z j))%Z).

Axiom ind_isum_to_isum :
  forall (f:Z -> Z) (i:Z) (j:Z), (i < j)%Z ->
  ((ind_isum f i j) = (isum (to_fset i j) f)).

Axiom pos_to_strict : forall (a:Z), (1%Z <= a)%Z -> (0%Z < a)%Z.

Axiom pos_by_strict : forall (a:Z), (0%Z < a)%Z -> (1%Z <= a)%Z.

Axiom ind_isum_const :
  forall (k:Z) (i:Z) (j:Z), (i < j)%Z ->
  ((ind_isum ((fun (y0:Z) (y1:Z) => (const y0 y1)) k) i j) =
   (k * (j - i)%Z)%Z).

Axiom ind_isum_null :
  forall (f:Z -> Z) (i:Z) (j:Z), (i < j)%Z ->
  (forall (k:Z), ((i <= k)%Z /\ (k < j)%Z) -> ((f k) = 0%Z)) ->
  ((ind_isum f i j) = 0%Z).

Axiom ind_isum_right_extension :
  forall (f:Z -> Z) (i:Z) (j:Z), (i <= j)%Z ->
  ((ind_isum f i (j + 1%Z)%Z) = ((ind_isum f i j) + (f j))%Z).

Axiom ind_isum_re :
  forall (f:Z -> Z) (i:Z) (j:Z), (i < j)%Z ->
  ((ind_isum f i j) = ((ind_isum f i (j - 1%Z)%Z) + (f (j - 1%Z)%Z))%Z).

Axiom ind_isum_re_null :
  forall (f:Z -> Z) (i:Z) (j:Z), (i < j)%Z -> ((f j) = 0%Z) ->
  ((ind_isum f i (j + 1%Z)%Z) = (ind_isum f i j)).

Axiom ind_isum_null_but_maybe_one_elt :
  forall (l:Z) (h:Z) (t1:Z -> Z) (e:Z), ((l <= e)%Z /\ (e < h)%Z) ->
  (forall (a:Z), ((l <= a)%Z /\ (a < h)%Z) -> ~ (a = e) -> ((t1 a) = 0%Z)) ->
  ((ind_isum t1 l h) = (t1 e)).

Axiom ind_isum_eq :
  forall (f:Z -> Z) (g:Z -> Z) (i:Z) (j:Z),
  (forall (k:Z), ((i <= k)%Z /\ (k < j)%Z) -> ((f k) = (g k))) ->
  ((ind_isum f i j) = (ind_isum g i j)).

Parameter fc: (Z -> Z) -> (Z -> Z) -> (Z -> bool) -> Z -> Z.

Axiom fc_def :
  forall (f:Z -> Z) (g:Z -> Z) (p:Z -> bool) (k:Z),
  (((p k) = true) -> (((fc f g p) k) = (f k))) /\
  (~ ((p k) = true) -> (((fc f g p) k) = (g k))).

Axiom ind_isum_to_guard :
  forall (f:Z -> Z) (g:Z -> Z) (p:Z -> bool) (i:Z) (j:Z),
  (forall (k:Z), ((i <= k)%Z /\ (k < j)%Z) -> ((p k) = true)) ->
  ((ind_isum (fc f g p) i j) = (ind_isum f i j)).

Parameter fc1: (Z -> Z) -> (Z -> Z) -> (Z -> bool) -> Z -> Z.

Axiom fc_def1 :
  forall (f:Z -> Z) (g:Z -> Z) (p:Z -> bool) (k:Z),
  (((p k) = true) -> (((fc1 f g p) k) = (g k))) /\
  (~ ((p k) = true) -> (((fc1 f g p) k) = (f k))).

Axiom ind_isum_no_guard :
  forall (f:Z -> Z) (g:Z -> Z) (p:Z -> bool) (i:Z) (j:Z),
  (forall (k:Z), ((i <= k)%Z /\ (k < j)%Z) -> ~ ((p k) = true)) ->
  ((ind_isum (fc1 f g p) i j) = (ind_isum f i j)).

Axiom ind_isum_eq_gen :
  forall (f:Z -> Z) (g:Z -> Z) (i:Z) (i1:Z) (j:Z) (j1:Z),
  (forall (k:Z), ((i <= k)%Z /\ (k < j)%Z) -> ((f k) = (g k))) -> (i = i1) ->
  (j = j1) -> ((ind_isum f i j) = (ind_isum g i1 j1)).

Axiom ind_isum_func_const :
  forall (k:Z) (f:Z -> Z) (i:Z) (j:Z), (i < j)%Z ->
  (forall (l:Z), ((i <= l)%Z /\ (l < j)%Z) -> ((f l) = k)) ->
  ((ind_isum f i j) = (k * (j - i)%Z)%Z).

Axiom ind_isum_pos :
  forall (f:Z -> Z) (i:Z) (j:Z), (i <= j)%Z ->
  (forall (k:Z), ((i <= k)%Z /\ (k < j)%Z) -> ((f k) >= 0%Z)%Z) ->
  (0%Z <= (ind_isum f i j))%Z.

Parameter ind_iproduct: (Z -> Z) -> Z -> Z -> Z.

Axiom ind_iproduct_def :
  forall (f:Z -> Z) (i:Z) (j:Z),
  ((ind_iproduct f i j) =
   (int_iterate (fun (y0:Z) (y1:Z) => (y0 * y1)%Z) f i j)).

Axiom ind_iproduct_eq :
  forall (f:Z -> Z) (g:Z -> Z) (i:Z) (j:Z),
  (forall (k:Z), ((i <= k)%Z /\ (k < j)%Z) -> ((f k) = (g k))) ->
  ((ind_iproduct f i j) = (ind_iproduct g i j)).

Axiom ind_iproduct_eq_gen :
  forall (f:Z -> Z) (g:Z -> Z) (i1:Z) (j1:Z) (i2:Z) (j2:Z),
  (forall (k:Z), ((i1 <= k)%Z /\ (k < j1)%Z) -> ((f k) = (g k))) ->
  (i1 = i2) -> (j1 = j2) -> ((ind_iproduct f i1 j1) = (ind_iproduct g i2 j2)).

Axiom ind_iproduct_to_iproduct :
  forall (f:Z -> Z) (i:Z) (j:Z),
  ((ind_iproduct f i j) = (iproduct (to_fset i j) f)).

Axiom ind_iproduct_one_but_maybe_one_elt :
  forall (f:Z -> Z) (i:Z) (j:Z) (e:Z), ((i <= e)%Z /\ (e < j)%Z) ->
  (forall (e':Z), ((i <= e')%Z /\ (e' <= j)%Z) -> ~ (e = e') ->
   ((f e') = 1%Z)) ->
  ((ind_iproduct f i j) = (f e)).

Axiom mult_one_int : forall (a:Z) (b:Z), (b = 1%Z) -> ((a * b)%Z = a).

Axiom one_mult_int : forall (a:Z) (b:Z), (a = 1%Z) -> ((a * b)%Z = b).

Axiom mult_zero_int : forall (a:Z) (b:Z), (b = 0%Z) -> ((a * b)%Z = 0%Z).

Axiom zero_mult_int : forall (a:Z) (b:Z), (a = 0%Z) -> ((a * b)%Z = 0%Z).

Axiom iproduct_to_iterate :
  forall (f:Z -> Z) (i:Z) (j:Z),
  ((ind_iproduct f i j) =
   (int_iterate (fun (y0:Z) (y1:Z) => (y0 * y1)%Z) f i j)).

Axiom ind_isum_map_auto :
  forall (i:Z) (j:Z) (f:Z -> Z) (t1:Z -> Z),
  (p_bijective f (to_fset i j) (to_fset i j)) ->
  ((ind_isum t1 i j) = (ind_isum (fun (b:Z) => (t1 (f b))) i j)).

Axiom ind_isum_map :
  forall (i:Z) (j:Z) (k:Z) (l:Z) (f:Z -> Z) (t1:Z -> Z),
  (p_bijective f (to_fset i j) (to_fset k l)) ->
  ((ind_isum t1 k l) = (ind_isum (fun (b:Z) => (t1 (f b))) i j)).

Axiom ind_isum_map_auto_bij :
  forall (i:Z) (j:Z) (f:Z -> Z) (t1:Z -> Z),
  (forall (e:Z), ((i <= e)%Z /\ (e < j)%Z) ->
   (i <= (f e))%Z /\ ((f e) < j)%Z) ->
  (forall (e:Z) (e':Z), ((i <= e)%Z /\ (e < j)%Z) ->
   ((i <= e')%Z /\ (e' < j)%Z) -> ~ (e = e') -> ~ ((f e) = (f e'))) ->
  (forall (e':Z), ((i <= e')%Z /\ (e' < j)%Z) ->
   exists e:Z, ((i <= e)%Z /\ (e < j)%Z) /\ ((f e) = e')) ->
  ((ind_isum t1 i j) = (ind_isum (fun (b:Z) => (t1 (f b))) i j)).

Axiom ind_isum_map_bij :
  forall (i:Z) (j:Z) (k:Z) (l:Z) (f:Z -> Z) (t1:Z -> Z),
  (forall (e:Z), ((i <= e)%Z /\ (e < j)%Z) ->
   (k <= (f e))%Z /\ ((f e) < l)%Z) ->
  (forall (e:Z) (e':Z), ((i <= e)%Z /\ (e < j)%Z) ->
   ((i <= e')%Z /\ (e' < j)%Z) -> ~ (e = e') -> ~ ((f e) = (f e'))) ->
  (forall (e':Z), ((k <= e')%Z /\ (e' < l)%Z) ->
   exists e:Z, ((i <= e)%Z /\ (e < j)%Z) /\ ((f e) = e')) ->
  ((ind_isum t1 k l) = (ind_isum (fun (b:Z) => (t1 (f b))) i j)).

Axiom ind_iproduct_empty :
  forall (f:Z -> Z) (i:Z) (j:Z), (i >= j)%Z -> ((ind_iproduct f i j) = 1%Z).

Axiom ind_iproduct_plus_one :
  forall (f:Z -> Z) (i:Z) (j:Z), (i < j)%Z ->
  ((ind_iproduct f i j) = ((f i) * (ind_iproduct f (i + 1%Z)%Z j))%Z).

Axiom ind_iproduct_right_extension :
  forall (f:Z -> Z) (i:Z) (j:Z), (i < j)%Z ->
  ((ind_iproduct f i j) =
   ((ind_iproduct f i (j - 1%Z)%Z) * (f (j - 1%Z)%Z))%Z).

Axiom ind_iproduct_right_extension_comm :
  forall (f:Z -> Z) (i:Z) (j:Z), (i < j)%Z ->
  (((ind_iproduct f i (j - 1%Z)%Z) * (f (j - 1%Z)%Z))%Z =
   (ind_iproduct f i j)).

Axiom ind_iproduct_comp :
  forall (f:Z -> Z) (g:Z -> Z) (h:Z -> Z) (i:Z) (j:Z), (i <= j)%Z ->
  (forall (k:Z), ((i <= k)%Z /\ (k < j)%Z) -> (((f k) * (g k))%Z = (h k))) ->
  ((ind_iproduct h i j) = ((ind_iproduct f i j) * (ind_iproduct g i j))%Z).

Axiom ind_iproduct_one :
  forall (f:Z -> Z) (i:Z) (j:Z),
  (forall (k:Z), ((i <= k)%Z /\ (k < j)%Z) -> ((f k) = 1%Z)) ->
  ((ind_iproduct f i j) = 1%Z).

Axiom positive_iproduct :
  forall (f:Z -> Z) (i:Z) (j:Z),
  (forall (k:Z), ((i <= k)%Z /\ (k < j)%Z) -> ((f k) > 0%Z)%Z) ->
  ((ind_iproduct f i j) > 0%Z)%Z.

Axiom ind_iproduct_pos :
  forall (f:Z -> Z) (i:Z) (j:Z),
  (forall (k:Z), ((i <= k)%Z /\ (k < j)%Z) -> (0%Z <= (f k))%Z) ->
  (0%Z <= (ind_iproduct f i j))%Z.

Axiom ind_iproduct_strict_pos :
  forall (f:Z -> Z) (i:Z) (j:Z),
  (forall (k:Z), ((i <= k)%Z /\ (k < j)%Z) -> (0%Z < (f k))%Z) ->
  (0%Z < (ind_iproduct f i j))%Z.

Axiom iproduct_strict_pos :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (f:a -> Z),
  (forall (k:a), (mem k s) -> (0%Z < (f k))%Z) -> (0%Z < (iproduct s f))%Z.

Axiom ind_iproduct_strict_pos_one :
  forall (f:Z -> Z) (i:Z) (j:Z),
  (forall (k:Z), ((i <= k)%Z /\ (k < j)%Z) -> (0%Z < (f k))%Z) ->
  (1%Z <= (ind_iproduct f i j))%Z.

Axiom ind_iproduct_left_right :
  forall (f:Z -> Z) (l:Z) (k:Z) (h:Z), ((l <= k)%Z /\ (k <= h)%Z) ->
  ((ind_iproduct f l k) =
   (ind_iproduct (fun (a:Z) => (f ((h - (a + 1%Z)%Z)%Z + l)%Z))
    ((h - k)%Z + l)%Z h)).

Axiom iterable_imult : iterable (fun (y0:Z) (y1:Z) => (y0 * y1)%Z).

Axiom int_minus_distr :
  forall (a:Z) (b:Z), ((-(a + b)%Z)%Z = ((-a)%Z + (-b)%Z)%Z).

Axiom int_minus_eq : forall (a:Z) (b:Z), (a = b) -> ((-a)%Z = (-b)%Z).

Axiom ind_iproduct_map_auto :
  forall (i:Z) (j:Z) (f:Z -> Z) (t1:Z -> Z),
  (p_bijective f (to_fset i j) (to_fset i j)) ->
  ((ind_iproduct t1 i j) = (ind_iproduct (fun (b:Z) => (t1 (f b))) i j)).

Axiom ind_iproduct_map :
  forall (i:Z) (j:Z) (k:Z) (l:Z) (f:Z -> Z) (t1:Z -> Z),
  (p_bijective f (to_fset i j) (to_fset k l)) ->
  ((ind_iproduct t1 k l) = (ind_iproduct (fun (b:Z) => (t1 (f b))) i j)).

Axiom ind_iproduct_trans :
  forall (f:Z -> Z) (i:Z) (k:Z) (j:Z), ((i <= k)%Z /\ (k <= j)%Z) ->
  ((ind_iproduct f i j) = ((ind_iproduct f i k) * (ind_iproduct f k j))%Z).

Axiom ind_iproduct_inf :
  forall (f:Z -> Z) (g:Z -> Z) (i:Z) (j:Z),
  (forall (k:Z), ((i <= k)%Z /\ (k < j)%Z) ->
   (0%Z <= (f k))%Z /\ ((f k) <= (g k))%Z) ->
  ((ind_iproduct f i j) <= (ind_iproduct g i j))%Z.

Parameter choose_filter:
  forall {a:Type} {a_WT:WhyType a}, (set a) -> (a -> bool) -> a.

Axiom choose_filter_def :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (p:a -> bool),
  (exists e:a, (mem e s) /\ ((p e) = true)) -> ((p (choose s)) = true) ->
  ((choose_filter s p) = (choose s)).

Axiom choose_filter_def1 :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (p:a -> bool),
  (exists e:a, (mem e s) /\ ((p e) = true)) -> ~ ((p (choose s)) = true) ->
  ((choose_filter s p) = (choose_filter (remove (choose s) s) p)).

Axiom choose_filter_spec :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (p:a -> bool),
  (exists e:a, (mem e s) /\ ((p e) = true)) ->
  ((p (choose_filter s p)) = true).

Axiom choose_filter_spec1 :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (p:a -> bool),
  (exists e:a, (mem e s) /\ ((p e) = true)) -> mem (choose_filter s p) s.

Parameter my_filter:
  forall {a:Type} {a_WT:WhyType a}, (set a) -> (a -> bool) -> set a.

Axiom my_filter_def :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (p:a -> bool), (is_empty s) ->
  ((my_filter s p) = (empty : set a)).

Axiom my_filter_def1 :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (p:a -> bool), ~ (is_empty s) ->
  ((p (choose s)) = true) ->
  ((my_filter s p) = (add (choose s) (my_filter (remove (choose s) s) p))).

Axiom my_filter_def2 :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (p:a -> bool), ~ (is_empty s) ->
  ~ ((p (choose s)) = true) ->
  ((my_filter s p) = (my_filter (remove (choose s) s) p)).

Axiom my_filter_spec :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (p:a -> bool), forall (e:a), (mem e s) ->
  ((p e) = true) -> mem e (my_filter s p).

Axiom my_filter_spec1 :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (p:a -> bool), forall (e:a), (mem e s) ->
  (mem e (my_filter s p)) -> ((p e) = true).

Axiom my_filter_spec2 :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (p:a -> bool), forall (e:a), (mem e (my_filter s p)) ->
  mem e s.

Axiom my_filter_spec3 :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (p:a -> bool), (0%Z <= (cardinal (my_filter s p)))%Z.

Axiom my_filter_spec4 :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (p:a -> bool),
  ((cardinal (my_filter s p)) <= (cardinal s))%Z.

Axiom in_my_filter :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (p:a -> bool) (e:a), (mem e s) -> ((p e) = true) ->
  mem e (my_filter s p).

Axiom not_in_my_filter_set :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (p:a -> bool) (e:a), ~ (mem e s) ->
  ~ (mem e (my_filter s p)).

Axiom not_in_my_filter_filter :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (p:a -> bool) (e:a), ~ ((p e) = true) ->
  ~ (mem e (my_filter s p)).

Axiom in_my_filter_set :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (p:a -> bool) (e:a), (mem e (my_filter s p)) -> mem e s.

Axiom in_my_filter_filter :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (p:a -> bool) (e:a), (mem e (my_filter s p)) ->
  ((p e) = true).

Axiom my_filter_inter :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (p1:a -> bool) (p2:a -> bool),
  (forall (e:a), (mem e s) -> ((p1 e) = true) -> ~ ((p2 e) = true)) ->
  ((inter (my_filter s p1) (my_filter s p2)) = (empty : set a)).

Axiom my_filter_union :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (p1:a -> bool) (p2:a -> bool),
  (forall (e:a), (mem e s) -> ~ ((p1 e) = true) -> ((p2 e) = true)) ->
  ((union (my_filter s p1) (my_filter s p2)) = s).

Axiom ind_iproduct_sup_one :
  forall (f:Z -> Z) (i:Z) (j:Z), (i < j)%Z ->
  (forall (k:Z), ((i <= k)%Z /\ (k < j)%Z) -> (1%Z <= (f k))%Z) ->
  (exists k:Z, ((i <= k)%Z /\ (k < j)%Z) /\ ~ ((f k) = 1%Z)) ->
  (1%Z < (ind_iproduct f i j))%Z.

Axiom ind_isum_transl :
  forall (f:Z -> Z) (i:Z) (j:Z) (k:Z),
  ((ind_isum f i j) =
   (ind_isum (fun (b:Z) => (f (b + k)%Z)) (i - k)%Z (j - k)%Z)).

Axiom ind_isum_transl_plus_one :
  forall (f:Z -> Z) (i:Z) (j:Z),
  ((ind_isum f i j) =
   (ind_isum (fun (b:Z) => (f (b - 1%Z)%Z)) (i + 1%Z)%Z (j + 1%Z)%Z)).

Axiom ind_isum_transl_minus_one :
  forall (f:Z -> Z) (i:Z) (j:Z),
  ((ind_isum f i j) =
   (ind_isum (fun (b:Z) => (f (b + 1%Z)%Z)) (i - 1%Z)%Z (j - 1%Z)%Z)).

Axiom ind_isum_scal :
  forall (f:Z -> Z) (i:Z) (j:Z) (a:Z), (i <= j)%Z ->
  ((ind_isum (fun (i1:Z) => (a * (f i1))%Z) i j) = (a * (ind_isum f i j))%Z).

Axiom minus_ind_isum :
  forall (f:Z -> Z) (i:Z) (j:Z), (i <= j)%Z ->
  ((-(ind_isum f i j))%Z = (ind_isum (fun (i1:Z) => (-(f i1))%Z) i j)).

Axiom minus_ind_isum_rev :
  forall (f:Z -> Z) (i:Z) (j:Z), (i <= j)%Z ->
  ((ind_isum (fun (i1:Z) => (-(f i1))%Z) i j) = (-(ind_isum f i j))%Z).

Axiom ind_isum_scal_rev :
  forall (f:Z -> Z) (i:Z) (j:Z) (a:Z), (i <= j)%Z ->
  ((a * (ind_isum f i j))%Z = (ind_isum (fun (i1:Z) => (a * (f i1))%Z) i j)).

Axiom ind_isum_scal_rev_right :
  forall (f:Z -> Z) (i:Z) (j:Z) (a:Z), (i <= j)%Z ->
  (((ind_isum f i j) * a)%Z = (ind_isum (fun (i1:Z) => ((f i1) * a)%Z) i j)).

Axiom ind_isum_scal_right :
  forall (f:Z -> Z) (i:Z) (j:Z) (a:Z), (i <= j)%Z ->
  ((ind_isum (fun (i1:Z) => ((f i1) * a)%Z) i j) = ((ind_isum f i j) * a)%Z).

Axiom ind_isum_bound :
  forall (f:Z -> Z) (g:Z -> Z) (i:Z) (j:Z), (i < j)%Z ->
  (forall (k:Z), ((i <= k)%Z /\ (k < j)%Z) -> ((f k) < (g k))%Z) ->
  ((ind_isum f i j) < (ind_isum g i j))%Z.

Axiom comp_trans_equal_strict :
  forall (a:Z) (b:Z) (c:Z), (a <= b)%Z -> (b < c)%Z -> (a < c)%Z.

Axiom transitive_inf_leq_int :
  forall (a:Z) (b:Z) (c:Z), (a < b)%Z -> (b <= c)%Z -> (a < c)%Z.

Axiom transitive_inf_int :
  forall (a:Z) (b:Z) (c:Z), (a < b)%Z -> (b < c)%Z -> (a < c)%Z.

Axiom compeq_trans_sum :
  forall (a:Z) (b:Z) (c:Z), (b <= c)%Z -> ((a + b)%Z <= (a + c)%Z)%Z.

Axiom compeq_trans_sum_zero :
  forall (a:Z) (b:Z), (0%Z <= b)%Z -> (a <= (a + b)%Z)%Z.

Axiom comp_trans_sum :
  forall (a:Z) (b:Z) (c:Z), (b < c)%Z -> ((a + b)%Z < (a + c)%Z)%Z.

Axiom ind_isum_bound_eq :
  forall (f:Z -> Z) (g:Z -> Z) (i:Z) (j:Z), (i <= j)%Z ->
  (forall (k:Z), ((i <= k)%Z /\ (k < j)%Z) -> ((f k) <= (g k))%Z) ->
  ((ind_isum f i j) <= (ind_isum g i j))%Z.

Axiom ind_isum_scal_gen :
  forall (f:Z -> Z) (i:Z) (j:Z), forall (a:Z), ((i <= a)%Z /\ (a < j)%Z) ->
  ((ind_isum (fun (i1:Z) => (a * (f i1))%Z) i j) = (a * (ind_isum f i j))%Z).

Axiom ind_isum_trans :
  forall (f:Z -> Z) (i:Z) (k:Z) (j:Z), ((i <= k)%Z /\ (k <= j)%Z) ->
  ((ind_isum f i j) = ((ind_isum f i k) + (ind_isum f k j))%Z).

Axiom minus_out_int : forall (a:Z) (b:Z), (((-a)%Z * b)%Z = (-(a * b)%Z)%Z).

Parameter power: Z -> Z -> Z.

Axiom power_def :
  forall (e:Z) (i:Z), (0%Z <= i)%Z -> (i = 0%Z) -> ((power e i) = 1%Z).

Axiom power_def1 :
  forall (e:Z) (i:Z), (0%Z <= i)%Z -> ~ (i = 0%Z) ->
  ((power e i) = (e * (power e (i - 1%Z)%Z))%Z).

Axiom Power_zero : forall (i:Z), ((power i 0%Z) = 1%Z).

Axiom Power_one : forall (i:Z), ((power i 1%Z) = i).

Axiom power_plus_one :
  forall (i:Z) (x:Z), (0%Z <= x)%Z ->
  ((power i (x + 1%Z)%Z) = ((power i x) * i)%Z).

Axiom power_sum :
  forall (i:Z) (x:Z) (y:Z), (0%Z <= x)%Z -> (0%Z <= y)%Z ->
  ((power i (x + y)%Z) = ((power i x) * (power i y))%Z).

Axiom power_mult :
  forall (i:Z) (x:Z) (y:Z), (0%Z <= x)%Z -> (0%Z <= y)%Z ->
  ((power i (x * y)%Z) = (power (power i x) y)).

Axiom Power_sum :
  forall (x:Z) (y:Z) (i:Z), (x >= 0%Z)%Z -> (y >= 0%Z)%Z ->
  ((power i (x + y)%Z) = ((power i x) * (power i y))%Z).

Axiom Power_mult :
  forall (x:Z) (y:Z) (i:Z), (x >= 0%Z)%Z -> (y >= 0%Z)%Z ->
  ((power i (x * y)%Z) = (power (power i x) y)).

Axiom power_to_ind_iproduct :
  forall (e:Z) (i:Z), (0%Z <= i)%Z ->
  ((power e i) =
   (ind_iproduct ((fun (y0:Z) (y1:Z) => (const y0 y1)) e) 0%Z i)).

Axiom power_transl :
  forall (e:Z) (k:Z) (i:Z), (0%Z <= i)%Z ->
  ((power e i) =
   (ind_iproduct ((fun (y0:Z) (y1:Z) => (const y0 y1)) e) k (k + i)%Z)).

Axiom ind_iproduct_to_power :
  forall (e:Z) (i:Z) (j:Z), ((0%Z <= i)%Z /\ (i <= j)%Z) ->
  ((ind_iproduct ((fun (y0:Z) (y1:Z) => (const y0 y1)) e) i j) =
   (power e (j - i)%Z)).

Axiom ind_iproduct_to_power_gen :
  forall (e:Z), forall (i:Z) (j:Z), ((0%Z <= i)%Z /\ (i <= j)%Z) ->
  ((ind_iproduct ((fun (y0:Z) (y1:Z) => (const y0 y1)) e) i j) =
   (power e (j - i)%Z)).

Axiom power_sum_rev :
  forall (x:Z) (n:Z) (m:Z), (n >= 0%Z)%Z -> (m >= 0%Z)%Z ->
  (((power x n) * (power x m))%Z = (power x (n + m)%Z)).

Axiom power_eq :
  forall (x:Z) (n:Z) (m:Z), (n = m) -> ((power x n) = (power x m)).

Axiom power_eq_gen :
  forall (x:Z) (y:Z) (n:Z) (m:Z), (n = m) -> (x = y) ->
  ((power x n) = (power y m)).

Axiom power_2_sum :
  forall (i:Z), (i >= 1%Z)%Z ->
  ((ind_isum (fun (k:Z) => (power 2%Z (k + 1%Z)%Z)) 0%Z i) =
   ((power 2%Z (i + 1%Z)%Z) - 2%Z)%Z).

Axiom power_decomp :
  forall (i:Z), (i >= 1%Z)%Z ->
  ((ind_isum (fun (k:Z) => (power 2%Z (k + 1%Z)%Z)) 0%Z i) <
   (power 2%Z (i + 1%Z)%Z))%Z.

Parameter fc2: Z -> Z -> Z.

Axiom fc_def2 :
  forall (i:Z) (k:Z),
  (((1%Z <= k)%Z /\ (k < (i + 1%Z)%Z)%Z) ->
   (((fc2 i) k) = (power 2%Z (k - 1%Z)%Z))) /\
  (~ ((1%Z <= k)%Z /\ (k < (i + 1%Z)%Z)%Z) -> (((fc2 i) k) = 0%Z)).

Axiom power_decomp_minus_one :
  forall (i:Z), (i >= 1%Z)%Z ->
  ((ind_isum (fc2 i) 1%Z i) < (power 2%Z (i - 1%Z)%Z))%Z.

Axiom power_decomp_ :
  forall (i:Z), (i >= 1%Z)%Z ->
  ((ind_isum (fun (k:Z) => (power 2%Z k)) 0%Z i) < (power 2%Z i))%Z.

Axiom power_decomp_one :
  forall (i:Z), (i >= 1%Z)%Z ->
  ((ind_isum (fun (k:Z) => (power 2%Z (k + 1%Z)%Z)) 1%Z i) <
   (power 2%Z (i + 1%Z)%Z))%Z.

Axiom power_decomp_one_ :
  forall (i:Z), (i >= 1%Z)%Z ->
  ((ind_isum (fun (k:Z) => (power 2%Z k)) 1%Z i) < (power 2%Z i))%Z.

Axiom growing_mult :
  forall (n:Z) (m:Z), (0%Z <= n)%Z -> (1%Z <= m)%Z -> ((n * m)%Z >= n)%Z.

Axiom strict_growing_mult :
  forall (n:Z) (m:Z), (1%Z < n)%Z -> (1%Z < m)%Z -> ((n * m)%Z > n)%Z.

Axiom init_exp : forall (k:Z), ((power k 0%Z) = 1%Z).

Axiom init_exp1 : forall (k:Z), ((power k 1%Z) = k).

Axiom init_exp2 : forall (k:Z), ((power k 2%Z) = (k * k)%Z).

Axiom positive_int_exp :
  forall (k:Z) (n:Z), (1%Z <= k)%Z -> (0%Z <= n)%Z -> ((power k n) >= 1%Z)%Z.

Axiom positive_int_exp1 :
  forall (k:Z) (n:Z), (1%Z <= k)%Z -> (0%Z <= n)%Z -> ((power k n) > 0%Z)%Z.

Axiom positive_int_exp2 :
  forall (k:Z) (n:Z), (1%Z <= k)%Z -> (0%Z <= n)%Z ->
  ((power k n) <= (power k (n + 1%Z)%Z))%Z.

Axiom strict_positive_int_exp :
  forall (k:Z) (n:Z), (1%Z < k)%Z -> (0%Z < n)%Z -> ((power k n) > 1%Z)%Z.

Axiom strict_positive_int_exp1 :
  forall (k:Z) (n:Z), (1%Z < k)%Z -> (0%Z < n)%Z ->
  ((power k (n - 1%Z)%Z) < (power k n))%Z.

Axiom strict_positive_int_exp2 :
  forall (k:Z) (n:Z), (1%Z < k)%Z -> (0%Z < n)%Z ->
  ((power k n) < (power k (n + 1%Z)%Z))%Z.

Axiom power_minus_one :
  forall (i:Z), (0%Z <= i)%Z -> ((int.EuclideanDivision.mod1 i 2%Z) = 0%Z) ->
  ((power (-1%Z)%Z i) = 1%Z).

Axiom power_minus_one1 :
  forall (i:Z), (0%Z <= i)%Z -> ((int.EuclideanDivision.mod1 i 2%Z) = 1%Z) ->
  ((power (-1%Z)%Z i) = (-1%Z)%Z).

Axiom growing_exp :
  forall (k:Z) (m:Z) (n:Z), (1%Z <= k)%Z -> ((0%Z <= m)%Z /\ (m <= n)%Z) ->
  ((power k m) <= (power k n))%Z.

Axiom strict_growing_exp :
  forall (k:Z) (m:Z) (n:Z), (1%Z < k)%Z -> ((0%Z <= m)%Z /\ (m < n)%Z) ->
  ((power k m) < (power k n))%Z.

Axiom unicity_exp :
  forall (k:Z) (m:Z) (n:Z), (1%Z < k)%Z -> (0%Z <= m)%Z -> (0%Z <= n)%Z ->
  ((power k m) = (power k n)) -> (m = n).

Axiom unicity_exp1 :
  forall (k:Z) (m:Z) (n:Z), (1%Z < k)%Z -> (0%Z <= m)%Z -> (0%Z <= n)%Z ->
  (m = n) -> ((power k m) = (power k n)).

Axiom bounded_sum_exp :
  forall (i:Z) (j:Z) (m:Z) (n:Z), (0%Z <= m)%Z -> (0%Z <= n)%Z ->
  ((0%Z <= i)%Z /\ (i < (power 2%Z m))%Z) ->
  ((0%Z <= j)%Z /\ (j < (power 2%Z n))%Z) ->
  (((i * (power 2%Z n))%Z + j)%Z < (power 2%Z (m + n)%Z))%Z.

Axiom add_im_re :
  forall (i:t) (j:t),
  ((infix_pldt i j) =
   (infix_pldt (infix_pldt (t_real_part i) (t_real_part j))
    (infix_asdt im (infix_pldt (t_im_part i) (t_im_part j))))).

Axiom add_im_re1 :
  forall (i:t) (j:t),
  ((t_real_part (infix_pldt i j)) =
   (infix_pldt (t_real_part i) (t_real_part j))).

Axiom add_im_re2 :
  forall (i:t) (j:t),
  ((t_im_part (infix_pldt i j)) = (infix_pldt (t_im_part i) (t_im_part j))).

Axiom add_real_part :
  forall (i:t) (j:t),
  ((infix_pldt (t_real_part i) (t_real_part j)) =
   (t_real_part (infix_pldt i j))).

Axiom add_im_part :
  forall (i:t) (j:t),
  ((infix_pldt (t_im_part i) (t_im_part j)) = (t_im_part (infix_pldt i j))).

Axiom add_real_part_rev :
  forall (i:t) (j:t),
  ((t_real_part (infix_pldt i j)) =
   (infix_pldt (t_real_part i) (t_real_part j))).

Axiom add_im_part_rev :
  forall (i:t) (j:t),
  ((t_im_part (infix_pldt i j)) = (infix_pldt (t_im_part i) (t_im_part j))).

Axiom mult_distr_add_r :
  forall (a:t) (b:t) (c:t),
  ((infix_asdt a (infix_pldt b c)) =
   (infix_pldt (infix_asdt a b) (infix_asdt a c))).

Axiom mult_distr_minus :
  forall (a:t) (b:t) (c:t),
  ((infix_asdt a (infix_mndt b c)) =
   (infix_mndt (infix_asdt a b) (infix_asdt a c))).

Axiom minus_out :
  forall (a:t) (b:t),
  ((infix_asdt (prefix_mndt a) b) = (prefix_mndt (infix_asdt a b))).

Axiom mult_distr_add_r_rev :
  forall (a:t) (b:t) (c:t),
  ((infix_pldt (infix_asdt a b) (infix_asdt a c)) =
   (infix_asdt a (infix_pldt b c))).

Axiom mult_distr_minus_rev :
  forall (a:t) (b:t) (c:t),
  ((infix_mndt (infix_asdt a b) (infix_asdt a c)) =
   (infix_asdt a (infix_mndt b c))).

Axiom div_distr_add :
  forall (a:t) (b:t) (c:t), ~ (a = tzero) ->
  ((infix_sldt (infix_pldt b c) a) =
   (infix_pldt (infix_sldt b a) (infix_sldt c a))).

Axiom div_distr_minus :
  forall (a:t) (b:t) (c:t), ~ (a = tzero) ->
  ((infix_sldt (infix_mndt b c) a) =
   (infix_mndt (infix_sldt b a) (infix_sldt c a))).

Axiom div_distr_add_rev :
  forall (a:t) (b:t) (c:t), ~ (a = tzero) ->
  ((infix_pldt (infix_sldt b a) (infix_sldt c a)) =
   (infix_sldt (infix_pldt b c) a)).

Axiom div_distr_minus_rev :
  forall (a:t) (b:t) (c:t), ~ (a = tzero) ->
  ((infix_mndt (infix_sldt b a) (infix_sldt c a)) =
   (infix_sldt (infix_mndt b c) a)).

Axiom mult_distr_add_l :
  forall (a:t) (b:t) (c:t),
  ((infix_asdt (infix_pldt b c) a) =
   (infix_pldt (infix_asdt a b) (infix_asdt a c))).

Axiom mult_distr_minus_r :
  forall (a:t) (b:t) (c:t),
  ((infix_asdt a (infix_mndt b c)) =
   (infix_mndt (infix_asdt a b) (infix_asdt a c))).

Axiom mult_distr_minus_ll :
  forall (a:t) (b:t) (c:t),
  ((infix_asdt (infix_pldt (prefix_mndt b) c) a) =
   (infix_pldt (infix_asdt (prefix_mndt a) b) (infix_asdt a c))).

Axiom mult_distr_minus_ri :
  forall (a:t) (b:t) (c:t),
  ((infix_asdt (infix_mndt b c) a) =
   (infix_mndt (infix_asdt a b) (infix_asdt a c))).

Axiom minus_distr_op :
  forall (a:t) (b:t) (c:t),
  ((infix_mndt a (infix_pldt b c)) = (infix_mndt (infix_mndt a b) c)).

Axiom mult_distr_minus_l :
  forall (a:t) (b:t) (c:t),
  ((infix_asdt (infix_mndt b c) a) =
   (infix_mndt (infix_asdt a b) (infix_asdt a c))).

Axiom assoc_right :
  forall (a:t) (b:t) (c:t),
  ((infix_pldt a (infix_pldt b c)) = (infix_pldt (infix_pldt a b) c)).

Axiom assoc_right_mult :
  forall (a:t) (b:t) (c:t),
  ((infix_asdt a (infix_asdt b c)) = (infix_asdt (infix_asdt a b) c)).

Axiom minus_elim :
  forall (a:t) (b:t), ((infix_mndt a b) = (infix_pldt a (prefix_mndt b))).

Axiom minus_eq_t :
  forall (a:t) (b:t) (a':t) (b':t), (a = a') -> (b = b') ->
  ((infix_mndt a b) = (infix_mndt a' b')).

Axiom minus_distr_elim :
  forall (a:t) (b:t) (c:t),
  ((infix_mndt a (infix_pldt b c)) =
   (infix_pldt (infix_pldt a (prefix_mndt b)) (prefix_mndt c))).

Axiom plus_minus_distr_elim :
  forall (a:t) (b:t) (c:t),
  ((infix_pldt a (prefix_mndt (infix_pldt b c))) =
   (infix_pldt (infix_pldt a (prefix_mndt b)) (prefix_mndt c))).

Axiom def_by_minus :
  forall (x:t) (y:t) (z:t), (x = (infix_mndt y z)) -> (y = (infix_pldt x z)).

Axiom switch :
  forall (a:t) (b:t) (c:t),
  ((infix_pldt (infix_pldt a b) c) = (infix_pldt (infix_pldt a c) b)).

Axiom meet_a_c :
  forall (a:t) (b:t) (c:t) (d:t),
  ((infix_pldt (infix_pldt (infix_pldt a b) c) d) =
   (infix_pldt (infix_pldt (infix_pldt a c) b) d)).

Axiom meet_a_d :
  forall (a:t) (b:t) (c:t) (d:t),
  ((infix_pldt (infix_pldt (infix_pldt a b) c) d) =
   (infix_pldt (infix_pldt (infix_pldt a d) b) c)).

Axiom meet_b_c :
  forall (a:t) (b:t) (c:t) (d:t),
  ((infix_pldt (infix_pldt (infix_pldt a b) c) d) =
   (infix_pldt (infix_pldt (infix_pldt b c) a) d)).

Axiom meet_b_d :
  forall (a:t) (b:t) (c:t) (d:t),
  ((infix_pldt (infix_pldt (infix_pldt a b) c) d) =
   (infix_pldt (infix_pldt (infix_pldt b d) a) c)).

Axiom meet_c_d :
  forall (a:t) (b:t) (c:t) (d:t),
  ((infix_pldt (infix_pldt (infix_pldt a b) c) d) =
   (infix_pldt (infix_pldt (infix_pldt c d) a) b)).

Axiom inv_add :
  forall (a:t) (b:t), ((infix_pldt (infix_pldt a (prefix_mndt a)) b) = b).

Axiom switch_m :
  forall (a:t) (b:t) (c:t),
  ((infix_pldt (infix_pldt a b) c) = (infix_pldt (infix_pldt a c) b)).

Axiom meet_a_c_m :
  forall (a:t) (b:t) (c:t) (d:t),
  ((infix_pldt (infix_pldt (infix_pldt a b) c) d) =
   (infix_pldt (infix_pldt (infix_pldt a c) b) d)).

Axiom meet_a_d_m :
  forall (a:t) (b:t) (c:t) (d:t),
  ((infix_pldt (infix_pldt (infix_pldt a b) c) d) =
   (infix_pldt (infix_pldt (infix_pldt a d) b) c)).

Axiom meet_b_c_m :
  forall (a:t) (b:t) (c:t) (d:t),
  ((infix_pldt (infix_pldt (infix_pldt a b) c) d) =
   (infix_pldt (infix_pldt (infix_pldt b c) a) d)).

Axiom meet_b_d_m :
  forall (a:t) (b:t) (c:t) (d:t),
  ((infix_pldt (infix_pldt (infix_pldt a b) c) d) =
   (infix_pldt (infix_pldt (infix_pldt b d) a) c)).

Axiom meet_c_d_m :
  forall (a:t) (b:t) (c:t) (d:t),
  ((infix_pldt (infix_pldt (infix_pldt a b) c) d) =
   (infix_pldt (infix_pldt (infix_pldt c d) a) b)).

Axiom t_real_part_add :
  forall (a:t) (b:t),
  ((t_real_part (infix_pldt a b)) =
   (infix_pldt (t_real_part a) (t_real_part b))).

Axiom t_real_part_subs :
  forall (a:t) (b:t),
  ((t_real_part (infix_mndt a b)) =
   (infix_mndt (t_real_part a) (t_real_part b))).

Axiom t_im_part_add :
  forall (a:t) (b:t),
  ((t_im_part (infix_pldt a b)) = (infix_pldt (t_im_part a) (t_im_part b))).

Axiom t_im_part_subs :
  forall (a:t) (b:t),
  ((t_im_part (infix_mndt a b)) = (infix_mndt (t_im_part a) (t_im_part b))).

Axiom t_real_part_real : forall (a:t), (real_ a) -> ((t_real_part a) = a).

Axiom t_real_part_im :
  forall (a:t), (pure_im_ a) -> ((t_real_part a) = tzero).

Axiom im_t_im_part_im :
  forall (a:t), (pure_im_ a) -> ((infix_asdt im (t_im_part a)) = a).

Axiom t_im_part_im :
  forall (a:t), (pure_im_ a) ->
  ((t_im_part a) = (infix_asdt (prefix_mndt im) a)).

Axiom t_im_part_real : forall (a:t), (real_ a) -> ((t_im_part a) = tzero).

Axiom a_div_b_mult_a :
  forall (a:t) (b:t) (c:t) (d:t), ~ (b = tzero) -> ~ (c = tzero) ->
  (d = (infix_sldt tone b)) -> (a = c) ->
  ((infix_asdt (infix_sldt a b) (infix_sldt tone c)) = d).

Parameter nonn_part:
  forall {a:Type} {a_WT:WhyType a} {im1:Type} {im1_WT:WhyType im1},
  (im1 -> im1 -> im1) -> (set a) -> (a -> im1) -> set a.

Parameter result2:
  forall {a:Type} {a_WT:WhyType a} {im1:Type} {im1_WT:WhyType im1},
  (im1 -> im1 -> im1) -> (a -> im1) -> a -> bool.

Axiom result_def2 :
  forall {a:Type} {a_WT:WhyType a} {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (t1:a -> im1) (e:a),
  (((result2 op1 t1) e) = true) <-> ~ (neutral op1 (t1 e)).

Axiom nonn_part_def :
  forall {a:Type} {a_WT:WhyType a} {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (s:set a) (t1:a -> im1),
  ((nonn_part op1 s t1) = (filter (result2 op1 t1) s)).

Axiom nonn_part_spec :
  forall {a:Type} {a_WT:WhyType a} {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (s:set a) (t1:a -> im1), forall (e:a),
  (mem e (nonn_part op1 s t1)) -> mem e s.

Axiom nonn_part_spec1 :
  forall {a:Type} {a_WT:WhyType a} {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (s:set a) (t1:a -> im1), forall (e:a),
  (mem e (nonn_part op1 s t1)) -> ~ (neutral op1 (t1 e)).

Axiom nonn_part_spec2 :
  forall {a:Type} {a_WT:WhyType a} {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (s:set a) (t1:a -> im1), forall (e:a),
  ((mem e s) /\ ~ (neutral op1 (t1 e))) -> mem e (nonn_part op1 s t1).

Parameter n_part:
  forall {a:Type} {a_WT:WhyType a} {im1:Type} {im1_WT:WhyType im1},
  (im1 -> im1 -> im1) -> (set a) -> (a -> im1) -> set a.

Parameter result3:
  forall {a:Type} {a_WT:WhyType a} {im1:Type} {im1_WT:WhyType im1},
  (im1 -> im1 -> im1) -> (a -> im1) -> a -> bool.

Axiom result_def3 :
  forall {a:Type} {a_WT:WhyType a} {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (t1:a -> im1) (e:a),
  (((result3 op1 t1) e) = true) <-> (neutral op1 (t1 e)).

Axiom n_part_def :
  forall {a:Type} {a_WT:WhyType a} {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (s:set a) (t1:a -> im1),
  ((n_part op1 s t1) = (filter (result3 op1 t1) s)).

Axiom n_part_spec :
  forall {a:Type} {a_WT:WhyType a} {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (s:set a) (t1:a -> im1), forall (e:a),
  (mem e (n_part op1 s t1)) -> mem e s.

Axiom n_part_spec1 :
  forall {a:Type} {a_WT:WhyType a} {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (s:set a) (t1:a -> im1), forall (e:a),
  (mem e (n_part op1 s t1)) -> neutral op1 (t1 e).

Axiom n_part_spec2 :
  forall {a:Type} {a_WT:WhyType a} {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (s:set a) (t1:a -> im1), forall (e:a),
  ((mem e s) /\ (neutral op1 (t1 e))) -> mem e (n_part op1 s t1).

Axiom nullity_partition :
  forall {a:Type} {a_WT:WhyType a} {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (s:set a) (t1:a -> im1), (commut op1) ->
  (s = (union (nonn_part op1 s t1) (n_part op1 s t1))).

Axiom nullity_partition1 :
  forall {a:Type} {a_WT:WhyType a} {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (s:set a) (t1:a -> im1), (commut op1) ->
  ((inter (nonn_part op1 s t1) (n_part op1 s t1)) = (empty : set a)).

Axiom iterate_neutral :
  forall {a:Type} {a_WT:WhyType a} {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (s:set a) (t1:a -> im1), (iterable op1) ->
  (commut op1) ->
  (forall (a1:a), (mem a1 s) -> ((t1 a1) = (neutral_elt op1))) ->
  ((iterate op1 s t1) = (neutral_elt op1)).

Axiom iterate_nullity_partition :
  forall {a:Type} {a_WT:WhyType a} {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (s:set a) (t1:a -> im1), (iterable op1) ->
  (commut op1) ->
  ((iterate op1 s t1) = (iterate op1 (nonn_part op1 s t1) t1)).

Parameter couple:
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b}
    {im1:Type} {im1_WT:WhyType im1},
  (a -> b -> im1) -> (a* b)%type -> im1.

Axiom couple_def :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b}
    {im1:Type} {im1_WT:WhyType im1},
  forall (f:a -> b -> im1) (o:(a* b)%type), forall (x:a) (x1:b),
  (o = (x, x1)) -> ((couple f o) = ((f x) x1)).

Axiom null_product :
  forall (a:t) (b:t), ((infix_asdt a b) = tzero) ->
  (a = tzero) \/ (b = tzero).

Axiom couple_value :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b}
    {im1:Type} {im1_WT:WhyType im1},
  forall (f:a -> b -> im1) (o:(a* b)%type),
  ((couple f o) = ((f (fir o)) (sec o))).

Axiom couple_value_dev :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b}
    {im1:Type} {im1_WT:WhyType im1},
  forall (f:a -> b -> im1) (o:(a* b)%type) (a1:a) (b1:b), (o = (a1, b1)) ->
  ((couple f o) = ((f a1) b1)).

Axiom neutral_tzero :
  neutral (fun (y0:t) (y1:t) => (infix_pldt y0 y1)) tzero.

Axiom neutral_tzero1 : iterable (fun (y0:t) (y1:t) => (infix_pldt y0 y1)).

Parameter sum: forall {a:Type} {a_WT:WhyType a}, (set a) -> (a -> t) -> t.

Axiom sum_def :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (t1:a -> t),
  ((sum s t1) = (iterate (fun (y0:t) (y1:t) => (infix_pldt y0 y1)) s t1)).

Parameter eq_t: t -> t -> Prop.

Axiom eq_t_def : forall (a:t) (a':t), (eq_t a a') -> (a = a').

Axiom eq_t_def1 : forall (a:t) (a':t), (a = a') -> eq_t a a'.

Axiom sum_empty :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (t1:a -> t), (is_empty s) -> ((sum s t1) = tzero).

Axiom sum_one :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (t1:a -> t), ((cardinal s) = 1%Z) ->
  ((sum s t1) = (t1 (choose s))).

Axiom sum_add :
  forall {b:Type} {b_WT:WhyType b},
  forall (s:set b) (f:b -> t) (x:b), ~ (mem x s) ->
  ((sum (add x s) f) = (infix_pldt (f x) (sum s f))).

Axiom sum_plus_one :
  forall {b:Type} {b_WT:WhyType b},
  forall (s:set b) (f:b -> t), ((cardinal s) > 1%Z)%Z ->
  ((sum s f) = (infix_pldt (f (choose s)) (sum (remove (choose s) s) f))).

Axiom sum_real :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (f:a -> t), (forall (a1:a), (mem a1 s) -> real_ (f a1)) ->
  ((cardinal s) > 0%Z)%Z -> real_ (sum s f).

Axiom map_sum_eq :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (s:set b) (f:b -> a) (t1:a -> t), (p_injective f s) ->
  ((sum (map f s) t1) = (sum s (fun (b1:b) => (t1 (f b1))))).

Axiom sum_comp :
  forall {b:Type} {b_WT:WhyType b},
  forall (s:set b) (f:b -> t) (g:b -> t),
  ((sum s (fun (k:b) => (infix_pldt (f k) (g k)))) =
   (infix_pldt (sum s f) (sum s g))).

Axiom sum_iter_ :
  opposite_n (fun (y0:t) (y1:t) => (infix_pldt y0 y1))
  (fun (y0:t) (y1:t) => (infix_mndt y0 y1)) tzero.

Axiom sum_iter_1 :
  opposite1 (fun (y0:t) (y1:t) => (infix_pldt y0 y1))
  (fun (y0:t) (y1:t) => (infix_mndt y0 y1)).

Axiom sum_iter_2 :
  opposite_com (fun (y0:t) (y1:t) => (infix_pldt y0 y1))
  (fun (y0:t) (y1:t) => (infix_mndt y0 y1)).

Axiom sum_iter_3 :
  inverse_tuple (fun (y0:t) (y1:t) => (infix_pldt y0 y1))
  (fun (y0:t) (y1:t) => (infix_mndt y0 y1)) tzero.

Axiom neutral_zero :
  ((neutral_elt (fun (y0:t) (y1:t) => (infix_pldt y0 y1))) = tzero).

Axiom sum_eq :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (f:a -> t) (g:a -> t),
  (forall (x:a), (mem x s) -> ((f x) = (g x))) -> ((sum s f) = (sum s g)).

Axiom sum_eq_gen :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (s':set a) (f:a -> t) (g:a -> t), (s = s') ->
  (forall (x:a), (mem x s) -> ((f x) = (g x))) -> ((sum s f) = (sum s' g)).

Axiom sum_disjoint_transitivity :
  forall {a:Type} {a_WT:WhyType a},
  forall (s1:set a) (s2:set a) (t1:a -> t),
  ((inter s1 s2) = (empty : set a)) ->
  ((sum (union s1 s2) t1) = (infix_pldt (sum s1 t1) (sum s2 t1))).

Axiom sum_to_cartesian_product :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (s1:set a) (s2:set b) (f:a -> b -> t),
  ((sum s1 (fun (a1:a) => (sum s2 (f a1)))) =
   (sum (cartesian_product s1 s2)
    (fun (o:(a* b)%type) => ((f (fir o)) (sec o))))).

Axiom sum_from_cartesian_product :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (s1:set a) (s2:set b) (f:a -> b -> t),
  ((sum (cartesian_product s1 s2)
    (fun (o:(a* b)%type) => ((f (fir o)) (sec o))))
   = (sum s1 (fun (a1:a) => (sum s2 (f a1))))).

Parameter ind_sum: (Z -> t) -> Z -> Z -> t.

Axiom ind_sum_def :
  forall (f:Z -> t) (i:Z) (j:Z),
  ((ind_sum f i j) =
   (int_iterate (fun (y0:t) (y1:t) => (infix_pldt y0 y1)) f i j)).

Axiom ind_sum_to_int_iterate :
  forall (f:Z -> t) (i:Z) (j:Z),
  ((ind_sum f i j) =
   (int_iterate (fun (y0:t) (y1:t) => (infix_pldt y0 y1)) f i j)).

Axiom ind_sum_cardone :
  forall (f:Z -> t) (i:Z) (j:Z), (j = (i + 1%Z)%Z) ->
  ((ind_sum f i j) = (f i)).

Axiom ind_sum_right_extension :
  forall (f:Z -> t) (i:Z) (j:Z), (i < j)%Z ->
  ((ind_sum f i j) = (infix_pldt (ind_sum f i (j - 1%Z)%Z) (f (j - 1%Z)%Z))).

Axiom ind_sum_trans :
  forall (f:Z -> t) (i:Z) (k:Z) (j:Z), ((i <= k)%Z /\ (k <= j)%Z) ->
  ((ind_sum f i j) = (infix_pldt (ind_sum f i k) (ind_sum f k j))).

Axiom ind_sum_plus_one :
  forall (f:Z -> t) (i:Z) (j:Z), (i < j)%Z ->
  ((ind_sum f i j) = (infix_pldt (f i) (ind_sum f (i + 1%Z)%Z j))).

Axiom real_ind_sum :
  forall (f:Z -> t) (i:Z) (j:Z), (i < j)%Z ->
  (forall (k:Z), ((i <= k)%Z /\ (k < j)%Z) -> real_ (f k)) ->
  real_ (ind_sum f i j).

Axiom positive_ind_sum :
  forall (f:Z -> t) (i:Z) (j:Z), (i < j)%Z ->
  (forall (k:Z), ((i <= k)%Z /\ (k < j)%Z) -> infix_lseqdt tzero (f k)) ->
  infix_lseqdt tzero (ind_sum f i j).

Axiom positive_sum :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (f:a -> t),
  (forall (k:a), (mem k s) -> infix_lseqdt tzero (f k)) ->
  infix_lseqdt tzero (sum s f).

Axiom ind_sum_eq :
  forall (f:Z -> t) (g:Z -> t) (i:Z) (j:Z),
  (forall (k:Z), ((i <= k)%Z /\ (k < j)%Z) -> ((f k) = (g k))) ->
  ((ind_sum f i j) = (ind_sum g i j)).

Parameter fc3: (Z -> t) -> t -> Z -> Z -> Z -> t.

Axiom fc_def3 :
  forall (f:Z -> t) (g:t) (i:Z) (j:Z) (k:Z),
  (((i <= k)%Z /\ (k < j)%Z) -> (((fc3 f g i j) k) = (f k))) /\
  (~ ((i <= k)%Z /\ (k < j)%Z) -> (((fc3 f g i j) k) = g)).

Axiom ind_sum_eq_del_bound :
  forall (f:Z -> t) (g:t) (i:Z) (j:Z),
  ((ind_sum (fc3 f g i j) i j) = (ind_sum f i j)).

Parameter fc4: (Z -> t) -> t -> Z -> Z -> Z -> t.

Axiom fc_def4 :
  forall (f:Z -> t) (g:t) (i:Z) (j:Z) (k:Z),
  (((i <= k)%Z /\ (k < j)%Z) -> (((fc4 f g i j) k) = (f k))) /\
  (~ ((i <= k)%Z /\ (k < j)%Z) -> (((fc4 f g i j) k) = g)).

Axiom ind_sum_eq_del_bound_rev :
  forall (f:Z -> t) (g:t) (i:Z) (j:Z),
  ((ind_sum f i j) = (ind_sum (fc4 f g i j) i j)).

Axiom ind_sum_eq_gen :
  forall (f:Z -> t) (g:Z -> t) (i1:Z) (j1:Z) (i2:Z) (j2:Z), (i1 = i2) ->
  (j1 = j2) ->
  (forall (k:Z), ((i1 <= k)%Z /\ (k < j1)%Z) -> ((f k) = (g k))) ->
  ((ind_sum f i1 j1) = (ind_sum g i2 j2)).

Axiom ind_sum_eq_bound :
  forall (f:Z -> t) (g:Z -> t) (i:Z) (j:Z), (i = j) ->
  (forall (k:Z), ((0%Z <= k)%Z /\ (k < j)%Z) -> ((f k) = (g k))) ->
  ((ind_sum f 0%Z i) = (ind_sum g 0%Z j)).

Axiom ind_sum_comp :
  forall (f:Z -> t) (g:Z -> t) (i:Z) (j:Z),
  ((ind_sum (fun (k:Z) => (infix_pldt (f k) (g k))) i j) =
   (infix_pldt (ind_sum f i j) (ind_sum g i j))).

Axiom ind_sum_comp_rev :
  forall (f:Z -> t) (g:Z -> t) (i:Z) (i':Z) (j:Z) (j':Z), (i = i') ->
  (j = j') ->
  ((infix_pldt (ind_sum f i j) (ind_sum g i' j')) =
   (ind_sum (fun (k:Z) => (infix_pldt (f k) (g k))) i j)).

Axiom ind_sum_to_iterate :
  forall (f:Z -> t) (i:Z) (j:Z),
  ((ind_sum f i j) =
   (iterate (fun (y0:t) (y1:t) => (infix_pldt y0 y1)) (to_fset i j) f)).

Axiom ind_sum_to_sum :
  forall (f:Z -> t) (i:Z) (j:Z), ((ind_sum f i j) = (sum (to_fset i j) f)).

Axiom map_ind_sum_eq :
  forall (i:Z) (j:Z) (k:Z) (l:Z) (f:Z -> Z) (t1:Z -> t),
  (p_bijective f (to_fset i j) (to_fset k l)) ->
  ((ind_sum t1 k l) = (ind_sum (fun (b:Z) => (t1 (f b))) i j)).

Axiom sum_scal :
  forall {a:Type} {a_WT:WhyType a},
  forall (f:a -> t) (s:set a) (c:t),
  ((sum s (fun (x:a) => (infix_asdt c (f x)))) = (infix_asdt c (sum s f))).

Axiom sum_scal_right :
  forall {a:Type} {a_WT:WhyType a},
  forall (f:a -> t) (s:set a) (c:t),
  ((sum s (fun (x:a) => (infix_asdt (f x) c))) = (infix_asdt (sum s f) c)).

Axiom sum_scal_rev_right :
  forall {a:Type} {a_WT:WhyType a},
  forall (f:a -> t) (s:set a) (c:t),
  ((infix_asdt (sum s f) c) = (sum s (fun (x:a) => (infix_asdt (f x) c)))).

Axiom sum_scal_rev :
  forall {a:Type} {a_WT:WhyType a},
  forall (f:a -> t) (s:set a) (c:t),
  ((infix_asdt c (sum s f)) = (sum s (fun (x:a) => (infix_asdt c (f x))))).

Axiom ind_sum_scal :
  forall (f:Z -> t) (i:Z) (j:Z) (a:t),
  ((ind_sum (fun (i1:Z) => (infix_asdt a (f i1))) i j) =
   (infix_asdt a (ind_sum f i j))).

Axiom ind_sum_scal_rev :
  forall (f:Z -> t) (i:Z) (j:Z) (a:t),
  ((infix_asdt a (ind_sum f i j)) =
   (ind_sum (fun (i1:Z) => (infix_asdt a (f i1))) i j)).

Axiom scal_ind_sum :
  forall (f:Z -> t) (i:Z) (j:Z) (a:t),
  ((ind_sum (fun (i1:Z) => (infix_asdt (f i1) a)) i j) =
   (infix_asdt (ind_sum f i j) a)).

Axiom scal_ind_sum_rev :
  forall (f:Z -> t) (i:Z) (j:Z) (a:t),
  ((infix_asdt (ind_sum f i j) a) =
   (ind_sum (fun (i1:Z) => (infix_asdt (f i1) a)) i j)).

Axiom sum_scal_gen :
  forall (f:Z -> t) (s:set Z), forall (a:t),
  ((sum s (fun (i:Z) => (infix_asdt a (f i)))) = (infix_asdt a (sum s f))).

Axiom ind_sum_scal_gen :
  forall (f:Z -> t) (i:Z) (j:Z), forall (a:t),
  ((ind_sum (fun (i1:Z) => (infix_asdt a (f i1))) i j) =
   (infix_asdt a (ind_sum f i j))).

Axiom int_int_iterate_def_empty :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (f:Z -> Z -> im1) (i:Z) (j:Z) (k:Z) (l:Z),
  (j <= i)%Z -> (iterable op1) ->
  ((int_int_iterate op1 f i j k l) = (neutral_elt op1)).

Axiom int_int_iterate_def_plus_one :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (f:Z -> Z -> im1) (i:Z) (j:Z) (k:Z) (l:Z),
  (i < j)%Z -> (iterable op1) ->
  ((int_int_iterate op1 f i j k l) =
   ((op1 (int_iterate op1 (fun (n:Z) => ((f i) n)) k l))
    (int_int_iterate op1 f (i + 1%Z)%Z j k l))).

Axiom int_int_iterate_to_int_iterate :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (f:Z -> Z -> im1) (i:Z) (j:Z) (k:Z) (l:Z),
  (i <= j)%Z -> (iterable op1) ->
  ((int_int_iterate op1 f i j k l) =
   (int_iterate op1 (fun (a:Z) => (int_iterate op1 (f a) k l)) i j)).

Axiom int_iterate_to_int_int_iterate :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (f:Z -> Z -> im1) (i:Z) (j:Z) (k:Z) (l:Z),
  (i <= j)%Z -> (iterable op1) ->
  ((int_iterate op1 (fun (a:Z) => (int_iterate op1 (f a) k l)) i j) =
   (int_int_iterate op1 f i j k l)).

Axiom int_int_iterate_to_iterate :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (f:Z -> Z -> im1) (i:Z) (j:Z) (k:Z) (l:Z),
  (i <= j)%Z -> (iterable op1) -> (commut op1) ->
  ((int_int_iterate op1 f i j k l) =
   (iterate op1 (cartesian_product (to_fset i j) (to_fset k l))
    (fun (o:(Z* Z)%type) => ((f (fir o)) (sec o))))).

Axiom iterate_commute :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b}
    {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (s1:set a) (s2:set b) (f:a -> b -> im1),
  (iterable op1) -> (commut op1) ->
  ((iterate op1 (cartesian_product s1 s2)
    (fun (o:(a* b)%type) => ((f (fir o)) (sec o))))
   =
   (iterate op1 (cartesian_product s2 s1)
    (fun (o:(b* a)%type) => ((f (sec o)) (fir o))))).

Axiom iterate_commute_ :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b}
    {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (s1:set a) (s2:set b) (f:a -> b -> im1),
  (iterable op1) -> (commut op1) ->
  ((iterate op1 s1
    (fun (a1:a) => (iterate op1 s2 (fun (a2:b) => ((f a1) a2)))))
   =
   (iterate op1 s2
    (fun (a2:b) => (iterate op1 s1 (fun (a1:a) => ((f a1) a2)))))).

Axiom int_int_iterate_commute :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (f:Z -> Z -> im1) (i:Z) (j:Z) (k:Z) (l:Z),
  (iterable op1) -> (commut op1) -> (i <= j)%Z -> (k <= l)%Z ->
  ((int_int_iterate op1 f i j k l) =
   (int_int_iterate op1 (fun (a:Z) (b:Z) => ((f b) a)) k l i j)).

Axiom int_iterate_commute :
  forall {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (f:Z -> Z -> im1) (i:Z) (j:Z) (k:Z) (l:Z),
  (iterable op1) -> (commut op1) -> (i <= j)%Z -> (k <= l)%Z ->
  ((int_iterate op1 (fun (a:Z) => (int_iterate op1 (f a) k l)) i j) =
   (int_iterate op1
    (fun (a:Z) => (int_iterate op1 (fun (b:Z) => ((f b) a)) i j)) k l)).

Axiom ind_sum_commute :
  forall (f:Z -> Z -> t) (i:Z) (j:Z) (k:Z) (l:Z), (i <= j)%Z -> (k <= l)%Z ->
  ((ind_sum (fun (k1:Z) => (ind_sum (f k1) k l)) i j) =
   (ind_sum (fun (k1:Z) => (ind_sum (fun (k2:Z) => ((f k2) k1)) i j)) k l)).

Axiom sum_commute :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:a -> b -> t) (sa:set a) (sb:set b),
  ((sum sa (fun (a1:a) => (sum sb (f a1)))) =
   (sum sb (fun (b1:b) => (sum sa (fun (a1:a) => ((f a1) b1)))))).

Parameter non_tzero:
  forall {a:Type} {a_WT:WhyType a}, (set a) -> (a -> t) -> set a.

Axiom non_tzero_def :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (t1:a -> t),
  ((non_tzero s t1) =
   (nonn_part (fun (y0:t) (y1:t) => (infix_pldt y0 y1)) s t1)).

Axiom non_tzero_spec :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (t1:a -> t), forall (e:a), (mem e (non_tzero s t1)) ->
  mem e s.

Axiom non_tzero_spec1 :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (t1:a -> t), forall (e:a), (mem e (non_tzero s t1)) ->
  ~ ((t1 e) = tzero).

Axiom non_tzero_spec2 :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (t1:a -> t), forall (e:a),
  ((mem e s) /\ ~ ((t1 e) = tzero)) -> mem e (non_tzero s t1).

Axiom get_non_tzero_member :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (t1:a -> t) (e:a), (mem e (non_tzero s t1)) -> mem e s.

Axiom get_non_tzero_member1 :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (t1:a -> t) (e:a), (mem e (non_tzero s t1)) ->
  ~ ((t1 e) = tzero).

Axiom set_non_tzero_member :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (t1:a -> t) (e:a), (mem e s) -> ~ ((t1 e) = tzero) ->
  mem e (non_tzero s t1).

Axiom set_non_tzero_member_gen :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (t1:a -> t), forall (e:a),
  ((mem e s) /\ ~ ((t1 e) = tzero)) -> mem e (non_tzero s t1).

Axiom set_non_tzero_member_gen_ :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (t1:a -> t), forall (e:a),
  ((mem e s) /\ ~ ((t1 e) = tzero)) -> mem e (non_tzero s t1).

Axiom sum_nullity_partition :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (t1:a -> t), ((sum s t1) = (sum (non_tzero s t1) t1)).

Axiom non_null_map :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (f:a -> a) (t1:a -> t),
  ((non_tzero (map f s) t1) =
   (map f (non_tzero s (fun (b:a) => (t1 (f b)))))).

Axiom map_sum_eq_nonnull :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (f:a -> a) (t1:a -> t),
  (p_bijective f (non_tzero s (fun (b:a) => (t1 (f b))))
   (non_tzero (map f s) t1)) ->
  ((sum (non_tzero (map f s) t1) t1) =
   (sum (non_tzero s (fun (b:a) => (t1 (f b)))) (fun (b:a) => (t1 (f b))))).

Axiom sum_null_but_one :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (t1:a -> t), ((cardinal (non_tzero s t1)) = 1%Z) ->
  ((sum s t1) = (t1 (element (non_tzero s t1)))).

Axiom sum_null :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (t1:a -> t), ((cardinal (non_tzero s t1)) = 0%Z) ->
  ((sum s t1) = tzero).

Axiom sum_null_ :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (t1:a -> t),
  (forall (e:a), (mem e s) -> ((t1 e) = tzero)) -> ((sum s t1) = tzero).

Axiom sum_null_forall :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (t1:a -> t),
  (forall (e:a), (mem e s) -> ((t1 e) = tzero)) -> ((sum s t1) = tzero).

Axiom ind_sum_null :
  forall (t1:Z -> t) (i:Z) (j:Z),
  (forall (k:Z), ((i <= k)%Z /\ (k < j)%Z) -> ((t1 k) = tzero)) ->
  ((ind_sum t1 i j) = tzero).

Axiom sum_null_but_one_elt :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (t1:a -> t) (elt:a),
  ((mem elt s) /\ ~ ((t1 elt) = tzero)) ->
  (forall (a1:a), (mem a1 s) -> ~ (a1 = elt) -> ((t1 a1) = tzero)) ->
  ((sum s t1) = (t1 elt)).

Axiom sum_null_but_maybe_one_elt :
  forall {a:Type} {a_WT:WhyType a},
  forall (t1:a -> t) (s:set a) (elt:a), (mem elt s) ->
  (forall (k:a), (mem k s) -> ~ (k = elt) -> ((t1 k) = tzero)) ->
  ((sum s t1) = (t1 elt)).

Axiom sum_null_but_maybe_two_elt :
  forall {a:Type} {a_WT:WhyType a},
  forall (t1:a -> t) (s:set a) (elt:a) (elt':a), (mem elt s) ->
  (mem elt' s) -> ~ (elt = elt') ->
  (forall (k:a), (mem k s) -> ~ (k = elt) -> ~ (k = elt') ->
   ((t1 k) = tzero)) ->
  ((sum s t1) = (infix_pldt (t1 elt) (t1 elt'))).

Axiom ind_sum_null_but_maybe_one_elt :
  forall (t1:Z -> t) (i:Z) (j:Z) (ind:Z), ((i <= ind)%Z /\ (ind < j)%Z) ->
  (forall (k:Z), ((i <= k)%Z /\ (k < j)%Z) -> ~ (k = ind) ->
   ((t1 k) = tzero)) ->
  ((ind_sum t1 i j) = (t1 ind)).

Axiom ind_sum_null_but_maybe_two_elt :
  forall (t1:Z -> t) (i:Z) (j:Z) (ind:Z) (ind':Z),
  ((i <= ind)%Z /\ (ind < j)%Z) -> ((i <= ind')%Z /\ (ind' < j)%Z) ->
  ~ (ind = ind') ->
  (forall (k:Z), ((i <= k)%Z /\ (k < j)%Z) -> ~ (k = ind) -> ~ (k = ind') ->
   ((t1 k) = tzero)) ->
  ((ind_sum t1 i j) = (infix_pldt (t1 ind) (t1 ind'))).

Axiom ind_sum_map_filter :
  forall (n:Z) (n':Z) (g:Z -> Z) (f:Z -> t) (p:Z -> bool),
  ((0%Z <= n')%Z /\ (n' <= n)%Z) -> (p_injective g (to_fset 0%Z n')) ->
  (forall (k:Z), ((0%Z <= k)%Z /\ (k < n)%Z) -> ~ ((p k) = true) ->
   ((f k) = tzero)) ->
  (forall (k:Z), ((0%Z <= k)%Z /\ (k < n')%Z) ->
   (0%Z <= (g k))%Z /\ ((g k) < n)%Z) ->
  (forall (k:Z), ((0%Z <= k)%Z /\ (k < n)%Z) ->
   ((p k) = true) <->
   exists ant:Z, ((0%Z <= ant)%Z /\ (ant < n')%Z) /\ (k = (g ant))) ->
  ((ind_sum f 0%Z n) = (ind_sum (fun (k:Z) => (f (g k))) 0%Z n')).

Axiom neutral_tone : neutral (fun (y0:t) (y1:t) => (infix_asdt y0 y1)) tone.

Axiom neutral_tone1 : iterable (fun (y0:t) (y1:t) => (infix_asdt y0 y1)).

Axiom product_iter :
  op_neutral_left (fun (y0:t) (y1:t) => (infix_asdt y0 y1)) tone.

Axiom product_iter1 :
  op_neutral_right (fun (y0:t) (y1:t) => (infix_asdt y0 y1)) tone.

Axiom product_iter2 : op_assoc (fun (y0:t) (y1:t) => (infix_asdt y0 y1)).

Axiom product_iter3 : commut (fun (y0:t) (y1:t) => (infix_asdt y0 y1)).

Axiom product_iter4 :
  iterates (fun (y0:t) (y1:t) => (infix_asdt y0 y1)) tone.

Parameter product:
  forall {a:Type} {a_WT:WhyType a}, (set a) -> (a -> t) -> t.

Axiom product_def :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (t1:a -> t),
  ((product s t1) = (iterate (fun (y0:t) (y1:t) => (infix_asdt y0 y1)) s t1)).

Axiom product_eq :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (t1:a -> t) (t':a -> t),
  (forall (e:a), (mem e s) -> ((t1 e) = (t' e))) ->
  ((product s t1) = (product s t')).

Axiom product_eq_gen :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (s':set a) (t1:a -> t) (t':a -> t), (s = s') ->
  (forall (e:a), (mem e s) -> ((t1 e) = (t' e))) ->
  ((product s t1) = (product s' t')).

Axiom product_empty :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (f:a -> t), (is_empty s) -> ((product s f) = tone).

Axiom product_iter_ : iterable (fun (y0:t) (y1:t) => (infix_asdt y0 y1)).

Axiom add_product :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (f:a -> t) (x:a), ~ (mem x s) ->
  ((product (add x s) f) = (infix_asdt (f x) (product s f))).

Axiom product_add :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (f:a -> t) (x:a), ~ (mem x s) ->
  ((product (add x s) f) = (infix_asdt (product s f) (f x))).

Axiom neutral_one :
  ((neutral_elt (fun (y0:t) (y1:t) => (infix_asdt y0 y1))) = tone).

Parameter ind_product: (Z -> t) -> Z -> Z -> t.

Axiom ind_product_def :
  forall (f:Z -> t) (i:Z) (j:Z),
  ((ind_product f i j) =
   (int_iterate (fun (y0:t) (y1:t) => (infix_asdt y0 y1)) f i j)).

Axiom ind_product_eq :
  forall (f:Z -> t) (g:Z -> t) (i:Z) (j:Z),
  (forall (k:Z), ((i <= k)%Z /\ (k < j)%Z) -> ((f k) = (g k))) ->
  ((ind_product f i j) = (ind_product g i j)).

Axiom ind_product_cardone :
  forall (f:Z -> t) (i:Z) (j:Z), (j = (i + 1%Z)%Z) ->
  ((ind_product f i j) = (f i)).

Axiom ind_product_eq_gen :
  forall (f:Z -> t) (g:Z -> t) (i1:Z) (j1:Z) (i2:Z) (j2:Z),
  (forall (k:Z), ((i1 <= k)%Z /\ (k < j1)%Z) -> ((f k) = (g k))) ->
  (i1 = i2) -> (j1 = j2) -> ((ind_product f i1 j1) = (ind_product g i2 j2)).

Axiom ind_product_right_extension :
  forall (f:Z -> t) (i:Z) (j:Z), (i < j)%Z ->
  ((ind_product f i j) =
   (infix_asdt (ind_product f i (j - 1%Z)%Z) (f (j - 1%Z)%Z))).

Axiom ind_product_left_extension :
  forall (f:Z -> t) (i:Z) (j:Z), (i < j)%Z ->
  ((ind_product f i j) = (infix_asdt (f i) (ind_product f (i + 1%Z)%Z j))).

Axiom ind_product_to_product :
  forall (f:Z -> t) (i:Z) (j:Z),
  ((ind_product f i j) = (product (to_fset i j) f)).

Axiom map_product_eq :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (s:set b) (f:b -> a) (t1:a -> t), (p_injective f s) ->
  ((product (map f s) t1) = (product s (fun (b1:b) => (t1 (f b1))))).

Axiom map_ind_product_eq :
  forall (i:Z) (j:Z) (k:Z) (l:Z) (f:Z -> Z) (t1:Z -> t),
  (p_bijective f (to_fset i j) (to_fset k l)) ->
  ((ind_product t1 k l) = (ind_product (fun (b:Z) => (t1 (f b))) i j)).

Axiom ind_product_right_extension_comm :
  forall (f:Z -> t) (i:Z) (j:Z), (i < j)%Z ->
  ((infix_asdt (ind_product f i (j - 1%Z)%Z) (f (j - 1%Z)%Z)) =
   (ind_product f i j)).

Axiom ind_product_eq_func :
  forall (i:Z) (j:Z) (f1:Z -> t) (f2:Z -> t),
  (p_injective f1 (to_fset i j)) -> (p_injective f2 (to_fset i j)) ->
  ((map f1 (to_fset i j)) = (map f2 (to_fset i j))) ->
  ((ind_product f1 i j) = (ind_product f2 i j)).

Axiom ind_product_trans :
  forall (f:Z -> t) (i:Z) (k:Z) (j:Z), ((i <= k)%Z /\ (k <= j)%Z) ->
  ((ind_product f i j) =
   (infix_asdt (ind_product f i k) (ind_product f k j))).

Axiom ind_product_zero_pre :
  forall (f:Z -> t) (i:Z) (t1:Z) (j:Z), ((i <= t1)%Z /\ (t1 < j)%Z) ->
  ((f t1) = tzero) -> ((ind_product f i j) = tzero).

Axiom ind_product_zero :
  forall (f:Z -> t) (i:Z) (j:Z), (i <= j)%Z ->
  (exists t1:Z, ((i <= t1)%Z /\ (t1 < j)%Z) /\ ((f t1) = tzero)) ->
  ((ind_product f i j) = tzero).

Axiom ind_product_zero_elt :
  forall (f:Z -> t) (i:Z) (j:Z) (t1:Z), (i <= j)%Z ->
  ((i <= t1)%Z /\ (t1 < j)%Z) -> ((f t1) = tzero) ->
  ((ind_product f i j) = tzero).

Axiom ind_product_const_tone :
  forall (f:Z -> t) (i:Z) (j:Z), (i <= j)%Z ->
  (forall (t1:Z), ((i <= t1)%Z /\ (t1 < j)%Z) -> ((f t1) = tone)) ->
  ((ind_product f i j) = tone).

Parameter nonn_part1:
  forall {a:Type} {a_WT:WhyType a} {im1:Type} {im1_WT:WhyType im1},
  (im1 -> im1 -> im1) -> (set a) -> (a -> im1) -> set a.

Parameter result4:
  forall {a:Type} {a_WT:WhyType a} {im1:Type} {im1_WT:WhyType im1},
  (im1 -> im1 -> im1) -> (a -> im1) -> a -> bool.

Axiom result_def4 :
  forall {a:Type} {a_WT:WhyType a} {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (t1:a -> im1) (e:a),
  (((result4 op1 t1) e) = true) <-> ~ (neutral op1 (t1 e)).

Axiom nonn_part_def1 :
  forall {a:Type} {a_WT:WhyType a} {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (s:set a) (t1:a -> im1),
  ((nonn_part1 op1 s t1) = (filter (result4 op1 t1) s)).

Axiom nonn_part_spec3 :
  forall {a:Type} {a_WT:WhyType a} {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (s:set a) (t1:a -> im1), forall (e:a),
  (mem e (nonn_part1 op1 s t1)) -> mem e s.

Axiom nonn_part_spec4 :
  forall {a:Type} {a_WT:WhyType a} {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (s:set a) (t1:a -> im1), forall (e:a),
  (mem e (nonn_part1 op1 s t1)) -> ~ (neutral op1 (t1 e)).

Axiom nonn_part_spec5 :
  forall {a:Type} {a_WT:WhyType a} {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (s:set a) (t1:a -> im1), forall (e:a),
  ((mem e s) /\ ~ (neutral op1 (t1 e))) -> mem e (nonn_part1 op1 s t1).

Parameter n_part1:
  forall {a:Type} {a_WT:WhyType a} {im1:Type} {im1_WT:WhyType im1},
  (im1 -> im1 -> im1) -> (set a) -> (a -> im1) -> set a.

Parameter result5:
  forall {a:Type} {a_WT:WhyType a} {im1:Type} {im1_WT:WhyType im1},
  (im1 -> im1 -> im1) -> (a -> im1) -> a -> bool.

Axiom result_def5 :
  forall {a:Type} {a_WT:WhyType a} {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (t1:a -> im1) (e:a),
  (((result5 op1 t1) e) = true) <-> (neutral op1 (t1 e)).

Axiom n_part_def1 :
  forall {a:Type} {a_WT:WhyType a} {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (s:set a) (t1:a -> im1),
  ((n_part1 op1 s t1) = (filter (result5 op1 t1) s)).

Axiom n_part_spec3 :
  forall {a:Type} {a_WT:WhyType a} {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (s:set a) (t1:a -> im1), forall (e:a),
  (mem e (n_part1 op1 s t1)) -> mem e s.

Axiom n_part_spec4 :
  forall {a:Type} {a_WT:WhyType a} {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (s:set a) (t1:a -> im1), forall (e:a),
  (mem e (n_part1 op1 s t1)) -> neutral op1 (t1 e).

Axiom n_part_spec5 :
  forall {a:Type} {a_WT:WhyType a} {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (s:set a) (t1:a -> im1), forall (e:a),
  ((mem e s) /\ (neutral op1 (t1 e))) -> mem e (n_part1 op1 s t1).

Axiom nullity_partition2 :
  forall {a:Type} {a_WT:WhyType a} {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (s:set a) (t1:a -> im1), (commut op1) ->
  (s = (union (nonn_part1 op1 s t1) (n_part1 op1 s t1))).

Axiom nullity_partition3 :
  forall {a:Type} {a_WT:WhyType a} {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (s:set a) (t1:a -> im1), (commut op1) ->
  ((inter (nonn_part1 op1 s t1) (n_part1 op1 s t1)) = (empty : set a)).

Axiom iterate_neutral1 :
  forall {a:Type} {a_WT:WhyType a} {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (s:set a) (t1:a -> im1), (iterable op1) ->
  (commut op1) ->
  (forall (a1:a), (mem a1 s) -> ((t1 a1) = (neutral_elt op1))) ->
  ((iterate op1 s t1) = (neutral_elt op1)).

Axiom iterate_nullity_partition1 :
  forall {a:Type} {a_WT:WhyType a} {im1:Type} {im1_WT:WhyType im1},
  forall (op1:im1 -> im1 -> im1) (s:set a) (t1:a -> im1), (iterable op1) ->
  (commut op1) ->
  ((iterate op1 s t1) = (iterate op1 (nonn_part1 op1 s t1) t1)).

Parameter indic: forall {a:Type} {a_WT:WhyType a}, a -> a -> t.

Axiom indic_def :
  forall {a:Type} {a_WT:WhyType a},
  forall (a1:a) (a':a), (infix_eqeq a1 a') -> ((indic a1 a') = tone).

Axiom indic_def1 :
  forall {a:Type} {a_WT:WhyType a},
  forall (a1:a) (a':a), ~ (infix_eqeq a1 a') -> ((indic a1 a') = tzero).

Axiom indic_spec :
  forall {a:Type} {a_WT:WhyType a},
  forall (a1:a) (a':a),
  ((a1 = a') -> ((indic a1 a') = tone)) /\
  (~ (a1 = a') -> ((indic a1 a') = tzero)).

Axiom get_indic :
  forall {a:Type} {a_WT:WhyType a},
  forall (a1:a) (a':a),
  ((a1 = a') -> ((indic a1 a') = tone)) /\
  (~ (a1 = a') -> ((indic a1 a') = tzero)).

Parameter indic_bool: forall {a:Type} {a_WT:WhyType a}, a -> a -> bool.

Axiom indic_bool_def :
  forall {a:Type} {a_WT:WhyType a},
  forall (a1:a) (a':a), (infix_eqeq a1 a') -> ((indic_bool a1 a') = true).

Axiom indic_bool_def1 :
  forall {a:Type} {a_WT:WhyType a},
  forall (a1:a) (a':a), ~ (infix_eqeq a1 a') -> ((indic_bool a1 a') = false).

Axiom indic_bool_spec :
  forall {a:Type} {a_WT:WhyType a},
  forall (a1:a) (a':a),
  ((a1 = a') -> ((indic_bool a1 a') = true)) /\
  (~ (a1 = a') -> ((indic_bool a1 a') = false)).

Axiom indic_comm :
  forall {a:Type} {a_WT:WhyType a},
  forall (a1:a) (a':a), ((indic a1 a') = (indic a' a1)).

Axiom indic_transl_r :
  forall {a:Type} {a_WT:WhyType a},
  forall (a1:a) (b:a) (c:a), (b = c) -> ((indic a1 b) = (indic a1 c)).

Axiom indic_transl_l :
  forall {a:Type} {a_WT:WhyType a},
  forall (a1:a) (b:a) (c:a), (b = c) -> ((indic b a1) = (indic c a1)).

Parameter indic_2:
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b}, a -> a -> b ->
  b -> t.

Axiom indic_2_def :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (a1:a) (a':a) (b1:b) (b':b),
  (((indic_bool a1 a') = true) /\ ((indic_bool b1 b') = true)) ->
  ((indic_2 a1 a' b1 b') = tone).

Axiom indic_2_def1 :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (a1:a) (a':a) (b1:b) (b':b), ~ ((indic_bool a1 a') = true) ->
  ((indic_2 a1 a' b1 b') = tzero).

Axiom indic_2_def2 :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (a1:a) (a':a) (b1:b) (b':b), ~ ((indic_bool b1 b') = true) ->
  ((indic_2 a1 a' b1 b') = tzero).

Axiom indic_2_spec :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (a1:a) (a':a) (b1:b) (b':b),
  ((indic_2 a1 a' b1 b') = (infix_asdt (indic a1 a') (indic b1 b'))).

Axiom indic_2_spec1 :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (a1:a) (a':a) (b1:b) (b':b),
  ((indic_2 a1 a' b1 b') = (indic (a1, b1) (a', b'))).

Axiom indic_2_if :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (i:a) (k:a) (j:b) (l:b),
  (((i = k) /\ (j = l)) -> ((indic_2 i k j l) = tone)) /\
  (~ ((i = k) /\ (j = l)) -> ((indic_2 i k j l) = tzero)).

Axiom indic_2_comm :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (a1:a) (a':a) (b1:b) (b':b),
  ((indic_2 a1 a' b1 b') = (indic_2 a' a1 b1 b')).

Axiom indic_2_comm1 :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (a1:a) (a':a) (b1:b) (b':b),
  ((indic_2 a1 a' b1 b') = (indic_2 a1 a' b' b1)).

Axiom indic_2_comm2 :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (a1:a) (a':a) (b1:b) (b':b),
  ((indic_2 a1 a' b1 b') = (indic_2 a' a1 b' b1)).

Parameter sum_indic:
  forall {a:Type} {a_WT:WhyType a}, (set a) -> (a -> t) -> a -> t.

Axiom sum_indic_def :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (t1:a -> t) (i:a),
  ((sum_indic s t1 i) =
   (sum s (fun (e:a) => (infix_asdt (t1 e) (indic i e))))).

Parameter bool_to_t: bool -> t.

Axiom bool_to_t_def : forall (a:bool), (a = true) -> ((bool_to_t a) = tone).

Axiom bool_to_t_def1 :
  forall (a:bool), ~ (a = true) -> ((bool_to_t a) = tzero).

Parameter ind_sum_indic: (Z -> t) -> Z -> Z -> Z -> t.

Axiom ind_sum_indic_def :
  forall (t1:Z -> t) (l:Z) (h:Z) (i:Z), (l < h)%Z ->
  ((ind_sum_indic t1 l h i) =
   (ind_sum (fun (e:Z) => (infix_asdt (t1 e) (indic i e))) l h)).

Axiom ind_sum_indic_spec :
  forall (t1:Z -> t) (l:Z) (h:Z) (i:Z), (l < h)%Z ->
  ((ind_sum_indic t1 l h i) = (sum_indic (to_fset l h) t1 i)).

Axiom sum_indic_t :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (t1:a -> t) (i:a), (mem i s) ->
  ((sum_indic s t1 i) = (t1 i)).

Axiom sum_indic_ts :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (t1:a -> t) (i:a), (mem i s) ->
  ((sum s (fun (e:a) => (infix_asdt (t1 e) (indic i e)))) = (t1 i)).

Axiom ind_sum_indic_t :
  forall (t1:Z -> t) (l:Z) (h:Z) (i:Z), ((l <= i)%Z /\ (i < h)%Z) ->
  ((ind_sum_indic t1 l h i) = (t1 i)).

Axiom ind_sum_indic_t1 :
  forall (t1:Z -> t) (l:Z) (h:Z) (i:Z), ((l <= i)%Z /\ (i < h)%Z) ->
  ((ind_sum (fun (e:Z) => (infix_asdt (t1 e) (indic i e))) l h) = (t1 i)).

Axiom ind_sum_indic_t_quant :
  forall (t1:Z -> t) (l:Z) (h:Z), forall (i:Z), ((l <= i)%Z /\ (i < h)%Z) ->
  ((ind_sum (fun (e:Z) => (infix_asdt (t1 e) (indic i e))) l h) = (t1 i)).

Axiom div_plus_one :
  forall (i:Z) (j:Z), (0%Z <= i)%Z -> (0%Z < j)%Z ->
  (((int.EuclideanDivision.div i j) * j)%Z <= i)%Z.

Axiom div_plus_one1 :
  forall (i:Z) (j:Z), (0%Z <= i)%Z -> (0%Z < j)%Z ->
  (i < (((int.EuclideanDivision.div i j) + 1%Z)%Z * j)%Z)%Z.

Axiom mod_is_inf :
  forall (i:Z) (j:Z), (0%Z < j)%Z -> ((int.EuclideanDivision.mod1 i j) < j)%Z.

Axiom zero_add : forall (a1:Z) (a2:Z), (a1 = 0%Z) -> ((a1 + a2)%Z = a2).

Axiom add_zero : forall (a1:Z) (a2:Z), (a2 = 0%Z) -> ((a1 + a2)%Z = a1).

Axiom one_mult : forall (a1:Z) (a2:Z), (a1 = 1%Z) -> ((a1 * a2)%Z = a2).

Axiom mult_one : forall (a1:Z) (a2:Z), (a2 = 1%Z) -> ((a1 * a2)%Z = a1).

Axiom add_eq :
  forall (a1:Z) (a2:Z) (b1:Z) (b2:Z), (a1 = a2) -> (b1 = b2) ->
  ((a1 + b1)%Z = (a2 + b2)%Z).

Axiom mult_eq :
  forall (a1:Z) (a2:Z) (b1:Z) (b2:Z), (a1 = a2) -> (b1 = b2) ->
  ((a1 * b1)%Z = (a2 * b2)%Z).

Axiom add_eq_inv :
  forall (a1:Z) (a2:Z) (b1:Z) (b2:Z), (a1 = a2) -> (b1 = b2) ->
  ((a1 + b1)%Z = (b2 + a2)%Z).

Axiom mult_eq_inv :
  forall (a1:Z) (a2:Z) (b1:Z) (b2:Z), (a1 = a2) -> (b1 = b2) ->
  ((a1 * b1)%Z = (b2 * a2)%Z).

Axiom bound_eq :
  forall (i:Z) (j:Z), ((0%Z <= i)%Z /\ (i < j)%Z) ->
  (i = (int.EuclideanDivision.mod1 i j)).

Axiom bound_eq_rev :
  forall (i:Z) (j:Z), ((0%Z <= i)%Z /\ (i < j)%Z) ->
  ((int.EuclideanDivision.mod1 i j) = i).

Axiom unicity_div_mod :
  forall (i:Z) (j:Z) (q:Z) (r:Z), (0%Z < j)%Z -> (i = ((q * j)%Z + r)%Z) ->
  ((0%Z <= r)%Z /\ (r < j)%Z) -> (q = (int.EuclideanDivision.div i j)).

Axiom unicity_div_mod1 :
  forall (i:Z) (j:Z) (q:Z) (r:Z), (0%Z < j)%Z -> (i = ((q * j)%Z + r)%Z) ->
  ((0%Z <= r)%Z /\ (r < j)%Z) -> (r = (int.EuclideanDivision.mod1 i j)).

Axiom get_div :
  forall (j:Z) (q:Z) (r:Z), (0%Z < j)%Z -> ((0%Z <= r)%Z /\ (r < j)%Z) ->
  ((int.EuclideanDivision.div ((q * j)%Z + r)%Z j) = q).

Axiom positive_div :
  forall (i:Z) (j:Z), ((0%Z < j)%Z /\ (j < i)%Z) ->
  (0%Z < (int.EuclideanDivision.div i j))%Z.

Axiom div_mod_sim_bound :
  forall (d:Z) (m:Z) (q:Z) (r:Z), ((0%Z <= d)%Z /\ (d < r)%Z) ->
  ((0%Z <= m)%Z /\ (m < q)%Z) -> (0%Z <= ((d * q)%Z + m)%Z)%Z.

Axiom div_mod_sim_bound1 :
  forall (d:Z) (m:Z) (q:Z) (r:Z), ((0%Z <= d)%Z /\ (d < r)%Z) ->
  ((0%Z <= m)%Z /\ (m < q)%Z) -> (((d * q)%Z + m)%Z < (r * q)%Z)%Z.

Axiom div_mod_sim_bound_gen_r :
  forall (d:Z) (q:Z) (r:Z), ((0%Z <= d)%Z /\ (d < r)%Z) -> forall (m:Z),
  ((0%Z <= m)%Z /\ (m < q)%Z) -> (0%Z <= ((d * q)%Z + m)%Z)%Z.

Axiom div_mod_sim_bound_gen_r1 :
  forall (d:Z) (q:Z) (r:Z), ((0%Z <= d)%Z /\ (d < r)%Z) -> forall (m:Z),
  ((0%Z <= m)%Z /\ (m < q)%Z) -> (((d * q)%Z + m)%Z < (r * q)%Z)%Z.

Axiom unicity_div_gen :
  forall (j:Z) (q:Z), (0%Z <= q)%Z -> (0%Z < j)%Z -> forall (i:Z),
  (0%Z <= i)%Z ->
  ((0%Z <= (i - (q * j)%Z)%Z)%Z /\ ((i - (q * j)%Z)%Z < j)%Z) ->
  (q = (int.EuclideanDivision.div i j)).

Axiom unicity_div_gen1 :
  forall (j:Z) (q:Z), (0%Z <= q)%Z -> (0%Z < j)%Z -> forall (i:Z),
  (0%Z <= i)%Z ->
  ((0%Z <= (i - (q * j)%Z)%Z)%Z /\ ((i - (q * j)%Z)%Z < j)%Z) ->
  ((i - (j * q)%Z)%Z = (int.EuclideanDivision.mod1 i j)).

Axiom bound_mod :
  forall (i:Z) (j:Z), (0%Z <= i)%Z -> (0%Z < j)%Z ->
  (0%Z <= (int.EuclideanDivision.mod1 i j))%Z.

Axiom bound_mod1 :
  forall (i:Z) (j:Z), (0%Z <= i)%Z -> (0%Z < j)%Z ->
  ((int.EuclideanDivision.mod1 i j) < j)%Z.

Axiom mod_eq :
  forall (a:Z) (b:Z) (d:Z), (a = b) ->
  ((int.EuclideanDivision.mod1 a d) = (int.EuclideanDivision.mod1 b d)).

Axiom e_div_eq :
  forall (a:Z) (b:Z) (d:Z), (a = b) ->
  ((int.EuclideanDivision.div a d) = (int.EuclideanDivision.div b d)).

Axiom decomp :
  forall (i:Z) (j:Z), ~ (0%Z = j) ->
  (i =
   ((j * (int.EuclideanDivision.div i j))%Z +
    (int.EuclideanDivision.mod1 i j))%Z).

Axiom div_mod_eq :
  forall (i:Z) (j:Z) (q:Z), (0%Z <= i)%Z -> (0%Z <= j)%Z -> (0%Z < q)%Z ->
  ((int.EuclideanDivision.div i q) = (int.EuclideanDivision.div j q)) ->
  ((int.EuclideanDivision.mod1 i q) = (int.EuclideanDivision.mod1 j q)) ->
  (i = j).

Axiom mod_zero :
  forall (i:Z) (j:Z), (0%Z <= i)%Z -> (0%Z < j)%Z ->
  ((int.EuclideanDivision.mod1 i j) = 0%Z) ->
  (i = (j * (int.EuclideanDivision.div i j))%Z).

Axiom div_plus_quotient :
  forall (i:Z) (j:Z), (0%Z <= i)%Z -> (0%Z < j)%Z ->
  ((int.EuclideanDivision.div (i + j)%Z j) =
   ((int.EuclideanDivision.div i j) + 1%Z)%Z).

Axiom div_plus_fact_gen_div :
  forall (i:Z) (j:Z) (k:Z), (0%Z < j)%Z ->
  ((int.EuclideanDivision.div (i + (k * j)%Z)%Z j) =
   ((int.EuclideanDivision.div i j) + k)%Z).

Axiom mod_plus_fact_gen_mod :
  forall (i:Z) (j:Z) (k:Z), (0%Z < j)%Z ->
  ((int.EuclideanDivision.mod1 ((k * j)%Z + i)%Z j) =
   (int.EuclideanDivision.mod1 i j)).

Axiom mod_plus_fact_gen_mod_left :
  forall (i:Z) (j:Z) (k:Z), (0%Z < j)%Z ->
  ((int.EuclideanDivision.mod1 ((j * k)%Z + i)%Z j) =
   (int.EuclideanDivision.mod1 i j)).

Axiom bound_div :
  forall (i:Z) (q:Z) (f:Z), (0%Z <= i)%Z -> (0%Z <= q)%Z -> (0%Z <= f)%Z ->
  (i < (f * q)%Z)%Z -> (0%Z <= (int.EuclideanDivision.div i q))%Z.

Axiom bound_div1 :
  forall (i:Z) (q:Z) (f:Z), (0%Z <= i)%Z -> (0%Z <= q)%Z -> (0%Z <= f)%Z ->
  (i < (f * q)%Z)%Z -> (0%Z <= ((int.EuclideanDivision.div i q) * q)%Z)%Z.

Axiom bound_div2 :
  forall (i:Z) (q:Z) (f:Z), (0%Z <= i)%Z -> (0%Z <= q)%Z -> (0%Z <= f)%Z ->
  (i < (f * q)%Z)%Z -> (((int.EuclideanDivision.div i q) * q)%Z <= i)%Z.

Axiom bound_div3 :
  forall (i:Z) (q:Z) (f:Z), (0%Z <= i)%Z -> (0%Z <= q)%Z -> (0%Z <= f)%Z ->
  (i < (f * q)%Z)%Z ->
  (i < (q * ((int.EuclideanDivision.div i q) + 1%Z)%Z)%Z)%Z.

Axiom bound_div4 :
  forall (i:Z) (q:Z) (f:Z), (0%Z <= i)%Z -> (0%Z <= q)%Z -> (0%Z <= f)%Z ->
  (i < (f * q)%Z)%Z -> ((int.EuclideanDivision.div i q) < f)%Z.

Axiom mod_upper_bound :
  forall (i:Z) (q:Z), (0%Z < i)%Z -> (i = q) ->
  ((int.EuclideanDivision.mod1 i q) = 0%Z).

Axiom bound_div_gen :
  forall (q:Z) (f:Z), (0%Z < q)%Z -> (0%Z <= f)%Z -> forall (i:Z),
  ((0%Z <= i)%Z /\ (i < (q * f)%Z)%Z) ->
  ((int.EuclideanDivision.div i q) < f)%Z.

Axiom mod_invariant :
  forall (i:Z) (q:Z) (f:Z), (0%Z <= i)%Z -> (0%Z < q)%Z -> (0%Z < f)%Z ->
  ((int.EuclideanDivision.mod1
    ((q * (f * (int.EuclideanDivision.div i (q * f)%Z))%Z)%Z +
     (int.EuclideanDivision.mod1 i (q * f)%Z))%Z
    q)
   = (int.EuclideanDivision.mod1 (int.EuclideanDivision.mod1 i (q * f)%Z) q)).

Axiom mod_inf :
  forall (i:Z) (q:Z), ((0%Z <= i)%Z /\ (i < q)%Z) ->
  ((int.EuclideanDivision.mod1 i q) = i).

Axiom add_mod :
  forall (a:Z) (b:Z) (c:Z), (c > 0%Z)%Z ->
  ((int.EuclideanDivision.mod1
    ((int.EuclideanDivision.mod1 a c) + (int.EuclideanDivision.mod1 b c))%Z
    c)
   = (int.EuclideanDivision.mod1 (a + b)%Z c)).

Axiom add_mod_left :
  forall (a:Z) (b:Z) (c:Z), (c > 0%Z)%Z ->
  ((int.EuclideanDivision.mod1 ((int.EuclideanDivision.mod1 a c) + b)%Z c) =
   (int.EuclideanDivision.mod1 (a + b)%Z c)).

Axiom simpl_add_mod_left :
  forall (a:Z) (b:Z) (c:Z), (c > 0%Z)%Z ->
  ((int.EuclideanDivision.mod1 a c) = 0%Z) ->
  ((int.EuclideanDivision.mod1 (a + b)%Z c) =
   (int.EuclideanDivision.mod1 b c)).

Axiom add_mod_right :
  forall (a:Z) (b:Z) (c:Z), (c > 0%Z)%Z ->
  ((int.EuclideanDivision.mod1 (a + (int.EuclideanDivision.mod1 b c))%Z c) =
   (int.EuclideanDivision.mod1 (a + b)%Z c)).

Axiom mod_mod_left :
  forall (i:Z) (j:Z) (f:Z), (0%Z < j)%Z -> (0%Z < f)%Z ->
  ((int.EuclideanDivision.mod1 (int.EuclideanDivision.mod1 i (f * j)%Z) j) =
   (int.EuclideanDivision.mod1 i j)).

Axiom mult_mod :
  forall (a:Z) (b:Z) (c:Z), (c > 0%Z)%Z ->
  ((int.EuclideanDivision.mod1
    ((int.EuclideanDivision.mod1 a c) * (int.EuclideanDivision.mod1 b c))%Z
    c)
   = (int.EuclideanDivision.mod1 (a * b)%Z c)).

Axiom mod_mod_mult :
  forall (a:Z) (b:Z) (c:Z), (0%Z < b)%Z ->
  ((int.EuclideanDivision.mod1
    ((int.EuclideanDivision.mod1 a b) * (int.EuclideanDivision.mod1 c b))%Z
    b)
   = (int.EuclideanDivision.mod1 (a * c)%Z b)).

Axiom mod_mod_mult_rev :
  forall (a:Z) (b:Z) (c:Z), (0%Z < b)%Z ->
  ((int.EuclideanDivision.mod1 (a * c)%Z b) =
   (int.EuclideanDivision.mod1
    ((int.EuclideanDivision.mod1 a b) * (int.EuclideanDivision.mod1 c b))%Z
    b)).

Axiom mod_mod_i :
  forall (i:Z) (j:Z), (0%Z < j)%Z ->
  ((int.EuclideanDivision.mod1 (int.EuclideanDivision.mod1 i j) j) =
   (int.EuclideanDivision.mod1 i j)).

Axiom binary_prod :
  forall (i:Z) (j:Z), (0%Z <= i)%Z -> (0%Z < j)%Z ->
  ((int.EuclideanDivision.mod1
    ((int.EuclideanDivision.mod1 i 2%Z) *
     (int.EuclideanDivision.mod1 j 2%Z))%Z
    2%Z)
   = (int.EuclideanDivision.mod1 (i * j)%Z 2%Z)).

Axiom mod_minus :
  forall (a:Z) (b:Z) (c:Z), (0%Z < b)%Z ->
  ((int.EuclideanDivision.mod1 a b) = c) ->
  ((int.EuclideanDivision.mod1 (-a)%Z b) =
   (int.EuclideanDivision.mod1 (-c)%Z b)).

Axiom mult_mod_left :
  forall (a:Z) (b:Z) (c:Z), (c > 0%Z)%Z ->
  ((int.EuclideanDivision.mod1 ((int.EuclideanDivision.mod1 a c) * b)%Z c) =
   (int.EuclideanDivision.mod1 (a * b)%Z c)).

Axiom mult_mod_right :
  forall (a:Z) (b:Z) (c:Z), (c > 0%Z)%Z ->
  ((int.EuclideanDivision.mod1 (a * (int.EuclideanDivision.mod1 b c))%Z c) =
   (int.EuclideanDivision.mod1 (a * b)%Z c)).

Axiom mod_mod_right :
  forall (i:Z) (j:Z) (f:Z), (0%Z <= i)%Z -> (0%Z < j)%Z -> (0%Z < f)%Z ->
  ((int.EuclideanDivision.mod1 (int.EuclideanDivision.mod1 i (j * f)%Z) j) =
   (int.EuclideanDivision.mod1 i j)).

Axiom mod_mod_rev :
  forall (i:Z) (j:Z) (f:Z), (0%Z <= i)%Z -> (0%Z < j)%Z -> (0%Z < f)%Z ->
  ((int.EuclideanDivision.mod1 i j) =
   (int.EuclideanDivision.mod1 (int.EuclideanDivision.mod1 i (j * f)%Z) j)).

Axiom mod_mod_rev1 :
  forall (i:Z) (j:Z) (f:Z), (0%Z <= i)%Z -> (0%Z < j)%Z -> (0%Z < f)%Z ->
  ((int.EuclideanDivision.mod1 i j) =
   (int.EuclideanDivision.mod1 (int.EuclideanDivision.mod1 i (f * j)%Z) j)).

Axiom mod_mod_plus :
  forall (i:Z) (j:Z), (0%Z <= i)%Z -> (0%Z < j)%Z ->
  ((int.EuclideanDivision.mod1 i j) =
   (int.EuclideanDivision.mod1 (int.EuclideanDivision.mod1 i (j + j)%Z) j)).

Axiom mod_mod_add_left :
  forall (a:Z) (b:Z) (c:Z), (0%Z < c)%Z ->
  ((int.EuclideanDivision.mod1 ((int.EuclideanDivision.mod1 a c) + b)%Z c) =
   (int.EuclideanDivision.mod1 (a + b)%Z c)).

Axiom mod_mod_add_right :
  forall (a:Z) (b:Z) (c:Z), (0%Z < c)%Z ->
  ((int.EuclideanDivision.mod1 (a + (int.EuclideanDivision.mod1 b c))%Z c) =
   (int.EuclideanDivision.mod1 (a + b)%Z c)).

Axiom mod_mod_add_left_rev :
  forall (a:Z) (b:Z) (c:Z), (0%Z < c)%Z ->
  ((int.EuclideanDivision.mod1 (a + b)%Z c) =
   (int.EuclideanDivision.mod1 ((int.EuclideanDivision.mod1 a c) + b)%Z c)).

Axiom mod_mod_add_right_rev :
  forall (a:Z) (b:Z) (c:Z), (0%Z < c)%Z ->
  ((int.EuclideanDivision.mod1 (a + b)%Z c) =
   (int.EuclideanDivision.mod1 (a + (int.EuclideanDivision.mod1 b c))%Z c)).

Axiom mult_assoc1 :
  forall (i:Z) (q:Z) (f:Z), (0%Z <= i)%Z -> (0%Z < q)%Z -> (0%Z < f)%Z ->
  ((q * (f * (int.EuclideanDivision.div i (q * f)%Z))%Z)%Z =
   ((q * f)%Z * (int.EuclideanDivision.div i (q * f)%Z))%Z).

Axiom div_div1 :
  forall (i:Z) (j:Z) (k:Z), (0%Z <= i)%Z -> (0%Z < j)%Z -> (0%Z < k)%Z ->
  ((int.EuclideanDivision.div (int.EuclideanDivision.div i k) j) =
   (int.EuclideanDivision.div i (k * j)%Z)).

Axiom div_div2 :
  forall (i:Z) (j:Z) (k:Z), (0%Z <= i)%Z -> (0%Z < j)%Z -> (0%Z < k)%Z ->
  ((int.EuclideanDivision.div (int.EuclideanDivision.div i k) j) =
   (int.EuclideanDivision.div i (j * k)%Z)).

Axiom compat_order_div :
  forall (i:Z) (i':Z) (j:Z), ((0%Z <= i)%Z /\ (i <= i')%Z) -> (0%Z < j)%Z ->
  ((int.EuclideanDivision.div i j) <= (int.EuclideanDivision.div i' j))%Z.

Axiom mod_div :
  forall (i:Z) (j:Z) (k:Z), (0%Z <= i)%Z -> (0%Z < j)%Z -> (0%Z < k)%Z ->
  ((int.EuclideanDivision.div (int.EuclideanDivision.mod1 i (j * k)%Z) j) =
   (int.EuclideanDivision.mod1 (int.EuclideanDivision.div i j) k)).

Axiom inf_mul :
  forall (ia:Z) (ib:Z) (a:Z) (b:Z), ((0%Z <= ia)%Z /\ (ia < a)%Z) ->
  ((0%Z <= ib)%Z /\ (ib < b)%Z) -> (((a * ib)%Z + ia)%Z < (a * b)%Z)%Z.

Axiom inf_mul1 :
  forall (ia:Z) (ib:Z) (a:Z) (b:Z), ((0%Z <= ia)%Z /\ (ia < a)%Z) ->
  ((0%Z <= ib)%Z /\ (ib < b)%Z) -> (((ib * a)%Z + ia)%Z < (b * a)%Z)%Z.

Axiom inf_mul_gen :
  forall (n:Z) (v:Z) (p:Z), ((0%Z <= p)%Z /\ (p < v)%Z) -> forall (k:Z),
  ((0%Z <= k)%Z /\ (k < n)%Z) -> (((k * v)%Z + p)%Z < (n * v)%Z)%Z.

Axiom inf_mul_gen_b :
  forall (n:Z) (v:Z) (p:Z), ((0%Z <= p)%Z /\ (p < n)%Z) -> forall (k:Z),
  ((0%Z <= k)%Z /\ (k < v)%Z) -> (((p * v)%Z + k)%Z < (n * v)%Z)%Z.

Axiom inf_mul_comm :
  forall (i:Z) (bi:Z) (quot:Z) (rest:Z), ((0%Z <= i)%Z /\ (i < bi)%Z) ->
  (0%Z < rest)%Z -> (0%Z < quot)%Z -> (bi = (quot * rest)%Z) ->
  ((int.EuclideanDivision.mod1 i rest) < rest)%Z.

Axiom indic_div_mod :
  forall (i:Z) (j:Z) (q:Z), (0%Z <= i)%Z -> (0%Z <= j)%Z -> (0%Z < q)%Z ->
  ((indic i j) =
   (infix_asdt
    (indic (int.EuclideanDivision.mod1 i q) (int.EuclideanDivision.mod1 j q))
    (indic (int.EuclideanDivision.div i q) (int.EuclideanDivision.div j q)))).

Axiom indic_div_mod_gen :
  forall (q:Z), (0%Z < q)%Z -> forall (i:Z) (j:Z),
  ((0%Z <= i)%Z /\ (0%Z <= j)%Z) ->
  ((indic i j) =
   (infix_asdt
    (indic (int.EuclideanDivision.mod1 i q) (int.EuclideanDivision.mod1 j q))
    (indic (int.EuclideanDivision.div i q) (int.EuclideanDivision.div j q)))).

Axiom set_inf : True.

Axiom set_infeq : True.

Axiom bounded_cycle :
  forall (a:Z) (b:Z) (c:Z) (d:Z), (0%Z <= a)%Z -> (0%Z < b)%Z ->
  ((0%Z <= d)%Z /\ (d < b)%Z) -> (0%Z < c)%Z ->
  ((int.EuclideanDivision.div ((a * b)%Z + d)%Z (b * c)%Z) =
   (int.EuclideanDivision.div a c)).

Axiom div_mod_minus :
  forall (a:Z) (b:Z), (0%Z < b)%Z -> ((0%Z < a)%Z /\ (a < b)%Z) ->
  ((int.EuclideanDivision.mod1 (-a)%Z b) =
   (b - (int.EuclideanDivision.mod1 a b))%Z).

Axiom mod_mod_iproduct :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (f:a -> Z) (b:Z), (0%Z < b)%Z ->
  ((int.EuclideanDivision.mod1
    (iproduct s (fun (i:a) => (int.EuclideanDivision.mod1 (f i) b))) b)
   = (int.EuclideanDivision.mod1 (iproduct s f) b)).

Parameter binary: (Z -> Z) -> Prop.

Axiom binary_def :
  forall (t1:Z -> Z), (binary t1) -> forall (k:Z), (0%Z <= (t1 k))%Z.

Axiom binary_def1 :
  forall (t1:Z -> Z), (binary t1) -> forall (k:Z), ((t1 k) < 2%Z)%Z.

Axiom binary_def2 :
  forall (t1:Z -> Z),
  (forall (k:Z), (0%Z <= (t1 k))%Z /\ ((t1 k) < 2%Z)%Z) -> binary t1.

Axiom set_binary :
  forall (t1:Z -> Z),
  (forall (k:Z), (0%Z <= (t1 k))%Z /\ ((t1 k) < 2%Z)%Z) -> binary t1.

Axiom get_binary :
  forall (t1:Z -> Z), (binary t1) -> forall (k:Z), (0%Z <= (t1 k))%Z.

Axiom get_binary1 :
  forall (t1:Z -> Z), (binary t1) -> forall (k:Z), ((t1 k) < 2%Z)%Z.

Parameter shift: forall {a:Type} {a_WT:WhyType a}, (Z -> a) -> Z -> Z -> a.

Axiom shift_def :
  forall {a:Type} {a_WT:WhyType a},
  forall (f:Z -> a) (i:Z) (k:Z), ((shift f i k) = (f (k + i)%Z)).

Axiom shift_value :
  forall {a:Type} {a_WT:WhyType a},
  forall (f:Z -> a) (i:Z) (k:Z), ((shift f i k) = (f (k + i)%Z)).

Axiom shiftz :
  forall {a:Type} {a_WT:WhyType a},
  forall (f:Z -> a) (k:Z), ((shift f 0%Z k) = (f k)).

Axiom shiftz_gen :
  forall {a:Type} {a_WT:WhyType a},
  forall (f:Z -> a) (i:Z) (k:Z), (i = 0%Z) -> ((shift f i k) = (f k)).

Axiom shiftz_quant :
  forall {a:Type} {a_WT:WhyType a},
  forall (f:Z -> a),
  ((((fun (y0:Z -> a) (y1:Z) (y2:Z) => (shift y0 y1 y2)) f) 0%Z) = f).

Axiom shiftz_quant_rev :
  forall {a:Type} {a_WT:WhyType a},
  forall (f:Z -> a),
  (f = (((fun (y0:Z -> a) (y1:Z) (y2:Z) => (shift y0 y1 y2)) f) 0%Z)).

Parameter concat_fun:
  forall {a:Type} {a_WT:WhyType a}, (Z -> a) -> (Z -> a) -> Z -> Z -> a.

Axiom concat_fun_def :
  forall {a:Type} {a_WT:WhyType a},
  forall (f:Z -> a) (g:Z -> a) (i:Z) (k:Z), (k < i)%Z ->
  ((concat_fun f g i k) = (f k)).

Axiom concat_fun_def1 :
  forall {a:Type} {a_WT:WhyType a},
  forall (f:Z -> a) (g:Z -> a) (i:Z) (k:Z), ~ (k < i)%Z ->
  ((concat_fun f g i k) = (g (k - i)%Z)).

Axiom shift_add :
  forall {a:Type} {a_WT:WhyType a},
  forall (f:Z -> a) (i:Z) (j:Z) (k:Z),
  ((shift (((fun (y0:Z -> a) (y1:Z) (y2:Z) => (shift y0 y1 y2)) f) j) i k) =
   (shift f (i + j)%Z k)).

Axiom concat_fun_value :
  forall {a:Type} {a_WT:WhyType a},
  forall (f:Z -> a) (g:Z -> a) (i:Z) (k:Z),
  ((k < i)%Z -> ((concat_fun f g i k) = (f k))) /\
  (~ (k < i)%Z -> ((concat_fun f g i k) = (g (k - i)%Z))).

Axiom concat_eq :
  forall {a:Type} {a_WT:WhyType a},
  forall (f1:Z -> a) (g1:Z -> a) (f2:Z -> a) (g2:Z -> a) (i1:Z) (i2:Z) (k:Z),
  (forall (l:Z), (l < i1)%Z -> ((f1 l) = (f2 l))) ->
  (forall (l:Z), (l >= 0%Z)%Z -> ((g1 l) = (g2 l))) -> (i1 = i2) ->
  ((concat_fun f1 g1 i1 k) = (concat_fun f2 g2 i2 k)).

Parameter mod_func:
  forall {a:Type} {a_WT:WhyType a}, (Z -> a) -> Z -> Z -> a.

Axiom mod_func_def :
  forall {a:Type} {a_WT:WhyType a},
  forall (f:Z -> a) (k:Z) (i:Z), (k > 0%Z)%Z ->
  ((mod_func f k i) = (f (int.EuclideanDivision.mod1 i k))).

Axiom mod_func_inf :
  forall {a:Type} {a_WT:WhyType a},
  forall (f:Z -> a) (k:Z) (i:Z), (k > 0%Z)%Z ->
  ((0%Z <= i)%Z /\ (i < k)%Z) -> ((mod_func f k i) = (f i)).

Axiom shift_mod :
  forall {a:Type} {a_WT:WhyType a},
  forall (f:Z -> a) (k:Z) (i:Z), (k > 0%Z)%Z ->
  ((mod_func f k i) =
   (shift (((fun (y0:Z -> a) (y1:Z) (y2:Z) => (mod_func y0 y1 y2)) f) k) k i)).

Axiom shift_mod_rev :
  forall {a:Type} {a_WT:WhyType a},
  forall (f:Z -> a) (k:Z) (i:Z), (k > 0%Z)%Z ->
  ((shift (((fun (y0:Z -> a) (y1:Z) (y2:Z) => (mod_func y0 y1 y2)) f) k) k i)
   = (mod_func f k i)).

Parameter head_bit: Z -> Z -> Z.

Axiom head_bit_def :
  forall (i:Z) (k:Z), (k > 0%Z)%Z ->
  ((0%Z <= i)%Z /\ (i < (power 2%Z k))%Z) ->
  ((head_bit i k) = (int.EuclideanDivision.div i (power 2%Z (k - 1%Z)%Z))).

Axiom head_bit_spec :
  forall (i:Z) (k:Z), (k > 0%Z)%Z ->
  ((0%Z <= i)%Z /\ (i < (power 2%Z k))%Z) -> (0%Z <= (head_bit i k))%Z.

Axiom head_bit_spec1 :
  forall (i:Z) (k:Z), (k > 0%Z)%Z ->
  ((0%Z <= i)%Z /\ (i < (power 2%Z k))%Z) -> ((head_bit i k) <= 1%Z)%Z.

Parameter tail_bits: Z -> Z -> Z.

Axiom tail_bits_def :
  forall (i:Z) (k:Z), (k > 0%Z)%Z ->
  ((0%Z <= i)%Z /\ (i < (power 2%Z k))%Z) ->
  ((tail_bits i k) = (int.EuclideanDivision.mod1 i (power 2%Z (k - 1%Z)%Z))).

Axiom tail_bits_spec :
  forall (i:Z) (k:Z), (k > 0%Z)%Z ->
  ((0%Z <= i)%Z /\ (i < (power 2%Z k))%Z) -> (0%Z <= (tail_bits i k))%Z.

Axiom tail_bits_spec1 :
  forall (i:Z) (k:Z), (k > 0%Z)%Z ->
  ((0%Z <= i)%Z /\ (i < (power 2%Z k))%Z) ->
  ((tail_bits i k) <= (power 2%Z (k - 1%Z)%Z))%Z.

Parameter ht_to_int: Z -> Z -> Z -> Z.

Axiom ht_to_int_def :
  forall (hi:Z) (ti:Z) (k:Z), (0%Z < k)%Z ->
  ((0%Z <= hi)%Z /\ (hi < 2%Z)%Z) ->
  ((0%Z <= ti)%Z /\ (ti < (power 2%Z (k - 1%Z)%Z))%Z) ->
  ((ht_to_int hi ti k) = ((hi * (power 2%Z (k - 1%Z)%Z))%Z + ti)%Z).

Axiom head_tail_inv :
  forall (i:Z) (k:Z), (k > 0%Z)%Z ->
  ((0%Z <= i)%Z /\ (i < (power 2%Z k))%Z) ->
  ((ht_to_int (head_bit i k) (tail_bits i k) k) = i).

Axiom ht_to_int_head :
  forall (i:Z) (ti:Z) (k:Z), (k > 0%Z)%Z ->
  ((0%Z <= i)%Z /\ (i < (power 2%Z k))%Z) ->
  ((0%Z <= ti)%Z /\ (ti < (power 2%Z (k - 1%Z)%Z))%Z) ->
  ((head_bit (ht_to_int (head_bit i k) ti k) k) = (head_bit i k)).

Axiom ht_to_int_tail :
  forall (hi:Z) (i:Z) (k:Z), (k > 0%Z)%Z ->
  ((0%Z <= i)%Z /\ (i < (power 2%Z k))%Z) ->
  ((0%Z <= hi)%Z /\ (hi < 2%Z)%Z) ->
  ((tail_bits (ht_to_int hi (tail_bits i k) k) k) = (tail_bits i k)).

Axiom concat_fun_bin_i :
  forall (f:Z -> Z) (g:Z -> Z) (i:Z) (k:Z), (binary f) -> (binary g) ->
  (0%Z <= (concat_fun f g i k))%Z.

Axiom concat_fun_bin_i1 :
  forall (f:Z -> Z) (g:Z -> Z) (i:Z) (k:Z), (binary f) -> (binary g) ->
  ((concat_fun f g i k) < 2%Z)%Z.

Axiom shift_bin_i :
  forall (f:Z -> Z) (i:Z) (k:Z), (binary f) -> (0%Z <= (shift f i k))%Z.

Axiom shift_bin_i1 :
  forall (f:Z -> Z) (i:Z) (k:Z), (binary f) -> ((shift f i k) < 2%Z)%Z.

Axiom concat_fun_bin :
  forall (f:Z -> Z) (g:Z -> Z) (i:Z), (binary f) -> (binary g) ->
  binary
  ((((fun (y0:Z -> Z) (y1:Z -> Z) (y2:Z) (y3:Z) => (concat_fun y0 y1 y2 y3))
     f)
    g)
   i).

Axiom mod_func_bin :
  forall (f:Z -> Z) (k:Z), (k > 0%Z)%Z -> (binary f) ->
  binary (((fun (y0:Z -> Z) (y1:Z) (y2:Z) => (mod_func y0 y1 y2)) f) k).

Axiom shift_bin :
  forall (f:Z -> Z) (i:Z), (binary f) ->
  binary (((fun (y0:Z -> Z) (y1:Z) (y2:Z) => (shift y0 y1 y2)) f) i).

Axiom binary_comp :
  forall (f:Z -> Z) (g:Z -> Z), (binary f) -> binary (fun (x:Z) => (f (g x))).

Axiom set_is_all_binary :
  forall (t1:Z -> Z),
  (forall (k:Z), (0%Z <= (t1 k))%Z /\ ((t1 k) < 2%Z)%Z) -> binary t1.

Parameter nary_length: Z -> Z -> Z.

Axiom nary_length_spec :
  forall (i:Z) (n:Z), (1%Z < n)%Z -> (0%Z <= i)%Z -> (0%Z < i)%Z ->
  ((power n ((nary_length i n) - 1%Z)%Z) <= i)%Z.

Axiom nary_length_spec1 :
  forall (i:Z) (n:Z), (1%Z < n)%Z -> (0%Z <= i)%Z -> (0%Z < i)%Z ->
  (i < (power n (nary_length i n)))%Z.

Axiom nary_length_spec2 :
  forall (i:Z) (n:Z), (1%Z < n)%Z -> (0%Z <= i)%Z -> (i < n)%Z ->
  ((nary_length i n) = 1%Z).

Axiom nary_length_spec3 :
  forall (i:Z) (n:Z), (1%Z < n)%Z -> (0%Z <= i)%Z ->
  ((nary_length i n) >= 1%Z)%Z.

Axiom nary_length_spec4 :
  forall (i:Z) (n:Z), (1%Z < n)%Z -> (0%Z <= i)%Z ->
  (i = (int.EuclideanDivision.mod1 i (power n (nary_length i n)))).

Parameter binary_length: Z -> Z.

Axiom binary_length_def :
  forall (i:Z), (0%Z <= i)%Z -> ((binary_length i) = (nary_length i 2%Z)).

Axiom binary_length_spec :
  forall (i:Z), (0%Z <= i)%Z -> (0%Z < i)%Z ->
  ((power 2%Z ((binary_length i) - 1%Z)%Z) <= i)%Z.

Axiom binary_length_spec1 :
  forall (i:Z), (0%Z <= i)%Z -> (0%Z < i)%Z ->
  (i < (power 2%Z (binary_length i)))%Z.

Axiom binary_length_spec2 :
  forall (i:Z), (0%Z <= i)%Z -> (i < 2%Z)%Z -> ((binary_length i) = 1%Z).

Axiom binary_length_spec3 :
  forall (i:Z), (0%Z <= i)%Z -> ((binary_length i) >= 1%Z)%Z.

Axiom binary_length_spec4 :
  forall (i:Z), (0%Z <= i)%Z ->
  (i = (int.EuclideanDivision.mod1 i (power 2%Z (binary_length i)))).

Axiom set_binary_length :
  forall (i:Z) (k:Z), (0%Z <= i)%Z -> (0%Z <= k)%Z -> ~ (0%Z < i)%Z ->
  ~ (i < 2%Z)%Z -> (k = (binary_length i)).

Axiom set_binary_length1 :
  forall (i:Z) (k:Z), (0%Z <= i)%Z -> (0%Z <= k)%Z -> ~ (0%Z < i)%Z ->
  (k = 1%Z) -> (k = (binary_length i)).

Axiom set_binary_length2 :
  forall (i:Z) (k:Z), (0%Z <= i)%Z -> (0%Z <= k)%Z ->
  (((power 2%Z (k - 1%Z)%Z) <= i)%Z /\ (i < (power 2%Z k))%Z) ->
  ~ (i < 2%Z)%Z -> (k = (binary_length i)).

Axiom set_binary_length3 :
  forall (i:Z) (k:Z), (0%Z <= i)%Z -> (0%Z <= k)%Z ->
  (((power 2%Z (k - 1%Z)%Z) <= i)%Z /\ (i < (power 2%Z k))%Z) -> (k = 1%Z) ->
  (k = (binary_length i)).

Axiom set_binary_length_b :
  forall (i:Z) (k:Z), (0%Z <= i)%Z -> (0%Z < k)%Z -> (i < (power 2%Z k))%Z ->
  ((binary_length i) <= k)%Z.

Axiom bitvec : Type.
Parameter bitvec_WhyType : WhyType bitvec.
Existing Instance bitvec_WhyType.

Parameter value: bitvec -> Z -> Z.

Parameter length: bitvec -> Z.

Axiom bitvec'invariant : forall (self:bitvec), (0%Z <= (length self))%Z.

Axiom bitvec'invariant1 :
  forall (self:bitvec), forall (i:Z),
  ((0%Z <= i)%Z /\ (i < (length self))%Z) -> (0%Z <= ((value self) i))%Z.

Axiom bitvec'invariant2 :
  forall (self:bitvec), forall (i:Z),
  ((0%Z <= i)%Z /\ (i < (length self))%Z) -> (((value self) i) < 2%Z)%Z.

Axiom bitvec'invariant3 :
  forall (self:bitvec), forall (i:Z), ~ (0%Z <= i)%Z ->
  (((value self) i) = 0%Z).

Axiom bitvec'invariant4 :
  forall (self:bitvec), forall (i:Z), ~ (i < (length self))%Z ->
  (((value self) i) = 0%Z).

Parameter bvlength: (Z -> Z) -> Z -> Prop.

Axiom bvlength_def :
  forall (f:Z -> Z) (i:Z), (bvlength f i) -> forall (k:Z),
  ((0%Z <= k)%Z /\ (k < i)%Z) -> (0%Z <= (f k))%Z.

Axiom bvlength_def1 :
  forall (f:Z -> Z) (i:Z), (bvlength f i) -> forall (k:Z),
  ((0%Z <= k)%Z /\ (k < i)%Z) -> ((f k) < 2%Z)%Z.

Axiom bvlength_def2 :
  forall (f:Z -> Z) (i:Z),
  (forall (k:Z), ((0%Z <= k)%Z /\ (k < i)%Z) ->
   (0%Z <= (f k))%Z /\ ((f k) < 2%Z)%Z) ->
  bvlength f i.

Axiom binary_mult :
  forall (a:Z) (b:Z),
  ((int.EuclideanDivision.mod1 (a * b)%Z 2%Z) =
   ((int.EuclideanDivision.mod1 a 2%Z) *
    (int.EuclideanDivision.mod1 b 2%Z))%Z).

Parameter getbv: bitvec -> Z -> Z.

Axiom getbv_def : forall (a:bitvec), ((getbv a) = (value a)).

Axiom getbv_spec : forall (a:bitvec), binary (getbv a).

Axiom getbv_spec1 :
  forall (a:bitvec), forall (i:Z), (((getbv a) i) = ((value a) i)).

Parameter to_bool: Z -> bool.

Axiom to_bool_def :
  forall (i:Z), ((0%Z <= i)%Z /\ (i < 2%Z)%Z) -> ~ (i = 0%Z) ->
  ((to_bool i) = true).

Axiom to_bool_def1 :
  forall (i:Z), ((0%Z <= i)%Z /\ (i < 2%Z)%Z) -> (i = 0%Z) ->
  ((to_bool i) = false).

Axiom getbv_bound : forall (bv:bitvec) (i:Z), (0%Z <= ((getbv bv) i))%Z.

Axiom getbv_bound1 : forall (bv:bitvec) (i:Z), (((getbv bv) i) < 2%Z)%Z.

Axiom getbv_eq :
  forall (bvx:bitvec) (bvy:bitvec) (i:Z), (bvx = bvy) ->
  (((getbv bvx) i) = ((getbv bvy) i)).

Axiom getbv_eq_gen :
  forall (bvx:bitvec) (bvy:bitvec) (i:Z) (j:Z), (bvx = bvy) -> (i = j) ->
  (((getbv bvx) i) = ((getbv bvy) j)).

Parameter setbv: (Z -> Z) -> Z -> Z -> Z -> Z.

Axiom setbv_def :
  forall (bv:Z -> Z) (i:Z) (j:Z),
  let result6 := setbv bv i j in
  forall (k:Z),
  ((k = i) -> ((result6 k) = j)) /\ (~ (k = i) -> ((result6 k) = (bv k))).

Axiom setbv_spec :
  forall (bv:Z -> Z) (i:Z) (j:Z), forall (k:Z), ~ (k = i) ->
  (((setbv bv i j) k) = (bv k)).

Axiom setbv_spec1 : forall (bv:Z -> Z) (i:Z) (j:Z), (((setbv bv i j) i) = j).

Parameter setbv_int: (Z -> Z) -> (Z -> Z) -> Z -> Z -> Z -> Z.

Axiom setbv_int_def :
  forall (bv1:Z -> Z) (bv2:Z -> Z) (i:Z) (j:Z),
  let result6 := setbv_int bv1 bv2 i j in
  forall (k:Z),
  (((i < k)%Z /\ (k <= j)%Z) -> ((result6 k) = (bv2 (k - i)%Z))) /\
  (~ ((i < k)%Z /\ (k <= j)%Z) -> ((result6 k) = (bv1 k))).

Axiom setbv_int_spec :
  forall (bv1:Z -> Z) (bv2:Z -> Z) (i:Z) (j:Z), forall (k:Z),
  ((i < k)%Z /\ (k <= j)%Z) ->
  (((setbv_int bv1 bv2 i j) k) = (bv2 (k - i)%Z)).

Axiom setbv_int_spec1 :
  forall (bv1:Z -> Z) (bv2:Z -> Z) (i:Z) (j:Z), forall (k:Z), (k <= i)%Z ->
  (((setbv_int bv1 bv2 i j) k) = (bv1 k)).

Axiom setbv_int_spec2 :
  forall (bv1:Z -> Z) (bv2:Z -> Z) (i:Z) (j:Z), forall (k:Z), (j < k)%Z ->
  (((setbv_int bv1 bv2 i j) k) = (bv1 k)).

Axiom set_bvlength :
  forall (bv:bitvec) (i:Z),
  (forall (k:Z), ((1%Z <= k)%Z /\ (k < i)%Z) ->
   (0%Z <= ((getbv bv) k))%Z /\ (((getbv bv) k) < 2%Z)%Z) ->
  bvlength (getbv bv) i.

Axiom null_product_bitvec :
  forall (x:bitvec) (n:Z), (n = (length x)) ->
  (forall (i:Z), ((0%Z <= i)%Z /\ (i < n)%Z) -> (((getbv x) i) = 1%Z)) ->
  ((ind_iproduct (getbv x) 0%Z n) = 1%Z).

Axiom non_null_product_bitvec :
  forall (x:bitvec) (n:Z), (n = (length x)) ->
  ~ (forall (i:Z), ((0%Z <= i)%Z /\ (i < n)%Z) -> (((getbv x) i) = 1%Z)) ->
  ((ind_iproduct (getbv x) 0%Z n) = 0%Z).

Axiom null_product_bitvec_inv :
  forall (x:bitvec) (n:Z), (n = (length x)) ->
  (forall (i:Z), ((0%Z <= i)%Z /\ (i < n)%Z) -> (((getbv x) i) = 0%Z)) ->
  ((ind_iproduct (fun (i:Z) => (1%Z - ((getbv x) i))%Z) 0%Z n) = 1%Z).

Axiom non_null_product_bitvec_inv :
  forall (x:bitvec) (n:Z), (n = (length x)) ->
  ~ (forall (i:Z), ((0%Z <= i)%Z /\ (i < n)%Z) -> (((getbv x) i) = 0%Z)) ->
  ((ind_iproduct (fun (i:Z) => (1%Z - ((getbv x) i))%Z) 0%Z n) = 0%Z).

Axiom null_product_bitvec_rev :
  forall (x:bitvec) (n:Z), (n = (length x)) ->
  ((ind_iproduct (getbv x) 0%Z n) = 1%Z) -> forall (i:Z),
  ((0%Z <= i)%Z /\ (i < n)%Z) -> (((getbv x) i) = 1%Z).

Axiom non_null_product_bitvec_rev :
  forall (x:bitvec) (n:Z), (n = (length x)) ->
  ((ind_iproduct (getbv x) 0%Z n) = 0%Z) ->
  ~ (forall (i:Z), ((0%Z <= i)%Z /\ (i < n)%Z) -> (((getbv x) i) = 1%Z)).

Axiom null_product_bitvec_inv_rev :
  forall (x:bitvec) (n:Z), (n = (length x)) ->
  ((ind_iproduct (fun (i:Z) => (1%Z - ((getbv x) i))%Z) 0%Z n) = 1%Z) ->
  forall (i:Z), ((0%Z <= i)%Z /\ (i < n)%Z) -> (((getbv x) i) = 0%Z).

Axiom inter1 :
  forall (x:bitvec) (n:Z) (k:Z), (n = (length x)) ->
  ((ind_iproduct (fun (i:Z) => (1%Z - ((getbv x) i))%Z) 0%Z n) = 0%Z) ->
  ((0%Z <= k)%Z /\ (k <= n)%Z) ->
  (forall (i:Z), ((0%Z <= i)%Z /\ (i < n)%Z) -> (((getbv x) i) = 0%Z)) ->
  ((ind_iproduct (fun (i:Z) => (1%Z - ((getbv x) i))%Z) 0%Z k) = 1%Z).

Axiom non_null_product_bitvec_inv_rev :
  forall (x:bitvec) (n:Z), (n = (length x)) ->
  ((ind_iproduct (fun (i:Z) => (1%Z - ((getbv x) i))%Z) 0%Z n) = 0%Z) ->
  ~ (forall (i:Z), ((0%Z <= i)%Z /\ (i < n)%Z) -> (((getbv x) i) = 0%Z)).

Axiom set_flength :
  forall (f:Z -> Z) (i:Z),
  (forall (k:Z), ((0%Z <= k)%Z /\ (k < i)%Z) ->
   (0%Z <= (f k))%Z /\ ((f k) < 2%Z)%Z) ->
  bvlength f i.

Axiom get_bvlength :
  forall (f:Z -> Z) (i:Z), (bvlength f i) -> forall (k:Z),
  ((0%Z <= k)%Z /\ (k < i)%Z) -> (0%Z <= (f k))%Z.

Axiom get_bvlength1 :
  forall (f:Z -> Z) (i:Z), (bvlength f i) -> forall (k:Z),
  ((0%Z <= k)%Z /\ (k < i)%Z) -> ((f k) < 2%Z)%Z.

Axiom set_bv_to :
  forall (f:Z -> Z) (i:Z), (0%Z < i)%Z ->
  (forall (j:Z), ((0%Z <= j)%Z /\ (j < i)%Z) ->
   (0%Z <= (f j))%Z /\ ((f j) <= 1%Z)%Z) ->
  bvlength f i.

Axiom set_in_range_val :
  forall (bv:bitvec) (i:Z), ((0%Z <= i)%Z /\ (i < (length bv))%Z) ->
  (0%Z <= ((getbv bv) i))%Z.

Axiom set_in_range_val1 :
  forall (bv:bitvec) (i:Z), ((0%Z <= i)%Z /\ (i < (length bv))%Z) ->
  (((getbv bv) i) < 2%Z)%Z.

Axiom bvlengthm :
  forall (bv:bitvec) (i:Z), ((0%Z <= i)%Z /\ (i < (length bv))%Z) ->
  bvlength (getbv bv) i.

Parameter in_range: bitvec -> Z -> Prop.

Axiom in_range_def :
  forall (bv:bitvec) (r:Z), (in_range bv r) -> (0%Z <= r)%Z.

Axiom in_range_def1 :
  forall (bv:bitvec) (r:Z), (in_range bv r) -> (r < (length bv))%Z.

Axiom in_range_def2 :
  forall (bv:bitvec) (r:Z), ((0%Z <= r)%Z /\ (r < (length bv))%Z) ->
  in_range bv r.

Axiom binary_bv :
  forall (bv:bitvec) (i:Z), (in_range bv i) -> (0%Z <= ((getbv bv) i))%Z.

Axiom binary_bv1 :
  forall (bv:bitvec) (i:Z), (in_range bv i) -> (((getbv bv) i) <= 1%Z)%Z.

Axiom equal_bv :
  forall (m:bitvec) (n:bitvec), (m = n) -> ((length m) = (length n)).

Axiom equal_bv1 :
  forall (m:bitvec) (n:bitvec), (m = n) -> forall (i:Z), (in_range m i) ->
  (((getbv m) i) = ((getbv n) i)).

Axiom equal_bv2 :
  forall (m:bitvec) (n:bitvec),
  (((length m) = (length n)) /\
   forall (i:Z), (in_range m i) -> (((getbv m) i) = ((getbv n) i))) ->
  (m = n).

Axiom set_equal_bv :
  forall (bv:bitvec) (bv':bitvec), ((length bv) = (length bv')) ->
  (forall (i:Z), ((0%Z <= i)%Z /\ (i < (length bv))%Z) ->
   (((getbv bv) i) = ((getbv bv') i))) ->
  (bv = bv').

Axiom get_equal_bv :
  forall (bv:bitvec) (bv':bitvec), (bv = bv') -> ((length bv) = (length bv')).

Axiom get_equal_bv1 :
  forall (bv:bitvec) (bv':bitvec), (bv = bv') -> forall (i:Z),
  ((0%Z <= i)%Z /\ (i < (length bv))%Z) -> (((getbv bv) i) = ((getbv bv') i)).

Parameter make_bv: (Z -> Z) -> Z -> bitvec.

Axiom make_bv_spec :
  forall (f:Z -> Z) (s:Z),
  (forall (i:Z), ((0%Z <= i)%Z /\ (i < s)%Z) ->
   (0%Z <= (f i))%Z /\ ((f i) < 2%Z)%Z) ->
  (s >= 0%Z)%Z -> ((length (make_bv f s)) = s).

Axiom make_bv_spec1 :
  forall (f:Z -> Z) (s:Z),
  (forall (i:Z), ((0%Z <= i)%Z /\ (i < s)%Z) ->
   (0%Z <= (f i))%Z /\ ((f i) < 2%Z)%Z) ->
  (s >= 0%Z)%Z -> forall (i:Z), ((0%Z <= i)%Z /\ (i < s)%Z) ->
  (((getbv (make_bv f s)) i) = (f i)).

Axiom make_bv_spec2 :
  forall (f:Z -> Z) (s:Z),
  (forall (i:Z), ((0%Z <= i)%Z /\ (i < s)%Z) ->
   (0%Z <= (f i))%Z /\ ((f i) < 2%Z)%Z) ->
  (s >= 0%Z)%Z -> forall (i:Z), ~ (0%Z <= i)%Z ->
  (((getbv (make_bv f s)) i) = 0%Z).

Axiom make_bv_spec3 :
  forall (f:Z -> Z) (s:Z),
  (forall (i:Z), ((0%Z <= i)%Z /\ (i < s)%Z) ->
   (0%Z <= (f i))%Z /\ ((f i) < 2%Z)%Z) ->
  (s >= 0%Z)%Z -> forall (i:Z), ~ (i < s)%Z ->
  (((getbv (make_bv f s)) i) = 0%Z).

Parameter make_bv_m: (Z -> Z) -> Z -> bitvec.

Axiom make_bv_m_def :
  forall (f:Z -> Z) (s:Z), (s >= 0%Z)%Z ->
  ((make_bv_m f s) =
   (make_bv (fun (k:Z) => (int.EuclideanDivision.mod1 (f k) 2%Z)) s)).

Axiom make_bv_m_spec :
  forall (f:Z -> Z) (s:Z), (s >= 0%Z)%Z -> ((length (make_bv_m f s)) = s).

Axiom make_bv_m_spec1 :
  forall (f:Z -> Z) (s:Z), (s >= 0%Z)%Z -> forall (i:Z),
  bvlength (getbv (make_bv_m f s)) i.

Axiom make_bv_m_spec2 :
  forall (f:Z -> Z) (s:Z), (s >= 0%Z)%Z -> forall (k:Z),
  ((0%Z <= k)%Z /\ (k < s)%Z) ->
  (((getbv (make_bv_m f s)) k) = (int.EuclideanDivision.mod1 (f k) 2%Z)).

Axiom make_bv_m_spec3 :
  forall (f:Z -> Z) (s:Z), (s >= 0%Z)%Z -> forall (k:Z), ~ (0%Z <= k)%Z ->
  (((getbv (make_bv_m f s)) k) = 0%Z).

Axiom make_bv_m_spec4 :
  forall (f:Z -> Z) (s:Z), (s >= 0%Z)%Z -> forall (k:Z), ~ (k < s)%Z ->
  (((getbv (make_bv_m f s)) k) = 0%Z).

Parameter bitvec_null: bitvec.

Axiom bitvec_null_def : (bitvec_null = (make_bv (fun (i:Z) => 0%Z) 0%Z)).

Axiom assert_make_bv_no_bound :
  forall (f:Z -> Z) (s:Z) (i:Z),
  (forall (i1:Z), ((0%Z <= i1)%Z /\ (i1 < s)%Z) ->
   (0%Z <= (f i1))%Z /\ ((f i1) < 2%Z)%Z) ->
  ((1%Z <= i)%Z /\ (i <= s)%Z) -> (((getbv (make_bv f 0%Z)) i) = 0%Z).

Axiom make_bv_length :
  forall (f:Z -> Z) (s:Z),
  (forall (i:Z), ((0%Z <= i)%Z /\ (i < s)%Z) ->
   (0%Z <= (f i))%Z /\ ((f i) < 2%Z)%Z) ->
  (s >= 0%Z)%Z -> ((length (make_bv f s)) = s).

Axiom assert_make_bv :
  forall (f:Z -> Z) (s:Z) (i:Z),
  (forall (i1:Z), ((0%Z <= i1)%Z /\ (i1 < s)%Z) ->
   (0%Z <= (f i1))%Z /\ ((f i1) < 2%Z)%Z) ->
  (0%Z <= s)%Z ->
  (((0%Z <= i)%Z /\ (i < s)%Z) -> (((getbv (make_bv f s)) i) = (f i))) /\
  (~ ((0%Z <= i)%Z /\ (i < s)%Z) -> (((getbv (make_bv f s)) i) = 0%Z)).

Axiom assert_make_m :
  forall (f:Z -> Z) (s:Z) (i:Z), (s >= 0%Z)%Z ->
  (((0%Z <= i)%Z /\ (i < s)%Z) ->
   (((getbv (make_bv_m f s)) i) = (int.EuclideanDivision.mod1 (f i) 2%Z))) /\
  (~ ((0%Z <= i)%Z /\ (i < s)%Z) -> (((getbv (make_bv_m f s)) i) = 0%Z)).

Axiom make_bv_eq :
  forall (f:Z -> Z) (f':Z -> Z) (n:Z) (n':Z), (n >= 0%Z)%Z -> (n = n') ->
  (forall (i:Z), ((0%Z <= i)%Z /\ (i < n)%Z) -> ((f i) = (f' i))) ->
  (forall (i:Z), ((0%Z <= i)%Z /\ (i < n)%Z) ->
   (0%Z <= (f i))%Z /\ ((f i) < 2%Z)%Z) ->
  ((make_bv f n) = (make_bv f' n')).

Axiom assert_make_bv_b :
  forall (f:Z -> Z) (s:Z) (i:Z),
  (forall (i1:Z), ((0%Z <= i1)%Z /\ (i1 < s)%Z) ->
   (0%Z <= (f i1))%Z /\ ((f i1) < 2%Z)%Z) ->
  ((0%Z <= i)%Z /\ (i < s)%Z) -> (((getbv (make_bv f s)) i) = (f i)).

Axiom assert_make_m_b :
  forall (f:Z -> Z) (s:Z) (i:Z), ((0%Z <= i)%Z /\ (i < s)%Z) ->
  (s >= 0%Z)%Z ->
  (((getbv (make_bv_m f s)) i) = (int.EuclideanDivision.mod1 (f i) 2%Z)).

Axiom make_m_bv_length :
  forall (f:Z -> Z) (s:Z) (i:Z), (s >= 0%Z)%Z ->
  bvlength (getbv (make_bv_m f s)) i.

Axiom make_m_length :
  forall (f:Z -> Z) (s:Z), (s >= 0%Z)%Z -> ((length (make_bv_m f s)) = s).

Axiom set_equal_bv_make :
  forall (f:Z -> Z) (g:Z -> Z) (s:Z),
  (forall (i:Z), (0%Z <= (f i))%Z /\ ((f i) < 2%Z)%Z) -> (s >= 0%Z)%Z ->
  (forall (i:Z), ((f i) = (g i))) -> ((make_bv f s) = (make_bv g s)).

Axiom set_equal_bv_m_make :
  forall (f:Z -> Z) (g:Z -> Z) (s:Z), (s >= 0%Z)%Z ->
  (forall (i:Z),
   ((int.EuclideanDivision.mod1 (f i) 2%Z) =
    (int.EuclideanDivision.mod1 (g i) 2%Z))) ->
  ((make_bv_m f s) = (make_bv_m g s)).

Axiom make_bv_itself :
  forall (x:bitvec) (n:Z), ((length x) = n) ->
  ((make_bv (fun (i:Z) => ((getbv x) i)) n) = x).

Parameter head: bitvec -> Z.

Axiom head_def :
  forall (bv:bitvec), ((length bv) >= 1%Z)%Z ->
  ((head bv) = ((getbv bv) 0%Z)).

Axiom head_spec :
  forall (bv:bitvec), ((length bv) >= 1%Z)%Z -> (0%Z <= (head bv))%Z.

Axiom head_spec1 :
  forall (bv:bitvec), ((length bv) >= 1%Z)%Z -> ((head bv) <= 1%Z)%Z.

Parameter makes_bv: (Z -> Z) -> Z -> bitvec.

Parameter result6: (Z -> Z) -> Z -> Z.

Axiom result_def6 :
  forall (f:Z -> Z) (i:Z),
  (((0%Z <= (f i))%Z /\ ((f i) < 2%Z)%Z) -> (((result6 f) i) = (f i))) /\
  (~ ((0%Z <= (f i))%Z /\ ((f i) < 2%Z)%Z) -> (((result6 f) i) = 0%Z)).

Axiom makes_bv_def :
  forall (f:Z -> Z) (s:Z), (s >= 0%Z)%Z ->
  ((makes_bv f s) = (make_bv (result6 f) s)).

Axiom makes_bv_spec :
  forall (f:Z -> Z) (s:Z), (s >= 0%Z)%Z -> ((length (makes_bv f s)) = s).

Axiom makes_bv_spec1 :
  forall (f:Z -> Z) (s:Z), (s >= 0%Z)%Z -> forall (i:Z),
  ((0%Z <= i)%Z /\ (i < s)%Z) -> ((0%Z <= (f i))%Z /\ ((f i) < 2%Z)%Z) ->
  (((getbv (makes_bv f s)) i) = (f i)).

Axiom makes_bv_spec2 :
  forall (f:Z -> Z) (s:Z), (s >= 0%Z)%Z ->
  (forall (i:Z), ((0%Z <= i)%Z /\ (i < s)%Z) ->
   (0%Z <= (f i))%Z /\ ((f i) < 2%Z)%Z) ->
  ((makes_bv f s) = (make_bv f s)).

Axiom makes_bv_spec3 :
  forall (f:Z -> Z) (s:Z), (s >= 0%Z)%Z -> forall (i:Z), ~ (0%Z <= i)%Z ->
  (((getbv (makes_bv f s)) i) = 0%Z).

Axiom makes_bv_spec4 :
  forall (f:Z -> Z) (s:Z), (s >= 0%Z)%Z -> forall (i:Z), ~ (i < s)%Z ->
  (((getbv (makes_bv f s)) i) = 0%Z).

Axiom assert_makes_bv_c :
  forall (f:Z -> Z) (s:Z) (i:Z),
  (forall (i1:Z), ((0%Z <= i1)%Z /\ (i1 < s)%Z) ->
   (0%Z <= (f i1))%Z /\ ((f i1) < 2%Z)%Z) ->
  (0%Z <= s)%Z ->
  (((0%Z <= i)%Z /\ (i < s)%Z) -> (((getbv (makes_bv f s)) i) = (f i))) /\
  (~ ((0%Z <= i)%Z /\ (i < s)%Z) -> (((getbv (makes_bv f s)) i) = 0%Z)).

Axiom assert_makes_bv_b :
  forall (f:Z -> Z) (s:Z) (i:Z),
  (forall (i1:Z), ((0%Z <= i1)%Z /\ (i1 < s)%Z) ->
   (0%Z <= (f i1))%Z /\ ((f i1) < 2%Z)%Z) ->
  (0%Z <= s)%Z -> ((0%Z <= i)%Z /\ (i < s)%Z) ->
  (((getbv (makes_bv f s)) i) = (f i)).

Axiom assert_makes_bv :
  forall (f:Z -> Z) (s:Z) (i:Z),
  (forall (i1:Z), ((0%Z <= i1)%Z /\ (i1 < s)%Z) ->
   (0%Z <= (f i1))%Z /\ ((f i1) < 2%Z)%Z) ->
  (0%Z <= s)%Z ->
  ((((0%Z <= i)%Z /\ (i < s)%Z) /\ (0%Z <= (f i))%Z) ->
   (((getbv (makes_bv f s)) i) = (f i))) /\
  (~ (((0%Z <= i)%Z /\ (i < s)%Z) /\ (0%Z <= (f i))%Z) ->
   (((getbv (makes_bv f s)) i) = 0%Z)).

Axiom makes_bv_length :
  forall (f:Z -> Z) (s:Z), (s >= 0%Z)%Z -> ((length (makes_bv f s)) = s).

Parameter tail: bitvec -> bitvec.

Axiom tail_def :
  forall (bv:bitvec), ((length bv) >= 1%Z)%Z ->
  ((tail bv) =
   (make_bv (fun (i:Z) => ((getbv bv) (i + 1%Z)%Z)) ((length bv) - 1%Z)%Z)).

Axiom tail_spec :
  forall (bv:bitvec), ((length bv) >= 1%Z)%Z ->
  ((length (tail bv)) = ((length bv) - 1%Z)%Z).

Axiom tail_spec1 :
  forall (bv:bitvec), ((length bv) >= 1%Z)%Z -> forall (i:Z),
  (in_range (tail bv) i) ->
  (((getbv (tail bv)) i) = ((getbv bv) (i + 1%Z)%Z)).

Parameter concat_l: bitvec -> Z -> bitvec.

Parameter result7: bitvec -> Z -> Z -> Z.

Axiom result_def7 :
  forall (bv:bitvec) (i:Z) (k:Z),
  ((k = 0%Z) -> (((result7 bv i) k) = i)) /\
  (~ (k = 0%Z) -> (((result7 bv i) k) = ((getbv bv) (k - 1%Z)%Z))).

Axiom concat_l_def :
  forall (bv:bitvec) (i:Z), ((0%Z <= i)%Z /\ (i <= 1%Z)%Z) ->
  ((concat_l bv i) = (make_bv (result7 bv i) ((length bv) + 1%Z)%Z)).

Axiom concat_l_spec :
  forall (bv:bitvec) (i:Z), ((0%Z <= i)%Z /\ (i <= 1%Z)%Z) ->
  ((length (concat_l bv i)) = ((length bv) + 1%Z)%Z).

Axiom concat_l_spec1 :
  forall (bv:bitvec) (i:Z), ((0%Z <= i)%Z /\ (i <= 1%Z)%Z) ->
  (((getbv (concat_l bv i)) 0%Z) = i).

Axiom concat_l_spec2 :
  forall (bv:bitvec) (i:Z), ((0%Z <= i)%Z /\ (i <= 1%Z)%Z) -> forall (j:Z),
  (in_range bv j) -> (((getbv (concat_l bv i)) (j + 1%Z)%Z) = ((getbv bv) j)).

Axiom concat_l_value :
  forall (bv:bitvec) (i:Z) (k:Z), ((0%Z <= i)%Z /\ (i < 2%Z)%Z) ->
  ((k = 0%Z) -> (((getbv (concat_l bv i)) k) = i)) /\
  (~ (k = 0%Z) ->
   (((0%Z < k)%Z /\ (k <= ((length bv) + 1%Z)%Z)%Z) ->
    (((getbv (concat_l bv i)) k) = ((getbv bv) (k - 1%Z)%Z))) /\
   (~ ((0%Z < k)%Z /\ (k <= ((length bv) + 1%Z)%Z)%Z) ->
    (((getbv (concat_l bv i)) k) = 0%Z))).

Axiom concat_l_value_b :
  forall (bv:bitvec) (i:Z) (k:Z),
  ((0%Z <= k)%Z /\ (k < ((length bv) + 1%Z)%Z)%Z) ->
  ((0%Z <= i)%Z /\ (i < 2%Z)%Z) ->
  ((k = 0%Z) -> (((getbv (concat_l bv i)) k) = i)) /\
  (~ (k = 0%Z) -> (((getbv (concat_l bv i)) k) = ((getbv bv) (k - 1%Z)%Z))).

Axiom concat_ht :
  forall (bv:bitvec), ((length bv) >= 1%Z)%Z ->
  (bv = (concat_l (tail bv) (head bv))).

Axiom concat_ht_union :
  forall (bv:bitvec), ((length bv) >= 2%Z)%Z ->
  ~ (bv = (concat_l (tail bv) 0%Z)) -> (bv = (concat_l (tail bv) 1%Z)).

Parameter bv_to_int: bitvec -> Z.

Parameter result8: bitvec -> Z -> Z.

Axiom result_def8 :
  forall (bv:bitvec) (k:Z),
  ((in_range bv k) ->
   (((result8 bv) k) =
    (((getbv bv) k) * (power 2%Z (((length bv) - 1%Z)%Z - k)%Z))%Z)) /\
  (~ (in_range bv k) -> (((result8 bv) k) = 1%Z)).

Axiom bv_to_int_def :
  forall (bv:bitvec),
  ((bv_to_int bv) = (ind_isum (result8 bv) 0%Z (length bv))).

Axiom bv_to_int_spec :
  forall (bv:bitvec),
  ((bv_to_int bv) =
   (ind_isum
    (fun (k:Z) =>
     (((getbv bv) k) * (power 2%Z (((length bv) - 1%Z)%Z - k)%Z))%Z)
    0%Z (length bv))).

Axiom bv_to_int_spec1 : forall (bv:bitvec), (0%Z <= (bv_to_int bv))%Z.

Axiom bv_to_int_eq :
  forall (bv1:bitvec) (bv2:bitvec), (bv1 = bv2) ->
  ((bv_to_int bv1) = (bv_to_int bv2)).

Axiom bv_to_int_sum :
  forall (bv:bitvec),
  ((bv_to_int bv) =
   (ind_isum
    (fun (k:Z) =>
     (((getbv bv) k) * (power 2%Z (((length bv) - 1%Z)%Z - k)%Z))%Z)
    0%Z (length bv))).

Axiom bv_to_int_sum_opp :
  forall (bv:bitvec),
  ((-(bv_to_int bv))%Z =
   (ind_isum
    (fun (k:Z) =>
     ((-((getbv bv) k))%Z * (power 2%Z (((length bv) - 1%Z)%Z - k)%Z))%Z)
    0%Z (length bv))).

Axiom bv_to_int_onebit :
  forall (bv:bitvec), ((length bv) = 1%Z) ->
  ((bv_to_int bv) = ((getbv bv) 0%Z)).

Axiom ind_isum_bv_rev :
  forall (bv:bitvec) (i:Z), ((0%Z <= i)%Z /\ (i <= (length bv))%Z) ->
  ((ind_isum
    (fun (l:Z) =>
     (((getbv bv) l) * (power 2%Z (((length bv) - 1%Z)%Z - l)%Z))%Z)
    i (length bv))
   =
   (ind_isum
    (fun (l:Z) =>
     (((getbv bv) (((length bv) - 1%Z)%Z - l)%Z) * (power 2%Z l))%Z)
    0%Z ((length bv) - i)%Z)).

Axiom ind_isum_bin_rev :
  forall (f:Z -> Z) (n:Z) (i:Z), ((0%Z <= i)%Z /\ (i < n)%Z) -> (binary f) ->
  ((ind_isum (fun (l:Z) => ((f l) * (power 2%Z ((n - 1%Z)%Z - l)%Z))%Z) i n)
   =
   (ind_isum (fun (l:Z) => ((f ((n - 1%Z)%Z - l)%Z) * (power 2%Z l))%Z) 0%Z
    (n - i)%Z)).

Axiom ind_isum_bin_rev_z :
  forall (f:Z -> Z) (n:Z), (0%Z <= n)%Z -> (binary f) ->
  ((ind_isum (fun (l:Z) => ((f l) * (power 2%Z ((n - 1%Z)%Z - l)%Z))%Z) 0%Z
    n)
   =
   (ind_isum (fun (l:Z) => ((f ((n - 1%Z)%Z - l)%Z) * (power 2%Z l))%Z) 0%Z
    n)).

Axiom bv_to_int_sum_rev :
  forall (bv:bitvec),
  ((ind_isum
    (fun (k:Z) =>
     (((getbv bv) (((length bv) - 1%Z)%Z - k)%Z) * (power 2%Z k))%Z)
    0%Z (length bv))
   = (bv_to_int bv)).

Axiom ind_isum_bv_bound_growing :
  forall (bv:bitvec) (i:Z), ((0%Z < i)%Z /\ (i < (length bv))%Z) ->
  ((ind_isum (fun (l:Z) => (((getbv bv) l) * (power 2%Z l))%Z) 0%Z i) <
   (power 2%Z i))%Z.

Axiom ind_isum_bv_bound :
  forall (bv:bitvec) (i:Z), ((0%Z <= i)%Z /\ (i < (length bv))%Z) ->
  ((ind_isum
    (fun (l:Z) =>
     (((getbv bv) l) * (power 2%Z (((length bv) - 1%Z)%Z - l)%Z))%Z)
    i (length bv))
   < (power 2%Z ((length bv) - i)%Z))%Z.

Axiom ind_isum_bin_bound :
  forall (f:Z -> Z) (n:Z) (i:Z), ((0%Z <= i)%Z /\ (i < n)%Z) -> (binary f) ->
  ((ind_isum (fun (l:Z) => ((f l) * (power 2%Z ((n - 1%Z)%Z - l)%Z))%Z) i n)
   < (power 2%Z (n - i)%Z))%Z.

Axiom bv_to_int_bound :
  forall (bv:bitvec), ((length bv) >= 1%Z)%Z ->
  ((bv_to_int bv) < (power 2%Z (length bv)))%Z.

Axiom matrix : forall (a:Type), Type.
Parameter matrix_WhyType :
  forall (a:Type) {a_WT:WhyType a}, WhyType (matrix a).
Existing Instance matrix_WhyType.

Parameter elts: forall {a:Type} {a_WT:WhyType a}, (matrix a) -> Z -> Z -> a.

Parameter rows: forall {a:Type} {a_WT:WhyType a}, (matrix a) -> Z.

Parameter columns: forall {a:Type} {a_WT:WhyType a}, (matrix a) -> Z.

Axiom matrix'invariant :
  forall {a:Type} {a_WT:WhyType a},
  forall (self:matrix a), (0%Z < (rows self))%Z.

Axiom matrix'invariant1 :
  forall {a:Type} {a_WT:WhyType a},
  forall (self:matrix a), (0%Z < (columns self))%Z.

Parameter valid_index:
  forall {a:Type} {a_WT:WhyType a}, (matrix a) -> Z -> Z -> Prop.

Axiom valid_index_def :
  forall {a:Type} {a_WT:WhyType a},
  forall (a1:matrix a) (r:Z) (c:Z), (valid_index a1 r c) -> (0%Z <= r)%Z.

Axiom valid_index_def1 :
  forall {a:Type} {a_WT:WhyType a},
  forall (a1:matrix a) (r:Z) (c:Z), (valid_index a1 r c) -> (r < (rows a1))%Z.

Axiom valid_index_def2 :
  forall {a:Type} {a_WT:WhyType a},
  forall (a1:matrix a) (r:Z) (c:Z), (valid_index a1 r c) -> (0%Z <= c)%Z.

Axiom valid_index_def3 :
  forall {a:Type} {a_WT:WhyType a},
  forall (a1:matrix a) (r:Z) (c:Z), (valid_index a1 r c) ->
  (c < (columns a1))%Z.

Axiom valid_index_def4 :
  forall {a:Type} {a_WT:WhyType a},
  forall (a1:matrix a) (r:Z) (c:Z),
  (((0%Z <= r)%Z /\ (r < (rows a1))%Z) /\
   ((0%Z <= c)%Z /\ (c < (columns a1))%Z)) ->
  valid_index a1 r c.

Parameter equal_size:
  forall {a:Type} {a_WT:WhyType a}, (matrix a) -> (matrix a) -> Prop.

Axiom equal_size_def :
  forall {a:Type} {a_WT:WhyType a},
  forall (a1:matrix a) (b:matrix a), (equal_size a1 b) ->
  ((rows a1) = (rows b)).

Axiom equal_size_def1 :
  forall {a:Type} {a_WT:WhyType a},
  forall (a1:matrix a) (b:matrix a), (equal_size a1 b) ->
  ((columns a1) = (columns b)).

Axiom equal_size_def2 :
  forall {a:Type} {a_WT:WhyType a},
  forall (a1:matrix a) (b:matrix a),
  (((rows a1) = (rows b)) /\ ((columns a1) = (columns b))) -> equal_size a1 b.

Parameter get: forall {a:Type} {a_WT:WhyType a}, (matrix a) -> Z -> Z -> a.

Axiom get_def :
  forall {a:Type} {a_WT:WhyType a},
  forall (a1:matrix a) (r:Z) (c:Z), ((get a1 r c) = (((elts a1) r) c)).

Axiom get_spec :
  forall {a:Type} {a_WT:WhyType a},
  forall (a1:matrix a) (r:Z) (c:Z), ((get a1 r c) = (((elts a1) r) c)).

Axiom elts_eq :
  forall {a:Type} {a_WT:WhyType a},
  forall (a1:matrix a) (b:matrix a), (a1 = b) -> ((elts a1) = (elts b)).

Axiom elts_inst_eq :
  forall {a:Type} {a_WT:WhyType a},
  forall (a1:matrix a) (b:matrix a) (i:Z) (j:Z), (a1 = b) ->
  ((0%Z <= i)%Z /\ (i < (rows a1))%Z) ->
  ((0%Z <= j)%Z /\ (j < (columns a1))%Z) ->
  ((((elts a1) i) j) = (((elts b) i) j)).

Parameter make: forall {a:Type} {a_WT:WhyType a}, Z -> Z -> a -> matrix a.

Axiom make_spec :
  forall {a:Type} {a_WT:WhyType a},
  forall (r:Z) (c:Z) (v:a), ((r > 0%Z)%Z /\ (c > 0%Z)%Z) ->
  ((rows (make r c v)) = r).

Axiom make_spec1 :
  forall {a:Type} {a_WT:WhyType a},
  forall (r:Z) (c:Z) (v:a), ((r > 0%Z)%Z /\ (c > 0%Z)%Z) ->
  ((columns (make r c v)) = c).

Axiom make_spec2 :
  forall {a:Type} {a_WT:WhyType a},
  forall (r:Z) (c:Z) (v:a), ((r > 0%Z)%Z /\ (c > 0%Z)%Z) ->
  forall (i:Z) (j:Z),
  (((0%Z <= i)%Z /\ (i < r)%Z) /\ ((0%Z <= j)%Z /\ (j < c)%Z)) ->
  ((get (make r c v) i j) = v).

Axiom equality :
  forall {a:Type} {a_WT:WhyType a},
  forall (m:matrix a) (n:matrix a), (m = n) -> ((rows m) = (rows n)).

Axiom equality1 :
  forall {a:Type} {a_WT:WhyType a},
  forall (m:matrix a) (n:matrix a), (m = n) -> ((columns m) = (columns n)).

Axiom equality2 :
  forall {a:Type} {a_WT:WhyType a},
  forall (m:matrix a) (n:matrix a), (m = n) -> forall (i:Z) (j:Z),
  (valid_index m i j) -> ((get m i j) = (get n i j)).

Axiom equality3 :
  forall {a:Type} {a_WT:WhyType a},
  forall (m:matrix a) (n:matrix a),
  ((((rows m) = (rows n)) /\ ((columns m) = (columns n))) /\
   forall (i:Z) (j:Z), (valid_index m i j) -> ((get m i j) = (get n i j))) ->
  (m = n).

Axiom make_value :
  forall {a:Type} {a_WT:WhyType a},
  forall (r:Z) (c:Z) (i:Z) (j:Z) (v:a), ((r > 0%Z)%Z /\ (c > 0%Z)%Z) ->
  ((0%Z <= i)%Z /\ (i < r)%Z) -> ((0%Z <= j)%Z /\ (j < c)%Z) ->
  ((get (make r c v) i j) = v).

Parameter mat_indices:
  forall {a:Type} {a_WT:WhyType a}, (matrix a) -> set (Z* Z)%type.

Axiom mat_indices_def :
  forall {a:Type} {a_WT:WhyType a},
  forall (m:matrix a),
  ((mat_indices m) =
   (cartesian_product (to_fset 0%Z (rows m)) (to_fset 0%Z (columns m)))).

Axiom mat_indices_spec :
  forall {a:Type} {a_WT:WhyType a},
  forall (m:matrix a), forall (o:(Z* Z)%type), (mem o (mat_indices m)) ->
  (0%Z <= (fir o))%Z.

Axiom mat_indices_spec1 :
  forall {a:Type} {a_WT:WhyType a},
  forall (m:matrix a), forall (o:(Z* Z)%type), (mem o (mat_indices m)) ->
  ((fir o) < (rows m))%Z.

Axiom mat_indices_spec2 :
  forall {a:Type} {a_WT:WhyType a},
  forall (m:matrix a), forall (o:(Z* Z)%type), (mem o (mat_indices m)) ->
  (0%Z <= (sec o))%Z.

Axiom mat_indices_spec3 :
  forall {a:Type} {a_WT:WhyType a},
  forall (m:matrix a), forall (o:(Z* Z)%type), (mem o (mat_indices m)) ->
  ((sec o) < (columns m))%Z.

Axiom mat_indices_spec4 :
  forall {a:Type} {a_WT:WhyType a},
  forall (m:matrix a), forall (o:(Z* Z)%type),
  ((0%Z <= (fir o))%Z /\ ((fir o) < (rows m))%Z) ->
  ((0%Z <= (sec o))%Z /\ ((sec o) < (columns m))%Z) -> mem o (mat_indices m).

Axiom mat_indices_spec5 :
  forall {a:Type} {a_WT:WhyType a},
  forall (m:matrix a), forall (i:Z) (j:Z), (valid_index m i j) ->
  mem (i, j) (mat_indices m).

Axiom mat_indices_spec6 :
  forall {a:Type} {a_WT:WhyType a},
  forall (m:matrix a), forall (i:Z) (j:Z), (mem (i, j) (mat_indices m)) ->
  valid_index m i j.

Parameter set1:
  forall {a:Type} {a_WT:WhyType a}, (matrix a) -> Z -> Z -> a -> matrix a.

Axiom set_spec :
  forall {a:Type} {a_WT:WhyType a},
  forall (a1:matrix a) (r:Z) (c:Z) (v:a), (valid_index a1 r c) ->
  ((rows (set1 a1 r c v)) = (rows a1)).

Axiom set_spec1 :
  forall {a:Type} {a_WT:WhyType a},
  forall (a1:matrix a) (r:Z) (c:Z) (v:a), (valid_index a1 r c) ->
  ((columns (set1 a1 r c v)) = (columns a1)).

Axiom set_spec2 :
  forall {a:Type} {a_WT:WhyType a},
  forall (a1:matrix a) (r:Z) (c:Z) (v:a), (valid_index a1 r c) ->
  forall (i:Z) (j:Z), (valid_index a1 i j) ->
  (((i = r) /\ (j = c)) -> ((get (set1 a1 r c v) i j) = v)) /\
  (~ ((i = r) /\ (j = c)) -> ((get (set1 a1 r c v) i j) = (get a1 i j))).

Axiom set_spec3 :
  forall {a:Type} {a_WT:WhyType a},
  forall (a1:matrix a) (r:Z) (c:Z) (v:a), (valid_index a1 r c) ->
  ((get (set1 a1 r c v) r c) = v).

Axiom set_spec4 :
  forall {a:Type} {a_WT:WhyType a},
  forall (a1:matrix a) (r:Z) (c:Z) (v:a), (valid_index a1 r c) ->
  forall (i:Z) (j:Z), (valid_index (set1 a1 r c v) i j) -> ~ (i = r) ->
  ((get (set1 a1 r c v) i j) = (get a1 i j)).

Axiom set_spec5 :
  forall {a:Type} {a_WT:WhyType a},
  forall (a1:matrix a) (r:Z) (c:Z) (v:a), (valid_index a1 r c) ->
  forall (i:Z) (j:Z), (valid_index (set1 a1 r c v) i j) -> ~ (j = c) ->
  ((get (set1 a1 r c v) i j) = (get a1 i j)).

Axiom set_valid_index :
  forall {a:Type} {a_WT:WhyType a},
  forall (a1:matrix a) (i:Z) (j:Z), ((0%Z <= i)%Z /\ (i < (rows a1))%Z) ->
  ((0%Z <= j)%Z /\ (j < (columns a1))%Z) -> valid_index a1 i j.

Axiom get_valid_index :
  forall {a:Type} {a_WT:WhyType a},
  forall (a1:matrix a) (r:Z) (c:Z), ((rows a1) = r) -> ((columns a1) = c) ->
  forall (i:Z) (j:Z), (valid_index a1 i j) -> (0%Z <= i)%Z.

Axiom get_valid_index1 :
  forall {a:Type} {a_WT:WhyType a},
  forall (a1:matrix a) (r:Z) (c:Z), ((rows a1) = r) -> ((columns a1) = c) ->
  forall (i:Z) (j:Z), (valid_index a1 i j) -> (i < r)%Z.

Axiom get_valid_index2 :
  forall {a:Type} {a_WT:WhyType a},
  forall (a1:matrix a) (r:Z) (c:Z), ((rows a1) = r) -> ((columns a1) = c) ->
  forall (i:Z) (j:Z), (valid_index a1 i j) -> (0%Z <= j)%Z.

Axiom get_valid_index3 :
  forall {a:Type} {a_WT:WhyType a},
  forall (a1:matrix a) (r:Z) (c:Z), ((rows a1) = r) -> ((columns a1) = c) ->
  forall (i:Z) (j:Z), (valid_index a1 i j) -> (j < c)%Z.

Axiom get_valid_index_params :
  forall {a:Type} {a_WT:WhyType a},
  forall (a1:matrix a) (r:Z) (c:Z) (i:Z) (j:Z), ((rows a1) = r) ->
  ((columns a1) = c) -> (valid_index a1 i j) -> (0%Z <= i)%Z.

Axiom get_valid_index_params1 :
  forall {a:Type} {a_WT:WhyType a},
  forall (a1:matrix a) (r:Z) (c:Z) (i:Z) (j:Z), ((rows a1) = r) ->
  ((columns a1) = c) -> (valid_index a1 i j) -> (i < r)%Z.

Axiom get_valid_index_params2 :
  forall {a:Type} {a_WT:WhyType a},
  forall (a1:matrix a) (r:Z) (c:Z) (i:Z) (j:Z), ((rows a1) = r) ->
  ((columns a1) = c) -> (valid_index a1 i j) -> (0%Z <= j)%Z.

Axiom get_valid_index_params3 :
  forall {a:Type} {a_WT:WhyType a},
  forall (a1:matrix a) (r:Z) (c:Z) (i:Z) (j:Z), ((rows a1) = r) ->
  ((columns a1) = c) -> (valid_index a1 i j) -> (j < c)%Z.

Axiom set_values :
  forall {a:Type} {a_WT:WhyType a},
  forall (a1:matrix a) (r:Z) (c:Z) (v:a), (valid_index a1 r c) ->
  forall (i:Z) (j:Z), (valid_index a1 i j) ->
  (((i = r) /\ (j = c)) -> ((get (set1 a1 r c v) i j) = v)) /\
  (~ ((i = r) /\ (j = c)) -> ((get (set1 a1 r c v) i j) = (get a1 i j))).

Axiom set_rows :
  forall {a:Type} {a_WT:WhyType a},
  forall (a1:matrix a) (r:Z) (c:Z) (v:a), (valid_index a1 r c) ->
  ((rows (set1 a1 r c v)) = (rows a1)).

Axiom set_columns :
  forall {a:Type} {a_WT:WhyType a},
  forall (a1:matrix a) (r:Z) (c:Z) (v:a), (valid_index a1 r c) ->
  ((columns (set1 a1 r c v)) = (columns a1)).

Parameter make_f:
  forall {a:Type} {a_WT:WhyType a}, Z -> Z -> (Z -> Z -> a) -> matrix a.

Axiom make_f_spec :
  forall {a:Type} {a_WT:WhyType a},
  forall (r:Z) (c:Z) (f:Z -> Z -> a), (r > 0%Z)%Z -> (c > 0%Z)%Z ->
  ((rows (make_f r c f)) = r).

Axiom make_f_spec1 :
  forall {a:Type} {a_WT:WhyType a},
  forall (r:Z) (c:Z) (f:Z -> Z -> a), (r > 0%Z)%Z -> (c > 0%Z)%Z ->
  ((columns (make_f r c f)) = c).

Axiom make_f_spec2 :
  forall {a:Type} {a_WT:WhyType a},
  forall (r:Z) (c:Z) (f:Z -> Z -> a), (r > 0%Z)%Z -> (c > 0%Z)%Z ->
  forall (i:Z) (j:Z), ((get (make_f r c f) i j) = ((f i) j)).

Axiom assert_make :
  forall {a:Type} {a_WT:WhyType a},
  forall (r:Z) (c:Z) (f:Z -> Z -> a) (i:Z) (j:Z),
  ((0%Z <= i)%Z /\ (i < r)%Z) -> ((0%Z <= j)%Z /\ (j < c)%Z) ->
  ((get (make_f r c f) i j) = ((f i) j)).

Axiom assert_make_r :
  forall {a:Type} {a_WT:WhyType a},
  forall (r:Z) (c:Z) (f:Z -> Z -> a), (0%Z < r)%Z -> (0%Z < c)%Z ->
  ((rows (make_f r c f)) = r).

Axiom assert_make_c :
  forall {a:Type} {a_WT:WhyType a},
  forall (r:Z) (c:Z) (f:Z -> Z -> a), (0%Z < r)%Z -> (0%Z < c)%Z ->
  ((columns (make_f r c f)) = c).

Parameter to_indexes:
  forall {a:Type} {a_WT:WhyType a}, (matrix a) -> set (Z* Z)%type.

Axiom to_indexes_def :
  forall {a:Type} {a_WT:WhyType a},
  forall (m:matrix a),
  ((to_indexes m) =
   (cartesian_product (to_fset 0%Z (rows m)) (to_fset 0%Z (columns m)))).

Axiom to_indexes_spec :
  forall {a:Type} {a_WT:WhyType a},
  forall (m:matrix a),
  ((cardinal (to_indexes m)) = ((rows m) * (columns m))%Z).

Axiom set_to_indexes_mem :
  forall {a:Type} {a_WT:WhyType a},
  forall (m:matrix a) (i:Z) (j:Z), ((0%Z <= i)%Z /\ (i < (rows m))%Z) ->
  ((0%Z <= j)%Z /\ (j < (columns m))%Z) -> mem (i, j) (to_indexes m).

Axiom get_to_indexes_mem :
  forall {a:Type} {a_WT:WhyType a},
  forall (m:matrix a) (o:(Z* Z)%type), (mem o (to_indexes m)) ->
  (0%Z <= (fir o))%Z.

Axiom get_to_indexes_mem1 :
  forall {a:Type} {a_WT:WhyType a},
  forall (m:matrix a) (o:(Z* Z)%type), (mem o (to_indexes m)) ->
  ((fir o) < (rows m))%Z.

Axiom get_to_indexes_mem2 :
  forall {a:Type} {a_WT:WhyType a},
  forall (m:matrix a) (o:(Z* Z)%type), (mem o (to_indexes m)) ->
  (0%Z <= (sec o))%Z.

Axiom get_to_indexes_mem3 :
  forall {a:Type} {a_WT:WhyType a},
  forall (m:matrix a) (o:(Z* Z)%type), (mem o (to_indexes m)) ->
  ((sec o) < (columns m))%Z.

Parameter equal:
  forall {a:Type} {a_WT:WhyType a}, (matrix a) -> (matrix a) -> Prop.

Axiom equal_def :
  forall {a:Type} {a_WT:WhyType a},
  forall (m:matrix a) (n:matrix a), (equal m n) -> infix_eqeq m n.

Axiom equal_def1 :
  forall {a:Type} {a_WT:WhyType a},
  forall (m:matrix a) (n:matrix a), (infix_eqeq m n) -> equal m n.

Axiom mat_equality :
  forall {a:Type} {a_WT:WhyType a},
  forall (m:matrix a) (n:matrix a), ((rows m) = (rows n)) ->
  ((columns m) = (columns n)) ->
  (forall (i:Z) (j:Z), (valid_index m i j) -> ((get m i j) = (get n i j))) ->
  equal m n.

Parameter square: forall {a:Type} {a_WT:WhyType a}, (matrix a) -> Prop.

Axiom square_def :
  forall {a:Type} {a_WT:WhyType a},
  forall (m:matrix a), (square m) -> ((rows m) = (columns m)).

Axiom square_def1 :
  forall {a:Type} {a_WT:WhyType a},
  forall (m:matrix a), ((rows m) = (columns m)) -> square m.

Axiom equal_sym :
  forall {a:Type} {a_WT:WhyType a},
  forall (m:matrix a) (n:matrix a), (equal m n) -> equal n m.

Axiom equal_sym1 :
  forall {a:Type} {a_WT:WhyType a},
  forall (m:matrix a) (n:matrix a), (equal n m) -> equal m n.

Axiom equal_rex :
  forall {a:Type} {a_WT:WhyType a}, forall (m:matrix a), equal m m.

Axiom equal_trans :
  forall {a:Type} {a_WT:WhyType a},
  forall (m:matrix a) (n:matrix a) (o:matrix a), (equal m n) ->
  (equal n o) -> equal m o.

Axiom set_equal_mat :
  forall {a:Type} {a_WT:WhyType a},
  forall (m:matrix a) (n:matrix a), ((rows m) = (rows n)) ->
  ((columns m) = (columns n)) ->
  (forall (i:Z) (j:Z), (valid_index m i j) -> ((get m i j) = (get n i j))) ->
  (m = n).

Axiom set_equal_mat_make :
  forall {a:Type} {a_WT:WhyType a},
  forall (r:Z) (c:Z) (f:Z -> Z -> a) (g:Z -> Z -> a), (0%Z < r)%Z ->
  (0%Z < c)%Z ->
  (forall (i:Z) (j:Z), ((0%Z <= i)%Z /\ (i < r)%Z) ->
   ((0%Z <= j)%Z /\ (j < c)%Z) -> (((f i) j) = ((g i) j))) ->
  ((make_f r c f) = (make_f r c g)).

Axiom set_equal_mat_make_t :
  forall {a:Type} {a_WT:WhyType a},
  forall (r:Z) (r':Z) (c:Z) (c':Z) (f:Z -> Z -> a) (g:Z -> Z -> a),
  (0%Z < r)%Z -> (0%Z < c)%Z -> (r = r') -> (c = c') ->
  (forall (i:Z) (j:Z), ((0%Z <= i)%Z /\ (i < r)%Z) ->
   ((0%Z <= j)%Z /\ (j < c)%Z) -> (((f i) j) = ((g i) j))) ->
  ((make_f r c f) = (make_f r' c' g)).

Axiom get_equal_mat :
  forall {a:Type} {a_WT:WhyType a},
  forall (m:matrix a) (n:matrix a), (m = n) -> ((rows m) = (rows n)).

Axiom get_equal_mat1 :
  forall {a:Type} {a_WT:WhyType a},
  forall (m:matrix a) (n:matrix a), (m = n) -> ((columns m) = (columns n)).

Axiom get_equal_mat2 :
  forall {a:Type} {a_WT:WhyType a},
  forall (m:matrix a) (n:matrix a), (m = n) -> forall (i:Z) (j:Z),
  (valid_index m i j) -> ((get m i j) = (get n i j)).

Axiom equal_functions :
  forall {a:Type} {a_WT:WhyType a},
  forall (r:Z) (c:Z) (f:Z -> Z -> a) (g:Z -> Z -> a), (0%Z < r)%Z ->
  (0%Z < c)%Z ->
  (forall (i:Z) (j:Z),
   (((0%Z <= i)%Z /\ (i < r)%Z) /\ ((0%Z <= j)%Z /\ (j < c)%Z)) ->
   (((f i) j) = ((g i) j))) ->
  ((make_f r c f) = (make_f r c g)).

Axiom equal_functions_mat :
  forall {a:Type} {a_WT:WhyType a},
  forall (f:Z -> Z -> a) (m:matrix a),
  (forall (i:Z) (j:Z),
   (((0%Z <= i)%Z /\ (i < (rows m))%Z) /\
    ((0%Z <= j)%Z /\ (j < (columns m))%Z)) ->
   (((f i) j) = (get m i j))) ->
  (m = (make_f (rows m) (columns m) f)).

Parameter null_mat: (matrix t) -> Prop.

Axiom null_mat_def :
  forall (a:matrix t), (null_mat a) -> forall (i:Z) (j:Z),
  (valid_index a i j) -> ((get a i j) = tzero).

Axiom null_mat_def1 :
  forall (a:matrix t),
  (forall (i:Z) (j:Z), (valid_index a i j) -> ((get a i j) = tzero)) ->
  null_mat a.

Axiom set_null_mat :
  forall (a:matrix t),
  (forall (i:Z) (j:Z), (valid_index a i j) -> ((get a i j) = tzero)) ->
  null_mat a.

Axiom get_null_mat :
  forall (a:matrix t), (null_mat a) -> forall (i:Z) (j:Z),
  (valid_index a i j) -> ((get a i j) = tzero).

Axiom power_minus_one2 :
  forall (i:Z), (i >= 0%Z)%Z -> ((int.EuclideanDivision.mod1 i 2%Z) = 0%Z) ->
  ((power (-1%Z)%Z i) = 1%Z).

Axiom power_minus_one3 :
  forall (i:Z), (i >= 0%Z)%Z -> ((int.EuclideanDivision.mod1 i 2%Z) = 1%Z) ->
  ((power (-1%Z)%Z i) = (-1%Z)%Z).

Parameter kth_right: Z -> Z -> Z -> (Z -> Z) -> Z.

Axiom kth_right_def :
  forall (i:Z) (k:Z) (h:Z) (f:Z -> Z), (0%Z <= i)%Z -> (1%Z <= k)%Z ->
  (forall (l:Z), (((h - k)%Z <= l)%Z /\ (l < h)%Z) -> (0%Z < (f l))%Z) ->
  ((kth_right i k h f) =
   (int.EuclideanDivision.mod1
    (int.EuclideanDivision.div i (ind_iproduct f ((h - k)%Z + 1%Z)%Z h))
    (f (h - k)%Z))).

Axiom kth_right_spec :
  forall (i:Z) (k:Z) (h:Z) (f:Z -> Z), (0%Z <= i)%Z -> (1%Z <= k)%Z ->
  (forall (l:Z), (((h - k)%Z <= l)%Z /\ (l < h)%Z) -> (0%Z < (f l))%Z) ->
  (0%Z <= (kth_right i k h f))%Z.

Axiom kth_right_spec1 :
  forall (i:Z) (k:Z) (h:Z) (f:Z -> Z), (0%Z <= i)%Z -> (1%Z <= k)%Z ->
  (forall (l:Z), (((h - k)%Z <= l)%Z /\ (l < h)%Z) -> (0%Z < (f l))%Z) ->
  ((kth_right i k h f) < (f (h - k)%Z))%Z.

Axiom kth_right_eq :
  forall (i:Z) (k:Z) (h:Z) (f:Z -> Z) (g:Z -> Z), (0%Z <= i)%Z ->
  (1%Z <= k)%Z ->
  (forall (l:Z), (((h - k)%Z <= l)%Z /\ (l <= h)%Z) -> (0%Z < (f l))%Z) ->
  (forall (l:Z), (((h - k)%Z <= l)%Z /\ (l <= h)%Z) -> ((f l) = (g l))) ->
  ((kth_right i k h f) = (kth_right i k h g)).

Axiom kth_right_trans :
  forall (i:Z) (k:Z) (h:Z) (t1:Z) (f:Z -> Z), (0%Z <= i)%Z -> (1%Z <= k)%Z ->
  (forall (l:Z), (0%Z < (f l))%Z) -> (0%Z <= h)%Z -> (0%Z <= t1)%Z ->
  ((kth_right (int.EuclideanDivision.div i (ind_iproduct f h (h + t1)%Z)) k h
    f)
   = (kth_right i (k + t1)%Z (h + t1)%Z f)).

Parameter kth_left: Z -> Z -> Z -> Z -> (Z -> Z) -> Z.

Axiom kth_left_def :
  forall (i:Z) (k:Z) (l:Z) (h:Z) (f:Z -> Z), (0%Z <= i)%Z -> (0%Z <= l)%Z ->
  ((1%Z <= k)%Z /\ (k <= (h - l)%Z)%Z) ->
  (forall (ind:Z), ((l <= ind)%Z /\ (ind < h)%Z) -> (0%Z < (f ind))%Z) ->
  ((kth_left i k l h f) = (kth_right i (((h - l)%Z - k)%Z + 1%Z)%Z h f)).

Axiom kth_left_spec :
  forall (i:Z) (k:Z) (l:Z) (h:Z) (f:Z -> Z), (0%Z <= i)%Z -> (0%Z <= l)%Z ->
  ((1%Z <= k)%Z /\ (k <= (h - l)%Z)%Z) ->
  (forall (ind:Z), ((l <= ind)%Z /\ (ind < h)%Z) -> (0%Z < (f ind))%Z) ->
  ((kth_left i k l h f) =
   (int.EuclideanDivision.mod1
    (int.EuclideanDivision.div i (ind_iproduct f (l + k)%Z h))
    (f ((l + k)%Z - 1%Z)%Z))).

Axiom kth_left_spec1 :
  forall (i:Z) (k:Z) (l:Z) (h:Z) (f:Z -> Z), (0%Z <= i)%Z -> (0%Z <= l)%Z ->
  ((1%Z <= k)%Z /\ (k <= (h - l)%Z)%Z) ->
  (forall (ind:Z), ((l <= ind)%Z /\ (ind < h)%Z) -> (0%Z < (f ind))%Z) ->
  (0%Z <= (kth_left i k l h f))%Z.

Axiom kth_left_spec2 :
  forall (i:Z) (k:Z) (l:Z) (h:Z) (f:Z -> Z), (0%Z <= i)%Z -> (0%Z <= l)%Z ->
  ((1%Z <= k)%Z /\ (k <= (h - l)%Z)%Z) ->
  (forall (ind:Z), ((l <= ind)%Z /\ (ind < h)%Z) -> (0%Z < (f ind))%Z) ->
  ((kth_left i k l h f) < (f ((l + k)%Z - 1%Z)%Z))%Z.

Axiom kth_left_eq :
  forall (i:Z) (k:Z) (l:Z) (h:Z) (f:Z -> Z) (g:Z -> Z), (0%Z <= i)%Z ->
  ((1%Z <= k)%Z /\ (k <= (h - l)%Z)%Z) -> (0%Z <= l)%Z ->
  (forall (ind:Z), ((l <= ind)%Z /\ (ind < h)%Z) ->
   ((f ind) = (g ind)) /\ ((g ind) > 0%Z)%Z) ->
  ((kth_left i k l h f) = (kth_left i k l h g)).

Axiom kth_left_to_mod_div :
  forall (i:Z) (k:Z) (l:Z) (h:Z) (f:Z -> Z), (0%Z <= i)%Z -> (0%Z <= l)%Z ->
  ((1%Z <= k)%Z /\ (k <= (h - l)%Z)%Z) ->
  (forall (ind:Z), ((l <= ind)%Z /\ (ind <= h)%Z) -> ((f ind) > 0%Z)%Z) ->
  ((kth_left i k l h f) =
   (int.EuclideanDivision.mod1
    (int.EuclideanDivision.div i (ind_iproduct f (l + k)%Z h))
    (f ((l + k)%Z - 1%Z)%Z))).

Axiom kth_left_trans :
  forall (i:Z) (k:Z) (l:Z) (h:Z) (f:Z -> Z), (0%Z <= i)%Z -> (0%Z <= l)%Z ->
  ((1%Z <= k)%Z /\ (k < (h - l)%Z)%Z) ->
  (forall (ind:Z), ((l <= ind)%Z /\ (ind <= h)%Z) -> ((f ind) > 0%Z)%Z) ->
  ((kth_left i k l h f) =
   (kth_left (int.EuclideanDivision.div i (f (h - 1%Z)%Z)) k l (h - 1%Z)%Z f)).

Axiom div_isum_exponents :
  forall (i:Z) (k:Z) (n:Z) (m:Z), (0%Z <= i)%Z -> (0%Z < k)%Z ->
  (0%Z <= n)%Z -> (0%Z <= m)%Z ->
  ((power k (n + m)%Z) = ((power k n) * (power k m))%Z).

Axiom div_isum_exponents1 :
  forall (i:Z) (k:Z) (n:Z) (m:Z), (0%Z <= i)%Z -> (0%Z < k)%Z ->
  (0%Z <= n)%Z -> (0%Z <= m)%Z ->
  ((power k (n + 1%Z)%Z) = ((power k n) * k)%Z).

Axiom div_isum_exponents2 :
  forall (i:Z) (k:Z) (n:Z) (m:Z), (0%Z <= i)%Z -> (0%Z < k)%Z ->
  (0%Z <= n)%Z -> (0%Z <= m)%Z -> ((power k 1%Z) = k).

Axiom div_isum_exponents3 :
  forall (i:Z) (k:Z) (n:Z) (m:Z), (0%Z <= i)%Z -> (0%Z < k)%Z ->
  (0%Z <= n)%Z -> (0%Z <= m)%Z ->
  ((int.EuclideanDivision.div (int.EuclideanDivision.div i (power k n))
    (power k m))
   = (int.EuclideanDivision.div i (power k (n + m)%Z))).

Axiom div_isum_exponents4 :
  forall (i:Z) (k:Z) (n:Z) (m:Z), (0%Z <= i)%Z -> (0%Z < k)%Z ->
  (0%Z <= n)%Z -> (0%Z <= m)%Z ->
  ((int.EuclideanDivision.div (int.EuclideanDivision.div i (power k n)) k) =
   (int.EuclideanDivision.div i (power k (n + 1%Z)%Z))).

Parameter divp: Z -> Z -> Z.

Axiom divp_def :
  forall (i:Z) (j:Z), (0%Z <= i)%Z -> (0%Z < j)%Z ->
  ((divp i j) = ((int.EuclideanDivision.div i j) * j)%Z).

Axiom divp_spec :
  forall (i:Z) (j:Z), (0%Z <= i)%Z -> (0%Z < j)%Z ->
  (i = ((divp i j) + (int.EuclideanDivision.mod1 i j))%Z).

Axiom divp_spec1 :
  forall (i:Z) (j:Z), (0%Z <= i)%Z -> (0%Z < j)%Z -> ((divp i j) <= i)%Z.

Axiom divp_spec2 :
  forall (i:Z) (j:Z), (0%Z <= i)%Z -> (0%Z < j)%Z ->
  (i < (((divp i j) + 1%Z)%Z * j)%Z)%Z.

Axiom divp_spec3 :
  forall (i:Z) (j:Z), (0%Z <= i)%Z -> (0%Z < j)%Z -> (i > j)%Z ->
  ((divp i j) > 0%Z)%Z.

Axiom kth_right_div_mod :
  forall (i:Z) (k:Z) (h:Z) (f:Z -> Z), (0%Z <= i)%Z -> (1%Z <= k)%Z ->
  (forall (k1:Z), (0%Z < (f k1))%Z) ->
  ((kth_right i k h f) =
   (int.EuclideanDivision.div
    (int.EuclideanDivision.mod1 i (ind_iproduct f (h - k)%Z h))
    (ind_iproduct f ((h - k)%Z + 1%Z)%Z h))).

Axiom kth_head :
  forall (i:Z) (h:Z) (f:Z -> Z), (0%Z <= i)%Z -> (1%Z <= h)%Z ->
  (forall (k:Z), (0%Z < (f k))%Z) ->
  ((kth_right i 1%Z h f) = (int.EuclideanDivision.mod1 i (f (h - 1%Z)%Z))).

Parameter weighted_kth_right: Z -> Z -> Z -> (Z -> Z) -> Z.

Axiom weighted_kth_right_def :
  forall (i:Z) (k:Z) (h:Z) (f:Z -> Z), (0%Z <= i)%Z ->
  (forall (k1:Z), (0%Z < (f k1))%Z) -> (1%Z <= k)%Z ->
  ((weighted_kth_right i k h f) =
   ((kth_right i k h f) * (ind_iproduct f ((h - k)%Z + 1%Z)%Z h))%Z).

Axiom weighted_kth_right_ :
  forall (i:Z) (k:Z) (h:Z) (f:Z -> Z), (1%Z <= k)%Z -> (0%Z <= i)%Z ->
  (forall (k1:Z), (0%Z < (f k1))%Z) ->
  ((int.EuclideanDivision.mod1 i (ind_iproduct f (h - k)%Z h)) =
   ((weighted_kth_right i k h f) +
    (int.EuclideanDivision.mod1 i (ind_iproduct f ((h - k)%Z + 1%Z)%Z h)))%Z).

Axiom kth_right_decomposition :
  forall (i:Z) (k:Z) (h:Z) (f:Z -> Z), (0%Z <= i)%Z -> (1%Z <= k)%Z ->
  (forall (k1:Z), (0%Z < (f k1))%Z) ->
  ((int.EuclideanDivision.mod1 i (ind_iproduct f (h - k)%Z h)) =
   (ind_isum (fun (a:Z) => (weighted_kth_right i a h f)) 1%Z (k + 1%Z)%Z)).

Axiom kth_left_div_mod :
  forall (i:Z) (k:Z) (l:Z) (h:Z) (f:Z -> Z), (0%Z <= i)%Z ->
  ((0%Z <= l)%Z /\ (l <= h)%Z) -> ((1%Z <= k)%Z /\ (k <= (h - l)%Z)%Z) ->
  (forall (k1:Z), (0%Z < (f k1))%Z) ->
  ((kth_left i k l h f) =
   (int.EuclideanDivision.div
    (int.EuclideanDivision.mod1 i (ind_iproduct f ((l + k)%Z - 1%Z)%Z h))
    (ind_iproduct f (l + k)%Z h))).

Parameter weighted_kth_left: Z -> Z -> Z -> Z -> (Z -> Z) -> Z.

Axiom weighted_kth_left_def :
  forall (i:Z) (k:Z) (l:Z) (h:Z) (f:Z -> Z), (0%Z <= i)%Z -> (l <= h)%Z ->
  ((1%Z <= k)%Z /\ (k <= (h - l)%Z)%Z) ->
  (forall (k1:Z), (0%Z < (f k1))%Z) ->
  ((weighted_kth_left i k l h f) =
   (weighted_kth_right i (((h - l)%Z - k)%Z + 1%Z)%Z h f)).

Axiom weighted_kth_left_ :
  forall (i:Z) (k:Z) (l:Z) (h:Z) (f:Z -> Z), (0%Z <= i)%Z -> (l <= h)%Z ->
  ((1%Z <= k)%Z /\ (k <= (h - l)%Z)%Z) ->
  (forall (k1:Z), (0%Z < (f k1))%Z) ->
  ((int.EuclideanDivision.mod1 i (ind_iproduct f ((l + k)%Z - 1%Z)%Z h)) =
   ((weighted_kth_left i k l h f) +
    (int.EuclideanDivision.mod1 i (ind_iproduct f (l + k)%Z h)))%Z).

Axiom bounded_kth_left_decomposition :
  forall (i:Z) (k:Z) (l:Z) (h:Z) (f:Z -> Z), (0%Z <= i)%Z -> (l <= h)%Z ->
  ((1%Z <= k)%Z /\ (k <= (h - l)%Z)%Z) ->
  (forall (k1:Z), (0%Z < (f k1))%Z) ->
  ((int.EuclideanDivision.mod1 i (ind_iproduct f ((l + k)%Z - 1%Z)%Z h)) =
   (ind_isum (fun (a:Z) => (weighted_kth_left i a l h f)) k
    ((h - l)%Z + 1%Z)%Z)).

Axiom kth_left_decomposition :
  forall (i:Z) (l:Z) (h:Z) (f:Z -> Z),
  ((0%Z <= i)%Z /\ (i < (ind_iproduct f l h))%Z) -> (l < h)%Z ->
  (forall (k:Z), (0%Z < (f k))%Z) ->
  (i =
   (ind_isum (fun (a:Z) => (weighted_kth_left i a l h f)) 1%Z
    ((h - l)%Z + 1%Z)%Z)).

Parameter kronecker_neutral: matrix t.

Axiom kronecker_neutral_def : (kronecker_neutral = (make 1%Z 1%Z tone)).

Parameter identity: Z -> matrix t.

Parameter result9: Z -> Z -> t.

Axiom result_def9 :
  forall (i:Z) (j:Z),
  ((i = j) -> (((result9 i) j) = tone)) /\
  (~ (i = j) -> (((result9 i) j) = tzero)).

Axiom identity_def :
  forall (n:Z), (0%Z <= n)%Z ->
  ((identity n) = (make_f (power 2%Z n) (power 2%Z n) result9)).

Axiom identity_spec :
  forall (n:Z), (0%Z <= n)%Z -> ((rows (identity n)) = (power 2%Z n)).

Axiom identity_spec1 :
  forall (n:Z), (0%Z <= n)%Z -> ((columns (identity n)) = (power 2%Z n)).

Axiom identity_spec2 :
  forall (n:Z), (0%Z <= n)%Z -> forall (i:Z) (j:Z),
  (valid_index (identity n) i j) ->
  ((i = j) -> ((get (identity n) i j) = tone)) /\
  (~ (i = j) -> ((get (identity n) i j) = tzero)).

Axiom identity_rows :
  forall (n:Z), (0%Z <= n)%Z -> ((rows (identity n)) = (power 2%Z n)).

Axiom identity_columns :
  forall (n:Z), (0%Z <= n)%Z -> ((columns (identity n)) = (power 2%Z n)).

Axiom identity_values :
  forall (i:Z) (j:Z) (n:Z), (0%Z <= n)%Z ->
  ((0%Z <= i)%Z /\ (i < (power 2%Z n))%Z) ->
  ((0%Z <= j)%Z /\ (j < (power 2%Z n))%Z) ->
  ((i = j) -> ((get (identity n) i j) = tone)) /\
  (~ (i = j) -> ((get (identity n) i j) = tzero)).

Parameter kronecker: (matrix t) -> (matrix t) -> matrix t.

Axiom kronecker_def :
  forall (m:matrix t) (n:matrix t),
  ((kronecker m n) =
   (make_f ((rows m) * (rows n))%Z ((columns m) * (columns n))%Z
    (fun (i:Z) (j:Z) =>
     (infix_asdt
      (get m (int.EuclideanDivision.div i (rows n))
       (int.EuclideanDivision.div j (columns n)))
      (get n (int.EuclideanDivision.mod1 i (rows n))
       (int.EuclideanDivision.mod1 j (columns n))))))).

Axiom kronecker_spec :
  forall (m:matrix t) (n:matrix t),
  ((rows (kronecker m n)) = ((rows m) * (rows n))%Z).

Axiom kronecker_spec1 :
  forall (m:matrix t) (n:matrix t),
  ((columns (kronecker m n)) = ((columns m) * (columns n))%Z).

Axiom kronecker_spec2 :
  forall (m:matrix t) (n:matrix t), forall (i:Z) (j:Z),
  (valid_index (kronecker m n) i j) ->
  ((get (kronecker m n) i j) =
   (infix_asdt
    (get m (int.EuclideanDivision.div i (rows n))
     (int.EuclideanDivision.div j (columns n)))
    (get n (int.EuclideanDivision.mod1 i (rows n))
     (int.EuclideanDivision.mod1 j (columns n))))).

Axiom kronecker_eq :
  forall (m1:matrix t) (n1:matrix t) (m2:matrix t) (n2:matrix t),
  (m1 = m2) -> (n1 = n2) -> ((kronecker m1 n1) = (kronecker m2 n2)).

Axiom get_kronecker :
  forall (m:matrix t) (n:matrix t),
  ((kronecker m n) =
   (make_f ((rows m) * (rows n))%Z ((columns m) * (columns n))%Z
    (fun (i:Z) (j:Z) =>
     (infix_asdt
      (get m (int.EuclideanDivision.div i (rows n))
       (int.EuclideanDivision.div j (columns n)))
      (get n (int.EuclideanDivision.mod1 i (rows n))
       (int.EuclideanDivision.mod1 j (columns n))))))).

Axiom kronecker_values :
  forall (m:matrix t) (n:matrix t) (i:Z) (j:Z),
  (valid_index (kronecker m n) i j) ->
  ((get (kronecker m n) i j) =
   (infix_asdt
    (get m (int.EuclideanDivision.div i (rows n))
     (int.EuclideanDivision.div j (columns n)))
    (get n (int.EuclideanDivision.mod1 i (rows n))
     (int.EuclideanDivision.mod1 j (columns n))))).

Axiom kronecker_rows :
  forall (m:matrix t) (n:matrix t),
  ((rows (kronecker m n)) = ((rows m) * (rows n))%Z).

Axiom kronecker_columns :
  forall (m:matrix t) (n:matrix t),
  ((columns (kronecker m n)) = ((columns m) * (columns n))%Z).

Axiom kronecker_values_gen :
  forall (m:matrix t) (n:matrix t), forall (i:Z) (j:Z),
  (valid_index (kronecker m n) i j) ->
  ((get (kronecker m n) i j) =
   (infix_asdt
    (get m (int.EuclideanDivision.div i (rows n))
     (int.EuclideanDivision.div j (columns n)))
    (get n (int.EuclideanDivision.mod1 i (rows n))
     (int.EuclideanDivision.mod1 j (columns n))))).

Axiom kronecker_mod_values :
  forall (m:matrix t) (n:matrix t) (i:Z) (j:Z),
  (valid_index (kronecker m n) i j) ->
  ((get (kronecker m n) i j) =
   (infix_asdt
    (get m
     (int.EuclideanDivision.div
      (int.EuclideanDivision.mod1 i (rows (kronecker m n))) (rows n))
     (int.EuclideanDivision.div
      (int.EuclideanDivision.mod1 j (columns (kronecker m n))) (columns n)))
    (get n
     (int.EuclideanDivision.mod1
      (int.EuclideanDivision.mod1 i (rows (kronecker m n))) (rows n))
     (int.EuclideanDivision.mod1
      (int.EuclideanDivision.mod1 j (columns (kronecker m n))) (columns n))))).

Axiom kronecker_indexes :
  forall (m:matrix t) (n:matrix t) (i:Z) (j:Z) (k:Z) (l:Z),
  (valid_index m i j) -> (valid_index n k l) ->
  valid_index (kronecker m n) ((i * (rows n))%Z + k)%Z
  ((j * (columns n))%Z + l)%Z.

Axiom kronecker_indexes_com :
  forall (m:matrix t) (n:matrix t) (i:Z) (j:Z),
  (valid_index (kronecker m n) i j) ->
  valid_index m (int.EuclideanDivision.div i (rows n))
  (int.EuclideanDivision.div j (columns n)).

Axiom kronecker_indexes_com1 :
  forall (m:matrix t) (n:matrix t) (i:Z) (j:Z),
  (valid_index (kronecker m n) i j) ->
  valid_index n (int.EuclideanDivision.mod1 i (rows n))
  (int.EuclideanDivision.mod1 j (columns n)).

Axiom kronecker_assoc_pre :
  forall (m:matrix t) (n:matrix t) (o:matrix t) (i:Z) (j:Z),
  ((0%Z <= i)%Z /\ (i < (((rows m) * (rows n))%Z * (rows o))%Z)%Z) ->
  ((0%Z <= j)%Z /\ (j < (((columns m) * (columns n))%Z * (columns o))%Z)%Z) ->
  ((get (kronecker (kronecker m n) o) i j) =
   (get (kronecker m (kronecker n o)) i j)).

Axiom kronecker_assoc :
  op_assoc (fun (y0:matrix t) (y1:matrix t) => (kronecker y0 y1)).

Axiom kronecker_assoc_use :
  forall (a:matrix t) (b:matrix t) (c:matrix t),
  ((kronecker a (kronecker b c)) = (kronecker (kronecker a b) c)).

Axiom kronecker_assoc_use_rev :
  forall (a:matrix t) (b:matrix t) (c:matrix t),
  ((kronecker (kronecker a b) c) = (kronecker a (kronecker b c))).

Axiom neutral_ : forall (m:matrix t), ((kronecker m kronecker_neutral) = m).

Axiom neutral_1 : forall (m:matrix t), ((kronecker kronecker_neutral m) = m).

Axiom neutral1 :
  (kronecker_neutral =
   (neutral_elt (fun (y0:matrix t) (y1:matrix t) => (kronecker y0 y1)))).

Axiom neutral2 :
  has_neutral (fun (y0:matrix t) (y1:matrix t) => (kronecker y0 y1)).

Axiom neutral3 :
  iterable (fun (y0:matrix t) (y1:matrix t) => (kronecker y0 y1)).

Axiom kronecker_equal :
  forall (m:matrix t) (ml:matrix t) (n:matrix t) (nl:matrix t),
  (equal m ml) -> (equal n nl) -> equal (kronecker m n) (kronecker ml nl).

Axiom kron_id :
  forall (m:Z) (n:Z), (0%Z <= m)%Z -> (0%Z <= n)%Z ->
  ((kronecker (identity m) (identity n)) = (identity (m + n)%Z)).

Parameter frows: (Z -> matrix t) -> Z -> Z.

Axiom frows_def :
  forall (f:Z -> matrix t) (k:Z), ((frows f k) = (rows (f k))).

Axiom frows_spec : forall (f:Z -> matrix t) (k:Z), ((frows f k) > 0%Z)%Z.

Parameter fcolumns: (Z -> matrix t) -> Z -> Z.

Axiom fcolumns_def :
  forall (f:Z -> matrix t) (k:Z), ((fcolumns f k) = (columns (f k))).

Axiom fcolumns_spec :
  forall (f:Z -> matrix t) (k:Z), ((fcolumns f k) > 0%Z)%Z.

Axiom const_fcol :
  forall (m:matrix t) (k:Z),
  ((fcolumns ((fun (y0:matrix t) (y1:Z) => (const y0 y1)) m) k) =
   (columns m)).

Axiom const_frows :
  forall (m:matrix t) (k:Z),
  ((frows ((fun (y0:matrix t) (y1:Z) => (const y0 y1)) m) k) = (rows m)).

Parameter mat_mult_no_bound: (matrix t) -> (matrix t) -> matrix t.

Axiom mat_mult_no_bound_def :
  forall (m:matrix t) (n:matrix t), ((columns m) = (rows n)) ->
  ((mat_mult_no_bound m n) =
   (make_f (rows m) (columns n)
    (fun (i:Z) (j:Z) =>
     (ind_sum (fun (k:Z) => (infix_asdt (get m i k) (get n k j))) 0%Z
      (columns m))))).

Axiom mat_mult_no_bound_def1 :
  forall (m:matrix t) (n:matrix t), ~ ((columns m) = (rows n)) ->
  ((mat_mult_no_bound m n) = (make_f 1%Z 1%Z (fun (i:Z) (j:Z) => tzero))).

Axiom mat_mult_no_bound_spec :
  forall (m:matrix t) (n:matrix t), ((columns m) = (rows n)) ->
  ((rows (mat_mult_no_bound m n)) = (rows m)).

Axiom mat_mult_no_bound_spec1 :
  forall (m:matrix t) (n:matrix t), ((columns m) = (rows n)) ->
  ((columns (mat_mult_no_bound m n)) = (columns n)).

Axiom mat_mult_no_bound_spec2 :
  forall (m:matrix t) (n:matrix t), ((columns m) = (rows n)) ->
  forall (i:Z) (j:Z), (valid_index (mat_mult_no_bound m n) i j) ->
  ((get (mat_mult_no_bound m n) i j) =
   (ind_sum (fun (k:Z) => (infix_asdt (get m i k) (get n k j))) 0%Z
    (columns m))).

Parameter mat_mult: (matrix t) -> (matrix t) -> matrix t.

Axiom mat_mult_def :
  forall (m:matrix t) (n:matrix t), ((columns m) = (rows n)) ->
  ((mat_mult m n) = (mat_mult_no_bound m n)).

Axiom mat_mult_spec :
  forall (m:matrix t) (n:matrix t), ((columns m) = (rows n)) ->
  ((rows (mat_mult m n)) = (rows m)).

Axiom mat_mult_spec1 :
  forall (m:matrix t) (n:matrix t), ((columns m) = (rows n)) ->
  ((columns (mat_mult m n)) = (columns n)).

Axiom mat_mult_spec2 :
  forall (m:matrix t) (n:matrix t), ((columns m) = (rows n)) ->
  forall (i:Z) (j:Z), (valid_index (mat_mult m n) i j) ->
  ((get (mat_mult m n) i j) =
   (ind_sum (fun (k:Z) => (infix_asdt (get m i k) (get n k j))) 0%Z
    (columns m))).

Axiom correct_mat_mult :
  forall (m:matrix t) (n:matrix t), ((columns m) = (rows n)) ->
  ((mat_mult m n) =
   (make_f (rows m) (columns n)
    (fun (i:Z) (j:Z) =>
     (ind_sum (fun (k:Z) => (infix_asdt (get m i k) (get n k j))) 0%Z
      (columns m))))).

Axiom mat_mult_values :
  forall (m:matrix t) (n:matrix t) (i:Z) (j:Z), ((columns m) = (rows n)) ->
  (valid_index (mat_mult m n) i j) ->
  ((get (mat_mult m n) i j) =
   (ind_sum (fun (k:Z) => (infix_asdt (get m i k) (get n k j))) 0%Z
    (columns m))).

Axiom mat_mult_columns :
  forall (m:matrix t) (n:matrix t), ((columns m) = (rows n)) ->
  ((columns (mat_mult m n)) = (columns n)).

Axiom mat_mult_rows :
  forall (m:matrix t) (n:matrix t), ((columns m) = (rows n)) ->
  ((rows (mat_mult m n)) = (rows m)).

Axiom mat_mult_values_quant :
  forall (m:matrix t) (n:matrix t), ((columns m) = (rows n)) ->
  forall (i:Z) (j:Z), (valid_index (mat_mult m n) i j) ->
  ((get (mat_mult m n) i j) =
   (ind_sum (fun (k:Z) => (infix_asdt (get m i k) (get n k j))) 0%Z
    (columns m))).

Parameter int_mat_prod: (Z -> matrix t) -> Z -> Z -> matrix t.

Axiom int_mat_prod_def :
  forall (f:Z -> matrix t) (i:Z) (j:Z), (i <= j)%Z ->
  (forall (k:Z) (k':Z),
   (((i <= k)%Z /\ (k <= j)%Z) /\ ((i <= k')%Z /\ (k' <= j)%Z)) ->
   ((rows (f k)) = (rows (f k'))) /\ ((rows (f k')) = (columns (f k')))) ->
  ((j - i)%Z = 0%Z) -> ((int_mat_prod f i j) = (f i)).

Axiom int_mat_prod_def1 :
  forall (f:Z -> matrix t) (i:Z) (j:Z), (i <= j)%Z ->
  (forall (k:Z) (k':Z),
   (((i <= k)%Z /\ (k <= j)%Z) /\ ((i <= k')%Z /\ (k' <= j)%Z)) ->
   ((rows (f k)) = (rows (f k'))) /\ ((rows (f k')) = (columns (f k')))) ->
  ~ ((j - i)%Z = 0%Z) ->
  ((int_mat_prod f i j) =
   (mat_mult_no_bound (int_mat_prod f i (j - 1%Z)%Z) (f j))).

Axiom int_mat_prod_spec :
  forall (f:Z -> matrix t) (i:Z) (j:Z), (i <= j)%Z ->
  (forall (k:Z) (k':Z),
   (((i <= k)%Z /\ (k <= j)%Z) /\ ((i <= k')%Z /\ (k' <= j)%Z)) ->
   ((rows (f k)) = (rows (f k'))) /\ ((rows (f k')) = (columns (f k')))) ->
  ((rows (int_mat_prod f i j)) = (rows (f i))).

Axiom int_mat_prod_spec1 :
  forall (f:Z -> matrix t) (i:Z) (j:Z), (i <= j)%Z ->
  (forall (k:Z) (k':Z),
   (((i <= k)%Z /\ (k <= j)%Z) /\ ((i <= k')%Z /\ (k' <= j)%Z)) ->
   ((rows (f k)) = (rows (f k'))) /\ ((rows (f k')) = (columns (f k')))) ->
  ((columns (int_mat_prod f i j)) = (columns (f i))).

Axiom int_mat_prod_spec2 :
  forall (f:Z -> matrix t) (i:Z) (j:Z), (i <= j)%Z ->
  (forall (k:Z) (k':Z),
   (((i <= k)%Z /\ (k <= j)%Z) /\ ((i <= k')%Z /\ (k' <= j)%Z)) ->
   ((rows (f k)) = (rows (f k'))) /\ ((rows (f k')) = (columns (f k')))) ->
  ((columns (int_mat_prod f i j)) = (rows (f i))).

Axiom int_mat_prod_zero :
  forall (f:Z -> matrix t) (i:Z) (j:Z), ((rows (f i)) = (columns (f i))) ->
  (i = j) -> ((int_mat_prod f i j) = (f i)).

Parameter int_mat_prod_plus_one: (Z -> matrix t) -> Z -> Z -> unit.

Axiom int_mat_prod_plus_one_def :
  forall (f:Z -> matrix t) (i:Z) (j:Z), (i < j)%Z ->
  (forall (k:Z) (k':Z),
   (((i <= k)%Z /\ (k <= j)%Z) /\ ((i <= k')%Z /\ (k' <= j)%Z)) ->
   ((rows (f k)) = (rows (f k'))) /\ ((rows (f k')) = (columns (f k')))) ->
  ((int_mat_prod_plus_one f i j) = tt).

Axiom int_mat_prod_plus_one_spec :
  forall (f:Z -> matrix t) (i:Z) (j:Z), (i < j)%Z ->
  (forall (k:Z) (k':Z),
   (((i <= k)%Z /\ (k <= j)%Z) /\ ((i <= k')%Z /\ (k' <= j)%Z)) ->
   ((rows (f k)) = (rows (f k'))) /\ ((rows (f k')) = (columns (f k')))) ->
  ((int_mat_prod f i j) = (mat_mult (int_mat_prod f i (j - 1%Z)%Z) (f j))).

Axiom int_mat_prod_eq :
  forall (f:Z -> matrix t) (g:Z -> matrix t) (i:Z) (j:Z), (i <= j)%Z ->
  (forall (k:Z) (k':Z), ((i <= k)%Z /\ (k <= j)%Z) ->
   ((i <= k')%Z /\ (k' <= j)%Z) ->
   ((rows (f k)) = (rows (f k'))) /\ ((rows (f k')) = (columns (f k')))) ->
  (forall (k:Z), ((i <= k)%Z /\ (k <= j)%Z) -> ((f k) = (g k))) ->
  ((int_mat_prod f i j) = (int_mat_prod g i j)).

Axiom mat_mult_id :
  forall (n:Z) (m:matrix t), (n >= 0%Z)%Z -> ((columns m) = (power 2%Z n)) ->
  ((mat_mult m (identity n)) = m).

Axiom id_mat_mult :
  forall (n:Z) (m:matrix t), (n >= 0%Z)%Z -> ((rows m) = (power 2%Z n)) ->
  ((mat_mult (identity n) m) = m).

Axiom mat_mult_eq :
  forall (m:matrix t) (n:matrix t) (m':matrix t) (n':matrix t), (m = m') ->
  (n = n') -> ((columns m) = (rows n)) -> ((mat_mult m n) = (mat_mult m' n')).

Parameter add_mat: (matrix t) -> (matrix t) -> matrix t.

Axiom add_mat_def :
  forall (m:matrix t) (n:matrix t), ((rows m) = (rows n)) ->
  ((columns m) = (columns n)) ->
  ((add_mat m n) =
   (make_f (rows m) (columns m)
    (fun (i:Z) (j:Z) => (infix_pldt (get m i j) (get n i j))))).

Axiom add_mat_spec :
  forall (m:matrix t) (n:matrix t), ((rows m) = (rows n)) ->
  ((columns m) = (columns n)) -> ((columns (add_mat m n)) = (columns m)).

Axiom add_mat_spec1 : True.

Axiom add_mat_spec2 :
  forall (m:matrix t) (n:matrix t), ((rows m) = (rows n)) ->
  ((columns m) = (columns n)) -> ((rows (add_mat m n)) = (rows m)).

Axiom add_mat_spec3 :
  forall (m:matrix t) (n:matrix t), ((rows m) = (rows n)) ->
  ((columns m) = (columns n)) -> ((rows m) = (rows n)).

Axiom add_mat_spec4 :
  forall (m:matrix t) (n:matrix t), ((rows m) = (rows n)) ->
  ((columns m) = (columns n)) -> forall (i:Z) (j:Z),
  ((get (add_mat m n) i j) = (infix_pldt (get m i j) (get n i j))).

Axiom add_mat_equal :
  forall (m:matrix t) (n:matrix t) (m':matrix t) (n':matrix t),
  ((rows m) = (rows n)) -> ((columns m) = (columns n)) -> (m = m') ->
  (n = n') -> ((add_mat m n) = (add_mat m' n')).

Axiom add_value :
  forall (m:matrix t) (n:matrix t), ((columns m) = (columns n)) ->
  ((rows m) = (rows n)) -> ((columns m) = (columns n)) -> forall (i:Z) (j:Z),
  ((0%Z <= i)%Z /\ (i < (rows m))%Z) ->
  ((0%Z <= j)%Z /\ (j < (columns m))%Z) ->
  ((get (add_mat m n) i j) = (infix_pldt (get m i j) (get n i j))).

Axiom add_values :
  forall (m:matrix t) (n:matrix t) (i:Z) (j:Z),
  ((columns m) = (columns n)) -> ((rows m) = (rows n)) ->
  ((get (add_mat m n) i j) = (infix_pldt (get m i j) (get n i j))).

Axiom add_mat_null_left :
  forall (m:matrix t) (n:matrix t), ((columns m) = (columns n)) ->
  ((rows m) = (rows n)) -> (null_mat m) -> ((add_mat m n) = n).

Axiom add_mat_null_right :
  forall (m:matrix t) (n:matrix t), ((columns m) = (columns n)) ->
  ((rows m) = (rows n)) -> (null_mat n) -> ((add_mat m n) = m).

Axiom set_equal_columns_elt :
  forall (m:matrix t) (n:matrix t) (i:Z),
  (((columns m) = (columns n)) /\ ((columns n) = i)) ->
  ((columns m) = (columns n)).

Axiom set_equal_rows_elt :
  forall (m:matrix t) (n:matrix t) (i:Z),
  (((rows m) = (rows n)) /\ ((rows n) = i)) -> ((rows m) = (rows n)).

Axiom add_columns :
  forall (m:matrix t) (n:matrix t), ((columns m) = (columns n)) ->
  ((rows m) = (rows n)) -> ((columns (add_mat m n)) = (columns m)).

Axiom add_rows :
  forall (m:matrix t) (n:matrix t), ((columns m) = (columns n)) ->
  ((rows m) = (rows n)) -> ((rows (add_mat m n)) = (rows m)).

Axiom set_equal_dim_elt :
  forall (m:matrix t) (n:matrix t) (i:Z) (j:Z),
  (((rows m) = (rows n)) /\ ((rows n) = i)) ->
  (((columns m) = (columns n)) /\ ((columns n) = j)) ->
  ((columns m) = (columns n)).

Axiom set_equal_dim_elt1 :
  forall (m:matrix t) (n:matrix t) (i:Z) (j:Z),
  (((rows m) = (rows n)) /\ ((rows n) = i)) ->
  (((columns m) = (columns n)) /\ ((columns n) = j)) -> ((rows m) = (rows n)).

Axiom set_dim_add :
  forall (m:matrix t) (n:matrix t) (i:Z) (j:Z),
  (((rows m) = (rows n)) /\ ((rows n) = i)) ->
  (((columns m) = (columns n)) /\ ((columns n) = j)) ->
  ((rows (add_mat m n)) = i).

Axiom set_dim_add1 :
  forall (m:matrix t) (n:matrix t) (i:Z) (j:Z),
  (((rows m) = (rows n)) /\ ((rows n) = i)) ->
  (((columns m) = (columns n)) /\ ((columns n) = j)) ->
  ((columns (add_mat m n)) = j).

Axiom add_mat_eq :
  forall (m:matrix t) (m1:matrix t) (n:matrix t) (n1:matrix t),
  ((rows m) = (rows n)) -> ((columns m) = (columns n)) -> (m = m1) ->
  (n = n1) -> ((add_mat m n) = (add_mat m1 n1)).

Axiom add_mat_comm :
  forall (m:matrix t) (n:matrix t), ((rows m) = (rows n)) ->
  ((columns m) = (columns n)) -> ((add_mat m n) = (add_mat n m)).

Parameter add_neutral: unit -> matrix t.

Axiom add_neutral_spec :
  forall (us:unit), forall (i:Z) (j:Z), (valid_index (add_neutral us) i j) ->
  ((get (add_neutral us) i j) = tzero).

Axiom add_neutral_spec1 :
  forall (us:unit), ((rows (add_neutral us)) > 0%Z)%Z.

Axiom add_neutral_spec2 :
  forall (us:unit), ((columns (add_neutral us)) > 0%Z)%Z.

Axiom distr_1_pre :
  forall (m:matrix t) (n:matrix t) (o:matrix t) (i:Z) (j:Z),
  ((rows m) = (rows n)) -> ((columns m) = (columns n)) ->
  ((columns m) = (rows o)) -> ((0%Z <= i)%Z /\ (i < (rows m))%Z) ->
  ((0%Z <= j)%Z /\ (j < (columns o))%Z) ->
  ((get (mat_mult (add_mat m n) o) i j) =
   (get (add_mat (mat_mult m o) (mat_mult n o)) i j)).

Axiom distr_l :
  forall (m:matrix t) (n:matrix t) (o:matrix t), ((rows m) = (rows n)) ->
  ((columns m) = (columns n)) -> ((columns m) = (rows o)) ->
  ((mat_mult (add_mat m n) o) = (add_mat (mat_mult m o) (mat_mult n o))).

Axiom distr_2_pre :
  forall (m:matrix t) (n:matrix t) (o:matrix t) (i:Z) (j:Z),
  ((rows n) = (rows o)) -> ((columns n) = (columns o)) ->
  ((columns m) = (rows n)) -> ((0%Z <= i)%Z /\ (i < (rows m))%Z) ->
  ((0%Z <= j)%Z /\ (j < (columns n))%Z) ->
  valid_index (mat_mult m (add_mat n o)) i j.

Axiom distr_2_pre1 :
  forall (m:matrix t) (n:matrix t) (o:matrix t) (i:Z) (j:Z),
  ((rows n) = (rows o)) -> ((columns n) = (columns o)) ->
  ((columns m) = (rows n)) -> ((0%Z <= i)%Z /\ (i < (rows m))%Z) ->
  ((0%Z <= j)%Z /\ (j < (columns n))%Z) ->
  ((get (mat_mult m (add_mat n o)) i j) =
   (get (add_mat (mat_mult m n) (mat_mult m o)) i j)).

Axiom distr_r :
  forall (m:matrix t) (n:matrix t) (o:matrix t), ((rows n) = (rows o)) ->
  ((columns n) = (columns o)) -> ((columns m) = (rows n)) ->
  ((mat_mult m (add_mat n o)) = (add_mat (mat_mult m n) (mat_mult m o))).

Parameter infix_asdtdt: t -> (matrix t) -> matrix t.

Axiom infix_asdtdt_def :
  forall (s:t) (m:matrix t),
  ((infix_asdtdt s m) =
   (make_f (rows m) (columns m)
    (fun (i:Z) (j:Z) => (infix_asdt s (get m i j))))).

Axiom infix_asdtdt_spec :
  forall (s:t) (m:matrix t), ((columns (infix_asdtdt s m)) = (columns m)).

Axiom infix_asdtdt_spec1 :
  forall (s:t) (m:matrix t), ((rows (infix_asdtdt s m)) = (rows m)).

Axiom infix_asdtdt_spec2 :
  forall (s:t) (m:matrix t), forall (i:Z) (j:Z),
  (valid_index (infix_asdtdt s m) i j) ->
  ((get (infix_asdtdt s m) i j) = (infix_asdt s (get m i j))).

Axiom infix_asdtdt_spec3 :
  forall (s:t) (m:matrix t), forall (i:Z) (j:Z),
  (valid_index (infix_asdtdt s m) i j) -> valid_index m i j.

Axiom infix_asdtdt_spec4 :
  forall (s:t) (m:matrix t), forall (i:Z) (j:Z), (valid_index m i j) ->
  valid_index (infix_asdtdt s m) i j.

Axiom scalar_columns :
  forall (m:matrix t) (a:t), ((columns (infix_asdtdt a m)) = (columns m)).

Axiom scalar_values :
  forall (m:matrix t) (a:t) (i:Z) (j:Z),
  ((get (infix_asdtdt a m) i j) = (infix_asdt a (get m i j))).

Axiom scalar_rows :
  forall (m:matrix t) (a:t), ((rows (infix_asdtdt a m)) = (rows m)).

Axiom scalar_null : forall (m:matrix t), null_mat (infix_asdtdt tzero m).

Axiom scalar_tone : forall (m:matrix t), ((infix_asdtdt tone m) = m).

Axiom scalar_tone_gen :
  forall (m:matrix t) (a:t), (a = tone) -> ((infix_asdtdt a m) = m).

Axiom scalar_null_gen :
  forall (m:matrix t) (a:t), (a = tzero) -> null_mat (infix_asdtdt a m).

Axiom scalar_plus :
  forall (m:matrix t) (a:t) (b:t),
  ((infix_asdtdt (infix_pldt a b) m) =
   (add_mat (infix_asdtdt a m) (infix_asdtdt b m))).

Axiom scalar_plus_rev :
  forall (m:matrix t) (a:t) (b:t),
  ((add_mat (infix_asdtdt a m) (infix_asdtdt b m)) =
   (infix_asdtdt (infix_pldt a b) m)).

Axiom add_scal :
  forall (m:matrix t) (n:matrix t) (a:t), ((rows m) = (rows n)) ->
  ((columns m) = (columns n)) ->
  ((infix_asdtdt a (add_mat m n)) =
   (add_mat (infix_asdtdt a m) (infix_asdtdt a n))).

Axiom add_scal_rev :
  forall (m:matrix t) (n:matrix t) (a:t), ((rows m) = (rows n)) ->
  ((columns m) = (columns n)) ->
  ((add_mat (infix_asdtdt a m) (infix_asdtdt a n)) =
   (infix_asdtdt a (add_mat m n))).

Axiom mat_mult_scal_values_l :
  forall (m:matrix t) (n:matrix t) (a:t) (i:Z) (j:Z),
  ((rows n) = (columns m)) -> ((0%Z <= i)%Z /\ (i < (rows m))%Z) ->
  ((0%Z <= j)%Z /\ (j < (columns n))%Z) ->
  ((infix_asdt a (get (mat_mult m n) i j)) =
   (ind_sum
    (fun (k:Z) => (infix_asdt (infix_asdt a (get m i k)) (get n k j))) 0%Z
    (columns m))).

Axiom mat_mult_scal_values_r :
  forall (m:matrix t) (n:matrix t) (a:t) (i:Z) (j:Z),
  ((rows n) = (columns m)) -> ((rows m) = (columns n)) ->
  ((columns m) = (columns n)) -> ((0%Z <= i)%Z /\ (i < (rows m))%Z) ->
  ((0%Z <= j)%Z /\ (j < (columns n))%Z) ->
  ((infix_asdt (get (mat_mult m n) i j) a) =
   (ind_sum
    (fun (k:Z) => (infix_asdt (infix_asdt a (get m i k)) (get n k j))) 0%Z
    (columns m))).

Axiom mat_mut_scal :
  forall (m:matrix t) (n:matrix t) (a:t), ((rows n) = (columns m)) ->
  ((mat_mult m (infix_asdtdt a n)) = (infix_asdtdt a (mat_mult m n))).

Axiom scal_mat_mut :
  forall (m:matrix t) (n:matrix t) (a:t), ((rows n) = (columns m)) ->
  ((mat_mult (infix_asdtdt a m) n) = (infix_asdtdt a (mat_mult m n))).

Axiom ind_sum_commute_scal_r :
  forall (f:Z -> Z -> t) (g:Z -> t) (i:Z) (j:Z) (k:Z) (l:Z), (i <= j)%Z ->
  (k <= l)%Z ->
  ((ind_sum (fun (k1:Z) => (infix_asdt (ind_sum (f k1) k l) (g k1))) i j) =
   (ind_sum
    (fun (k1:Z) =>
     (ind_sum (fun (k2:Z) => (infix_asdt ((f k2) k1) (g k2))) i j))
    k l)).

Axiom mat_mult_assoc_pre :
  forall (m:matrix t) (n:matrix t) (o:matrix t) (i:Z) (j:Z),
  ((columns m) = (rows n)) -> ((columns n) = (rows o)) ->
  ((0%Z <= i)%Z /\ (i < (rows m))%Z) ->
  ((0%Z <= j)%Z /\ (j < (columns o))%Z) ->
  ((get (mat_mult (mat_mult m n) o) i j) =
   (get (mat_mult m (mat_mult n o)) i j)).

Axiom mat_mult_assoc :
  forall (m:matrix t) (n:matrix t) (o:matrix t), ((columns m) = (rows n)) ->
  ((columns n) = (rows o)) ->
  ((mat_mult (mat_mult m n) o) = (mat_mult m (mat_mult n o))).

Axiom mat_mult_assoc_quant :
  forall (m:matrix t) (n:matrix t), ((columns m) = (rows n)) ->
  forall (o:matrix t), ((columns n) = (rows o)) ->
  ((mat_mult (mat_mult m n) o) = (mat_mult m (mat_mult n o))).

Axiom mat_mult_assoc_comm :
  forall (m:matrix t) (n:matrix t) (o:matrix t), ((columns m) = (rows n)) ->
  ((columns n) = (rows o)) ->
  ((mat_mult m (mat_mult n o)) = (mat_mult (mat_mult m n) o)).

Axiom scalar_eq :
  forall (m:matrix t) (n:matrix t) (a:t), (m = n) ->
  ((infix_asdtdt a m) = (infix_asdtdt a n)).

Axiom scalar_eq_gen :
  forall (m:matrix t) (n:matrix t) (a:t) (b:t), (m = n) -> (a = b) ->
  ((infix_asdtdt a m) = (infix_asdtdt b n)).

Axiom scalar_add :
  forall (m:matrix t) (a:t) (b:t),
  ((infix_asdtdt (infix_pldt a b) m) =
   (add_mat (infix_asdtdt a m) (infix_asdtdt b m))).

Axiom scalar_assoc :
  forall (m:matrix t) (a:t) (b:t),
  ((infix_asdtdt a (infix_asdtdt b m)) = (infix_asdtdt (infix_asdt a b) m)).

Axiom scalar_assoc_rev :
  forall (m:matrix t) (a:t) (b:t),
  ((infix_asdtdt (infix_asdt a b) m) = (infix_asdtdt a (infix_asdtdt b m))).

Axiom scalars_inv :
  forall (m:matrix t) (a:t) (b:t) (a':t) (b':t), (a = a') -> (b = b') ->
  ((infix_asdtdt a' (infix_asdtdt b' m)) =
   (infix_asdtdt b (infix_asdtdt a m))).

Axiom eq_scalar :
  forall (m:matrix t) (a:t) (b:t),
  (exists i:Z, exists j:Z, (valid_index m i j) /\ ~ ((get m i j) = tzero)) ->
  ((infix_asdtdt a m) = (infix_asdtdt b m)) -> (a = b).

Parameter mat_substr: (matrix t) -> (matrix t) -> matrix t.

Axiom mat_substr_def :
  forall (m:matrix t) (n:matrix t), ((rows m) = (rows n)) ->
  ((columns m) = (columns n)) ->
  ((mat_substr m n) = (add_mat m (infix_asdtdt (prefix_mndt tone) n))).

Axiom mat_substr_spec :
  forall (m:matrix t) (n:matrix t), ((rows m) = (rows n)) ->
  ((columns m) = (columns n)) -> ((rows (mat_substr m n)) = (rows m)).

Axiom mat_substr_spec1 :
  forall (m:matrix t) (n:matrix t), ((rows m) = (rows n)) ->
  ((columns m) = (columns n)) -> ((columns (mat_substr m n)) = (columns m)).

Axiom mat_substr_spec2 :
  forall (m:matrix t) (n:matrix t), ((rows m) = (rows n)) ->
  ((columns m) = (columns n)) -> forall (i:Z) (j:Z),
  ((0%Z <= i)%Z /\ (i < (rows m))%Z) ->
  ((0%Z <= j)%Z /\ (j < (columns m))%Z) ->
  ((get (mat_substr m n) i j) = (infix_mndt (get m i j) (get n i j))).

Axiom substr_rows :
  forall (m:matrix t) (n:matrix t) (r:Z),
  (((rows m) = (rows n)) /\ ((rows n) = r)) -> ((columns m) = (columns n)) ->
  ((rows (mat_substr m n)) = r).

Axiom substr_columns :
  forall (m:matrix t) (n:matrix t) (c:Z), ((rows m) = (rows n)) ->
  (((columns m) = (columns n)) /\ ((columns n) = c)) ->
  ((columns (mat_substr m n)) = c).

Axiom substr_value :
  forall (m:matrix t) (n:matrix t) (i:Z) (j:Z), ((rows m) = (rows n)) ->
  ((columns m) = (columns n)) -> ((0%Z <= i)%Z /\ (i < (rows m))%Z) ->
  ((0%Z <= j)%Z /\ (j < (columns m))%Z) ->
  ((get (mat_substr m n) i j) = (infix_mndt (get m i j) (get n i j))).

Axiom distr_l_substr :
  forall (m:matrix t) (n:matrix t) (o:matrix t), ((rows m) = (rows n)) ->
  ((columns m) = (columns n)) -> ((columns m) = (rows o)) ->
  ((mat_mult (mat_substr m n) o) =
   (mat_substr (mat_mult m o) (mat_mult n o))).

Axiom distr_r_substr :
  forall (m:matrix t) (n:matrix t) (o:matrix t), ((rows n) = (rows o)) ->
  ((columns n) = (columns o)) -> ((columns m) = (rows o)) ->
  ((mat_mult m (mat_substr n o)) =
   (mat_substr (mat_mult m n) (mat_mult m o))).

Axiom mat_substr_eq :
  forall (m:matrix t) (m':matrix t) (n:matrix t) (n':matrix t),
  ((rows m) = (rows n)) -> ((columns m) = (columns n)) -> (m = m') ->
  (n = n') -> ((mat_substr m n) = (mat_substr m' n')).

Axiom substr_decomp :
  forall (m:matrix t) (n:matrix t), ((rows m) = (rows n)) ->
  ((columns m) = (columns n)) -> (m = (add_mat n (mat_substr m n))).

Axiom subtr_scal :
  forall (m:matrix t) (n:matrix t) (a:t), ((rows m) = (rows n)) ->
  ((columns m) = (columns n)) ->
  ((infix_asdtdt a (mat_substr m n)) =
   (mat_substr (infix_asdtdt a m) (infix_asdtdt a n))).

Axiom subtr_scal_rev :
  forall (m:matrix t) (n:matrix t) (a:t), ((rows m) = (rows n)) ->
  ((columns m) = (columns n)) ->
  ((mat_substr (infix_asdtdt a m) (infix_asdtdt a n)) =
   (infix_asdtdt a (mat_substr m n))).

Axiom get_equal_mat_to_substr :
  forall (m:matrix t) (n:matrix t), ((rows m) = (rows n)) ->
  ((columns m) = (columns n)) -> (m = n) ->
  ((mat_substr m n) = (make (rows m) (columns m) tzero)).

Axiom set_inequal_mat_by_substr :
  forall (m:matrix t) (n:matrix t), ((rows m) = (rows n)) ->
  ((columns m) = (columns n)) -> ~ (m = n) ->
  ~ ((mat_substr m n) = (make (rows m) (columns m) tzero)).

Axiom set_inequal_mat_by_substr1 :
  forall (m:matrix t) (n:matrix t), ((rows m) = (rows n)) ->
  ((columns m) = (columns n)) ->
  ~ ((mat_substr m n) = (make (rows m) (columns m) tzero)) -> ~ (m = n).

Parameter constant_size:
  forall {a:Type} {a_WT:WhyType a}, (set a) -> (a -> matrix t) -> Prop.

Axiom constant_size_def :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (f:a -> matrix t), (constant_size s f) -> forall (e:a),
  (mem e s) -> ((rows (f e)) = (rows (f (choose s)))).

Axiom constant_size_def1 :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (f:a -> matrix t), (constant_size s f) -> forall (e:a),
  (mem e s) -> ((columns (f e)) = (columns (f (choose s)))).

Axiom constant_size_def2 :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (f:a -> matrix t),
  (forall (e:a), (mem e s) ->
   ((rows (f e)) = (rows (f (choose s)))) /\
   ((columns (f e)) = (columns (f (choose s))))) ->
  constant_size s f.

Axiom set_constant_size :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (f:a -> matrix t),
  (forall (e:a) (e':a), (mem e s) -> (mem e' s) ->
   ((rows (f e)) = (rows (f e')))) ->
  (forall (e:a) (e':a), (mem e s) -> (mem e' s) ->
   ((columns (f e)) = (columns (f e')))) ->
  constant_size s f.

Axiom set_constant_size_exists :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (f:a -> matrix t),
  (exists r:Z, forall (e:a), (mem e s) -> ((rows (f e)) = r)) ->
  (exists c:Z, forall (e:a), (mem e s) -> ((columns (f e)) = c)) ->
  constant_size s f.

Axiom set_constant_size_t :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (f:a -> matrix t) (r:Z) (c:Z),
  (forall (e:a), (mem e s) -> ((rows (f e)) = r)) ->
  (forall (e:a), (mem e s) -> ((columns (f e)) = c)) -> constant_size s f.

Parameter fc5:
  forall {a:Type} {a_WT:WhyType a}, (a -> matrix t) -> (a -> bool) ->
  (matrix t) -> a -> matrix t.

Axiom fc_def5 :
  forall {a:Type} {a_WT:WhyType a},
  forall (f:a -> matrix t) (p:a -> bool) (m:matrix t) (j:a),
  (((p j) = true) -> (((fc5 f p m) j) = (f j))) /\
  (~ ((p j) = true) -> (((fc5 f p m) j) = m)).

Axiom guarded_set_constant_size :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (f:a -> matrix t) (p:a -> bool) (m:matrix t),
  (constant_size s f) -> (forall (e:a), (mem e s) -> ((p e) = true)) ->
  constant_size s (fc5 f p m).

Axiom set_constant_size_set :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (f:a -> t) (m:matrix t) (i:Z) (j:Z),
  (valid_index m i j) -> constant_size s (fun (e:a) => (set1 m i j (f e))).

Axiom get_constant_size :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (f:a -> matrix t), (constant_size s f) ->
  forall (e:a) (e':a), (mem e s) -> (mem e' s) ->
  ((rows (f e)) = (rows (f e'))).

Axiom get_constant_size1 :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (f:a -> matrix t), (constant_size s f) ->
  forall (e:a) (e':a), (mem e s) -> (mem e' s) ->
  ((columns (f e)) = (columns (f e'))).

Parameter s_rows:
  forall {a:Type} {a_WT:WhyType a}, (set a) -> (a -> matrix t) -> Z.

Axiom s_rows_def :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (f:a -> matrix t), (constant_size s f) ->
  ((s_rows s f) = (rows (f (choose s)))).

Axiom s_rows_spec :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (f:a -> matrix t), (constant_size s f) ->
  (0%Z < (s_rows s f))%Z.

Axiom s_rows_spec1 :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (f:a -> matrix t), (constant_size s f) -> forall (e:a),
  (mem e s) -> ((rows (f e)) = (s_rows s f)).

Axiom s_rows_spec2 :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (f:a -> matrix t), (constant_size s f) ->
  forall (e:a) (e':a), (mem e s) -> (mem e' s) ->
  ((rows (f e)) = (rows (f e'))).

Parameter s_columns:
  forall {a:Type} {a_WT:WhyType a}, (set a) -> (a -> matrix t) -> Z.

Axiom s_columns_def :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (f:a -> matrix t), (constant_size s f) ->
  ((s_columns s f) = (columns (f (choose s)))).

Axiom s_columns_spec :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (f:a -> matrix t), (constant_size s f) ->
  (0%Z < (s_columns s f))%Z.

Axiom s_columns_spec1 :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (f:a -> matrix t), (constant_size s f) -> forall (e:a),
  (mem e s) -> ((columns (f e)) = (s_columns s f)).

Axiom s_columns_spec2 :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (f:a -> matrix t), (constant_size s f) ->
  forall (e:a) (e':a), (mem e s) -> (mem e' s) ->
  ((columns (f e)) = (columns (f e'))).

Axiom set_s_rows :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (f:a -> matrix t) (r:Z), (constant_size s f) ->
  ((rows (f (choose s))) = r) -> ((s_rows s f) = r).

Axiom set_s_rows_elt :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (f:a -> matrix t) (elt:a), (constant_size s f) ->
  (mem elt s) -> ((s_rows s f) = (rows (f elt))).

Axiom set_s_columns :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (f:a -> matrix t) (r:Z), (constant_size s f) ->
  ((columns (f (choose s))) = r) -> ((s_columns s f) = r).

Axiom set_s_columns_elt :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (f:a -> matrix t) (elt:a), (constant_size s f) ->
  (mem elt s) -> ((s_columns s f) = (columns (f elt))).

Axiom s_rows_eq :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (f:a -> matrix t) (g:a -> matrix t),
  (constant_size s f) -> ((cardinal s) > 0%Z)%Z ->
  (forall (e:a), (mem e s) -> ((f e) = (g e))) ->
  ((s_rows s f) = (s_rows s g)).

Axiom set_constant_size_give :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (f:a -> matrix t) (r:Z) (c:Z), ((cardinal s) > 0%Z)%Z ->
  (forall (e:a), (mem e s) -> ((rows (f e)) = r)) ->
  (forall (e:a), (mem e s) -> ((columns (f e)) = c)) -> constant_size s f.

Axiom set_constant_size_give1 :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (f:a -> matrix t) (r:Z) (c:Z), ((cardinal s) > 0%Z)%Z ->
  (forall (e:a), (mem e s) -> ((rows (f e)) = r)) ->
  (forall (e:a), (mem e s) -> ((columns (f e)) = c)) -> forall (e:a),
  (mem e s) -> ((rows (f e)) = r).

Axiom set_constant_size_give2 : True.

Axiom set_constant_size_give3 :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (f:a -> matrix t) (r:Z) (c:Z), ((cardinal s) > 0%Z)%Z ->
  (forall (e:a), (mem e s) -> ((rows (f e)) = r)) ->
  (forall (e:a), (mem e s) -> ((columns (f e)) = c)) -> ((s_rows s f) = r).

Axiom set_constant_size_give4 :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (f:a -> matrix t) (r:Z) (c:Z), ((cardinal s) > 0%Z)%Z ->
  (forall (e:a), (mem e s) -> ((rows (f e)) = r)) ->
  (forall (e:a), (mem e s) -> ((columns (f e)) = c)) -> ((s_columns s f) = c).

Axiom s_columns_eq :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (f:a -> matrix t) (g:a -> matrix t),
  (constant_size s f) -> ((cardinal s) > 0%Z)%Z ->
  (forall (e:a), (mem e s) -> ((f e) = (g e))) ->
  ((s_columns s f) = (s_columns s g)).

Axiom subset_constant_size :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (s':set a) (f:a -> matrix t), (constant_size s f) ->
  ~ (is_empty s') -> (subset s' s) -> constant_size s' f.

Axiom subset_constant_size1 :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (s':set a) (f:a -> matrix t), (constant_size s f) ->
  ~ (is_empty s') -> (subset s' s) -> ((s_rows s' f) = (s_rows s f)).

Axiom subset_constant_size2 :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (s':set a) (f:a -> matrix t), (constant_size s f) ->
  ~ (is_empty s') -> (subset s' s) -> ((s_columns s' f) = (s_columns s f)).

Axiom set_s_rows_rem :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (f:a -> matrix t), ((cardinal s) > 1%Z)%Z ->
  (constant_size s f) -> constant_size (remove (choose s) s) f.

Axiom set_s_rows_rem1 :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (f:a -> matrix t), ((cardinal s) > 1%Z)%Z ->
  (constant_size s f) ->
  ((s_rows (remove (choose s) s) f) = (rows (f (choose s)))).

Axiom set_s_columns_rem :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (f:a -> matrix t), ((cardinal s) > 1%Z)%Z ->
  (constant_size s f) -> constant_size (remove (choose s) s) f.

Axiom set_s_columns_rem1 :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (f:a -> matrix t), ((cardinal s) > 1%Z)%Z ->
  (constant_size s f) ->
  ((s_columns (remove (choose s) s) f) = (columns (f (choose s)))).

Axiom set_s_rows_add :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (f:a -> matrix t) (x:a), ((cardinal s) > 0%Z)%Z ->
  (constant_size s f) -> ((columns (f x)) = (s_columns s f)) ->
  ((rows (f x)) = (s_rows s f)) -> ((s_rows (add x s) f) = (s_rows s f)).

Axiom set_s_columns_add :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (f:a -> matrix t) (x:a), ((cardinal s) > 0%Z)%Z ->
  (constant_size s f) -> ((columns (f x)) = (s_columns s f)) ->
  ((rows (f x)) = (s_rows s f)) ->
  ((s_columns (add x s) f) = (s_columns s f)).

Axiom set_s_rows_columns_add :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (f:a -> matrix t) (x:a), ((cardinal s) > 0%Z)%Z ->
  (constant_size s f) -> ((columns (f x)) = (s_columns s f)) ->
  ((rows (f x)) = (s_rows s f)) ->
  ((s_columns (add x s) f) = (s_columns s f)).

Axiom set_s_rows_columns_add1 :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (f:a -> matrix t) (x:a), ((cardinal s) > 0%Z)%Z ->
  (constant_size s f) -> ((columns (f x)) = (s_columns s f)) ->
  ((rows (f x)) = (s_rows s f)) -> ((s_rows (add x s) f) = (s_rows s f)).

Parameter mat_sum:
  forall {a:Type} {a_WT:WhyType a}, (set a) -> (a -> matrix t) -> matrix t.

Axiom mat_sum_def :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (f:a -> matrix t), (constant_size s f) ->
  ((cardinal s) > 0%Z)%Z -> ((cardinal s) = 1%Z) ->
  ((mat_sum s f) = (f (element s))).

Axiom mat_sum_def1 :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (f:a -> matrix t), (constant_size s f) ->
  ((cardinal s) > 0%Z)%Z -> ~ ((cardinal s) = 1%Z) ->
  ((mat_sum s f) =
   (add_mat (f (choose s)) (mat_sum (remove (choose s) s) f))).

Axiom mat_sum_spec :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (f:a -> matrix t), (constant_size s f) ->
  ((cardinal s) > 0%Z)%Z -> ((rows (mat_sum s f)) = (s_rows s f)).

Axiom mat_sum_spec1 :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (f:a -> matrix t), (constant_size s f) ->
  ((cardinal s) > 0%Z)%Z -> ((columns (mat_sum s f)) = (s_columns s f)).

Axiom mat_sum_spec2 :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (f:a -> matrix t), (constant_size s f) ->
  ((cardinal s) > 0%Z)%Z -> forall (e:a), (mem e s) ->
  ((rows (f e)) = (s_rows s f)).

Axiom mat_sum_spec3 :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (f:a -> matrix t), (constant_size s f) ->
  ((cardinal s) > 0%Z)%Z -> forall (e:a), (mem e s) ->
  ((columns (f e)) = (s_columns s f)).

Axiom columns_mat_sum :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (f:a -> matrix t) (n:Z), ~ ((cardinal s) = 0%Z) ->
  (constant_size s f) ->
  (forall (e:a), (mem e s) -> ((columns (f e)) = n)) ->
  ((columns (mat_sum s f)) = n).

Axiom rows_mat_sum :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (f:a -> matrix t) (n:Z), ~ ((cardinal s) = 0%Z) ->
  (constant_size s f) -> (forall (e:a), (mem e s) -> ((rows (f e)) = n)) ->
  ((rows (mat_sum s f)) = n).

Axiom mat_sum_cardone :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (f:a -> matrix t), ((cardinal s) = 1%Z) ->
  ((mat_sum s f) = (f (element s))).

Axiom mat_sum_to_sum_pre :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (f:a -> matrix t) (i:Z) (j:Z), (constant_size s f) ->
  ((cardinal s) > 0%Z)%Z -> ((0%Z <= i)%Z /\ (i < (s_rows s f))%Z) ->
  ((0%Z <= j)%Z /\ (j < (s_columns s f))%Z) ->
  ((get (mat_sum s f) i j) = (sum s (fun (e:a) => (get (f e) i j)))).

Axiom mat_sum_to_sum :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (f:a -> matrix t), (constant_size s f) ->
  ((cardinal s) > 0%Z)%Z ->
  ((mat_sum s f) =
   (make_f (s_rows s f) (s_columns s f)
    (fun (i:Z) (j:Z) => (sum s (fun (e:a) => (get (f e) i j)))))).

Axiom mat_sum_value :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (f:a -> matrix t), (constant_size s f) ->
  ((cardinal s) > 0%Z)%Z ->
  ((mat_sum s f) =
   (make_f (s_rows s f) (s_columns s f)
    (fun (i:Z) (j:Z) => (sum s (fun (e:a) => (get (f e) i j)))))).

Axiom mat_sum_add :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (f:a -> matrix t) (x:a), ((cardinal s) > 0%Z)%Z ->
  (constant_size s f) -> ((rows (f x)) = (s_rows s f)) ->
  ((columns (f x)) = (s_columns s f)) -> ~ (mem x s) ->
  ((mat_sum (add x s) f) = (add_mat (f x) (mat_sum s f))).

Axiom mat_sum_plus_one :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (f:a -> matrix t), ((cardinal s) > 1%Z)%Z ->
  (constant_size s f) ->
  ((mat_sum s f) =
   (add_mat (f (choose s)) (mat_sum (remove (choose s) s) f))).

Axiom mat_sum_comp_pre :
  forall {b:Type} {b_WT:WhyType b},
  forall (s:set b) (f:b -> matrix t) (g:b -> matrix t) (i:Z) (j:Z),
  (constant_size s f) -> (constant_size s g) ->
  ((0%Z <= i)%Z /\ (i < (s_rows s f))%Z) ->
  ((0%Z <= j)%Z /\ (j < (s_columns s f))%Z) ->
  ((s_rows s f) = (s_rows s g)) -> ((s_columns s f) = (s_columns s g)) ->
  ((cardinal s) > 0%Z)%Z ->
  ((get (mat_sum s (fun (k:b) => (add_mat (f k) (g k)))) i j) =
   (get (add_mat (mat_sum s f) (mat_sum s g)) i j)).

Axiom mat_sum_comp :
  forall {b:Type} {b_WT:WhyType b},
  forall (s:set b) (f:b -> matrix t) (g:b -> matrix t),
  (constant_size s f) -> (constant_size s g) ->
  ((s_rows s f) = (s_rows s g)) -> ((s_columns s f) = (s_columns s g)) ->
  ((cardinal s) > 0%Z)%Z ->
  ((mat_sum s (fun (k:b) => (add_mat (f k) (g k)))) =
   (add_mat (mat_sum s f) (mat_sum s g))).

Axiom mat_sum_comp_rec :
  forall {b:Type} {b_WT:WhyType b},
  forall (s:set b) (f:b -> matrix t) (g:b -> matrix t),
  (constant_size s f) -> (constant_size s g) ->
  ((s_rows s f) = (s_rows s g)) -> ((s_columns s f) = (s_columns s g)) ->
  ((cardinal s) > 0%Z)%Z ->
  ((add_mat (mat_sum s f) (mat_sum s g)) =
   (mat_sum s (fun (k:b) => (add_mat (f k) (g k))))).

Axiom mat_sum_to_sum_fun :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (s:set a) (s':set b) (f:a -> b -> matrix t) (r:Z) (c:Z) (i:Z) (j:Z),
  ((cardinal s) > 0%Z)%Z -> ((cardinal s') > 0%Z)%Z ->
  (forall (e:a), forall (e1:b), (mem e s) -> (mem e1 s') ->
   ((rows ((f e) e1)) = r)) ->
  (forall (e:a), forall (e1:b), (mem e s) -> (mem e1 s') ->
   ((columns ((f e) e1)) = c)) ->
  ((0%Z <= i)%Z /\ (i < r)%Z) -> ((0%Z <= j)%Z /\ (j < c)%Z) ->
  ((sum s (fun (e:a) => (get (mat_sum s' (f e)) i j))) =
   (sum s (fun (e:a) => (sum s' (fun (e1:b) => (get ((f e) e1) i j)))))).

Axiom mat_sum_to_sum_double_pre :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (s:set a) (s':set b) (f:a -> b -> matrix t) (r:Z) (c:Z) (i:Z) (j:Z),
  (forall (e:a) (e':b), (mem e s) -> (mem e' s') -> ((rows ((f e) e')) = r)) ->
  (forall (e:a) (e':b), (mem e s) -> (mem e' s') ->
   ((columns ((f e) e')) = c)) ->
  ((0%Z <= i)%Z /\ (i < r)%Z) -> ((0%Z <= j)%Z /\ (j < c)%Z) ->
  ((cardinal s) > 0%Z)%Z -> ((cardinal s') > 0%Z)%Z ->
  ((get (mat_sum s (fun (e:a) => (mat_sum s' (f e)))) i j) =
   (sum s (fun (e:a) => (sum s' (fun (e':b) => (get ((f e) e') i j)))))).

Axiom mat_mult_sum_out_l :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (f:a -> matrix t) (n:matrix t), ((cardinal s) > 0%Z)%Z ->
  (forall (e:a), (mem e s) -> ((columns (f e)) = (rows n))) ->
  (exists r:Z, forall (e:a), (mem e s) -> ((rows (f e)) = r)) ->
  ((mat_mult (mat_sum s f) n) =
   (mat_sum s (fun (e:a) => (mat_mult (f e) n)))).

Parameter mat_sum_dim:
  forall {a:Type} {a_WT:WhyType a}, (set a) -> (a -> matrix t) -> Z ->
  Z -> matrix t.

Axiom mat_sum_dim_def :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (f:a -> matrix t) (r:Z) (c:Z), (0%Z < r)%Z ->
  (0%Z < c)%Z -> (forall (e:a), (mem e s) -> ((rows (f e)) = r)) ->
  (forall (e:a), (mem e s) -> ((columns (f e)) = c)) ->
  ((cardinal s) = 0%Z) -> ((mat_sum_dim s f r c) = (make r c tzero)).

Axiom mat_sum_dim_def1 :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (f:a -> matrix t) (r:Z) (c:Z), (0%Z < r)%Z ->
  (0%Z < c)%Z -> (forall (e:a), (mem e s) -> ((rows (f e)) = r)) ->
  (forall (e:a), (mem e s) -> ((columns (f e)) = c)) ->
  ~ ((cardinal s) = 0%Z) -> ((mat_sum_dim s f r c) = (mat_sum s f)).

Axiom mat_sum_dim_spec :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (f:a -> matrix t) (r:Z) (c:Z), (0%Z < r)%Z ->
  (0%Z < c)%Z -> (forall (e:a), (mem e s) -> ((rows (f e)) = r)) ->
  (forall (e:a), (mem e s) -> ((columns (f e)) = c)) ->
  ((cardinal s) > 0%Z)%Z -> ((mat_sum_dim s f r c) = (mat_sum s f)).

Axiom mat_sum_dim_spec1 :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (f:a -> matrix t) (r:Z) (c:Z), (0%Z < r)%Z ->
  (0%Z < c)%Z -> (forall (e:a), (mem e s) -> ((rows (f e)) = r)) ->
  (forall (e:a), (mem e s) -> ((columns (f e)) = c)) ->
  ((cardinal s) = 0%Z) -> ((mat_sum_dim s f r c) = (make r c tzero)).

Axiom mat_sum_dim_spec2 :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (f:a -> matrix t) (r:Z) (c:Z), (0%Z < r)%Z ->
  (0%Z < c)%Z -> (forall (e:a), (mem e s) -> ((rows (f e)) = r)) ->
  (forall (e:a), (mem e s) -> ((columns (f e)) = c)) ->
  ((rows (mat_sum_dim s f r c)) = r).

Axiom mat_sum_dim_spec3 :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (f:a -> matrix t) (r:Z) (c:Z), (0%Z < r)%Z ->
  (0%Z < c)%Z -> (forall (e:a), (mem e s) -> ((rows (f e)) = r)) ->
  (forall (e:a), (mem e s) -> ((columns (f e)) = c)) ->
  ((columns (mat_sum_dim s f r c)) = c).

Axiom mat_sum_dim_to_mat_sum :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (f:a -> matrix t) (r:Z) (c:Z), ((cardinal s) > 0%Z)%Z ->
  (0%Z < r)%Z -> (0%Z < c)%Z ->
  (forall (e:a), (mem e s) -> ((rows (f e)) = r)) ->
  (forall (e:a), (mem e s) -> ((columns (f e)) = c)) ->
  ((mat_sum_dim s f r c) = (mat_sum s f)).

Axiom mat_sum_dim_to_make_zero :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (f:a -> matrix t) (r:Z) (c:Z), ((cardinal s) = 0%Z) ->
  (forall (e:a), (mem e s) -> ((rows (f e)) = r)) ->
  (forall (e:a), (mem e s) -> ((columns (f e)) = c)) -> (0%Z < r)%Z ->
  (0%Z < c)%Z -> ((mat_sum_dim s f r c) = (make r c tzero)).

Axiom mat_sum_dim_add :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (f:a -> matrix t) (x:a) (r:Z) (c:Z),
  ((cardinal s) >= 0%Z)%Z -> ~ (mem x s) ->
  (forall (e:a), (mem e (add x s)) -> ((rows (f e)) = r)) ->
  (forall (e:a), (mem e (add x s)) -> ((columns (f e)) = c)) ->
  (0%Z < r)%Z -> (0%Z < c)%Z ->
  ((mat_sum_dim (add x s) f r c) = (add_mat (f x) (mat_sum_dim s f r c))).

Axiom mat_sum_scalar :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (f:a -> matrix t) (a1:t), (constant_size s f) ->
  ((cardinal s) > 0%Z)%Z ->
  ((mat_sum s (fun (k:a) => (infix_asdtdt a1 (f k)))) =
   (infix_asdtdt a1 (mat_sum s f))).

Axiom mat_sum_scalar_rev :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (f:a -> matrix t) (a1:t), (constant_size s f) ->
  ((cardinal s) > 0%Z)%Z ->
  ((infix_asdtdt a1 (mat_sum s f)) =
   (mat_sum s (fun (k:a) => (infix_asdtdt a1 (f k))))).

Axiom real : forall (x:t), (real_ x) -> (x = (r_to_t (real_part x))).

Axiom pure_im :
  forall (x:t), (pure_im_ x) -> (x = (infix_asdt im (r_to_t (im_part x)))).

Axiom im_dec : ((real_part im) = 0%R).

Axiom im_dec1 : ((im_part im) = 1%R).

Axiom tone_dec : ((real_part tone) = 1%R).

Axiom tone_dec1 : ((im_part tone) = 0%R).

Axiom tzero_dec : ((real_part tzero) = 0%R).

Axiom tzero_dec1 : ((im_part tzero) = 0%R).

Axiom ttwo_dec : ((real_part ttwo) = 2%R).

Axiom ttwo_dec1 : ((im_part ttwo) = 0%R).

Parameter i_to_t: Z -> t.

Axiom i_to_t_def : forall (i:Z), ((i_to_t i) = (r_to_t (from_int i))).

Axiom i_to_t_spec : forall (i:Z), real_ (i_to_t i).

Axiom i_to_t_zero : ((i_to_t 0%Z) = tzero).

Axiom i_to_t_surj :
  forall (i:Z) (j:Z), ~ (i = j) -> ~ ((i_to_t i) = (i_to_t j)).

Axiom i_to_t_eq : forall (i:Z) (j:Z), (i = j) -> ((i_to_t i) = (i_to_t j)).

Axiom i_to_t_inf :
  forall (i:Z) (j:Z), (i < j)%Z -> infix_lsdt (i_to_t i) (i_to_t j).

Axiom i_to_t_nzero : forall (i:Z), ~ (i = 0%Z) -> ~ ((i_to_t i) = tzero).

Axiom i_to_t_one : ((i_to_t 1%Z) = tone).

Axiom i_to_t_add :
  forall (i:Z) (j:Z),
  ((infix_pldt (i_to_t i) (i_to_t j)) = (i_to_t (i + j)%Z)).

Axiom i_to_t_add_rev :
  forall (i:Z) (j:Z),
  ((i_to_t (i + j)%Z) = (infix_pldt (i_to_t i) (i_to_t j))).

Axiom i_to_t_ttwo : ((i_to_t 2%Z) = ttwo).

Axiom i_to_t_pos :
  forall (a:Z), (0%Z <= a)%Z -> infix_lseqdt tzero (i_to_t a).

Axiom i_to_t_minus :
  forall (a:Z), ((i_to_t (-a)%Z) = (prefix_mndt (i_to_t a))).

Axiom i_to_t_strict_pos :
  forall (a:Z), (0%Z < a)%Z -> infix_lsdt tzero (i_to_t a).

Axiom i_to_t_mult_pos :
  forall (i:Z) (j:Z), (0%Z <= j)%Z ->
  ((infix_asdt (i_to_t i) (i_to_t j)) = (i_to_t (i * j)%Z)).

Axiom i_to_t_mult :
  forall (i:Z) (j:Z),
  ((infix_asdt (i_to_t i) (i_to_t j)) = (i_to_t (i * j)%Z)).

Axiom i_to_t_mult_rev :
  forall (i:Z) (j:Z),
  ((i_to_t (i * j)%Z) = (infix_asdt (i_to_t i) (i_to_t j))).

Axiom i_to_t_mult_assoc :
  forall (x:t) (i:Z) (j:Z),
  ((infix_asdt x (i_to_t (i * j)%Z)) =
   (infix_asdt (infix_asdt x (i_to_t i)) (i_to_t j))).

Axiom i_to_t_mult_assoc_rev :
  forall (x:t) (i:Z) (j:Z),
  ((infix_asdt (infix_asdt x (i_to_t i)) (i_to_t j)) =
   (infix_asdt x (i_to_t (i * j)%Z))).

Axiom i_to_t_sub :
  forall (i:Z) (j:Z),
  ((infix_mndt (i_to_t i) (i_to_t j)) = (i_to_t (i - j)%Z)).

Axiom i_to_t_opp :
  forall (i:Z), ((i_to_t (-i)%Z) = (prefix_mndt (i_to_t i))).

Axiom i_to_t_div :
  forall (i:Z) (j:Z), ~ (j = 0%Z) ->
  ((infix_sldt (i_to_t (i * j)%Z) (i_to_t j)) = (i_to_t i)).

Axiom i_to_t_minus_mult :
  forall (i:Z) (j:Z),
  ((infix_asdt (i_to_t (-i)%Z) (i_to_t j)) =
   (infix_asdt (i_to_t i) (i_to_t (-j)%Z))).

Axiom i_to_t_div_leq_tone :
  forall (a:Z) (b:Z), ((0%Z <= a)%Z /\ (a < b)%Z) ->
  infix_lseqdt (infix_sldt (i_to_t a) (i_to_t b)) tone.

Axiom compat_i_to_t_infeq :
  forall (a:Z) (b:Z), (a <= b)%Z -> infix_lseqdt (i_to_t a) (i_to_t b).

Axiom compat_i_to_t_inf :
  forall (a:Z) (b:Z), (a < b)%Z -> infix_lsdt (i_to_t a) (i_to_t b).

Axiom compat_i_to_t_supeq :
  forall (a:Z) (b:Z), (a >= b)%Z -> infix_gteqdt (i_to_t a) (i_to_t b).

Axiom compat_i_to_t_sup :
  forall (a:Z) (b:Z), (a > b)%Z -> infix_gtdt (i_to_t a) (i_to_t b).

Axiom positive_int_squrt :
  forall (i:Z), (i > 0%Z)%Z -> infix_gtdt (square_rt (i_to_t i)) tzero.

Axiom non_null_int_squrt :
  forall (i:Z), (i > 0%Z)%Z -> ~ ((square_rt (i_to_t i)) = tzero).

Axiom ind_sum_constant :
  forall (f:Z -> t) (valu:t) (i:Z) (j:Z), (i <= j)%Z ->
  (forall (k:Z), ((i <= k)%Z /\ (k < j)%Z) -> ((f k) = valu)) ->
  ((ind_sum f i j) = (infix_asdt valu (i_to_t (j - i)%Z))).

Axiom ind_sum_constant_from_z :
  forall (f:Z -> t) (valu:t) (j:Z), (0%Z <= j)%Z ->
  (forall (k:Z), ((0%Z <= k)%Z /\ (k < j)%Z) -> ((f k) = valu)) ->
  ((ind_sum f 0%Z j) = (infix_asdt valu (i_to_t j))).

Axiom sum_constant :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (t1:a -> t) (x:t),
  (forall (e:a), (mem e s) -> ((t1 e) = x)) ->
  ((sum s t1) = (infix_asdt (i_to_t (cardinal s)) x)).

Axiom ind_sum_constant_case :
  forall (n:Z) (t1:Z -> t) (p:Z -> bool) (x:t) (y:t) (k1:Z), (0%Z <= n)%Z ->
  ((cardinal (my_filter (to_fset 0%Z n) p)) = k1) ->
  (forall (e:Z), ((0%Z <= e)%Z /\ (e < n)%Z) -> ((p e) = true) ->
   ((t1 e) = x)) ->
  (forall (e:Z), ((0%Z <= e)%Z /\ (e < n)%Z) -> ~ ((p e) = true) ->
   ((t1 e) = y)) ->
  ((ind_sum t1 0%Z n) =
   (infix_pldt (infix_asdt (i_to_t k1) x) (infix_asdt (i_to_t (n - k1)%Z) y))).

Axiom sum_const_one :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (t1:a -> t),
  (forall (e:a), (mem e s) -> ((t1 e) = tone)) ->
  ((sum s t1) = (i_to_t (cardinal s))).

Axiom mat_sum_const :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (x:matrix t), ((cardinal s) > 0%Z)%Z ->
  ((mat_sum s (fun (us:a) => x)) = (infix_asdtdt (i_to_t (cardinal s)) x)).

Axiom mat_sum_quot :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (x:matrix t), ((cardinal s) > 0%Z)%Z ->
  (x =
   (infix_asdtdt (infix_sldt tone (i_to_t (cardinal s)))
    (mat_sum s (fun (us:a) => x)))).

Axiom mat_sum_scalar_right :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (f:a -> matrix t) (m:matrix t) (i:Z) (j:Z),
  (constant_size s f) -> ((cardinal s) > 0%Z)%Z ->
  ((0%Z <= i)%Z /\ (i < (s_rows s f))%Z) ->
  ((0%Z <= j)%Z /\ (j < (s_columns s f))%Z) ->
  ((infix_asdtdt (get (mat_sum s f) i j) m) =
   (mat_sum s (fun (k:a) => (infix_asdtdt (get (f k) i j) m)))).

Axiom mat_sum_eq :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (f:a -> matrix t) (g:a -> matrix t),
  ((cardinal s) > 0%Z)%Z -> (constant_size s f) ->
  (forall (a1:a), (mem a1 s) -> ((f a1) = (g a1))) ->
  ((mat_sum s f) = (mat_sum s g)).

Axiom mat_sum_eq_gen :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (s':set a) (f:a -> matrix t) (g:a -> matrix t),
  ((cardinal s) > 0%Z)%Z -> (s = s') -> (constant_size s f) ->
  (forall (a1:a), (mem a1 s) -> ((f a1) = (g a1))) ->
  ((mat_sum s f) = (mat_sum s' g)).

Axiom mat_sum_eq_gen_int :
  forall (i1:Z) (i2:Z) (o1:Z) (o2:Z) (f:Z -> matrix t) (g:Z -> matrix t),
  (i1 < o1)%Z -> (i1 = o1) -> (i2 = o2) ->
  (constant_size (to_fset i1 o1) f) ->
  (forall (a:Z), (mem a (to_fset i1 o1)) -> ((f a) = (g a))) ->
  ((mat_sum (to_fset i1 o1) f) = (mat_sum (to_fset i2 o2) g)).

Axiom mat_sum_comp_eq :
  forall {b:Type} {b_WT:WhyType b},
  forall (s:set b) (f:b -> matrix t) (g:b -> matrix t) (h:b -> matrix t),
  (constant_size s f) -> (constant_size s g) -> (constant_size s h) ->
  (((s_rows s f) = (s_rows s g)) /\ ((s_rows s g) = (s_rows s h))) ->
  (((s_columns s f) = (s_columns s g)) /\
   ((s_columns s g) = (s_columns s h))) ->
  ((cardinal s) > 0%Z)%Z ->
  (forall (e:b), forall (i:Z) (j:Z), (mem e s) ->
   ((0%Z <= i)%Z /\ (i < (s_rows s f))%Z) ->
   ((0%Z <= j)%Z /\ (j < (s_columns s f))%Z) ->
   ((infix_pldt (get (f e) i j) (get (g e) i j)) = (get (h e) i j))) ->
  ((add_mat (mat_sum s f) (mat_sum s g)) = (mat_sum s h)).

Axiom mat_sum_dim_eq :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (f:a -> matrix t) (g:a -> matrix t) (r:Z) (c:Z),
  (0%Z < r)%Z -> (0%Z < c)%Z ->
  (forall (e:a), (mem e s) -> ((rows (f e)) = r)) ->
  (forall (e:a), (mem e s) -> ((columns (f e)) = c)) ->
  (forall (e:a), (mem e s) -> ((f e) = (g e))) ->
  ((mat_sum_dim s f r c) = (mat_sum_dim s g r c)).

Axiom constant_size_map :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:b -> matrix t) (s:set a) (t1:a -> b),
  (constant_size s (fun (a1:a) => (f (t1 a1)))) -> constant_size (map t1 s) f.

Axiom map_mat_sum :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:b -> matrix t) (s:set a) (t1:a -> b), ((cardinal s) > 0%Z)%Z ->
  (constant_size s (fun (a1:a) => (f (t1 a1)))) -> (p_injective t1 s) ->
  ((mat_sum (map t1 s) f) = (mat_sum s (fun (a1:a) => (f (t1 a1))))).

Axiom map_mat_sum_rec :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:b -> matrix t) (s:set a) (t1:a -> b), ((cardinal s) > 0%Z)%Z ->
  (constant_size s (fun (a1:a) => (f (t1 a1)))) -> (p_injective t1 s) ->
  ((mat_sum s (fun (a1:a) => (f (t1 a1)))) = (mat_sum (map t1 s) f)).

Axiom mat_sum_id :
  forall {a:Type} {a_WT:WhyType a},
  forall (f:a -> matrix t) (s:set a), ((cardinal s) > 0%Z)%Z ->
  (constant_size s f) ->
  (constant_size (map f s) (fun (y0:matrix t) => (p_id y0))) ->
  (p_injective f s) ->
  ((mat_sum (map f s) (fun (y0:matrix t) => (p_id y0))) = (mat_sum s f)).

Parameter nonn_mat_subset:
  forall {a:Type} {a_WT:WhyType a}, (a -> matrix t) -> (set a) -> set a.

Parameter result10:
  forall {a:Type} {a_WT:WhyType a}, (a -> matrix t) -> (set a) -> a -> bool.

Axiom result_def10 :
  forall {a:Type} {a_WT:WhyType a},
  forall (f:a -> matrix t) (s:set a) (e:a),
  (((result10 f s) e) = true) <->
  ~ (equal (f e) (make (s_rows s f) (s_columns s f) tzero)).

Axiom nonn_mat_subset_def :
  forall {a:Type} {a_WT:WhyType a},
  forall (f:a -> matrix t) (s:set a), (constant_size s f) ->
  ((nonn_mat_subset f s) = (filter (result10 f s) s)).

Axiom nonn_mat_subset_spec :
  forall {a:Type} {a_WT:WhyType a},
  forall (f:a -> matrix t) (s:set a), (constant_size s f) ->
  subset (nonn_mat_subset f s) s.

Axiom nonn_mat_subset_spec1 :
  forall {a:Type} {a_WT:WhyType a},
  forall (f:a -> matrix t) (s:set a), (constant_size s f) -> forall (e:a),
  (mem e (nonn_mat_subset f s)) -> mem e s.

Axiom nonn_mat_subset_spec2 :
  forall {a:Type} {a_WT:WhyType a},
  forall (f:a -> matrix t) (s:set a), (constant_size s f) ->
  constant_size (nonn_mat_subset f s) f.

Axiom nonn_mat_subset_spec3 :
  forall {a:Type} {a_WT:WhyType a},
  forall (f:a -> matrix t) (s:set a), (constant_size s f) ->
  ~ ((nonn_mat_subset f s) = (empty : set a)) ->
  ((s_rows (nonn_mat_subset f s) f) = (s_rows s f)).

Axiom nonn_mat_subset_spec4 :
  forall {a:Type} {a_WT:WhyType a},
  forall (f:a -> matrix t) (s:set a), (constant_size s f) ->
  ~ ((nonn_mat_subset f s) = (empty : set a)) ->
  ((s_columns (nonn_mat_subset f s) f) = (s_columns s f)).

Axiom mat_subset_elt :
  forall {a:Type} {a_WT:WhyType a},
  forall (f:a -> matrix t) (s:set a), (constant_size s f) -> forall (e:a),
  (mem e (nonn_mat_subset f s)) -> mem e s.

Axiom mat_subset_nonn_elt :
  forall {a:Type} {a_WT:WhyType a},
  forall (f:a -> matrix t) (s:set a), (constant_size s f) -> forall (e:a),
  (mem e (nonn_mat_subset f s)) ->
  ~ ((f e) = (make (s_rows s f) (s_columns s f) tzero)).

Axiom nonn_mat_sum_cardzero :
  forall {a:Type} {a_WT:WhyType a},
  forall (f:a -> matrix t) (s:set a) (r:Z) (c:Z), ((cardinal s) = 0%Z) ->
  (r > 0%Z)%Z -> (c > 0%Z)%Z ->
  ((mat_sum_dim s f r c) = (mat_sum_dim (nonn_mat_subset f s) f r c)).

Axiom nonn_mat_sum_cardone :
  forall {a:Type} {a_WT:WhyType a},
  forall (f:a -> matrix t) (s:set a) (r:Z) (c:Z), ((cardinal s) = 1%Z) ->
  (r > 0%Z)%Z -> (c > 0%Z)%Z -> ((rows (f (choose s))) = r) ->
  ((columns (f (choose s))) = c) ->
  ((mat_sum_dim s f r c) = (mat_sum_dim (nonn_mat_subset f s) f r c)).

Axiom mat_sum_null_but_maybe_one_elt :
  forall {a:Type} {a_WT:WhyType a},
  forall (f:a -> matrix t) (s:set a) (e:a), ((cardinal s) > 1%Z)%Z ->
  (constant_size s f) -> (mem e s) ->
  (forall (e':a), (mem e' s) -> ~ (e = e') -> null_mat (f e')) ->
  ((mat_sum s f) = (f e)).

Axiom nonn_mat_sum_plus_one :
  forall {a:Type} {a_WT:WhyType a},
  forall (f:a -> matrix t) (s:set a) (r:Z) (c:Z), ((cardinal s) > 1%Z)%Z ->
  (r > 0%Z)%Z -> (c > 0%Z)%Z ->
  (forall (e:a), (mem e s) -> ((rows (f e)) = r)) ->
  (forall (e:a), (mem e s) -> ((columns (f e)) = c)) ->
  ((mat_sum_dim (remove (choose s) s) f r c) =
   (mat_sum_dim (nonn_mat_subset f (remove (choose s) s)) f r c)) ->
  ((mat_sum_dim s f r c) = (mat_sum_dim (nonn_mat_subset f s) f r c)).

Axiom nonn_mat_sum :
  forall {a:Type} {a_WT:WhyType a},
  forall (f:a -> matrix t) (s:set a) (r:Z) (c:Z), (r > 0%Z)%Z ->
  (c > 0%Z)%Z -> (forall (e:a), (mem e s) -> ((rows (f e)) = r)) ->
  (forall (e:a), (mem e s) -> ((columns (f e)) = c)) ->
  ((mat_sum_dim s f r c) = (mat_sum_dim (nonn_mat_subset f s) f r c)).

Axiom mat_sum_map_map :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b}
    {c:Type} {c_WT:WhyType c},
  forall (s1:set a) (s2:set b) (t1:a -> c) (t2:b -> c) (f:c -> matrix t),
  ((cardinal s1) > 0%Z)%Z -> (p_injective t1 s1) ->
  (constant_size s1 (fun (a1:a) => (f (t1 a1)))) ->
  ((cardinal s2) > 0%Z)%Z -> (p_injective t2 s2) ->
  (constant_size s2 (fun (a1:b) => (f (t2 a1)))) ->
  ((map t1 s1) = (map t2 s2)) ->
  ((mat_sum (map t1 s1) f) = (mat_sum (map t2 s2) f)).

Axiom mat_sum_disjoint_transitivity :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (s1:set a) (s2:set a) (f:a -> matrix t),
  (constant_size s f) -> ((inter s1 s2) = (empty : set a)) ->
  ((union s1 s2) = s) -> ((cardinal s1) > 0%Z)%Z ->
  ((cardinal s2) > 0%Z)%Z ->
  ((add_mat (mat_sum s1 f) (mat_sum s2 f)) = (mat_sum s f)).

Axiom mat_sum_null :
  forall {a:Type} {a_WT:WhyType a},
  forall (f:a -> matrix t) (s:set a), ((cardinal s) > 1%Z)%Z ->
  (constant_size s f) ->
  (forall (e:a), (mem e s) -> forall (i:Z) (j:Z), (valid_index (f e) i j) ->
   ((get (f e) i j) = tzero)) ->
  forall (i:Z) (j:Z), (valid_index (mat_sum s f) i j) ->
  ((get (mat_sum s f) i j) = tzero).

Axiom mat_sum_null_b :
  forall {a:Type} {a_WT:WhyType a},
  forall (f:a -> matrix t) (s:set a) (r:Z) (c:Z), ((cardinal s) > 1%Z)%Z ->
  (forall (e:a), (mem e s) -> ((rows (f e)) = r)) ->
  (forall (e:a), (mem e s) -> ((columns (f e)) = c)) ->
  (forall (e:a), (mem e s) -> forall (i:Z) (j:Z), (valid_index (f e) i j) ->
   ((get (f e) i j) = tzero)) ->
  forall (i:Z) (j:Z), ((0%Z <= i)%Z /\ (i < r)%Z) ->
  ((0%Z <= j)%Z /\ (j < c)%Z) -> ((get (mat_sum s f) i j) = tzero).

Axiom map_add_mat_sum_t :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (s:set a) (s':set b) (f:b -> matrix t) (injz:a -> b) (injo:a -> b),
  (constant_size s' f) -> ((cardinal s) > 0%Z)%Z ->
  ((inter (map injz s) (map injo s)) = (empty : set b)) ->
  ((union (map injz s) (map injo s)) = s') -> (p_injective injo s) ->
  (p_injective injz s) ->
  ((mat_sum s (fun (e:a) => (add_mat (f (injz e)) (f (injo e))))) =
   (mat_sum s' f)).

Axiom map_add_mat_sum :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (s1:set a) (s2:set a) (s':set a) (f:a -> matrix t)
    (g:a -> matrix t) (h:a -> matrix t),
  (constant_size s' h) -> (constant_size s f) -> (constant_size s g) ->
  (((s_rows s' h) = (s_rows s f)) /\ ((s_rows s f) = (s_rows s g))) ->
  (((s_columns s' h) = (s_columns s f)) /\
   ((s_columns s f) = (s_columns s g))) ->
  ((cardinal s) > 0%Z)%Z -> (p_injective f s) -> (p_injective g s) ->
  (p_injective h s') -> ((map f s) = (map h s1)) ->
  ((map g s) = (map h s2)) -> ((inter s1 s2) = (empty : set a)) ->
  ((union s1 s2) = s') ->
  ((mat_sum s (fun (e:a) => (add_mat (f e) (g e)))) =
   (mat_sum s' (fun (e:a) => (h e)))).

Parameter inv_func:
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b}, (a -> b) ->
  (set a) -> (set b) -> b -> a.

Axiom inv_func_def :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:a -> b) (s:set a) (s':set b) (e':b), (p_bijective f s s') ->
  (mem e' s') ->
  ((inv_func f s s' e') =
   (element (my_filter s (fun (e:a) => (indic_bool (f e) e'))))).

Axiom inv_func_spec :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:a -> b) (s:set a) (s':set b) (e':b), (p_bijective f s s') ->
  (mem e' s') -> mem (inv_func f s s' e') s.

Axiom inv_func_spec1 :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:a -> b) (s:set a) (s':set b) (e':b), (p_bijective f s s') ->
  (mem e' s') -> ((f (inv_func f s s' e')) = e').

Axiom inv_rec :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:a -> b) (s:set a) (s':set b) (e:a), (p_bijective f s s') ->
  (mem e s) -> ((inv_func f s s' (f e)) = e).

Parameter inv_:
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b}, (a -> b) ->
  (set a) -> (set b) -> b -> a.

Axiom inv__def :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:a -> b) (s:set a) (s':set b) (e:b), (p_bijective f s s') ->
  (mem e s') -> ((inv_ f s s' e) = (inv_func f s s' e)).

Axiom inv__spec :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:a -> b) (s:set a) (s':set b) (e:b), (p_bijective f s s') ->
  (mem e s') -> mem (inv_ f s s' e) s.

Axiom inv__spec1 :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:a -> b) (s:set a) (s':set b) (e:b), (p_bijective f s s') ->
  (mem e s') -> ((f (inv_ f s s' e)) = e).

Axiom inv_bijective :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:a -> b) (s:set a) (s':set b), (p_bijective f s s') ->
  p_bijective
  ((((fun (y0:a -> b) (y1:set a) (y2:set b) (y3:b) => (inv_ y0 y1 y2 y3)) f)
    s)
   s')
  s' s.

Axiom set_bijective_inv :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:a -> b) (g:b -> a) (s:set a) (b1:b), (mem b1 (map f s)) ->
  (forall (e:a) (e':a), (mem e s) -> (mem e' s) -> ~ (e = e') ->
   ~ ((f e) = (f e'))) ->
  (forall (e':b), (mem e' (map f s)) -> (mem (g e') s) /\ ((f (g e')) = e')) ->
  p_bijective f s (map f s).

Axiom set_bijective_inv1 :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:a -> b) (g:b -> a) (s:set a) (b1:b), (mem b1 (map f s)) ->
  (forall (e:a) (e':a), (mem e s) -> (mem e' s) -> ~ (e = e') ->
   ~ ((f e) = (f e'))) ->
  (forall (e':b), (mem e' (map f s)) -> (mem (g e') s) /\ ((f (g e')) = e')) ->
  ((inv_func f s (map f s) b1) = (g b1)).

Axiom set_bij_inv :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:a -> b) (g:b -> a) (s:set a),
  (forall (e:a) (e':a), (mem e s) -> (mem e' s) -> ~ (e = e') ->
   ~ ((f e) = (f e'))) ->
  (forall (e':b), (mem e' (map f s)) -> (mem (g e') s) /\ ((f (g e')) = e')) ->
  p_bijective f s (map f s).

Axiom set_bij_inv1 :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:a -> b) (g:b -> a) (s:set a),
  (forall (e:a) (e':a), (mem e s) -> (mem e' s) -> ~ (e = e') ->
   ~ ((f e) = (f e'))) ->
  (forall (e':b), (mem e' (map f s)) -> (mem (g e') s) /\ ((f (g e')) = e')) ->
  p_bijective g (map f s) s.

Axiom set_bij_inv2 :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:a -> b) (g:b -> a) (s:set a),
  (forall (e:a) (e':a), (mem e s) -> (mem e' s) -> ~ (e = e') ->
   ~ ((f e) = (f e'))) ->
  (forall (e':b), (mem e' (map f s)) -> (mem (g e') s) /\ ((f (g e')) = e')) ->
  forall (b1:b), (mem b1 (map f s)) -> ((inv_func f s (map f s) b1) = (g b1)).

Parameter inv_f:
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b}, (a -> b) ->
  (set a) -> (set b) -> b -> a.

Axiom inv_f_spec :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:a -> b) (s:set a) (s':set b), (p_bijective f s s') ->
  forall (e:b), (mem e s') -> mem ((inv_f f s s') e) s.

Axiom inv_f_spec1 :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:a -> b) (s:set a) (s':set b), (p_bijective f s s') ->
  forall (e:b), (mem e s') -> ((f ((inv_f f s s') e)) = e).

Axiom inv_f_spec2 :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:a -> b) (s:set a) (s':set b), (p_bijective f s s') ->
  p_bijective (inv_f f s s') s' s.

Axiom injective_is_bijective :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:a -> b) (s:set a) (s':set b), (p_injective f s) ->
  (forall (e:a), (mem e s) -> mem (f e) s') ->
  ((cardinal s) = (cardinal s')) -> p_bijective f s s'.

Axiom injective_is_bijective_auto :
  forall {a:Type} {a_WT:WhyType a},
  forall (f:a -> a) (s:set a), (p_injective f s) ->
  (forall (e:a), (mem e s) -> mem (f e) s) -> p_bijective f s s.

Axiom injective_is_bijective_auto1 :
  forall {a:Type} {a_WT:WhyType a},
  forall (f:a -> a) (s:set a), (p_injective f s) ->
  (forall (e:a), (mem e s) -> mem (f e) s) -> ((map f s) = s).

Parameter inv_auto:
  forall {a:Type} {a_WT:WhyType a}, (a -> a) -> (set a) -> a -> a.

Axiom inv_auto_def :
  forall {a:Type} {a_WT:WhyType a},
  forall (f:a -> a) (s:set a), (p_injective f s) ->
  (forall (e:a), (mem e s) -> mem (f e) s) ->
  ((inv_auto f s) = (inv_f f s s)).

Axiom inv_auto_spec :
  forall {a:Type} {a_WT:WhyType a},
  forall (f:a -> a) (s:set a), (p_injective f s) ->
  (forall (e:a), (mem e s) -> mem (f e) s) -> forall (e:a), (mem e s) ->
  mem ((inv_auto f s) e) s.

Axiom inv_auto_spec1 :
  forall {a:Type} {a_WT:WhyType a},
  forall (f:a -> a) (s:set a), (p_injective f s) ->
  (forall (e:a), (mem e s) -> mem (f e) s) -> forall (e:a), (mem e s) ->
  ((f ((inv_auto f s) e)) = e).

Axiom inv_auto_spec2 :
  forall {a:Type} {a_WT:WhyType a},
  forall (f:a -> a) (s:set a), (p_injective f s) ->
  (forall (e:a), (mem e s) -> mem (f e) s) -> p_bijective (inv_auto f s) s s.

Axiom ind_isum_mod_div :
  forall (bv:bitvec) (i:Z), ((0%Z <= i)%Z /\ (i < (length bv))%Z) ->
  ((int.EuclideanDivision.mod1
    (ind_isum
     (fun (k:Z) =>
      (((getbv bv) k) * (power 2%Z (((length bv) - 1%Z)%Z - k)%Z))%Z)
     0%Z (length bv))
    (power 2%Z ((length bv) - i)%Z))
   =
   (ind_isum
    (fun (k:Z) =>
     (((getbv bv) k) * (power 2%Z (((length bv) - 1%Z)%Z - k)%Z))%Z)
    i (length bv))).

Axiom ind_isum_mod_div1 :
  forall (bv:bitvec) (i:Z), ((0%Z <= i)%Z /\ (i < (length bv))%Z) ->
  ((int.EuclideanDivision.div
    (ind_isum
     (fun (k:Z) =>
      (((getbv bv) k) * (power 2%Z (((length bv) - 1%Z)%Z - k)%Z))%Z)
     0%Z (length bv))
    (power 2%Z ((length bv) - i)%Z))
   =
   (ind_isum
    (fun (k:Z) => (((getbv bv) k) * (power 2%Z ((i - 1%Z)%Z - k)%Z))%Z) 0%Z
    i)).

Axiom mod_ind_isum :
  forall (f:Z -> Z) (i:Z) (l:Z), ((0%Z <= i)%Z /\ (i <= l)%Z) ->
  (binary f) ->
  ((int.EuclideanDivision.mod1
    (ind_isum (fun (k:Z) => ((f k) * (power 2%Z ((l - 1%Z)%Z - k)%Z))%Z) 0%Z
     l)
    (power 2%Z i))
   =
   (ind_isum (fun (k:Z) => ((f k) * (power 2%Z ((l - 1%Z)%Z - k)%Z))%Z)
    (l - i)%Z l)).

Axiom mod_ind_isum_z :
  forall (f:Z -> Z) (i:Z) (l:Z), ((0%Z <= i)%Z /\ (i <= l)%Z) ->
  (binary f) ->
  ((int.EuclideanDivision.mod1
    (ind_isum (fun (k:Z) => ((f k) * (power 2%Z ((l - 1%Z)%Z - k)%Z))%Z) 0%Z
     l)
    (power 2%Z i))
   =
   (ind_isum
    (fun (k:Z) =>
     ((f ((k + l)%Z - i)%Z) * (power 2%Z ((i - 1%Z)%Z - k)%Z))%Z)
    0%Z i)).

Axiom div_ind_isum :
  forall (f:Z -> Z) (i:Z) (l:Z), ((0%Z <= i)%Z /\ (i <= l)%Z) ->
  (binary f) ->
  ((int.EuclideanDivision.div
    (ind_isum (fun (k:Z) => ((f k) * (power 2%Z ((l - 1%Z)%Z - k)%Z))%Z) 0%Z
     l)
    (power 2%Z i))
   =
   (ind_isum
    (fun (k:Z) => ((f k) * (power 2%Z (((l - 1%Z)%Z - k)%Z - i)%Z))%Z) 0%Z
    (l - i)%Z)).

Axiom ind_isum_mod :
  forall (bv:bitvec) (i:Z), ((0%Z <= i)%Z /\ (i < (length bv))%Z) ->
  ((int.EuclideanDivision.mod1
    (ind_isum (fun (l:Z) => (((getbv bv) l) * (power 2%Z (i - l)%Z))%Z) 0%Z
     (i + 1%Z)%Z)
    2%Z)
   = ((getbv bv) i)).

Parameter power_: Z -> Z -> Z.

Axiom power__def :
  forall (e:Z) (i:Z), (i >= 0%Z)%Z -> ((power_ e i) = (power e i)).

Axiom power__def1 :
  forall (e:Z) (i:Z), ~ (i >= 0%Z)%Z -> ((power_ e i) = 0%Z).

Axiom power_to_ :
  forall (i:Z) (x:Z), (0%Z <= x)%Z -> ((power i x) = (power_ i x)).

Axiom power_no_ :
  forall (i:Z) (x:Z), (0%Z <= x)%Z -> ((power_ i x) = (power i x)).

Axiom power__plus_one :
  forall (i:Z) (x:Z), (0%Z <= x)%Z ->
  ((power_ i (x + 1%Z)%Z) = ((power_ i x) * i)%Z).

Axiom power__eq :
  forall (e:Z) (e':Z) (i:Z) (i':Z), (e = e') -> (i = i') ->
  ((power_ e i) = (power_ e' i')).

Axiom power__sum :
  forall (i:Z) (x:Z) (y:Z), (0%Z <= x)%Z -> (0%Z <= y)%Z ->
  ((power_ i (x + y)%Z) = ((power_ i x) * (power_ i y))%Z).

Axiom power__sum_rev :
  forall (i:Z) (x:Z) (y:Z), (0%Z <= x)%Z -> (0%Z <= y)%Z ->
  (((power_ i x) * (power_ i y))%Z = (power_ i (x + y)%Z)).

Axiom power__mult :
  forall (i:Z) (x:Z) (y:Z), (0%Z <= x)%Z -> (0%Z <= y)%Z ->
  ((power_ i (x * y)%Z) = (power_ (power_ i x) y)).

Axiom Power_zero_ : forall (i:Z), ((power_ i 0%Z) = 1%Z).

Axiom Power_one_ : forall (i:Z), ((power_ i 1%Z) = i).

Axiom Power_sum_ :
  forall (x:Z) (y:Z) (i:Z), (0%Z <= x)%Z -> (y >= 0%Z)%Z ->
  ((power_ i (x + y)%Z) = ((power_ i x) * (power_ i y))%Z).

Axiom Power_mult_ :
  forall (x:Z) (y:Z) (i:Z), (x >= 0%Z)%Z -> (y >= 0%Z)%Z ->
  ((power i (x * y)%Z) = (power (power i x) y)).

Axiom Power_pos_ : forall (i:Z), (i >= 0%Z)%Z -> ((power_ i 0%Z) > 0%Z)%Z.

Axiom Power_pos_gen_ :
  forall (i:Z) (j:Z), (i > 0%Z)%Z -> (j >= 0%Z)%Z -> (0%Z < (power_ i j))%Z.

Axiom power_two_ :
  forall (x:Z), (0%Z <= x)%Z -> ((power_ x 2%Z) = (x * x)%Z).

Axiom power_plus_one_two :
  forall (x:Z), (0%Z <= x)%Z ->
  ((power_ 2%Z (x + 1%Z)%Z) = ((power_ 2%Z x) + (power_ 2%Z x))%Z).

Axiom growing_right_power_ :
  forall (a:Z) (b:Z) (i:Z), (0%Z <= i)%Z -> ((0%Z <= a)%Z /\ (a <= b)%Z) ->
  ((power_ a i) <= (power_ b i))%Z.

Axiom power_of_one_ :
  forall (a:Z) (b:Z), (0%Z <= b)%Z -> (a = 1%Z) -> ((power_ a b) = 1%Z).

Axiom bound_power_ :
  forall (i:Z) (a:Z) (k:Z) (n:Z), (0%Z < a)%Z ->
  ((0%Z < k)%Z /\ (k <= n)%Z) -> ((0%Z <= i)%Z /\ (i < (power_ a n))%Z) ->
  ((int.EuclideanDivision.div i (power_ a (n - k)%Z)) < (power_ a k))%Z.

Axiom power_inf :
  forall (a:Z) (n:Z) (n':Z), (1%Z < a)%Z -> ((0%Z < n)%Z /\ (n < n')%Z) ->
  ((power_ a n) < (power_ a n'))%Z.

Axiom power_leq :
  forall (a:Z) (n:Z) (n':Z), (0%Z <= a)%Z -> ((0%Z < n)%Z /\ (n <= n')%Z) ->
  ((power_ a n) <= (power_ a n'))%Z.

Axiom power_rises :
  forall (a:Z) (n:Z), (1%Z < a)%Z -> (1%Z < n)%Z -> (a < (power_ a n))%Z.

Axiom int_expo_rises :
  forall (a:Z) (n:Z), (1%Z < a)%Z -> (1%Z <= n)%Z -> (n < (power_ a n))%Z.

Axiom bound_power_2 :
  forall (i:Z) (n:Z), (0%Z <= n)%Z ->
  ((0%Z <= i)%Z /\ (i < (power_ 2%Z (n + 1%Z)%Z))%Z) ->
  ((int.EuclideanDivision.div i (power_ 2%Z n)) < 2%Z)%Z.

Parameter polysquare: Z -> Z -> Z -> Z -> Z.

Axiom polysquare_def :
  forall (n:Z) (a2:Z) (a1:Z) (a0:Z), (0%Z < n)%Z -> (0%Z <= a2)%Z ->
  (0%Z <= a1)%Z -> (0%Z <= a0)%Z ->
  ((polysquare n a2 a1 a0) =
   (((a2 * (power_ n 2%Z))%Z + (a1 * n)%Z)%Z + a0)%Z).

Axiom polysquare_spec :
  forall (n:Z) (a2:Z) (a1:Z) (a0:Z), (0%Z < n)%Z -> (0%Z <= a2)%Z ->
  (0%Z <= a1)%Z -> (0%Z <= a0)%Z -> (0%Z <= (polysquare n a2 a1 a0))%Z.

Axiom polysquare_leq_trans :
  forall (n:Z) (a2:Z) (a1:Z) (a0:Z) (b2:Z) (b1:Z) (b0:Z) (pa:Z) (pb:Z) (ps:Z),
  (0%Z < n)%Z -> (0%Z <= a2)%Z -> (0%Z <= a1)%Z -> (0%Z <= a0)%Z ->
  (0%Z <= b2)%Z -> (0%Z <= b1)%Z -> (0%Z <= b0)%Z ->
  (pa <= (polysquare n a2 a1 a0))%Z -> (pb <= (polysquare n b2 b1 b0))%Z ->
  (ps <= (pa + pb)%Z)%Z ->
  (ps <= (polysquare n (a2 + b2)%Z (a1 + b1)%Z (a0 + b0)%Z))%Z.

Axiom polysquare_leq_trans_sc :
  forall (n:Z) (a2:Z) (a1:Z) (a0:Z) (b2:Z) (b1:Z) (b0:Z) (pa:Z) (sc:Z) (ps:Z),
  (0%Z < n)%Z -> (0%Z <= a2)%Z -> (0%Z <= a1)%Z -> (0%Z <= a0)%Z ->
  (0%Z <= sc)%Z -> ((sc * a2)%Z <= b2)%Z -> ((sc * a1)%Z <= b1)%Z ->
  ((sc * a0)%Z <= b0)%Z -> (pa <= (polysquare n a2 a1 a0))%Z ->
  (ps <= (sc * pa)%Z)%Z -> (ps <= (polysquare n b2 b1 b0))%Z.

Axiom polysquare_update :
  forall (na:Z) (nb:Z) (a2:Z) (a1:Z) (a0:Z) (pa:Z),
  ((0%Z < na)%Z /\ (na <= nb)%Z) -> (0%Z <= a2)%Z -> (0%Z <= a1)%Z ->
  (0%Z <= a0)%Z -> (pa <= (polysquare na a2 a1 a0))%Z ->
  (pa <= (polysquare nb a2 a1 a0))%Z.

Axiom mod_ind_isum_ :
  forall (f:Z -> Z) (i:Z) (l:Z), ((0%Z <= i)%Z /\ (i <= l)%Z) ->
  (binary f) ->
  ((int.EuclideanDivision.mod1
    (ind_isum (fun (k:Z) => ((f k) * (power_ 2%Z ((l - 1%Z)%Z - k)%Z))%Z) 0%Z
     l)
    (power_ 2%Z i))
   =
   (ind_isum (fun (k:Z) => ((f k) * (power_ 2%Z ((l - 1%Z)%Z - k)%Z))%Z)
    (l - i)%Z l)).

Axiom mod_ind_isum_z_ :
  forall (f:Z -> Z) (i:Z) (l:Z), ((0%Z <= i)%Z /\ (i <= l)%Z) ->
  (binary f) ->
  ((int.EuclideanDivision.mod1
    (ind_isum (fun (k:Z) => ((f k) * (power_ 2%Z ((l - 1%Z)%Z - k)%Z))%Z) 0%Z
     l)
    (power_ 2%Z i))
   =
   (ind_isum
    (fun (k:Z) =>
     ((f ((k + l)%Z - i)%Z) * (power_ 2%Z ((i - 1%Z)%Z - k)%Z))%Z)
    0%Z i)).

Axiom div_ind_isum_ :
  forall (f:Z -> Z) (i:Z) (l:Z), ((0%Z <= i)%Z /\ (i <= l)%Z) ->
  (binary f) ->
  ((int.EuclideanDivision.div
    (ind_isum (fun (k:Z) => ((f k) * (power_ 2%Z ((l - 1%Z)%Z - k)%Z))%Z) 0%Z
     l)
    (power_ 2%Z i))
   =
   (ind_isum
    (fun (k:Z) => ((f k) * (power_ 2%Z (((l - 1%Z)%Z - k)%Z - i)%Z))%Z) 0%Z
    (l - i)%Z)).

Axiom ind_isum_mod_ :
  forall (bv:bitvec) (i:Z), ((0%Z <= i)%Z /\ (i < (length bv))%Z) ->
  ((int.EuclideanDivision.mod1
    (ind_isum (fun (l:Z) => (((getbv bv) l) * (power_ 2%Z (i - l)%Z))%Z) 0%Z
     (i + 1%Z)%Z)
    2%Z)
   = ((getbv bv) i)).

Axiom bv_to_int_kth_pre :
  forall (bv:bitvec) (k:Z),
  ((0%Z <= k)%Z /\ (k < ((length bv) - 1%Z)%Z)%Z) ->
  (((getbv bv) k) =
   (int.EuclideanDivision.mod1
    (int.EuclideanDivision.div
     (ind_isum
      (fun (l:Z) =>
       (((getbv bv) l) * (power 2%Z (((length bv) - 1%Z)%Z - l)%Z))%Z)
      0%Z (length bv))
     (power 2%Z (((length bv) - k)%Z - 1%Z)%Z))
    2%Z)).

Axiom bv_to_int_kth_pre1 :
  forall (bv:bitvec) (k:Z),
  ((0%Z <= k)%Z /\ (k < ((length bv) - 1%Z)%Z)%Z) ->
  (((getbv bv) k) =
   (int.EuclideanDivision.div
    (int.EuclideanDivision.mod1
     (ind_isum
      (fun (l:Z) =>
       (((getbv bv) l) * (power 2%Z (((length bv) - 1%Z)%Z - l)%Z))%Z)
      0%Z (length bv))
     (power 2%Z ((length bv) - k)%Z))
    (power 2%Z (((length bv) - k)%Z - 1%Z)%Z))).

Parameter int_to_bv: Z -> Z -> bitvec.

Parameter result11: Z -> Z -> Z -> Z.

Axiom result_def11 :
  forall (i:Z) (n:Z) (k:Z),
  (((0%Z <= k)%Z /\ (k < n)%Z) ->
   (((result11 i n) k) =
    (int.EuclideanDivision.div
     (int.EuclideanDivision.mod1 i (power 2%Z (n - k)%Z))
     (power 2%Z ((n - k)%Z - 1%Z)%Z)))) /\
  (~ ((0%Z <= k)%Z /\ (k < n)%Z) -> (((result11 i n) k) = 0%Z)).

Axiom int_to_bv_def :
  forall (i:Z) (n:Z), (n >= 0%Z)%Z ->
  ((int_to_bv i n) = (make_bv (result11 i n) n)).

Axiom int_to_bv_spec :
  forall (i:Z) (n:Z), (n >= 0%Z)%Z -> ((length (int_to_bv i n)) = n).

Axiom int_to_bv_spec1 :
  forall (i:Z) (n:Z), (n >= 0%Z)%Z ->
  ((int_to_bv i n) =
   (make_bv
    (fun (k:Z) =>
     (int.EuclideanDivision.div
      (int.EuclideanDivision.mod1 i (power 2%Z (n - k)%Z))
      (power 2%Z ((n - k)%Z - 1%Z)%Z)))
    n)).

Axiom int_to_bv_sum_pre :
  forall (i:Z) (n:Z) (k:Z), ((n >= k)%Z /\ (k >= 0%Z)%Z) ->
  ((0%Z <= i)%Z /\ (i < (power 2%Z n))%Z) ->
  ((int.EuclideanDivision.mod1 i (power 2%Z k)) =
   (ind_isum
    (fun (l:Z) =>
     (((getbv (int_to_bv i n)) l) * (power 2%Z ((n - l)%Z - 1%Z)%Z))%Z)
    (n - k)%Z n)).

Axiom int_to_bv_sum :
  forall (i:Z) (n:Z), (n >= 0%Z)%Z ->
  ((0%Z <= i)%Z /\ (i < (power 2%Z n))%Z) ->
  (i =
   (ind_isum
    (fun (k:Z) =>
     (((getbv (int_to_bv i n)) k) * (power 2%Z ((n - 1%Z)%Z - k)%Z))%Z)
    0%Z n)).

Axiom int_to_bv_sum_rev :
  forall (i:Z) (n:Z), (n >= 0%Z)%Z ->
  ((0%Z <= i)%Z /\ (i < (power 2%Z n))%Z) ->
  ((ind_isum
    (fun (k:Z) =>
     (((getbv (int_to_bv i n)) k) * (power_ 2%Z ((n - k)%Z - 1%Z)%Z))%Z)
    0%Z n)
   = i).

Axiom int_to_bv_mod_div :
  forall (i:Z) (n:Z), (n >= 0%Z)%Z ->
  ((0%Z <= i)%Z /\ (i < (power 2%Z n))%Z) ->
  ((int_to_bv i n) =
   (make_bv
    (fun (k:Z) =>
     (int.EuclideanDivision.mod1
      (int.EuclideanDivision.div i (power 2%Z ((n - k)%Z - 1%Z)%Z)) 2%Z))
    n)).

Axiom mod_isum :
  forall (i:Z) (k:Z) (n:Z), (n >= 0%Z)%Z ->
  ((0%Z <= i)%Z /\ (i < (power 2%Z n))%Z) -> ((0%Z <= k)%Z /\ (k < n)%Z) ->
  ((int.EuclideanDivision.mod1 i (power 2%Z k)) =
   (ind_isum
    (fun (l:Z) =>
     (((getbv (int_to_bv i n)) l) * (power 2%Z ((n - 1%Z)%Z - l)%Z))%Z)
    (n - k)%Z n)).

Axiom mod_isum_z :
  forall (i:Z) (k:Z) (n:Z), (n >= 0%Z)%Z ->
  ((0%Z <= i)%Z /\ (i < (power 2%Z n))%Z) -> ((0%Z <= k)%Z /\ (k < n)%Z) ->
  ((int.EuclideanDivision.mod1 i (power 2%Z k)) =
   (ind_isum
    (fun (l:Z) =>
     (((getbv (int_to_bv i n)) (l + (n - k)%Z)%Z) *
      (power 2%Z ((k - l)%Z - 1%Z)%Z))%Z)
    0%Z k)).

Axiom div_isum :
  forall (i:Z) (k:Z) (n:Z), (n >= 0%Z)%Z ->
  ((0%Z <= i)%Z /\ (i < (power 2%Z n))%Z) -> ((0%Z <= k)%Z /\ (k < n)%Z) ->
  ((int.EuclideanDivision.div i (power 2%Z k)) =
   (ind_isum
    (fun (l:Z) =>
     (((getbv (int_to_bv i n)) l) *
      (power 2%Z (((n - 1%Z)%Z - k)%Z - l)%Z))%Z)
    0%Z (n - k)%Z)).

Axiom int_to_bv_div_mod :
  forall (i:Z) (k:Z) (n:Z), (n >= 0%Z)%Z ->
  ((0%Z <= i)%Z /\ (i < (power 2%Z n))%Z) -> ((0%Z <= k)%Z /\ (k < n)%Z) ->
  ((int_to_bv i n) =
   (make_bv
    (fun (k1:Z) =>
     (int.EuclideanDivision.div
      (int.EuclideanDivision.mod1 i (power 2%Z (n - k1)%Z))
      (power 2%Z ((n - k1)%Z - 1%Z)%Z)))
    n)).

Axiom int_to_bv_value :
  forall (i:Z) (n:Z) (k:Z), (n > 0%Z)%Z ->
  ((0%Z <= i)%Z /\ (i < (power 2%Z n))%Z) -> ((0%Z <= k)%Z /\ (k < n)%Z) ->
  (((getbv (int_to_bv i n)) k) =
   (int.EuclideanDivision.mod1
    (int.EuclideanDivision.div i (power 2%Z ((n - k)%Z - 1%Z)%Z)) 2%Z)).

Axiom int_to_bv_value_zero :
  forall (i:Z) (n:Z), (0%Z < n)%Z ->
  ((0%Z <= i)%Z /\ (i < (power 2%Z n))%Z) ->
  ((i < (power 2%Z (n - 1%Z)%Z))%Z -> (((getbv (int_to_bv i n)) 0%Z) = 0%Z)) /\
  (~ (i < (power 2%Z (n - 1%Z)%Z))%Z ->
   (((getbv (int_to_bv i n)) 0%Z) = 1%Z)).

Axiom int_to_bv_mod_div_ :
  forall (i:Z) (n:Z), (n >= 0%Z)%Z ->
  ((0%Z <= i)%Z /\ (i < (power_ 2%Z n))%Z) ->
  ((int_to_bv i n) =
   (make_bv
    (fun (k:Z) =>
     (int.EuclideanDivision.mod1
      (int.EuclideanDivision.div i (power_ 2%Z ((n - k)%Z - 1%Z)%Z)) 2%Z))
    n)).

Axiom mod_isum_ :
  forall (i:Z) (k:Z) (n:Z), (n >= 0%Z)%Z ->
  ((0%Z <= i)%Z /\ (i < (power_ 2%Z n))%Z) -> ((0%Z <= k)%Z /\ (k < n)%Z) ->
  ((int.EuclideanDivision.mod1 i (power_ 2%Z k)) =
   (ind_isum
    (fun (l:Z) =>
     (((getbv (int_to_bv i n)) l) * (power_ 2%Z ((n - 1%Z)%Z - l)%Z))%Z)
    (n - k)%Z n)).

Axiom mod_isum_z_ :
  forall (i:Z) (k:Z) (n:Z), (n >= 0%Z)%Z ->
  ((0%Z <= i)%Z /\ (i < (power_ 2%Z n))%Z) -> ((0%Z <= k)%Z /\ (k < n)%Z) ->
  ((int.EuclideanDivision.mod1 i (power_ 2%Z k)) =
   (ind_isum
    (fun (l:Z) =>
     (((getbv (int_to_bv i n)) (l + (n - k)%Z)%Z) *
      (power_ 2%Z ((k - l)%Z - 1%Z)%Z))%Z)
    0%Z k)).

Axiom div_isum_ :
  forall (i:Z) (k:Z) (n:Z), (n >= 0%Z)%Z ->
  ((0%Z <= i)%Z /\ (i < (power_ 2%Z n))%Z) -> ((0%Z <= k)%Z /\ (k < n)%Z) ->
  ((int.EuclideanDivision.div i (power_ 2%Z k)) =
   (ind_isum
    (fun (l:Z) =>
     (((getbv (int_to_bv i n)) l) *
      (power_ 2%Z (((n - 1%Z)%Z - k)%Z - l)%Z))%Z)
    0%Z (n - k)%Z)).

Axiom int_to_bv_div_mod_ :
  forall (i:Z) (k:Z) (n:Z), (n >= 0%Z)%Z ->
  ((0%Z <= i)%Z /\ (i < (power_ 2%Z n))%Z) -> ((0%Z <= k)%Z /\ (k < n)%Z) ->
  ((int_to_bv i n) =
   (make_bv
    (fun (k1:Z) =>
     (int.EuclideanDivision.div
      (int.EuclideanDivision.mod1 i (power_ 2%Z (n - k1)%Z))
      (power_ 2%Z ((n - k1)%Z - 1%Z)%Z)))
    n)).

Axiom int_to_bv_value_ :
  forall (i:Z) (n:Z) (k:Z), (n > 0%Z)%Z ->
  ((0%Z <= i)%Z /\ (i < (power_ 2%Z n))%Z) -> ((0%Z <= k)%Z /\ (k < n)%Z) ->
  (((getbv (int_to_bv i n)) k) =
   (int.EuclideanDivision.mod1
    (int.EuclideanDivision.div i (power_ 2%Z ((n - k)%Z - 1%Z)%Z)) 2%Z)).

Axiom int_to_bv_value_zero_ :
  forall (i:Z) (n:Z), (0%Z < n)%Z ->
  ((0%Z <= i)%Z /\ (i < (power_ 2%Z n))%Z) ->
  ((i < (power_ 2%Z (n - 1%Z)%Z))%Z -> (((getbv (int_to_bv i n)) 0%Z) = 0%Z)) /\
  (~ (i < (power_ 2%Z (n - 1%Z)%Z))%Z ->
   (((getbv (int_to_bv i n)) 0%Z) = 1%Z)).

Axiom int_to_bv_zero :
  forall (n:Z), forall (k:Z), ((0%Z <= k)%Z /\ (k < n)%Z) ->
  (((getbv (int_to_bv 0%Z n)) k) = 0%Z).

Axiom int_to_sum :
  forall (i:Z) (n:Z), (n > 0%Z)%Z ->
  ((0%Z <= i)%Z /\ (i < (power 2%Z n))%Z) ->
  (i =
   (ind_isum
    (fun (k:Z) =>
     (((getbv (int_to_bv i n)) k) * (power 2%Z ((n - k)%Z - 1%Z)%Z))%Z)
    0%Z n)).

Axiom int_to_bv_transl :
  forall (i:Z) (k:Z) (n:Z) (t1:Z), ((0%Z <= i)%Z /\ (i < (power 2%Z n))%Z) ->
  ((0%Z <= k)%Z /\ (k < (n - t1)%Z)%Z) -> ((0%Z < t1)%Z /\ (t1 <= n)%Z) ->
  (((getbv
     (int_to_bv (int.EuclideanDivision.mod1 i (power_ 2%Z (n - t1)%Z))
      (n - t1)%Z))
    k)
   = ((getbv (int_to_bv i n)) (k + t1)%Z)).

Axiom int_to_bv_transl_div :
  forall (i:Z) (k:Z) (n:Z) (n':Z) (t1:Z),
  ((0%Z <= i)%Z /\ (i < (power 2%Z n))%Z) -> ((0%Z <= k)%Z /\ (k < t1)%Z) ->
  (n' = t1) -> ((0%Z < t1)%Z /\ (t1 <= n)%Z) ->
  (((getbv
     (int_to_bv (int.EuclideanDivision.div i (power_ 2%Z (n - t1)%Z)) n'))
    k)
   = ((getbv (int_to_bv i n)) k)).

Axiom product_int_to_bv_inv :
  forall (n:Z) (i:Z), (0%Z <= n)%Z ->
  ((0%Z <= i)%Z /\ (i < (power 2%Z n))%Z) ->
  ((i = 0%Z) ->
   ((ind_iproduct (fun (j:Z) => (1%Z - ((getbv (int_to_bv i n)) j))%Z) 0%Z n)
    = 1%Z)) /\
  (~ (i = 0%Z) ->
   ((ind_iproduct (fun (j:Z) => (1%Z - ((getbv (int_to_bv i n)) j))%Z) 0%Z n)
    = 0%Z)).

Parameter bin_to_int: (Z -> Z) -> Z -> Z.

Axiom bin_to_int_def :
  forall (f:Z -> Z) (n:Z), (0%Z <= n)%Z -> (binary f) ->
  ((bin_to_int f n) = (bv_to_int (make_bv f n))).

Axiom bin_to_int_spec :
  forall (f:Z -> Z) (n:Z), (0%Z <= n)%Z -> (binary f) ->
  ((bin_to_int f n) =
   (ind_isum (fun (k:Z) => ((f k) * (power 2%Z ((n - 1%Z)%Z - k)%Z))%Z) 0%Z
    n)).

Axiom bin_to_int_spec1 :
  forall (f:Z -> Z) (n:Z), (0%Z <= n)%Z -> (binary f) ->
  (0%Z <= (bin_to_int f n))%Z.

Parameter int_to_bin: Z -> Z -> Z -> Z.

Axiom int_to_bin_def :
  forall (i:Z) (n:Z), (n >= 0%Z)%Z ->
  ((0%Z <= i)%Z /\ (i < (power 2%Z n))%Z) ->
  ((int_to_bin i n) = (getbv (int_to_bv i n))).

Axiom int_to_bin_spec :
  forall (i:Z) (n:Z), (n >= 0%Z)%Z ->
  ((0%Z <= i)%Z /\ (i < (power 2%Z n))%Z) ->
  (i =
   (ind_isum
    (fun (k:Z) =>
     (((int_to_bin i n) k) * (power_ 2%Z ((n - 1%Z)%Z - k)%Z))%Z)
    0%Z n)).

Axiom int_to_bin_spec1 :
  forall (i:Z) (n:Z), (n >= 0%Z)%Z ->
  ((0%Z <= i)%Z /\ (i < (power 2%Z n))%Z) -> binary (int_to_bin i n).

Axiom int_to_bin_spec2 :
  forall (i:Z) (n:Z), (n >= 0%Z)%Z ->
  ((0%Z <= i)%Z /\ (i < (power 2%Z n))%Z) -> forall (k:Z),
  ((0%Z <= k)%Z /\ (k < n)%Z) ->
  (((int_to_bin i n) k) =
   (int.EuclideanDivision.mod1
    (int.EuclideanDivision.div i (power_ 2%Z ((n - k)%Z - 1%Z)%Z)) 2%Z)).

Axiom int_to_bv_tail :
  forall (i:Z) (n:Z), (n > 1%Z)%Z ->
  ((0%Z <= i)%Z /\ (i < (power 2%Z n))%Z) ->
  ((int_to_bv (tail_bits i n) (n - 1%Z)%Z) = (tail (int_to_bv i n))).

Axiom bound_sum_dec :
  forall (bv:bitvec) (i:Z), ((1%Z <= i)%Z /\ (i <= (length bv))%Z) ->
  ((ind_isum
    (fun (l:Z) => (((getbv bv) l) * (power 2%Z ((length bv) - l)%Z))%Z) i
    ((length bv) + 1%Z)%Z)
   < (power 2%Z (((length bv) - i)%Z + 1%Z)%Z))%Z.

Axiom bv_to_int_to_bv :
  forall (i:Z) (n:Z), (n >= 0%Z)%Z ->
  ((0%Z <= i)%Z /\ (i < (power 2%Z n))%Z) ->
  ((bv_to_int (int_to_bv i n)) = i).

Axiom bv_to_int_to_bv_ :
  forall (i:Z) (n:Z), (n >= 0%Z)%Z ->
  ((0%Z <= i)%Z /\ (i < (power_ 2%Z n))%Z) ->
  ((bv_to_int (int_to_bv i n)) = i).

Axiom tail_bits_sum :
  forall (i:Z) (n:Z), (1%Z < n)%Z -> (0%Z <= i)%Z ->
  ((0%Z <= i)%Z /\ (i < (power 2%Z n))%Z) ->
  ((tail_bits i n) =
   (ind_isum
    (fun (l:Z) =>
     (((getbv (int_to_bv i n)) l) * (power 2%Z ((n - 1%Z)%Z - l)%Z))%Z)
    1%Z n)).

Axiom int_to_bv_to_int :
  forall (bv:bitvec), (1%Z <= (length bv))%Z ->
  ((int_to_bv (bv_to_int bv) (length bv)) = bv).

Axiom concat_to_int :
  forall (bv:bitvec) (i:Z), ((0%Z <= i)%Z /\ (i <= 1%Z)%Z) ->
  ((bv_to_int (concat_l bv i)) =
   ((bv_to_int bv) + (i * (power 2%Z (length bv)))%Z)%Z).

Axiom bounded_to_int :
  forall (bv:bitvec), ((bv_to_int bv) < (power 2%Z (length bv)))%Z.

Axiom int_to_bv_to_int_value :
  forall (bv:bitvec) (i:Z), (1%Z <= (length bv))%Z ->
  (((0%Z <= i)%Z /\ (i < (length bv))%Z) ->
   (((getbv (int_to_bv (bv_to_int bv) (length bv))) i) = ((getbv bv) i))) /\
  (~ ((0%Z <= i)%Z /\ (i < (length bv))%Z) ->
   (((getbv (int_to_bv (bv_to_int bv) (length bv))) i) = 0%Z)).

Axiom int_to_bv_to_int_gen :
  forall (bv:bitvec) (n:Z), (1%Z <= (length bv))%Z -> (n = (length bv)) ->
  ((int_to_bv (bv_to_int bv) n) = bv).

Axiom bv_to_int_mod :
  forall (bv:bitvec) (k:Z), ((0%Z <= k)%Z /\ (k < (length bv))%Z) ->
  ((int.EuclideanDivision.mod1 (bv_to_int bv)
    (power 2%Z ((length bv) - k)%Z))
   =
   (ind_isum
    (fun (l:Z) =>
     (((getbv bv) l) * (power 2%Z (((length bv) - 1%Z)%Z - l)%Z))%Z)
    k (length bv))).

Axiom bv_to_int_mod_rev :
  forall (bv:bitvec) (k:Z), ((0%Z <= k)%Z /\ (k < (length bv))%Z) ->
  ((ind_isum
    (fun (l:Z) =>
     (((getbv bv) l) * (power 2%Z (((length bv) - 1%Z)%Z - l)%Z))%Z)
    k (length bv))
   =
   (int.EuclideanDivision.mod1 (bv_to_int bv)
    (power 2%Z ((length bv) - k)%Z))).

Axiom bv_to_int_mod_gen :
  forall (k:Z) (n:Z), ((0%Z <= k)%Z /\ (k < n)%Z) -> forall (bv:bitvec),
  ((length bv) = n) ->
  ((int.EuclideanDivision.mod1 (bv_to_int bv)
    (power 2%Z ((length bv) - k)%Z))
   =
   (ind_isum
    (fun (l:Z) =>
     (((getbv bv) l) * (power 2%Z (((length bv) - 1%Z)%Z - l)%Z))%Z)
    k (length bv))).

Axiom to_int_head_tail :
  forall (bv:bitvec), ((length bv) >= 1%Z)%Z ->
  ((bv_to_int bv) =
   ((bv_to_int (tail bv)) +
    ((head bv) * (power 2%Z ((length bv) - 1%Z)%Z))%Z)%Z).

Axiom to_int_head_tail1 :
  forall (bv:bitvec), ((length bv) >= 1%Z)%Z ->
  ((bv_to_int (tail bv)) =
   (int.EuclideanDivision.mod1 (bv_to_int bv)
    (power 2%Z ((length bv) - 1%Z)%Z))).

Axiom not_disj :
  forall (a:bool) (b:bool), ~ (a = true) -> ~ (b = true) -> ~ (a = true).

Axiom not_disj1 : True.

Parameter my_map:
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b}, (a -> b) ->
  (set a) -> set b.

Axiom my_map_def :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:a -> b) (u:set a), ((cardinal u) = 0%Z) ->
  ((my_map f u) = (empty : set b)).

Axiom my_map_def1 :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:a -> b) (u:set a), ~ ((cardinal u) = 0%Z) ->
  ((my_map f u) = (add (f (choose u)) (my_map f (remove (choose u) u)))).

Axiom my_map_spec :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:a -> b) (u:set a), ((my_map f u) = (map f u)).

Axiom my_map_to_map :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:a -> b) (u:set a), ((my_map f u) = (map f u)).

Axiom map_to_my_map :
  forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
  forall (f:a -> b) (u:set a), ((map f u) = (my_map f u)).

Parameter mapz_pre: Z -> (set bitvec) -> set bitvec.

Axiom mapz_pre_def :
  forall (n:Z) (s:set bitvec), (1%Z <= n)%Z ->
  (forall (f:bitvec), (mem f s) <-> ((length f) = (n - 1%Z)%Z)) ->
  ((mapz_pre n s) = (my_map (fun (bv:bitvec) => (concat_l bv 0%Z)) s)).

Axiom mapz_pre_spec :
  forall (n:Z) (s:set bitvec), (1%Z <= n)%Z ->
  (forall (f:bitvec), (mem f s) <-> ((length f) = (n - 1%Z)%Z)) ->
  mem (make_bv (fun (us:Z) => 0%Z) n) (mapz_pre n s).

Axiom mapz_pre_spec1 :
  forall (n:Z) (s:set bitvec), (1%Z <= n)%Z ->
  (forall (f:bitvec), (mem f s) <-> ((length f) = (n - 1%Z)%Z)) ->
  forall (e:bitvec), (mem e (mapz_pre n s)) -> (((getbv e) 0%Z) = 0%Z).

Axiom mapz_pre_spec2 :
  forall (n:Z) (s:set bitvec), (1%Z <= n)%Z ->
  (forall (f:bitvec), (mem f s) <-> ((length f) = (n - 1%Z)%Z)) ->
  forall (e:bitvec), (mem e (mapz_pre n s)) ->
  exists bv:bitvec, (mem bv s) /\ (e = (concat_l bv 0%Z)).

Axiom mapz_pre_spec3 :
  forall (n:Z) (s:set bitvec), (1%Z <= n)%Z ->
  (forall (f:bitvec), (mem f s) <-> ((length f) = (n - 1%Z)%Z)) ->
  forall (e:bitvec), (mem e (mapz_pre n s)) -> ((length e) = n).

Axiom mapz_pre_spec4 :
  forall (n:Z) (s:set bitvec), (1%Z <= n)%Z ->
  (forall (f:bitvec), (mem f s) <-> ((length f) = (n - 1%Z)%Z)) ->
  forall (e:bitvec), ((length e) = n) -> (((getbv e) 0%Z) = 0%Z) ->
  mem e (mapz_pre n s).

Parameter mapo_pre: Z -> (set bitvec) -> set bitvec.

Axiom mapo_pre_def :
  forall (n:Z) (s:set bitvec), (1%Z <= n)%Z ->
  (forall (f:bitvec), (mem f s) <-> ((length f) = (n - 1%Z)%Z)) ->
  ((mapo_pre n s) = (my_map (fun (bv:bitvec) => (concat_l bv 1%Z)) s)).

Axiom mapo_pre_spec :
  forall (n:Z) (s:set bitvec), (1%Z <= n)%Z ->
  (forall (f:bitvec), (mem f s) <-> ((length f) = (n - 1%Z)%Z)) ->
  mem (make_bv (fun (us:Z) => 1%Z) n) (mapo_pre n s).

Axiom mapo_pre_spec1 :
  forall (n:Z) (s:set bitvec), (1%Z <= n)%Z ->
  (forall (f:bitvec), (mem f s) <-> ((length f) = (n - 1%Z)%Z)) ->
  forall (e:bitvec), (mem e (mapo_pre n s)) -> (((getbv e) 0%Z) = 1%Z).

Axiom mapo_pre_spec2 :
  forall (n:Z) (s:set bitvec), (1%Z <= n)%Z ->
  (forall (f:bitvec), (mem f s) <-> ((length f) = (n - 1%Z)%Z)) ->
  forall (e:bitvec), (mem e (mapo_pre n s)) ->
  exists bv:bitvec, (mem bv s) /\ (e = (concat_l bv 1%Z)).

Axiom mapo_pre_spec3 :
  forall (n:Z) (s:set bitvec), (1%Z <= n)%Z ->
  (forall (f:bitvec), (mem f s) <-> ((length f) = (n - 1%Z)%Z)) ->
  forall (e:bitvec), (mem e (mapo_pre n s)) -> ((length e) = n).

Axiom mapo_pre_spec4 :
  forall (n:Z) (s:set bitvec), (1%Z <= n)%Z ->
  (forall (f:bitvec), (mem f s) <-> ((length f) = (n - 1%Z)%Z)) ->
  forall (e:bitvec), ((length e) = n) -> (((getbv e) 0%Z) = 1%Z) ->
  mem e (mapo_pre n s).

Parameter n_bvs: Z -> set bitvec.

Axiom n_bvs_spec :
  forall (n:Z), (0%Z <= n)%Z -> (1%Z <= n)%Z -> forall (s:set bitvec),
  (forall (f:bitvec), (mem f s) <-> ((length f) = (n - 1%Z)%Z)) ->
  ((n_bvs n) = (union (mapz_pre n s) (mapo_pre n s))).

Axiom n_bvs_spec1 :
  forall (n:Z), (0%Z <= n)%Z -> forall (f:bitvec), (mem f (n_bvs n)) ->
  ((length f) = n).

Axiom n_bvs_spec2 :
  forall (n:Z), (0%Z <= n)%Z -> forall (f:bitvec), (mem f (n_bvs n)) ->
  ((length f) = n).

Axiom n_bvs_spec3 :
  forall (n:Z), (0%Z <= n)%Z -> forall (f:bitvec), ((length f) = n) ->
  mem f (n_bvs n).

Axiom n_bvs_spec4 :
  forall (n:Z), (0%Z <= n)%Z -> ((cardinal (n_bvs n)) > 0%Z)%Z.

Parameter mapz: Z -> set bitvec.

Axiom mapz_def :
  forall (n:Z), (1%Z <= n)%Z -> ((mapz n) = (mapz_pre n (n_bvs (n - 1%Z)%Z))).

Axiom mapz_spec :
  forall (n:Z), (1%Z <= n)%Z ->
  ((mapz n) =
   (my_map (fun (bv:bitvec) => (concat_l bv 0%Z)) (n_bvs (n - 1%Z)%Z))).

Axiom mapz_spec1 :
  forall (n:Z), (1%Z <= n)%Z -> (0%Z < (cardinal (mapz n)))%Z.

Axiom mapz_spec2 :
  forall (n:Z), (1%Z <= n)%Z -> forall (e:bitvec), (mem e (mapz n)) ->
  (((getbv e) 0%Z) = 0%Z).

Axiom mapz_spec3 :
  forall (n:Z), (1%Z <= n)%Z -> forall (e:bitvec), (mem e (mapz n)) ->
  exists bv:bitvec, (mem bv (n_bvs (n - 1%Z)%Z)) /\ (e = (concat_l bv 0%Z)).

Axiom mapz_spec4 :
  forall (n:Z), (1%Z <= n)%Z -> forall (e:bitvec), (mem e (mapz n)) ->
  ((length e) = n).

Axiom mapz_spec5 :
  forall (n:Z), (1%Z <= n)%Z -> forall (e:bitvec), ((length e) = n) ->
  (((getbv e) 0%Z) = 0%Z) -> mem e (mapz n).

Parameter mapo: Z -> set bitvec.

Axiom mapo_def :
  forall (n:Z), (1%Z <= n)%Z -> ((mapo n) = (mapo_pre n (n_bvs (n - 1%Z)%Z))).

Axiom mapo_spec :
  forall (n:Z), (1%Z <= n)%Z ->
  ((mapo n) =
   (my_map (fun (bv:bitvec) => (concat_l bv 1%Z)) (n_bvs (n - 1%Z)%Z))).

Axiom mapo_spec1 :
  forall (n:Z), (1%Z <= n)%Z -> (0%Z < (cardinal (mapo n)))%Z.

Axiom mapo_spec2 :
  forall (n:Z), (1%Z <= n)%Z -> forall (e:bitvec), (mem e (mapo n)) ->
  (((getbv e) 0%Z) = 1%Z).

Axiom mapo_spec3 :
  forall (n:Z), (1%Z <= n)%Z -> forall (e:bitvec), (mem e (mapo n)) ->
  exists bv:bitvec, (mem bv (n_bvs (n - 1%Z)%Z)) /\ (e = (concat_l bv 1%Z)).

Axiom mapo_spec4 :
  forall (n:Z), (1%Z <= n)%Z -> forall (e:bitvec), (mem e (mapo n)) ->
  ((length e) = n).

Axiom mapo_spec5 :
  forall (n:Z), (1%Z <= n)%Z -> forall (e:bitvec), ((length e) = n) ->
  (((getbv e) 0%Z) = 1%Z) -> mem e (mapo n).

Axiom n_bvs_node :
  forall (n:Z), (0%Z < n)%Z ->
  ((inter (mapz n) (mapo n)) = (empty : set bitvec)).

Axiom n_bvs_node1 :
  forall (n:Z), (0%Z < n)%Z -> ((union (mapz n) (mapo n)) = (n_bvs n)).

Parameter empty_bv: unit -> bitvec.

Axiom empty_bv_def :
  forall (us:unit), ((empty_bv us) = (make_bv (fun (us1:Z) => 0%Z) 0%Z)).

Axiom empty_bv_spec : forall (us:unit), ((length (empty_bv us)) = 0%Z).

Axiom empty_bv_spec1 :
  forall (us:unit), forall (x:bitvec), ((length x) = 0%Z) ->
  (x = (empty_bv us)).

Parameter n_bvsz: unit -> set bitvec.

Axiom n_bvsz_def : forall (us:unit), ((n_bvsz us) = (n_bvs 0%Z)).

Axiom n_bvsz_spec :
  forall (us:unit), forall (x:bitvec), ((length x) = 0%Z) ->
  mem x (n_bvsz us).

Axiom n_bvsz_spec1 :
  forall (us:unit), forall (x:bitvec), (mem x (n_bvsz us)) ->
  (x = (empty_bv tt)).

Axiom n_bvsz_spec2 :
  forall (us:unit), ((n_bvsz us) = (to_set (empty_bv tt))).

Parameter n_bvso: unit -> set bitvec.

Axiom n_bvso_def : forall (us:unit), ((n_bvso us) = (n_bvs 1%Z)).

Axiom n_bvso_spec :
  forall (us:unit), forall (x:bitvec), ((length x) = 1%Z) ->
  mem x (n_bvso us).

Axiom n_bvso_spec1 :
  forall (us:unit), forall (x:bitvec), (mem x (n_bvso us)) ->
  ((length x) = 1%Z).

Axiom n_bvso_spec2 :
  forall (us:unit),
  ((n_bvso us) =
   (add (make_bv (fun (us1:Z) => 0%Z) 1%Z)
    (to_set (make_bv (fun (us1:Z) => 1%Z) 1%Z)))).

Axiom injective_node :
  forall (n:Z), (0%Z <= n)%Z ->
  p_injective (fun (bv:bitvec) => (concat_l bv 0%Z)) (n_bvs n).

Axiom injective_node1 :
  forall (n:Z), (0%Z <= n)%Z ->
  p_injective (fun (bv:bitvec) => (concat_l bv 1%Z)) (n_bvs n).

Parameter n: Z.

Parameter f: bitvec -> matrix t.

Axiom H : (0%Z < n)%Z.

Axiom H1 : constant_size (n_bvs n) f.

Axiom H2 : (n = 1%Z).

(* Why3 goal *)
Theorem G :
  mem (choose (to_set (make_bv (fun (us:Z) => 1%Z) 1%Z)))
  (to_set (make_bv (fun (us:Z) => 1%Z) 1%Z)).
Proof.

Qed.