(* 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.MinMax.
Require int.EuclideanDivision.
Require real.Real.
Require real.FromInt.
Require real.Square.

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 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_spec : forall (x:t) (y:t), (teq x y) <-> (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_spec : forall (x:R) (y:R), (infix_eqas x y) <-> (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_spec :
  forall (x:R) (y:R), (infix_lsgtas x y) <-> ~ (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.

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) /\ (infix_lsgtas 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).

Parameter infix_gteqas: R -> R -> Prop.

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

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)) /\ (y = (im_part i)).

Parameter real_: t -> Prop.

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

Parameter pure_im_: t -> Prop.

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

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)) /\ (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)))) /\
   ((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))))) /\
  (((real_part (infix_asdt a b)) = (infix_asas (real_part a) (real_part 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)))) /\
  (((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)))) /\
   ((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)) /\ ((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 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))) /\
  ((real_ (infix_sldt tone a)) /\
   (((t_real_part (infix_sldt tone a)) = (infix_sldt tone (t_real_part a))) /\
    ((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) /\ ((real_ y) /\ (infix_lseqas (real_part x) (real_part y)))) \/
   (infix_eqeq 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) /\ ~ (infix_eqeq 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).

Parameter infix_gtdt: t -> t -> Prop.

Axiom infix_gtdt_def :
  forall (x:t) (y:t),
  (infix_gtdt x y) <-> ((infix_gteqdt x y) /\ ~ (infix_eqeq 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 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) /\ (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) /\ ((real_ y) /\ (infix_lseqas (real_part x) (real_part y)))) \/
   (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)) /\ (~ (b = tzero) -> (a = tzero)).

Axiom inf_zero_inv :
  forall (z:t), (infix_lsdt tzero z) ->
  (infix_lsdt tzero (infix_sldt tone 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) /\ ((real_ y) /\ (infix_lsas (real_part x) (real_part y)))).

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

Axiom sup_def :
  forall (x:t) (y:t),
  (infix_gtdt x y) <->
  ((real_ x) /\ ((real_ y) /\ (infix_gtas (real_part x) (real_part 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) /\ (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)) /\ (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)) /\ ((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_spec1 :
  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 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_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).

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)).

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) /\ (mem y 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)).

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) /\ (mem x 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) /\ ~ (mem x 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_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))))) /\
  (((infix_asdt a b) =
    (prefix_mndt (r_to_t (infix_asas (im_part a) (im_part b))))) /\
   (((real_part (infix_asdt a b)) =
     (prefix_mnas (infix_asas (im_part a) (im_part 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))))) /\
  (((infix_asdt a b) =
    (infix_asdt im (r_to_t (infix_asas (real_part a) (im_part b))))) /\
   (((real_part (infix_asdt a b)) = 0%R) /\
    ((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))))) /\
  (((infix_asdt a b) =
    (infix_asdt im (r_to_t (infix_asas (im_part a) (real_part b))))) /\
   (((real_part (infix_asdt a b)) = 0%R) /\
    ((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)))) /\
  ((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))) /\
  (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)))) /\
  ((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) /\
  ((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)) /\
  (((infix_asdt (square_rt x) (square_rt x)) = 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'))).

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 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 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) /\ (mem x 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_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 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 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 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) /\ (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') /\
  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)) /\ (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)) /\ (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) /\ ((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 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) /\ ~ (mem e 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) /\ ~ ((f e) = b1))) /\
  ((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))) /\
  (~ (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)) /\
  ((forall (a':a), forall (b1:b),
    (mem (a', b1) (right_injections a1 s)) <-> ((a' = a1) /\ (mem b1 s))) /\
   ((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))) /\
  (~ (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) /\ (b' = b1))) /\
  (((cardinal (left_injections s b1)) = (cardinal s)) /\
   ((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)) /\
  ((forall (a':a), forall (b1:b),
    (mem (a', b1) (right_injections a1 s)) <-> ((a' = a1) /\ (mem b1 s))) /\
   ((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) /\ (b' = b1))) /\
  (((cardinal (left_injections s b1)) = (cardinal s)) /\
   ((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))) /\
  (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) /\
  ((forall (a1:a), forall (b1:b),
    (mem (a1, b1) (cartesian_product s1 s2)) <-> ((mem a1 s1) /\ (mem b1 s2))) /\
   forall (o:(a* b)%type),
   (mem o (cartesian_product s1 s2)) <->
   ((mem (fir o) s1) /\ (mem (sec o) 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),
  match o with
  | (a1, b1) => ((commute o) = (b1, a1))
  end.

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') -> ~ (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),
  match o with
  | (a1, b1) =>
      ((mem o (cartesian_product s1 s2)) <-> ((mem a1 s1) /\ (mem b1 s2))) /\
      (((mem a1 s1) /\ (mem b1 s2)) <->
       (mem (b1, a1) (commute_product_el s1 s2)))
  end.

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)) /\
  (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))) /\
  (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))) /\
  (~ (is_empty s) ->
   ((iter_union s) = (union (choose s) (iter_union (remove (choose 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).

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).

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))).

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).

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)).

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))).

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).

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))).

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).

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 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) /\
   ((op_neutral_right op1 neut) /\ (op_assoc op1))).

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.

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) /\
   ((op_neutral_right op1 neutral1) /\ (op_assoc op1))).

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 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) /\ (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).

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) /\
   ((opposite1 op1 po1) /\ (opposite_com op1 po1))).

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)
    (c:im1),
  (iterable op1) -> (commut op1) ->
  (inverse_tuple op1 po1 (neutral_elt op1)) ->
  (((po1 ((op1 a) b)) a) = b) /\
  ((((po1 ((op1 b) a)) a) = b) /\
   ((((po1 a) ((po1 b) c)) = ((op1 ((po1 a) b)) c)) /\
    (((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 -> iterable op1) ->
  ((j <= i)%Z -> ((int_iterate op1 f i j) = (neutral_elt op1))) /\
  (~ (j <= i)%Z ->
   ((j = (i + 1%Z)%Z) -> ((int_iterate op1 f i j) = (f i))) /\
   (~ (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 -> iterable op1) ->
  ((j <= i)%Z -> ((int_iterate op1 f i j) = (neutral_elt 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))) /\
  (~ (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),
  ((cardinal (to_set e)) = 1%Z) /\
  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)) /\
  (((j <= i)%Z -> is_empty (to_fset i j)) /\
   forall (k:Z), (mem k (to_fset i j)) <-> ((i <= k)%Z /\ (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) /\ ((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) /\ ((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') /\
  forall (e1:a) (e':a), (mem e1 s) -> (mem e' s) -> ~ (e1 = e') ->
  ~ ((f e1) = (f e')).

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 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 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 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') /\
  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') /\
   forall (e':b), (mem e' s') -> exists e:a, (mem e s) /\ ((f e) = e')).

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') /\
  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') /\ (p_surjective 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') /\ ((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')) /\ (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') /\
  ((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')) /\
    ((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.

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 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) -> 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) -> 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) -> 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) -> 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) -> 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 -> 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 -> 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 -> 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 -> 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 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))))) /\
  (((t_real_part (infix_pldt i j)) =
    (infix_pldt (t_real_part i) (t_real_part j))) /\
   ((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) /\ ~ (neutral op1 (t1 e))).

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) /\ (neutral op1 (t1 e))).

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))) /\
  ((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),
  match o with
  | (a1, b1) => ((couple f o) = ((f a1) b1))
  end.

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) /\
  (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 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) /\
  ((opposite1 (fun (y0:t) (y1:t) => (infix_pldt y0 y1))
    (fun (y0:t) (y1:t) => (infix_mndt y0 y1))) /\
   ((opposite_com (fun (y0:t) (y1:t) => (infix_pldt y0 y1))
     (fun (y0:t) (y1:t) => (infix_mndt y0 y1))) /\
    (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 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 fc: (Z -> t) -> t -> Z -> Z -> Z -> t.

Axiom fc_def :
  forall (f:Z -> t) (g:t) (i:Z) (j:Z) (k:Z),
  (((i <= k)%Z /\ (k < j)%Z) -> (((fc f g i j) k) = (f k))) /\
  (~ ((i <= k)%Z /\ (k < j)%Z) -> (((fc f g i j) k) = g)).

Axiom ind_sum_eq_del_bound :
  forall (f:Z -> t) (g:t) (i:Z) (j:Z),
  ((ind_sum (fc f g i j) i j) = (ind_sum f i j)).

Parameter fc1: (Z -> t) -> t -> Z -> Z -> Z -> t.

Axiom fc_def1 :
  forall (f:Z -> t) (g:t) (i:Z) (j:Z) (k:Z),
  (((i <= k)%Z /\ (k < j)%Z) -> (((fc1 f g i j) k) = (f k))) /\
  (~ ((i <= k)%Z /\ (k < j)%Z) -> (((fc1 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 (fc1 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) /\ ~ ((t1 e) = tzero)).

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) /\ ~ ((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'))).

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))) /\
  (~ ((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) /\ (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))) /\
  (~ (is_empty s) ->
   (((p (choose s)) = true) ->
    ((my_filter s p) = (add (choose s) (my_filter (remove (choose s) s) p)))) /\
   (~ ((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))) /\
  ((forall (e:a), (mem e (my_filter s p)) -> mem e s) /\
   ((0%Z <= (cardinal (my_filter s p)))%Z /\
    ((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 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_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) /\
  (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) /\
  (((op_neutral_right (fun (y0:t) (y1:t) => (infix_asdt y0 y1)) tone) /\
    (op_assoc (fun (y0:t) (y1:t) => (infix_asdt y0 y1)))) /\
   ((commut (fun (y0:t) (y1:t) => (infix_asdt y0 y1))) /\
    (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).

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 /\
  (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)) /\
  (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 /\ (((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 /\ (((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))) /\
  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 /\
  ((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 /\
  (((0%Z <= ((int.EuclideanDivision.div i q) * q)%Z)%Z /\
    ((((int.EuclideanDivision.div i q) * q)%Z <= i)%Z /\
     (i < (q * ((int.EuclideanDivision.div i q) + 1%Z)%Z)%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)) /\
  ((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)) /\
  ((int.EuclideanDivision.div (int.EuclideanDivision.div i k) j) =
   (int.EuclideanDivision.div i (j * k)%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 /\ (((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.

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_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_part1 op1 s t1)) <-> ((mem e s) /\ ~ (neutral op1 (t1 e))).

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_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_part1 op1 s t1)) <-> ((mem e s) /\ (neutral op1 (t1 e))).

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) ->
  (s = (union (nonn_part1 op1 s t1) (n_part1 op1 s t1))) /\
  ((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)) /\
  (~ (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)) /\
  (~ (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)) /\
  (~ (((indic_bool a1 a') = true) /\ ((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'))) /\
  ((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')) /\
  (((indic_2 a1 a' b1 b') = (indic_2 a1 a' b' b1)) /\
   ((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)) /\
  (~ (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)) /\
  ((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 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 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 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))) /\
  ((1%Z = (neutral_elt (fun (y0:Z) (y1:Z) => (y0 * y1)%Z))) /\
   ((iterable (fun (y0:Z) (y1:Z) => (y0 + y1)%Z)) /\
    (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)).

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 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 isum_iter_ :
  (opposite_n (fun (y0:Z) (y1:Z) => (y0 + y1)%Z)
   (fun (y0:Z) (y1:Z) => (y0 - y1)%Z) 0%Z) /\
  ((opposite1 (fun (y0:Z) (y1:Z) => (y0 + y1)%Z)
    (fun (y0:Z) (y1:Z) => (y0 - y1)%Z)) /\
   ((opposite_com (fun (y0:Z) (y1:Z) => (y0 + y1)%Z)
     (fun (y0:Z) (y1:Z) => (y0 - y1)%Z)) /\
    (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 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 fc2: (Z -> Z) -> (Z -> Z) -> (Z -> bool) -> Z -> Z.

Axiom fc_def2 :
  forall (f:Z -> Z) (g:Z -> Z) (p:Z -> bool) (k:Z),
  (((p k) = true) -> (((fc2 f g p) k) = (f k))) /\
  (~ ((p k) = true) -> (((fc2 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 (fc2 f g p) i j) = (ind_isum f i j)).

Parameter fc3: (Z -> Z) -> (Z -> Z) -> (Z -> bool) -> Z -> Z.

Axiom fc_def3 :
  forall (f:Z -> Z) (g:Z -> Z) (p:Z -> bool) (k:Z),
  (((p k) = true) -> (((fc3 f g p) k) = (g k))) /\
  (~ ((p k) = true) -> (((fc3 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 (fc3 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 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_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_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_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)) /\
  (~ (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 fc4: Z -> Z -> Z.

Axiom fc_def4 :
  forall (i:Z) (k:Z),
  (((1%Z <= k)%Z /\ (k < (i + 1%Z)%Z)%Z) ->
   (((fc4 i) k) = (power 2%Z (k - 1%Z)%Z))) /\
  (~ ((1%Z <= k)%Z /\ (k < (i + 1%Z)%Z)%Z) -> (((fc4 i) k) = 0%Z)).

Axiom power_decomp_minus_one :
  forall (i:Z), (i >= 1%Z)%Z ->
  ((ind_isum (fc4 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) /\
  (((power k 1%Z) = k) /\ ((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 /\
  (((power k n) > 0%Z)%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 /\
  (((power k (n - 1%Z)%Z) < (power k 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)) /\
  (((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 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.

Parameter power_: Z -> Z -> Z.

Axiom power__def :
  forall (e:Z) (i:Z),
  ((i >= 0%Z)%Z -> ((power_ e i) = (power e i))) /\
  (~ (i >= 0%Z)%Z -> ((power_ e i) = 0%Z)).

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_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 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 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.

Parameter odd: Z -> bool.

Axiom odd_def :
  forall (n:Z),
  (((int.EuclideanDivision.mod1 n 2%Z) = 1%Z) -> ((odd n) = true)) /\
  (~ ((int.EuclideanDivision.mod1 n 2%Z) = 1%Z) -> ((odd n) = false)).

Axiom odd_spec :
  forall (n:Z),
  (((odd n) = true) ->
   (n = ((2%Z * (int.EuclideanDivision.div n 2%Z))%Z + 1%Z)%Z)) /\
  (((odd n) = false) -> (n = (2%Z * (int.EuclideanDivision.div n 2%Z))%Z)).

Parameter even: Z -> bool.

Axiom even_def :
  forall (n:Z),
  (((int.EuclideanDivision.mod1 n 2%Z) = 0%Z) -> ((even n) = true)) /\
  (~ ((int.EuclideanDivision.mod1 n 2%Z) = 0%Z) -> ((even n) = false)).

Axiom even_spec : forall (n:Z), ((even n) = true) <-> ~ ((odd n) = true).

Axiom even_to_mod :
  forall (n:Z), ((even n) = true) ->
  ((int.EuclideanDivision.mod1 n 2%Z) = 0%Z).

Axiom even_minus_one :
  forall (n:Z), (0%Z < n)%Z -> ((even n) = true) ->
  ((odd (n - 1%Z)%Z) = true).

Axiom odd_minus_one :
  forall (n:Z), (0%Z < n)%Z -> ((odd n) = true) ->
  ((even (n - 1%Z)%Z) = true).

Axiom odd_to_mod :
  forall (n:Z), ((odd n) = true) ->
  ((int.EuclideanDivision.mod1 n 2%Z) = 1%Z).

Axiom even_or_odd : forall (n:Z), ((even n) = true) \/ ((odd n) = true).

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) /\ ((im_part im) = 1%R).

Axiom tone_dec : ((real_part tone) = 1%R) /\ ((im_part tone) = 0%R).

Axiom tzero_dec : ((real_part tzero) = 0%R) /\ ((im_part tzero) = 0%R).

Axiom ttwo_dec : ((real_part ttwo) = 2%R) /\ ((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 abs_eqinf :
  forall (x:Z) (y:Z), ((x <= y)%Z /\ (y <= 0%Z)%Z) ->
  ((ZArith.BinInt.Z.abs x) >= (ZArith.BinInt.Z.abs y))%Z.

Axiom abs_inf :
  forall (x:Z) (y:Z), ((0%Z < x)%Z /\ ((x < y)%Z /\ (y <= 0%Z)%Z)) ->
  ((ZArith.BinInt.Z.abs x) > (ZArith.BinInt.Z.abs y))%Z.

Axiom abs_eqsup :
  forall (x:Z) (y:Z), ((0%Z >= x)%Z /\ (x >= y)%Z) ->
  ((ZArith.BinInt.Z.abs x) <= (ZArith.BinInt.Z.abs y))%Z.

Axiom abs_sup :
  forall (x:Z) (y:Z), ((0%Z >= x)%Z /\ (x > y)%Z) ->
  ((ZArith.BinInt.Z.abs x) < (ZArith.BinInt.Z.abs y))%Z.

Axiom inv_negeq :
  forall (x:Z), (0%Z >= x)%Z -> ((ZArith.BinInt.Z.abs x) >= 0%Z)%Z.

Axiom inv_neg1 :
  forall (x:Z), (0%Z > x)%Z -> ((ZArith.BinInt.Z.abs x) > 0%Z)%Z.

Parameter cpower: t -> Z -> t.

Axiom Cpower_zero : forall (i:t), ((cpower i 0%Z) = tone).

Axiom Cpower_one : forall (i:t), ((cpower i 1%Z) = i).

Axiom Cpower_sum :
  forall (i:t), forall (n:Z) (m:Z), ((i = tzero) -> ~ (n = (-m)%Z)) ->
  ((cpower i (n + m)%Z) = (infix_asdt (cpower i n) (cpower i m))).

Axiom zero_poower : forall (e:Z), ~ (e = 0%Z) -> ((cpower tzero e) = tzero).

Axiom cpower_ttwo_two : ((cpower ttwo 2%Z) = (i_to_t 4%Z)).

Parameter squarert_two: t.

Axiom squarert_two_def : (squarert_two = (square_rt ttwo)).

Axiom real_squarert_two : real_ squarert_two.

Axiom squarertTwo : ((cpower squarert_two 2%Z) = ttwo).

Axiom complete_rt_two :
  forall (a:t), (a = (infix_sldt squarert_two ttwo)) ->
  ((infix_asdt squarert_two a) = tone).

Axiom cpower_sum :
  forall (x:t) (n:Z) (m:Z), ((x = tzero) -> ~ (n = (-m)%Z)) ->
  ((cpower x (n + m)%Z) = (infix_asdt (cpower x n) (cpower x m))).

Axiom cpower_one : forall (x:t) (n:Z), (n = 1%Z) -> ((cpower x n) = x).

Axiom cpower_two :
  forall (x:t) (n:Z), (n = 2%Z) -> ((cpower x n) = (infix_asdt x x)).

Axiom cpower_sum_rev :
  forall (x:t) (n:Z) (m:Z), ((x = tzero) -> ~ (n = (-m)%Z)) ->
  ((infix_asdt (cpower x n) (cpower x m)) = (cpower x (n + m)%Z)).

Axiom cpower_plus_one :
  forall (e:t) (i:Z), ((e = tzero) -> ~ (i = (-1%Z)%Z)) ->
  ((cpower e (i + 1%Z)%Z) = (infix_asdt (cpower e i) e)).

Axiom cpower_zero : forall (e:t), ((cpower e 0%Z) = tone).

Axiom cpower_eq :
  forall (e:t) (e':t) (i:Z) (i':Z), (e = e') -> (i = i') ->
  ((cpower e i) = (cpower e' i')).

Axiom cpower_inv :
  forall (e:t) (i:Z), ~ (e = tzero) ->
  ((infix_asdt (cpower e i) (cpower e (-i)%Z)) = tone).

Axiom compat_cpower_leq :
  forall (a:t) (b:t) (i:Z), ((infix_lseqdt tzero a) /\ (infix_lseqdt a b)) ->
  (0%Z <= i)%Z ->
  (infix_lseqdt tzero (cpower a i)) /\
  (infix_lseqdt (cpower a i) (cpower b i)).

Axiom cpower_inv_rew :
  forall (e:t) (i:Z), ~ (e = tzero) ->
  ((cpower e i) = (infix_sldt tone (cpower e (-i)%Z))).

Axiom inv_cpower :
  forall (e:t) (i:Z), ~ ((cpower e i) = tzero) ->
  ((infix_sldt tone (cpower e i)) = (cpower e (-i)%Z)).

Axiom cpower_div :
  forall (x:t) (y:t) (n:Z), (0%Z <= n)%Z -> ~ (y = tzero) ->
  ((cpower (infix_sldt x y) n) = (infix_sldt (cpower x n) (cpower y n))).

Axiom cpower_div_rev :
  forall (x:t) (y:t) (n:Z), (0%Z <= n)%Z -> ~ (y = tzero) ->
  ((infix_sldt (cpower x n) (cpower y n)) = (cpower (infix_sldt x y) n)).

Axiom cpower_pi_bound_square_inv :
  infix_lseqdt (infix_sldt (i_to_t 4%Z) (cpower pi 2%Z)) tone.

Axiom cpower_mult_split :
  forall (x:t) (y:t) (m:Z), (0%Z <= m)%Z ->
  ((cpower (infix_asdt x y) m) = (infix_asdt (cpower x m) (cpower y m))).

Axiom not_cpower_zero :
  forall (e:t) (i:Z), ~ (e = tzero) -> ~ ((cpower e i) = tzero).

Axiom cpower_inv_out :
  forall (x:t) (y:t), (infix_lsdt tzero y) ->
  ((infix_asdt (cpower (infix_asdt (infix_sldt tone (square_rt y)) x) 2%Z) y)
   = (cpower x 2%Z)).

Axiom cpower_square_rt_raise :
  forall (x:t) (y:t), (infix_lsdt tzero y) ->
  ((cpower (infix_sldt x (square_rt y)) 2%Z) =
   (infix_sldt (infix_asdt (cpower x 2%Z) tone) y)).

Axiom cpower_subst :
  forall (x:t) (n:Z) (m:Z), ~ (x = tzero) ->
  ((infix_asdt (infix_sldt tone (cpower x n)) (cpower x m)) =
   (cpower x (m - n)%Z)).

Axiom cpower_tone_pos :
  forall (m:Z), (m >= 0%Z)%Z -> ((cpower tone m) = tone).

Axiom mult_cpower :
  forall (x:t) (x':t) (i:Z), (0%Z <= i)%Z ->
  ((infix_asdt (cpower x i) (cpower x' i)) = (cpower (infix_asdt x x') i)).

Axiom mult_cpower_rev :
  forall (x:t) (x':t) (i:Z), (0%Z <= i)%Z ->
  ((cpower (infix_asdt x x') i) = (infix_asdt (cpower x i) (cpower x' i))).

Axiom cpower_iterate :
  forall (e:t) (i:Z), (0%Z <= i)%Z ->
  ((cpower e i) =
   (int_iterate (fun (y0:t) (y1:t) => (infix_asdt y0 y1))
    ((fun (y0:t) (y1:Z) => (const y0 y1)) e) 0%Z i)).

Axiom cpower_modulus :
  forall (x:t) (n:Z), (0%Z <= n)%Z ->
  ((modulus (cpower x n)) = (cpower (modulus x) n)) /\
  (((n > 0%Z)%Z -> (infix_lsdt (modulus x) tone) ->
    infix_lsdt (modulus (cpower x n)) tone) /\
   (((n > 0%Z)%Z -> ((modulus x) = tone) -> ((modulus (cpower x n)) = tone)) /\
    (((n > 0%Z)%Z -> (infix_gtdt (modulus x) tone) ->
      infix_gtdt (modulus (cpower x n)) tone) /\
     (((n > 0%Z)%Z -> (infix_lsdt (modulus (cpower x n)) tone) ->
       infix_lsdt (modulus x) tone) /\
      (((n > 0%Z)%Z -> ((modulus (cpower x n)) = tone) ->
        ((modulus x) = tone)) /\
       ((n > 0%Z)%Z -> (infix_gtdt (modulus (cpower x n)) tone) ->
        infix_gtdt (modulus x) tone)))))).

Axiom cpower_mult_pre :
  forall (x:t) (n:Z) (m:Z), (0%Z <= m)%Z ->
  ((cpower x (n * m)%Z) = (cpower (cpower x n) m)).

Axiom cpower_mult :
  forall (x:t) (n:Z) (m:Z), ((cpower x (n * m)%Z) = (cpower (cpower x n) m)).

Axiom cpower_mult_rev :
  forall (x:t) (n:Z) (m:Z), ((cpower (cpower x n) m) = (cpower x (n * m)%Z)).

Axiom non_zero_cpower_pos :
  forall (i:t) (n:Z), ~ (i = tzero) -> (n >= 0%Z)%Z ->
  ~ ((cpower i n) = tzero).

Axiom inv_cpower_ :
  forall (e:t) (i:Z), ~ (e = tzero) ->
  ((infix_sldt tone (cpower e i)) = (cpower e (-i)%Z)).

Axiom zero_cpower_pos :
  forall (n:Z), (n > 0%Z)%Z -> ((cpower tzero n) = tzero).

Axiom zero_cpower : forall (n:Z), ~ (n = 0%Z) -> ((cpower tzero n) = tzero).

Axiom non_zero_cpower :
  forall (i:t) (n:Z), ~ (i = tzero) -> ~ ((cpower i n) = tzero).

Axiom real_cpower_pos :
  forall (elt:t) (i:Z), (real_ elt) -> (0%Z <= i)%Z -> real_ (cpower elt i).

Axiom real_cpower :
  forall (elt:t) (i:Z), (real_ elt) -> real_ (cpower elt i).

Axiom real_cpower_is_pos :
  forall (elt:t) (i:Z), (real_ elt) -> (infix_lseqdt tzero elt) ->
  (0%Z <= i)%Z -> infix_lseqdt tzero (cpower elt i).

Axiom real_cpower_is_strict_pos :
  forall (elt:t) (i:Z), (real_ elt) -> (infix_lsdt tzero elt) ->
  (0%Z <= i)%Z -> infix_lsdt tzero (cpower elt i).

Axiom real_modulus_square :
  forall (x:t), (real_ x) -> ((cpower (modulus x) 2%Z) = (cpower x 2%Z)).

Axiom real_modulus_pos :
  forall (x:t), (real_ x) -> (infix_gteqdt x tzero) -> ((modulus x) = x).

Parameter conjugate: t -> t.

Axiom conjugate_def :
  forall (i:t),
  ((conjugate i) =
   (infix_mndt (t_real_part i) (infix_asdt im (t_im_part i)))).

Axiom real_part_conjugate :
  forall (i:t), ((t_real_part (conjugate i)) = (t_real_part i)).

Axiom im_part_conjugate :
  forall (i:t), ((t_im_part (conjugate i)) = (prefix_mndt (t_im_part i))).

Axiom invol_conjugate : forall (i:t), ((conjugate (conjugate i)) = i).

Axiom add_conjugate :
  forall (i:t) (j:t),
  ((conjugate (infix_pldt i j)) = (infix_pldt (conjugate i) (conjugate j))).

Axiom add_own_conjugate :
  forall (i:t),
  ((infix_pldt i (conjugate i)) = (infix_asdt ttwo (t_real_part i))).

Axiom itself_times_conjugate :
  forall (i:t),
  (real_ (infix_asdt i (conjugate i))) /\
  ((infix_asdt i (conjugate i)) =
   (infix_pldt (infix_asdt (t_real_part i) (t_real_part i))
    (infix_asdt (t_im_part i) (t_im_part i)))).

Axiom conjugate_to_modulus :
  forall (i:t), ((modulus i) = (square_rt (infix_asdt i (conjugate i)))).

Axiom conjugate_times_itself_pos :
  forall (i:t), infix_lseqdt tzero (infix_asdt i (conjugate i)).

Axiom sum_conjugate :
  forall {a:Type} {a_WT:WhyType a},
  forall (s:set a) (f:a -> t),
  ((conjugate (sum s f)) = (sum s (fun (x:a) => (conjugate (f x))))).

Axiom conjugate_module_one :
  forall (i:t), ((modulus i) = tone) -> ((conjugate i) = (inv i)).

Axiom conjugate_module_one_rev :
  forall (i:t), ~ (i = tzero) -> ((conjugate i) = (inv i)) ->
  ((modulus i) = tone).

Axiom conjugate_real : forall (i:t), (real_ i) -> ((conjugate i) = i).

Axiom conjugate_real_gen : forall (i:t), (real_ i) -> ((conjugate i) = i).

Axiom conjugate_one : forall (x:t), (x = tone) -> ((conjugate x) = tone).

Axiom conjugate_tzero : forall (x:t), (x = tzero) -> ((conjugate x) = tzero).

Axiom conjugate_indic :
  forall {a:Type} {a_WT:WhyType a},
  forall (i:a) (j:a), ((conjugate (indic i j)) = (indic i j)).

Axiom conjugate_indic_rev :
  forall {a:Type} {a_WT:WhyType a},
  forall (i:a) (j:a), ((indic i j) = (conjugate (indic i j))).

Axiom conjugate_indic_gen_int :
  forall (i:Z) (j:Z), ((conjugate (indic i j)) = (indic i j)).

Axiom conjugate_pure_im :
  forall (i:t), (pure_im_ i) -> ((conjugate i) = (prefix_mndt i)).

Axiom conjugate_im : ((conjugate im) = (prefix_mndt im)).

Axiom conjugate_value :
  forall (c:t) (a:t) (b:t), (real_ a) -> (real_ b) ->
  (c = (infix_pldt a (infix_asdt im b))) ->
  ((conjugate c) = (infix_mndt a (infix_asdt im b))).

Axiom conjugate_minus_value :
  forall (c:t) (a:t) (b:t), (real_ a) -> (real_ b) ->
  (c = (infix_mndt a (infix_asdt im b))) ->
  ((conjugate c) = (infix_pldt a (infix_asdt im b))).

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

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

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

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

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

Axiom itself_prod_conjugate_modulus_one :
  forall (a:t), ((modulus a) = tone) -> ((infix_asdt a (conjugate a)) = tone).

Axiom conjugate_prod_itself_modulus_one :
  forall (a:t), ((modulus a) = tone) -> ((infix_asdt a (conjugate a)) = tone).

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

Axiom modulus_conjugate :
  forall (a:t), ((modulus a) = (modulus (conjugate a))).

Axiom modulus_pos1 :
  forall (a:t), (real_ a) -> (infix_lseqdt tzero a) -> ((modulus a) = a).

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

Axiom inv_rewrite :
  forall (x:t), ~ (x = tzero) ->
  ((infix_sldt tone x) = (infix_sldt (conjugate x) (cpower (modulus x) 2%Z))) /\
  ((infix_sldt tone x) =
   (infix_asdt (conjugate x) (infix_sldt tone (cpower (modulus x) 2%Z)))).

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

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

Axiom square_frac_modulus :
  forall (x:t) (y:t), ~ (y = tzero) ->
  ((cpower (modulus (infix_sldt x y)) 2%Z) =
   (infix_sldt (cpower (modulus x) 2%Z) (cpower (modulus y) 2%Z))).

Axiom extract_2_sq_modulus :
  forall (x:t) (y:t) (a:t), ~ (a = tzero) -> ~ (y = tzero) ->
  ((infix_sldt (cpower (modulus x) 2%Z) (cpower (modulus y) 2%Z)) =
   (infix_sldt (infix_asdt a (cpower (modulus x) 2%Z))
    (infix_asdt a (cpower (modulus y) 2%Z)))).

Axiom cpower_2_modulus_simpl :
  forall (x:t) (y:t) (z:t), ~ (x = tzero) -> ~ (y = tzero) ->
  ~ (z = tzero) ->
  ((infix_sldt (cpower (modulus (infix_asdt x y)) 2%Z)
    (cpower (modulus (infix_asdt z y)) 2%Z))
   = (infix_sldt (cpower (modulus x) 2%Z) (cpower (modulus z) 2%Z))).

Axiom cpower_div_leq_one :
  forall (a:t) (b:t) (i:Z), ((infix_lseqdt tzero a) /\ (infix_lseqdt a b)) ->
  (infix_lsdt tzero b) -> (0%Z <= i)%Z ->
  (infix_lseqdt tzero (infix_sldt (cpower a i) (cpower b i))) /\
  (infix_lseqdt (infix_sldt (cpower a i) (cpower b i)) tone).

Axiom cpower_cpower :
  forall (x:t) (a:Z) (b:Z), ((cpower (cpower x a) b) = (cpower x (a * b)%Z)).

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

Axiom growing_mult1 :
  forall (n:t) (m:t), (infix_lseqdt tzero n) -> (infix_lseqdt tone m) ->
  infix_lseqdt n (infix_asdt n m).

Axiom strict_growing_mult_pos :
  forall (n:t) (m:t), (infix_lsdt tone n) -> (infix_lsdt tone m) ->
  infix_lsdt n (infix_asdt n m).

Axiom init_exp1 :
  forall (k:t),
  ((cpower k 0%Z) = tone) /\
  (((cpower k 1%Z) = k) /\ ((cpower k 2%Z) = (infix_asdt k k))).

Axiom int_exp_pos :
  forall (k:t) (n:Z), (infix_lseqdt tone k) -> (0%Z <= n)%Z ->
  (infix_gteqdt (cpower k n) tone) /\
  ((infix_gtdt (cpower k n) tzero) /\
   (infix_lseqdt (cpower k n) (cpower k (n + 1%Z)%Z))).

Axiom strict_int_exp_pos :
  forall (k:t) (n:Z), (infix_lsdt tone k) -> (0%Z < n)%Z ->
  (infix_gtdt (cpower k n) tone) /\
  ((infix_lsdt (cpower k (n - 1%Z)%Z) (cpower k n)) /\
   (infix_lsdt (cpower k n) (cpower k (n + 1%Z)%Z))).

Axiom strict_int_exp_neg :
  forall (k:t) (n:Z), (infix_lsdt tone k) -> (n < 0%Z)%Z ->
  (infix_lsdt (cpower k n) tone) /\
  ((infix_lsdt (cpower k (n - 1%Z)%Z) (cpower k n)) /\
   (infix_lsdt (cpower k n) (cpower k (n + 1%Z)%Z))).

Axiom int_exp_neg :
  forall (k:t) (n:Z), (infix_lseqdt tone k) -> (n < 0%Z)%Z ->
  (infix_lseqdt (cpower k n) tone) /\
  ((infix_gtdt (cpower k n) tzero) /\
   (infix_lseqdt (cpower k n) (cpower k (n + 1%Z)%Z))).

Axiom positive_exp :
  forall (k:t) (m:Z), (infix_lseqdt tone k) -> infix_lsdt tzero (cpower k m).

Axiom growing_exp_pos :
  forall (k:t) (m:Z) (n:Z), (infix_lseqdt tone k) ->
  ((0%Z <= m)%Z /\ (m <= n)%Z) -> infix_lseqdt (cpower k m) (cpower k n).

Axiom growing_exp1 :
  forall (k:t) (m:Z) (n:Z), (infix_lseqdt tone k) -> (m <= n)%Z ->
  infix_lseqdt (cpower k m) (cpower k n).

Axiom growing_exp_arg :
  forall (k:t) (k':t) (n:Z),
  ((infix_lseqdt tzero k) /\ (infix_lseqdt k k')) -> (0%Z <= n)%Z ->
  infix_lseqdt (cpower k n) (cpower k' n).

Axiom strict_growing_exp1 :
  forall (k:t) (m:Z) (n:Z), (infix_lsdt tone k) -> (m < n)%Z ->
  infix_lsdt (cpower k m) (cpower k n).

Axiom cpower_comm_pos :
  forall (x:t) (y:t) (n:Z), (infix_lseqdt tone x) -> (infix_lseqdt tone y) ->
  (0%Z <= n)%Z ->
  ((cpower (infix_asdt x y) n) = (infix_asdt (cpower x n) (cpower y n))).

Axiom cpower_comm :
  forall (x:t) (y:t) (n:Z), (infix_lseqdt tone x) -> (infix_lseqdt tone y) ->
  ((cpower (infix_asdt x y) n) = (infix_asdt (cpower x n) (cpower y n))).

Axiom unicity_exp1 :
  forall (k:t) (m:Z) (n:Z), (infix_lsdt tone k) ->
  ((cpower k m) = (cpower k n)) <-> (m = n).

Axiom cpower_i_to_t :
  forall (a:Z) (b:Z), (0%Z <= b)%Z ->
  ((i_to_t (power_ a b)) = (cpower (i_to_t a) b)).

Axiom cpower_i_to_t_rev :
  forall (a:Z) (b:Z), (0%Z <= b)%Z ->
  ((cpower (i_to_t a) b) = (i_to_t (power_ a b))).

Axiom geometric_series :
  forall (a:t) (q:t) (n:Z), (1%Z <= n)%Z -> ~ (tone = q) ->
  ((sum (to_fset 0%Z n) (fun (i:Z) => (infix_asdt a (cpower q i)))) =
   (infix_sldt (infix_asdt a (infix_mndt tone (cpower q n)))
    (infix_mndt tone q))).

Axiom ind_geometric_series_r :
  forall (a:t) (q:t) (n:Z), (n >= 1%Z)%Z -> ~ (tone = q) ->
  ((ind_sum (fun (i:Z) => (infix_asdt a (cpower q i))) 0%Z n) =
   (infix_sldt (infix_asdt a (infix_mndt tone (cpower q n)))
    (infix_mndt tone q))).

Axiom ind_geometric_series :
  forall (q:t) (n:Z), (n >= 1%Z)%Z -> ~ (tone = q) ->
  ((ind_sum (fun (i:Z) => (cpower q i)) 0%Z n) =
   (infix_sldt (infix_mndt tone (cpower q n)) (infix_mndt tone q))).

Axiom geometric_series_init_one :
  forall (q:t) (n:Z), (n >= 1%Z)%Z -> ~ (tone = q) ->
  ((sum (to_fset 0%Z n) (fun (i:Z) => (cpower q i))) =
   (infix_sldt (infix_mndt tone (cpower q n)) (infix_mndt tone q))).

Axiom geometric_series_tone :
  forall (a:t) (q:t) (n:Z), (1%Z <= n)%Z -> (q = tone) ->
  ((sum (to_fset 0%Z n) (fun (i:Z) => (infix_asdt a (cpower q i)))) =
   (infix_asdt a (i_to_t n))).

Axiom geometric_series_tone_init_one :
  forall (q:t) (n:Z), (1%Z <= n)%Z -> (q = tone) ->
  ((sum (to_fset 0%Z n) (fun (i:Z) => (cpower q i))) = (i_to_t n)).

Axiom positive_cpower_2 :
  forall (x:t), (real_ x) -> ~ (tzero = x) -> infix_lsdt tzero (cpower x 2%Z).

Axiom positive_cpower_2_mod :
  forall (x:t), infix_lseqdt tzero (cpower (modulus x) 2%Z).

Axiom cpower_2_mod_non_null :
  forall (x:t), ~ (x = tzero) -> infix_lsdt tzero (cpower (modulus x) 2%Z).

Axiom cpower_2_mod_mult_non_null :
  forall (x:t) (y:t), ~ (x = tzero) -> ~ (y = tzero) ->
  infix_lsdt tzero (cpower (modulus x) 2%Z).

Axiom growing_cpower_2 :
  forall (x:t) (y:t), ((infix_lseqdt tzero x) /\ (infix_lseqdt x y)) ->
  infix_lseqdt (cpower x 2%Z) (cpower y 2%Z).

Axiom cpower_incr_power_2 :
  forall (k:Z), (0%Z <= k)%Z ->
  ((cpower (i_to_t (power_ 2%Z k)) 2%Z) = (i_to_t (power_ 2%Z (2%Z * k)%Z))).

Axiom cpower_modulus_incr_power_2 :
  forall (k:Z), (0%Z <= k)%Z ->
  ((cpower (modulus (i_to_t (power_ 2%Z k))) 2%Z) =
   (i_to_t (power_ 2%Z (2%Z * k)%Z))).

Axiom cpower_modulus_supeq :
  forall (x:t) (y:t) (i:Z), (i >= 1%Z)%Z ->
  (infix_gteqdt (modulus x) (modulus y)) ->
  infix_gteqdt (cpower (modulus x) i) (cpower (modulus y) i).

Axiom cpower_modulus_div_simpl :
  forall (x:t) (y:t) (z:t) (i:Z), (i >= 1%Z)%Z -> (infix_lseqdt tzero x) ->
  (infix_lsdt tzero y) -> (infix_lsdt tzero z) ->
  ((infix_sldt (cpower x i) (cpower y i)) =
   (infix_sldt (cpower (modulus (infix_asdt x z)) i)
    (cpower (modulus (infix_asdt y z)) i))).

Axiom cpower_two_modulus_div_simpl :
  forall (x:t) (y:t) (z:t), (real_ x) -> (real_ y) -> (real_ z) ->
  ~ (tzero = y) -> ~ (tzero = z) ->
  ((infix_sldt (cpower x 2%Z) (cpower y 2%Z)) =
   (infix_sldt (cpower (modulus (infix_asdt x z)) 2%Z)
    (cpower (modulus (infix_asdt y z)) 2%Z))).

Axiom cpower_minus_tone :
  forall (n:Z), (0%Z <= n)%Z ->
  (((even n) = true) -> ((cpower (prefix_mndt tone) n) = tone)) /\
  (((odd n) = true) -> ((cpower (prefix_mndt tone) n) = (prefix_mndt tone))).

Axiom cpower_minus_tone_even :
  forall (n:Z), (0%Z <= n)%Z -> ((even n) = true) ->
  ((cpower (prefix_mndt tone) n) = tone).

Axiom cpower_minus_tone_odd :
  forall (n:Z), (0%Z <= n)%Z -> ((odd n) = true) ->
  ((cpower (prefix_mndt tone) n) = (prefix_mndt tone)).

Parameter min_set: (set Z) -> Z.

Axiom min_set_def :
  forall (s:set Z), ((cardinal s) > 0%Z)%Z ->
  (((cardinal s) = 1%Z) -> ((min_set s) = (choose s))) /\
  (~ ((cardinal s) = 1%Z) ->
   ((min_set s) =
    (ZArith.BinInt.Z.min (choose s) (min_set (remove (choose s) s))))).

Axiom min_set_spec :
  forall (s:set Z), ((cardinal s) > 0%Z)%Z ->
  (mem (min_set s) s) /\ forall (e:Z), (mem e s) -> (e >= (min_set s))%Z.

Parameter max_set: (set Z) -> Z.

Axiom max_set_def :
  forall (s:set Z), ((cardinal s) > 0%Z)%Z ->
  (((cardinal s) = 1%Z) -> ((max_set s) = (choose s))) /\
  (~ ((cardinal s) = 1%Z) ->
   ((max_set s) =
    (ZArith.BinInt.Z.max (choose s) (max_set (remove (choose s) s))))).

Axiom max_set_spec :
  forall (s:set Z), ((cardinal s) > 0%Z)%Z ->
  (mem (max_set s) s) /\ forall (e:Z), (mem e s) -> (e <= (max_set s))%Z.

Parameter max3: Z -> Z -> Z -> Z.

Axiom max3_def :
  forall (a:Z) (b:Z) (c:Z),
  ((max3 a b c) = (ZArith.BinInt.Z.max (ZArith.BinInt.Z.max a b) c)).

Axiom max3_spec :
  forall (a:Z) (b:Z) (c:Z),
  ((max3 a b c) = (ZArith.BinInt.Z.max a (ZArith.BinInt.Z.max b c))).

Parameter min_filter: (set Z) -> (Z -> bool) -> Z.

Axiom min_filter_def :
  forall (s:set Z) (p:Z -> bool),
  (exists e:Z, (mem e s) /\ ((p e) = true)) ->
  (((p (min_set s)) = true) -> ((min_filter s p) = (min_set s))) /\
  (~ ((p (min_set s)) = true) ->
   ((min_filter s p) = (min_filter (remove (min_set s) s) p))).

Axiom min_filter_spec :
  forall (s:set Z) (p:Z -> bool),
  (exists e:Z, (mem e s) /\ ((p e) = true)) ->
  ((p (min_filter s p)) = true) /\
  ((mem (min_filter s p) s) /\
   ((forall (e:Z), (mem e s) -> ((p e) = true) -> ((min_filter s p) <= e)%Z) /\
    forall (e:Z), (mem e s) -> (e < (min_filter s p))%Z -> ~ ((p e) = true))).

Parameter max_filter: (set Z) -> (Z -> bool) -> Z.

Axiom max_filter_def :
  forall (s:set Z) (p:Z -> bool),
  (exists e:Z, (mem e s) /\ ((p e) = true)) ->
  (((p (max_set s)) = true) -> ((max_filter s p) = (max_set s))) /\
  (~ ((p (max_set s)) = true) ->
   ((max_filter s p) = (max_filter (remove (max_set s) s) p))).

Axiom max_filter_spec :
  forall (s:set Z) (p:Z -> bool),
  (exists e:Z, (mem e s) /\ ((p e) = true)) ->
  ((p (max_filter s p)) = true) /\
  ((mem (max_filter s p) s) /\
   ((forall (e:Z), (mem e s) -> ((p e) = true) -> (e <= (max_filter s p))%Z) /\
    forall (e:Z), (mem e s) -> ((max_filter s p) < e)%Z -> ~ ((p e) = true))).

Axiom appr_pre :
  forall (theta:t) (n:Z), (0%Z < n)%Z -> (real_ theta) ->
  ((infix_lsdt tzero theta) /\ (infix_lseqdt theta tone)) ->
  exists k:Z,
  (mem k (to_fset 0%Z (n + 1%Z)%Z)) /\
  (infix_lseqdt
   (modulus (infix_mndt theta (infix_sldt (i_to_t k) (i_to_t n))))
   (infix_sldt tone (i_to_t (n * 2%Z)%Z))).

Axiom appr :
  forall (theta:t) (n:Z), (0%Z < n)%Z -> (real_ theta) ->
  ((infix_lsdt tzero theta) /\ (infix_lseqdt theta tone)) ->
  exists k:Z,
  (mem k (to_fset 0%Z (n + 1%Z)%Z)) /\
  (infix_lseqdt
   (modulus (infix_mndt theta (infix_sldt (i_to_t k) (i_to_t n))))
   (infix_sldt tone (i_to_t (n * 2%Z)%Z))).

Parameter divisors: Z -> set Z.

Parameter result6: Z -> Z -> bool.

Axiom result_def6 :
  forall (i:Z) (j:Z),
  (((result6 i) j) = true) <->
  (((1%Z <= j)%Z /\ (j <= i)%Z) /\ ((int.EuclideanDivision.mod1 i j) = 0%Z)).

Axiom divisors_def :
  forall (i:Z), (0%Z < i)%Z ->
  ((divisors i) = (my_filter (to_fset 1%Z (i + 1%Z)%Z) (result6 i))).

Axiom divisors_spec :
  forall (i:Z), (0%Z < i)%Z ->
  (forall (j:Z), (mem j (divisors i)) -> (0%Z < j)%Z /\ (j <= i)%Z) /\
  ((forall (j:Z), (mem j (divisors i)) ->
    ((int.EuclideanDivision.mod1 i j) = 0%Z)) /\
   ((forall (j:Z), (mem j (divisors i)) ->
     exists k:Z, ((1%Z <= k)%Z /\ (k <= i)%Z) /\ (i = (k * j)%Z)) /\
    ((forall (j:Z), ((1%Z <= j)%Z /\ (j <= i)%Z) ->
      ((int.EuclideanDivision.mod1 i j) = 0%Z) -> mem j (divisors i)) /\
     forall (j:Z), ((1%Z <= j)%Z /\ (j <= i)%Z) ->
     (exists k:Z, ((1%Z <= k)%Z /\ (k <= i)%Z) /\ (i = (k * j)%Z)) ->
     mem j (divisors i)))).

Axiom set_mem_divisors :
  forall (i:Z) (j:Z), (0%Z < i)%Z -> ((1%Z <= j)%Z /\ (j <= i)%Z) ->
  ((int.EuclideanDivision.mod1 i j) = 0%Z) -> mem j (divisors i).

Axiom unicity_div_rev :
  forall (i:Z) (j:Z) (q:Z), (0%Z < i)%Z -> (mem j (divisors i)) ->
  (q = (int.EuclideanDivision.div i j)) -> (i = (q * j)%Z).

Axiom mem_own_divisors : forall (i:Z), (0%Z < i)%Z -> mem i (divisors i).

Axiom mem_one_divisors : forall (i:Z), (0%Z < i)%Z -> mem 1%Z (divisors i).

Parameter prime: Z -> Prop.

Axiom prime_def :
  forall (a:Z),
  (prime a) <-> ((0%Z < a)%Z /\ ((divisors a) = (add a (to_set 1%Z)))).

Axiom card_prime_divisors :
  forall (a:Z), (1%Z < a)%Z -> (prime a) -> ((cardinal (divisors a)) = 2%Z).

Parameter co_prime: Z -> Z -> Prop.

Axiom co_prime_def :
  forall (a:Z) (b:Z),
  (co_prime a b) <->
  ((0%Z < a)%Z /\
   ((0%Z < b)%Z /\ ((inter (divisors a) (divisors b)) = (to_set 1%Z)))).

Axiom symetric_co_prime :
  forall (a:Z) (b:Z), (0%Z < a)%Z -> (0%Z < b)%Z -> (co_prime a b) ->
  co_prime b a.

Axiom mem_divisors_trans :
  forall (a:Z) (b:Z) (c:Z), (0%Z < c)%Z -> (mem b (divisors c)) ->
  (mem a (divisors b)) -> mem a (divisors c).

Axiom subset_divisors :
  forall (a:Z) (b:Z), (0%Z < b)%Z -> (mem a (divisors b)) ->
  subset (divisors a) (divisors b).

Axiom not_prime_divisors :
  forall (a:Z), (1%Z < a)%Z -> ~ (prime a) ->
  (2%Z < (cardinal (divisors a)))%Z /\
  exists i:Z, (mem i (divisors a)) /\ (~ (i = 1%Z) /\ ~ (i = a)).

Axiom strict_subset_divisors :
  forall (a:Z) (b:Z), (0%Z < b)%Z -> ~ (a = b) -> (mem a (divisors b)) ->
  (subset (divisors a) (divisors b)) /\
  (~ ((divisors a) = (divisors b)) /\
   ((cardinal (divisors a)) < (cardinal (divisors b)))%Z).

Axiom divisors_contains_prime :
  forall (i:Z), (1%Z < i)%Z ->
  exists j:Z, (prime j) /\ ((1%Z < j)%Z /\ (mem j (divisors i))).

Axiom set_not_co_prime :
  forall (a:Z) (b:Z) (k:Z), (0%Z < a)%Z -> (0%Z < b)%Z -> ~ (a = b) ->
  ((1%Z < k)%Z /\ (k <= a)%Z) -> ((1%Z < k)%Z /\ (k <= b)%Z) ->
  ((int.EuclideanDivision.mod1 a k) = 0%Z) ->
  ((int.EuclideanDivision.mod1 b k) = 0%Z) -> ~ (co_prime a b).

Axiom set_not_co_prime_ :
  forall (a:Z) (b:Z), (0%Z < a)%Z -> (0%Z < b)%Z -> ~ (a = b) ->
  (exists k:Z,
   ((1%Z < k)%Z /\ (k <= a)%Z) /\
   (((1%Z < k)%Z /\ (k <= b)%Z) /\
    (((int.EuclideanDivision.mod1 a k) = 0%Z) /\
     ((int.EuclideanDivision.mod1 b k) = 0%Z)))) ->
  ~ (co_prime a b).

Axiom set_co_prime :
  forall (a:Z) (b:Z), (0%Z < a)%Z -> (0%Z < b)%Z -> ~ (a = b) ->
  (forall (c:Z), (mem c (divisors a)) -> ~ (c = 1%Z) ->
   ~ (mem c (divisors b))) ->
  co_prime a b.

Axiom co_prime_to_mod :
  forall (a:Z) (b:Z), (0%Z < a)%Z -> (1%Z < b)%Z -> ~ (a = b) ->
  (co_prime a b) -> (0%Z < (int.EuclideanDivision.mod1 a b))%Z.

Axiom co_prime_to_mod_right :
  forall (a:Z) (b:Z), (1%Z < a)%Z -> (0%Z < b)%Z -> ~ (a = b) ->
  (co_prime a b) -> (0%Z < (int.EuclideanDivision.mod1 b a))%Z.

Axiom inter_div_mod :
  forall (a:Z) (b:Z), (0%Z < a)%Z -> (1%Z < b)%Z -> (co_prime a b) ->
  subset (inter (divisors (int.EuclideanDivision.mod1 a b)) (divisors b))
  (inter (divisors a) (divisors b)).

Axiom co_prime_mod :
  forall (a:Z) (b:Z), (0%Z < a)%Z -> (1%Z < b)%Z -> (co_prime a b) ->
  co_prime (int.EuclideanDivision.mod1 a b) b.

Axiom co_prime_by_primes :
  forall (a:Z) (b:Z), (0%Z < a)%Z -> (1%Z < b)%Z -> ~ (a = b) ->
  (forall (c:Z), (prime c) -> ~ (c = 1%Z) -> (mem c (divisors a)) ->
   ~ (mem c (divisors b))) ->
  co_prime a b.

Parameter a: Z.

Parameter b: Z.

Parameter c: Z.

Axiom H : (0%Z < a)%Z.

Axiom H1 : (0%Z < b)%Z.

Axiom H2 : (0%Z < c)%Z.

Axiom H3 : prime c.

Axiom H4 : ((int.EuclideanDivision.mod1 (a * b)%Z c) = 0%Z).

Axiom H5 : ~ ((int.EuclideanDivision.mod1 b c) = 0%Z).

Axiom H6 : ~ ((int.EuclideanDivision.mod1 a c) = 0%Z).

Axiom H7 : (1%Z < c)%Z -> ((cardinal (to_fset 1%Z c)) = (c - 1%Z)%Z).

Axiom H8 : (c <= 1%Z)%Z -> is_empty (to_fset 1%Z c).

Axiom H9 :
  forall (k:Z), (mem k (to_fset 1%Z c)) <-> ((1%Z <= k)%Z /\ (k < c)%Z).

Parameter b': Z.

Parameter o: Z -> bool.

Axiom o_def :
  forall (d:Z),
  ((o d) = true) <->
  (((1%Z <= d)%Z /\ (d <= c)%Z) /\
   (~ ((int.EuclideanDivision.mod1 d c) = 0%Z) /\
    ((int.EuclideanDivision.mod1 (a * d)%Z c) = 0%Z))).

Axiom b'_def : (b' = (min_filter (to_fset 1%Z c) o)).

Parameter o1: Z -> bool.

Axiom o_def1 :
  forall (d:Z),
  ((o1 d) = true) <->
  (((1%Z <= d)%Z /\ (d <= c)%Z) /\
   (~ ((int.EuclideanDivision.mod1 d c) = 0%Z) /\
    ((int.EuclideanDivision.mod1 (a * d)%Z c) = 0%Z))).

Axiom H10 : ((o1 b') = true).

Axiom H11 : mem b' (to_fset 1%Z c).

Parameter o2: Z -> bool.

Axiom o_def2 :
  forall (d:Z),
  ((o2 d) = true) <->
  (((1%Z <= d)%Z /\ (d <= c)%Z) /\
   (~ ((int.EuclideanDivision.mod1 d c) = 0%Z) /\
    ((int.EuclideanDivision.mod1 (a * d)%Z c) = 0%Z))).

Axiom H12 :
  forall (e:Z), (mem e (to_fset 1%Z c)) -> ((o2 e) = true) -> (b' <= e)%Z.

Parameter o3: Z -> bool.

Axiom o_def3 :
  forall (d:Z),
  ((o3 d) = true) <->
  (((1%Z <= d)%Z /\ (d <= c)%Z) /\
   (~ ((int.EuclideanDivision.mod1 d c) = 0%Z) /\
    ((int.EuclideanDivision.mod1 (a * d)%Z c) = 0%Z))).

Axiom H13 :
  forall (e:Z), (mem e (to_fset 1%Z c)) -> (e < b')%Z -> ~ ((o3 e) = true).

Axiom H14 : (0%Z < b')%Z.

Axiom H15 : (b' < c)%Z.

Axiom H16 : (0%Z < (int.EuclideanDivision.mod1 b' c))%Z.

Parameter r: Z.

Axiom r_def : (r = (int.EuclideanDivision.mod1 c b')).

Axiom h : (0%Z = r).

Axiom h1 : mem b' (divisors c).

(* Why3 goal *)
Theorem h2 : ~ ((0%Z < c)%Z /\ ((divisors c) = (add c (to_set 1%Z)))).
Proof.

Qed.