Built with Alectryon, running Coq+SerAPI v8.10.0+0.7.0. Coq sources are in this panel; goals and messages will appear in the other. Bubbles () indicate interactive fragments: hover for details, tap to reveal contents. Use Ctrl+↑ Ctrl+↓ to navigate, Ctrl+🖱️ to focus.
(************************************************************************)
(*         *   The Coq Proof Assistant / The Coq Development Team       *)
(*  v      *   INRIA, CNRS and contributors - Copyright 1999-2018       *)
(* <O___,, *       (see CREDITS file for the list of authors)           *)
(*   \VV/  **************************************************************)
(*    //   *    This file is distributed under the terms of the         *)
(*         *     GNU Lesser General Public License Version 2.1          *)
(*         *     (see LICENSE file for the text of the license)         *)
(************************************************************************)

Require Import Rbase.
Require Import Rbasic_fun.
Require Import Even.
Require Import Div2.
Require Import ArithRing.

Local Open Scope Z_scope.
Local Open Scope R_scope.


forall n i : nat, (i < n)%nat -> (n - i)%nat <> 0%nat

forall n i : nat, (i < n)%nat -> (n - i)%nat <> 0%nat
n, i:nat
H:(i < n)%nat
H0:(n - i)%nat = 0%nat

False
n, i:nat
H:(i < n)%nat
H0:(n - i)%nat = 0%nat

(forall n0 m : nat, (m <= n0)%nat -> (n0 - m)%nat = 0%nat -> n0 = m) -> False
n, i:nat
H:(i < n)%nat
H0:(n - i)%nat = 0%nat
forall n0 m : nat, (m <= n0)%nat -> (n0 - m)%nat = 0%nat -> n0 = m
n, i:nat
H:(i < n)%nat
H0:(n - i)%nat = 0%nat

forall n0 m : nat, (m <= n0)%nat -> (n0 - m)%nat = 0%nat -> n0 = m
n, i:nat
H:(i < n)%nat
H0:(n - i)%nat = 0%nat
R:=fun n0 m : nat => (m <= n0)%nat -> (n0 - m)%nat = 0%nat -> n0 = m:nat -> nat -> Prop

forall n0 m : nat, (m <= n0)%nat -> (n0 - m)%nat = 0%nat -> n0 = m
n, i:nat
H:(i < n)%nat
H0:(n - i)%nat = 0%nat
R:=fun n0 m : nat => (m <= n0)%nat -> (n0 - m)%nat = 0%nat -> n0 = m:nat -> nat -> Prop

((forall n0 m : nat, R n0 m) -> forall n0 m : nat, (m <= n0)%nat -> (n0 - m)%nat = 0%nat -> n0 = m) -> forall n0 m : nat, (m <= n0)%nat -> (n0 - m)%nat = 0%nat -> n0 = m
n, i:nat
H:(i < n)%nat
H0:(n - i)%nat = 0%nat
R:=fun n0 m : nat => (m <= n0)%nat -> (n0 - m)%nat = 0%nat -> n0 = m:nat -> nat -> Prop
(forall n0 m : nat, R n0 m) -> forall n0 m : nat, (m <= n0)%nat -> (n0 - m)%nat = 0%nat -> n0 = m
n, i:nat
H:(i < n)%nat
H0:(n - i)%nat = 0%nat
R:=fun n0 m : nat => (m <= n0)%nat -> (n0 - m)%nat = 0%nat -> n0 = m:nat -> nat -> Prop
H1:(forall n0 m : nat, R n0 m) -> forall n0 m : nat, (m <= n0)%nat -> (n0 - m)%nat = 0%nat -> n0 = m

forall n0 m : nat, R n0 m
n, i:nat
H:(i < n)%nat
H0:(n - i)%nat = 0%nat
R:=fun n0 m : nat => (m <= n0)%nat -> (n0 - m)%nat = 0%nat -> n0 = m:nat -> nat -> Prop
(forall n0 m : nat, R n0 m) -> forall n0 m : nat, (m <= n0)%nat -> (n0 - m)%nat = 0%nat -> n0 = m
n, i:nat
H:(i < n)%nat
H0:(n - i)%nat = 0%nat
R:=fun n0 m : nat => (m <= n0)%nat -> (n0 - m)%nat = 0%nat -> n0 = m:nat -> nat -> Prop
H1:(forall n0 m : nat, R n0 m) -> forall n0 m : nat, (m <= n0)%nat -> (n0 - m)%nat = 0%nat -> n0 = m

forall n0 : nat, R 0%nat n0
n, i:nat
H:(i < n)%nat
H0:(n - i)%nat = 0%nat
R:=fun n0 m : nat => (m <= n0)%nat -> (n0 - m)%nat = 0%nat -> n0 = m:nat -> nat -> Prop
H1:(forall n0 m : nat, R n0 m) -> forall n0 m : nat, (m <= n0)%nat -> (n0 - m)%nat = 0%nat -> n0 = m
forall n0 : nat, R (S n0) 0%nat
n, i:nat
H:(i < n)%nat
H0:(n - i)%nat = 0%nat
R:=fun n0 m : nat => (m <= n0)%nat -> (n0 - m)%nat = 0%nat -> n0 = m:nat -> nat -> Prop
H1:(forall n0 m : nat, R n0 m) -> forall n0 m : nat, (m <= n0)%nat -> (n0 - m)%nat = 0%nat -> n0 = m
forall n0 m : nat, R n0 m -> R (S n0) (S m)
n, i:nat
H:(i < n)%nat
H0:(n - i)%nat = 0%nat
R:=fun n0 m : nat => (m <= n0)%nat -> (n0 - m)%nat = 0%nat -> n0 = m:nat -> nat -> Prop
(forall n0 m : nat, R n0 m) -> forall n0 m : nat, (m <= n0)%nat -> (n0 - m)%nat = 0%nat -> n0 = m
n, i:nat
H:(i < n)%nat
H0:(n - i)%nat = 0%nat
R:=fun n0 m : nat => (m <= n0)%nat -> (n0 - m)%nat = 0%nat -> n0 = m:nat -> nat -> Prop
H1:(forall n0 m : nat, R n0 m) -> forall n0 m : nat, (m <= n0)%nat -> (n0 - m)%nat = 0%nat -> n0 = m

forall n0 : nat, R (S n0) 0%nat
n, i:nat
H:(i < n)%nat
H0:(n - i)%nat = 0%nat
R:=fun n0 m : nat => (m <= n0)%nat -> (n0 - m)%nat = 0%nat -> n0 = m:nat -> nat -> Prop
H1:(forall n0 m : nat, R n0 m) -> forall n0 m : nat, (m <= n0)%nat -> (n0 - m)%nat = 0%nat -> n0 = m
forall n0 m : nat, R n0 m -> R (S n0) (S m)
n, i:nat
H:(i < n)%nat
H0:(n - i)%nat = 0%nat
R:=fun n0 m : nat => (m <= n0)%nat -> (n0 - m)%nat = 0%nat -> n0 = m:nat -> nat -> Prop
(forall n0 m : nat, R n0 m) -> forall n0 m : nat, (m <= n0)%nat -> (n0 - m)%nat = 0%nat -> n0 = m
n, i:nat
H:(i < n)%nat
H0:(n - i)%nat = 0%nat
R:=fun n0 m : nat => (m <= n0)%nat -> (n0 - m)%nat = 0%nat -> n0 = m:nat -> nat -> Prop
H1:(forall n0 m : nat, R n0 m) -> forall n0 m : nat, (m <= n0)%nat -> (n0 - m)%nat = 0%nat -> n0 = m

forall n0 m : nat, R n0 m -> R (S n0) (S m)
n, i:nat
H:(i < n)%nat
H0:(n - i)%nat = 0%nat
R:=fun n0 m : nat => (m <= n0)%nat -> (n0 - m)%nat = 0%nat -> n0 = m:nat -> nat -> Prop
(forall n0 m : nat, R n0 m) -> forall n0 m : nat, (m <= n0)%nat -> (n0 - m)%nat = 0%nat -> n0 = m
n, i:nat
H:(i < n)%nat
H0:(n - i)%nat = 0%nat
R:=fun n0 m : nat => (m <= n0)%nat -> (n0 - m)%nat = 0%nat -> n0 = m:nat -> nat -> Prop

(forall n0 m : nat, R n0 m) -> forall n0 m : nat, (m <= n0)%nat -> (n0 - m)%nat = 0%nat -> n0 = m
unfold R; intros; apply H1; assumption. Qed.

forall n i : nat, (i <= n)%nat -> (n - i <= n)%nat

forall n i : nat, (i <= n)%nat -> (n - i <= n)%nat
R:=fun m n : nat => (n <= m)%nat -> (m - n <= m)%nat:nat -> nat -> Prop

forall n i : nat, (i <= n)%nat -> (n - i <= n)%nat
R:=fun m n : nat => (n <= m)%nat -> (m - n <= m)%nat:nat -> nat -> Prop

((forall m n : nat, R m n) -> forall n i : nat, (i <= n)%nat -> (n - i <= n)%nat) -> forall n i : nat, (i <= n)%nat -> (n - i <= n)%nat
R:=fun m n : nat => (n <= m)%nat -> (m - n <= m)%nat:nat -> nat -> Prop
(forall m n : nat, R m n) -> forall n i : nat, (i <= n)%nat -> (n - i <= n)%nat
R:=fun m n : nat => (n <= m)%nat -> (m - n <= m)%nat:nat -> nat -> Prop
H:(forall m n : nat, R m n) -> forall n i : nat, (i <= n)%nat -> (n - i <= n)%nat

forall m n : nat, R m n
R:=fun m n : nat => (n <= m)%nat -> (m - n <= m)%nat:nat -> nat -> Prop
(forall m n : nat, R m n) -> forall n i : nat, (i <= n)%nat -> (n - i <= n)%nat
R:=fun m n : nat => (n <= m)%nat -> (m - n <= m)%nat:nat -> nat -> Prop
H:(forall m n : nat, R m n) -> forall n i : nat, (i <= n)%nat -> (n - i <= n)%nat

forall n : nat, R 0%nat n
R:=fun m n : nat => (n <= m)%nat -> (m - n <= m)%nat:nat -> nat -> Prop
H:(forall m n : nat, R m n) -> forall n i : nat, (i <= n)%nat -> (n - i <= n)%nat
forall n : nat, R (S n) 0%nat
R:=fun m n : nat => (n <= m)%nat -> (m - n <= m)%nat:nat -> nat -> Prop
H:(forall m n : nat, R m n) -> forall n i : nat, (i <= n)%nat -> (n - i <= n)%nat
forall n m : nat, R n m -> R (S n) (S m)
R:=fun m n : nat => (n <= m)%nat -> (m - n <= m)%nat:nat -> nat -> Prop
(forall m n : nat, R m n) -> forall n i : nat, (i <= n)%nat -> (n - i <= n)%nat
R:=fun m n : nat => (n <= m)%nat -> (m - n <= m)%nat:nat -> nat -> Prop
H:(forall m n : nat, R m n) -> forall n i : nat, (i <= n)%nat -> (n - i <= n)%nat

forall n : nat, R (S n) 0%nat
R:=fun m n : nat => (n <= m)%nat -> (m - n <= m)%nat:nat -> nat -> Prop
H:(forall m n : nat, R m n) -> forall n i : nat, (i <= n)%nat -> (n - i <= n)%nat
forall n m : nat, R n m -> R (S n) (S m)
R:=fun m n : nat => (n <= m)%nat -> (m - n <= m)%nat:nat -> nat -> Prop
(forall m n : nat, R m n) -> forall n i : nat, (i <= n)%nat -> (n - i <= n)%nat
R:=fun m n : nat => (n <= m)%nat -> (m - n <= m)%nat:nat -> nat -> Prop
H:(forall m n : nat, R m n) -> forall n i : nat, (i <= n)%nat -> (n - i <= n)%nat

forall n m : nat, R n m -> R (S n) (S m)
R:=fun m n : nat => (n <= m)%nat -> (m - n <= m)%nat:nat -> nat -> Prop
(forall m n : nat, R m n) -> forall n i : nat, (i <= n)%nat -> (n - i <= n)%nat
R:=fun m0 n0 : nat => (n0 <= m0)%nat -> (m0 - n0 <= m0)%nat:nat -> nat -> Prop
H:(forall m0 n0 : nat, R m0 n0) -> forall n0 i : nat, (i <= n0)%nat -> (n0 - i <= n0)%nat
n, m:nat
H0:(m <= n)%nat -> (n - m <= n)%nat
H1:(S m <= S n)%nat

(n - m <= n)%nat
R:=fun m0 n0 : nat => (n0 <= m0)%nat -> (m0 - n0 <= m0)%nat:nat -> nat -> Prop
H:(forall m0 n0 : nat, R m0 n0) -> forall n0 i : nat, (i <= n0)%nat -> (n0 - i <= n0)%nat
n, m:nat
H0:(m <= n)%nat -> (n - m <= n)%nat
H1:(S m <= S n)%nat
(n <= S n)%nat
R:=fun m n : nat => (n <= m)%nat -> (m - n <= m)%nat:nat -> nat -> Prop
(forall m n : nat, R m n) -> forall n i : nat, (i <= n)%nat -> (n - i <= n)%nat
R:=fun m0 n0 : nat => (n0 <= m0)%nat -> (m0 - n0 <= m0)%nat:nat -> nat -> Prop
H:(forall m0 n0 : nat, R m0 n0) -> forall n0 i : nat, (i <= n0)%nat -> (n0 - i <= n0)%nat
n, m:nat
H0:(m <= n)%nat -> (n - m <= n)%nat
H1:(S m <= S n)%nat

(n <= S n)%nat
R:=fun m n : nat => (n <= m)%nat -> (m - n <= m)%nat:nat -> nat -> Prop
(forall m n : nat, R m n) -> forall n i : nat, (i <= n)%nat -> (n - i <= n)%nat
R:=fun m n : nat => (n <= m)%nat -> (m - n <= m)%nat:nat -> nat -> Prop

(forall m n : nat, R m n) -> forall n i : nat, (i <= n)%nat -> (n - i <= n)%nat
unfold R; intros; apply H; assumption. Qed.

forall m n : nat, (m < n)%nat -> (0 < n - m)%nat

forall m n : nat, (m < n)%nat -> (0 < n - m)%nat
intros n m; pattern n, m; apply nat_double_ind; [ intros; rewrite <- minus_n_O; assumption | intros; elim (lt_n_O _ H) | intros; simpl; apply H; apply lt_S_n; assumption ]. Qed.

forall n : nat, exists p : nat, n = (2 * p)%nat \/ n = S (2 * p)

forall n : nat, exists p : nat, n = (2 * p)%nat \/ n = S (2 * p)
n:nat

exists p : nat, n = (2 * p)%nat \/ n = S (2 * p)
n:nat
H:even n \/ odd n

exists p : nat, n = (2 * p)%nat \/ n = S (2 * p)
n:nat
H:even n \/ odd n

n = (2 * Nat.div2 n)%nat \/ n = S (2 * Nat.div2 n)
n:nat
H:even n \/ odd n
H0:(even n <-> n = Nat.double (Nat.div2 n)) /\ (odd n <-> n = S (Nat.double (Nat.div2 n)))

n = (2 * Nat.div2 n)%nat \/ n = S (2 * Nat.div2 n)
n:nat
H:even n \/ odd n
H0:(even n <-> n = Nat.double (Nat.div2 n)) /\ (odd n <-> n = S (Nat.double (Nat.div2 n)))
H1:even n <-> n = Nat.double (Nat.div2 n)
H2:odd n <-> n = S (Nat.double (Nat.div2 n))

n = (2 * Nat.div2 n)%nat \/ n = S (2 * Nat.div2 n)
n:nat
H:even n \/ odd n
H0:(even n <-> n = Nat.double (Nat.div2 n)) /\ (odd n <-> n = S (Nat.double (Nat.div2 n)))
H1:even n <-> n = Nat.double (Nat.div2 n)
H2:odd n <-> n = S (Nat.double (Nat.div2 n))
H3:even n -> n = Nat.double (Nat.div2 n)

n = (2 * Nat.div2 n)%nat \/ n = S (2 * Nat.div2 n)
n:nat
H:even n \/ odd n
H0:(even n <-> n = Nat.double (Nat.div2 n)) /\ (odd n <-> n = S (Nat.double (Nat.div2 n)))
H1:even n <-> n = Nat.double (Nat.div2 n)
H2:odd n <-> n = S (Nat.double (Nat.div2 n))
H3:even n -> n = Nat.double (Nat.div2 n)
H4:odd n -> n = S (Nat.double (Nat.div2 n))

n = (2 * Nat.div2 n)%nat \/ n = S (2 * Nat.div2 n)
n:nat
H:even n \/ odd n
H0:(even n <-> n = Nat.double (Nat.div2 n)) /\ (odd n <-> n = S (Nat.double (Nat.div2 n)))
H1:even n <-> n = Nat.double (Nat.div2 n)
H2:odd n <-> n = S (Nat.double (Nat.div2 n))
H3:even n -> n = Nat.double (Nat.div2 n)
H4:odd n -> n = S (Nat.double (Nat.div2 n))

n = Nat.double (Nat.div2 n) \/ n = S (Nat.double (Nat.div2 n))
n:nat
H:even n \/ odd n
H0:(even n <-> n = Nat.double (Nat.div2 n)) /\ (odd n <-> n = S (Nat.double (Nat.div2 n)))
H1:even n <-> n = Nat.double (Nat.div2 n)
H2:odd n <-> n = S (Nat.double (Nat.div2 n))
H3:even n -> n = Nat.double (Nat.div2 n)
H4:odd n -> n = S (Nat.double (Nat.div2 n))
Nat.double (Nat.div2 n) = (2 * Nat.div2 n)%nat
n:nat
H:even n \/ odd n
H0:(even n <-> n = Nat.double (Nat.div2 n)) /\ (odd n <-> n = S (Nat.double (Nat.div2 n)))
H1:even n <-> n = Nat.double (Nat.div2 n)
H2:odd n <-> n = S (Nat.double (Nat.div2 n))
H3:even n -> n = Nat.double (Nat.div2 n)
H4:odd n -> n = S (Nat.double (Nat.div2 n))
H5:even n

n = Nat.double (Nat.div2 n) \/ n = S (Nat.double (Nat.div2 n))
n:nat
H:even n \/ odd n
H0:(even n <-> n = Nat.double (Nat.div2 n)) /\ (odd n <-> n = S (Nat.double (Nat.div2 n)))
H1:even n <-> n = Nat.double (Nat.div2 n)
H2:odd n <-> n = S (Nat.double (Nat.div2 n))
H3:even n -> n = Nat.double (Nat.div2 n)
H4:odd n -> n = S (Nat.double (Nat.div2 n))
H5:odd n
n = Nat.double (Nat.div2 n) \/ n = S (Nat.double (Nat.div2 n))
n:nat
H:even n \/ odd n
H0:(even n <-> n = Nat.double (Nat.div2 n)) /\ (odd n <-> n = S (Nat.double (Nat.div2 n)))
H1:even n <-> n = Nat.double (Nat.div2 n)
H2:odd n <-> n = S (Nat.double (Nat.div2 n))
H3:even n -> n = Nat.double (Nat.div2 n)
H4:odd n -> n = S (Nat.double (Nat.div2 n))
Nat.double (Nat.div2 n) = (2 * Nat.div2 n)%nat
n:nat
H:even n \/ odd n
H0:(even n <-> n = Nat.double (Nat.div2 n)) /\ (odd n <-> n = S (Nat.double (Nat.div2 n)))
H1:even n <-> n = Nat.double (Nat.div2 n)
H2:odd n <-> n = S (Nat.double (Nat.div2 n))
H3:even n -> n = Nat.double (Nat.div2 n)
H4:odd n -> n = S (Nat.double (Nat.div2 n))
H5:even n

n = Nat.double (Nat.div2 n)
n:nat
H:even n \/ odd n
H0:(even n <-> n = Nat.double (Nat.div2 n)) /\ (odd n <-> n = S (Nat.double (Nat.div2 n)))
H1:even n <-> n = Nat.double (Nat.div2 n)
H2:odd n <-> n = S (Nat.double (Nat.div2 n))
H3:even n -> n = Nat.double (Nat.div2 n)
H4:odd n -> n = S (Nat.double (Nat.div2 n))
H5:odd n
n = Nat.double (Nat.div2 n) \/ n = S (Nat.double (Nat.div2 n))
n:nat
H:even n \/ odd n
H0:(even n <-> n = Nat.double (Nat.div2 n)) /\ (odd n <-> n = S (Nat.double (Nat.div2 n)))
H1:even n <-> n = Nat.double (Nat.div2 n)
H2:odd n <-> n = S (Nat.double (Nat.div2 n))
H3:even n -> n = Nat.double (Nat.div2 n)
H4:odd n -> n = S (Nat.double (Nat.div2 n))
Nat.double (Nat.div2 n) = (2 * Nat.div2 n)%nat
n:nat
H:even n \/ odd n
H0:(even n <-> n = Nat.double (Nat.div2 n)) /\ (odd n <-> n = S (Nat.double (Nat.div2 n)))
H1:even n <-> n = Nat.double (Nat.div2 n)
H2:odd n <-> n = S (Nat.double (Nat.div2 n))
H3:even n -> n = Nat.double (Nat.div2 n)
H4:odd n -> n = S (Nat.double (Nat.div2 n))
H5:odd n

n = Nat.double (Nat.div2 n) \/ n = S (Nat.double (Nat.div2 n))
n:nat
H:even n \/ odd n
H0:(even n <-> n = Nat.double (Nat.div2 n)) /\ (odd n <-> n = S (Nat.double (Nat.div2 n)))
H1:even n <-> n = Nat.double (Nat.div2 n)
H2:odd n <-> n = S (Nat.double (Nat.div2 n))
H3:even n -> n = Nat.double (Nat.div2 n)
H4:odd n -> n = S (Nat.double (Nat.div2 n))
Nat.double (Nat.div2 n) = (2 * Nat.div2 n)%nat
n:nat
H:even n \/ odd n
H0:(even n <-> n = Nat.double (Nat.div2 n)) /\ (odd n <-> n = S (Nat.double (Nat.div2 n)))
H1:even n <-> n = Nat.double (Nat.div2 n)
H2:odd n <-> n = S (Nat.double (Nat.div2 n))
H3:even n -> n = Nat.double (Nat.div2 n)
H4:odd n -> n = S (Nat.double (Nat.div2 n))
H5:odd n

n = S (Nat.double (Nat.div2 n))
n:nat
H:even n \/ odd n
H0:(even n <-> n = Nat.double (Nat.div2 n)) /\ (odd n <-> n = S (Nat.double (Nat.div2 n)))
H1:even n <-> n = Nat.double (Nat.div2 n)
H2:odd n <-> n = S (Nat.double (Nat.div2 n))
H3:even n -> n = Nat.double (Nat.div2 n)
H4:odd n -> n = S (Nat.double (Nat.div2 n))
Nat.double (Nat.div2 n) = (2 * Nat.div2 n)%nat
n:nat
H:even n \/ odd n
H0:(even n <-> n = Nat.double (Nat.div2 n)) /\ (odd n <-> n = S (Nat.double (Nat.div2 n)))
H1:even n <-> n = Nat.double (Nat.div2 n)
H2:odd n <-> n = S (Nat.double (Nat.div2 n))
H3:even n -> n = Nat.double (Nat.div2 n)
H4:odd n -> n = S (Nat.double (Nat.div2 n))

Nat.double (Nat.div2 n) = (2 * Nat.div2 n)%nat
unfold double;ring. Qed. (* 2m <= 2n => m<=n *)

forall m n : nat, (2 * m <= 2 * n)%nat -> (m <= n)%nat

forall m n : nat, (2 * m <= 2 * n)%nat -> (m <= n)%nat
m, n:nat
H:(2 * m <= 2 * n)%nat

INR m <= INR n
m, n:nat
H:(2 * m <= 2 * n)%nat
H1:INR (2 * m) <= INR (2 * n)

INR m <= INR n
m, n:nat
H:(2 * m <= 2 * n)%nat
H1:INR 2 * INR m <= INR 2 * INR n

INR m <= INR n
m, n:nat
H:(2 * m <= 2 * n)%nat
H1:INR 2 * INR m <= INR 2 * INR n

0 < INR 2
m, n:nat
H:(2 * m <= 2 * n)%nat
H1:INR 2 * INR m <= INR 2 * INR n
INR 2 * INR m <= INR 2 * INR n
m, n:nat
H:(2 * m <= 2 * n)%nat
H1:INR 2 * INR m <= INR 2 * INR n

INR 2 * INR m <= INR 2 * INR n
assumption. Qed.
Here, we have the euclidian division
This lemma is used in the proof of sin_eq_0 : (sin x)=0<->x=kPI

forall x y : R, y <> 0 -> exists (k : Z) (r : R), x = IZR k * y + r /\ 0 <= r < Rabs y

forall x y : R, y <> 0 -> exists (k : Z) (r : R), x = IZR k * y + r /\ 0 <= r < Rabs y
x, y:R
H:y <> 0

exists (k : Z) (r : R), x = IZR k * y + r /\ 0 <= r < Rabs y
x, y:R
H:y <> 0
k0:=if Rcase_abs y then (1 - up (x / - y))%Z else (up (x / y) - 1)%Z:Z

exists (k : Z) (r : R), x = IZR k * y + r /\ 0 <= r < Rabs y
x, y:R
H:y <> 0
k0:=if Rcase_abs y then (1 - up (x / - y))%Z else (up (x / y) - 1)%Z:Z

exists r : R, x = IZR k0 * y + r /\ 0 <= r < Rabs y
x, y:R
H:y <> 0
k0:=if Rcase_abs y then (1 - up (x / - y))%Z else (up (x / y) - 1)%Z:Z

x = IZR k0 * y + (x - IZR k0 * y) /\ 0 <= x - IZR k0 * y < Rabs y
x, y:R
H:y <> 0
k0:=if Rcase_abs y then (1 - up (x / - y))%Z else (up (x / y) - 1)%Z:Z

x = IZR k0 * y + (x - IZR k0 * y)
x, y:R
H:y <> 0
k0:=if Rcase_abs y then (1 - up (x / - y))%Z else (up (x / y) - 1)%Z:Z
0 <= x - IZR k0 * y < Rabs y
x, y:R
H:y <> 0
k0:=if Rcase_abs y then (1 - up (x / - y))%Z else (up (x / y) - 1)%Z:Z

0 <= x - IZR k0 * y < Rabs y
x, y:R
H:y <> 0
Hlt:y < 0
k0:=(1 - up (x / - y))%Z:Z

0 <= x - IZR (1 - up (x / - y)) * y < Rabs y
x, y:R
H:y <> 0
Hge:y >= 0
k0:=(up (x / y) - 1)%Z:Z
0 <= x - IZR (up (x / y) - 1) * y < Rabs y
x, y:R
H:y <> 0
Hlt:y < 0
k0:=(1 - up (x / - y))%Z:Z
H0:IZR (up (x / - y)) > x / - y /\ IZR (up (x / - y)) - x / - y <= 1

0 <= x + - ((1 + - IZR (up (x / - y))) * y) < Rabs y
x, y:R
H:y <> 0
Hge:y >= 0
k0:=(up (x / y) - 1)%Z:Z
0 <= x - IZR (up (x / y) - 1) * y < Rabs y
x, y:R
H:y <> 0
Hlt:y < 0
k0:=(1 - up (x / - y))%Z:Z
H0:IZR (up (x / - y)) > x / - y /\ IZR (up (x / - y)) - x / - y <= 1

0 <= x + (IZR (up (x / - y)) - 1) * y < Rabs y
x, y:R
H:y <> 0
Hge:y >= 0
k0:=(up (x / y) - 1)%Z:Z
0 <= x - IZR (up (x / y) - 1) * y < Rabs y
x, y:R
H:y <> 0
Hlt:y < 0
k0:=(1 - up (x / - y))%Z:Z
H0:IZR (up (x / - y)) > x / - y /\ IZR (up (x / - y)) - x / - y <= 1

0 <= x + (IZR (up (x / - y)) - 1) * y
x, y:R
H:y <> 0
Hlt:y < 0
k0:=(1 - up (x / - y))%Z:Z
H0:IZR (up (x / - y)) > x / - y /\ IZR (up (x / - y)) - x / - y <= 1
x + (IZR (up (x / - y)) - 1) * y < Rabs y
x, y:R
H:y <> 0
Hge:y >= 0
k0:=(up (x / y) - 1)%Z:Z
0 <= x - IZR (up (x / y) - 1) * y < Rabs y
x, y:R
H:y <> 0
Hlt:y < 0
k0:=(1 - up (x / - y))%Z:Z
H0:IZR (up (x / - y)) > x / - y /\ IZR (up (x / - y)) - x / - y <= 1

0 < / - y
x, y:R
H:y <> 0
Hlt:y < 0
k0:=(1 - up (x / - y))%Z:Z
H0:IZR (up (x / - y)) > x / - y /\ IZR (up (x / - y)) - x / - y <= 1
/ - y * 0 <= / - y * (x + (IZR (up (x / - y)) - 1) * y)
x, y:R
H:y <> 0
Hlt:y < 0
k0:=(1 - up (x / - y))%Z:Z
H0:IZR (up (x / - y)) > x / - y /\ IZR (up (x / - y)) - x / - y <= 1
x + (IZR (up (x / - y)) - 1) * y < Rabs y
x, y:R
H:y <> 0
Hge:y >= 0
k0:=(up (x / y) - 1)%Z:Z
0 <= x - IZR (up (x / y) - 1) * y < Rabs y
x, y:R
H:y <> 0
Hlt:y < 0
k0:=(1 - up (x / - y))%Z:Z
H0:IZR (up (x / - y)) > x / - y /\ IZR (up (x / - y)) - x / - y <= 1

/ - y * 0 <= / - y * (x + (IZR (up (x / - y)) - 1) * y)
x, y:R
H:y <> 0
Hlt:y < 0
k0:=(1 - up (x / - y))%Z:Z
H0:IZR (up (x / - y)) > x / - y /\ IZR (up (x / - y)) - x / - y <= 1
x + (IZR (up (x / - y)) - 1) * y < Rabs y
x, y:R
H:y <> 0
Hge:y >= 0
k0:=(up (x / y) - 1)%Z:Z
0 <= x - IZR (up (x / y) - 1) * y < Rabs y
x, y:R
H:y <> 0
Hlt:y < 0
k0:=(1 - up (x / - y))%Z:Z
H0:IZR (up (x / - y)) > x / - y /\ IZR (up (x / - y)) - x / - y <= 1

0 <= x * - / y + (IZR (up (x / - y)) - 1) * y * - / y
x, y:R
H:y <> 0
Hlt:y < 0
k0:=(1 - up (x / - y))%Z:Z
H0:IZR (up (x / - y)) > x / - y /\ IZR (up (x / - y)) - x / - y <= 1
x + (IZR (up (x / - y)) - 1) * y < Rabs y
x, y:R
H:y <> 0
Hge:y >= 0
k0:=(up (x / y) - 1)%Z:Z
0 <= x - IZR (up (x / y) - 1) * y < Rabs y
x, y:R
H:y <> 0
Hlt:y < 0
k0:=(1 - up (x / - y))%Z:Z
H0:IZR (up (x / - y)) > x / - y /\ IZR (up (x / - y)) - x / - y <= 1

0 <= - (x * / y) + - (IZR (up (x / - y)) - 1)
x, y:R
H:y <> 0
Hlt:y < 0
k0:=(1 - up (x / - y))%Z:Z
H0:IZR (up (x / - y)) > x / - y /\ IZR (up (x / - y)) - x / - y <= 1
x + (IZR (up (x / - y)) - 1) * y < Rabs y
x, y:R
H:y <> 0
Hge:y >= 0
k0:=(up (x / y) - 1)%Z:Z
0 <= x - IZR (up (x / y) - 1) * y < Rabs y
x, y:R
H:y <> 0
Hlt:y < 0
k0:=(1 - up (x / - y))%Z:Z
H0:IZR (up (x / - y)) > x / - y /\ IZR (up (x / - y)) - x / - y <= 1

IZR (up (x / - y)) - x / - y + 0 <= IZR (up (x / - y)) - x / - y + (- (x * / y) + - (IZR (up (x / - y)) - 1))
x, y:R
H:y <> 0
Hlt:y < 0
k0:=(1 - up (x / - y))%Z:Z
H0:IZR (up (x / - y)) > x / - y /\ IZR (up (x / - y)) - x / - y <= 1
x + (IZR (up (x / - y)) - 1) * y < Rabs y
x, y:R
H:y <> 0
Hge:y >= 0
k0:=(up (x / y) - 1)%Z:Z
0 <= x - IZR (up (x / y) - 1) * y < Rabs y
x, y:R
H:y <> 0
Hlt:y < 0
k0:=(1 - up (x / - y))%Z:Z
H0:IZR (up (x / - y)) > x / - y /\ IZR (up (x / - y)) - x / - y <= 1

IZR (up (x * / - y)) - x * / - y <= IZR (up (x * / - y)) - x * - / y + (- (x * / y) + - (IZR (up (x * / - y)) - 1))
x, y:R
H:y <> 0
Hlt:y < 0
k0:=(1 - up (x / - y))%Z:Z
H0:IZR (up (x / - y)) > x / - y /\ IZR (up (x / - y)) - x / - y <= 1
x + (IZR (up (x / - y)) - 1) * y < Rabs y
x, y:R
H:y <> 0
Hge:y >= 0
k0:=(up (x / y) - 1)%Z:Z
0 <= x - IZR (up (x / y) - 1) * y < Rabs y
x, y:R
H:y <> 0
Hlt:y < 0
k0:=(1 - up (x / - y))%Z:Z
H0:IZR (up (x / - y)) > x / - y /\ IZR (up (x / - y)) - x / - y <= 1

IZR (up (x * / - y)) - x * / - y <= 1
x, y:R
H:y <> 0
Hlt:y < 0
k0:=(1 - up (x / - y))%Z:Z
H0:IZR (up (x / - y)) > x / - y /\ IZR (up (x / - y)) - x / - y <= 1
x + (IZR (up (x / - y)) - 1) * y < Rabs y
x, y:R
H:y <> 0
Hge:y >= 0
k0:=(up (x / y) - 1)%Z:Z
0 <= x - IZR (up (x / y) - 1) * y < Rabs y
x, y:R
H:y <> 0
Hlt:y < 0
k0:=(1 - up (x / - y))%Z:Z
H0:IZR (up (x / - y)) > x / - y /\ IZR (up (x / - y)) - x / - y <= 1

x + (IZR (up (x / - y)) - 1) * y < Rabs y
x, y:R
H:y <> 0
Hge:y >= 0
k0:=(up (x / y) - 1)%Z:Z
0 <= x - IZR (up (x / y) - 1) * y < Rabs y
x, y:R
H:y <> 0
Hlt:y < 0
k0:=(1 - up (x / - y))%Z:Z
H0:IZR (up (x / - y)) > x / - y /\ IZR (up (x / - y)) - x / - y <= 1

0 < / - y
x, y:R
H:y <> 0
Hlt:y < 0
k0:=(1 - up (x / - y))%Z:Z
H0:IZR (up (x / - y)) > x / - y /\ IZR (up (x / - y)) - x / - y <= 1
/ - y * (x + (IZR (up (x / - y)) - 1) * y) < / - y * - y
x, y:R
H:y <> 0
Hge:y >= 0
k0:=(up (x / y) - 1)%Z:Z
0 <= x - IZR (up (x / y) - 1) * y < Rabs y
x, y:R
H:y <> 0
Hlt:y < 0
k0:=(1 - up (x / - y))%Z:Z
H0:IZR (up (x / - y)) > x / - y /\ IZR (up (x / - y)) - x / - y <= 1

/ - y * (x + (IZR (up (x / - y)) - 1) * y) < / - y * - y
x, y:R
H:y <> 0
Hge:y >= 0
k0:=(up (x / y) - 1)%Z:Z
0 <= x - IZR (up (x / y) - 1) * y < Rabs y
x, y:R
H:y <> 0
Hlt:y < 0
k0:=(1 - up (x / - y))%Z:Z
H0:IZR (up (x / - y)) > x / - y /\ IZR (up (x / - y)) - x / - y <= 1

/ - y * (x + (IZR (up (x / - y)) - 1) * y) < 1
x, y:R
H:y <> 0
Hlt:y < 0
k0:=(1 - up (x / - y))%Z:Z
H0:IZR (up (x / - y)) > x / - y /\ IZR (up (x / - y)) - x / - y <= 1
- y <> 0
x, y:R
H:y <> 0
Hge:y >= 0
k0:=(up (x / y) - 1)%Z:Z
0 <= x - IZR (up (x / y) - 1) * y < Rabs y
x, y:R
H:y <> 0
Hlt:y < 0
k0:=(1 - up (x / - y))%Z:Z
H0:IZR (up (x / - y)) > x / - y /\ IZR (up (x / - y)) - x / - y <= 1

x * - / y + (IZR (up (x / - y)) - 1) * y * - / y < 1
x, y:R
H:y <> 0
Hlt:y < 0
k0:=(1 - up (x / - y))%Z:Z
H0:IZR (up (x / - y)) > x / - y /\ IZR (up (x / - y)) - x / - y <= 1
- y <> 0
x, y:R
H:y <> 0
Hge:y >= 0
k0:=(up (x / y) - 1)%Z:Z
0 <= x - IZR (up (x / y) - 1) * y < Rabs y
x, y:R
H:y <> 0
Hlt:y < 0
k0:=(1 - up (x / - y))%Z:Z
H0:IZR (up (x / - y)) > x / - y /\ IZR (up (x / - y)) - x / - y <= 1

IZR (up (x / - y)) - 1 + (- (x * / y) + - (IZR (up (x / - y)) - 1)) < IZR (up (x / - y)) - 1 + 1
x, y:R
H:y <> 0
Hlt:y < 0
k0:=(1 - up (x / - y))%Z:Z
H0:IZR (up (x / - y)) > x / - y /\ IZR (up (x / - y)) - x / - y <= 1
- y <> 0
x, y:R
H:y <> 0
Hge:y >= 0
k0:=(up (x / y) - 1)%Z:Z
0 <= x - IZR (up (x / y) - 1) * y < Rabs y
x, y:R
H:y <> 0
Hlt:y < 0
k0:=(1 - up (x / - y))%Z:Z
H0:IZR (up (x / - y)) > x / - y /\ IZR (up (x / - y)) - x / - y <= 1

IZR (up (x / - y)) - 1 + (- (x * / y) + - (IZR (up (x / - y)) - 1)) < IZR (up (x / - y))
x, y:R
H:y <> 0
Hlt:y < 0
k0:=(1 - up (x / - y))%Z:Z
H0:IZR (up (x / - y)) > x / - y /\ IZR (up (x / - y)) - x / - y <= 1
- y <> 0
x, y:R
H:y <> 0
Hge:y >= 0
k0:=(up (x / y) - 1)%Z:Z
0 <= x - IZR (up (x / y) - 1) * y < Rabs y
x, y:R
H:y <> 0
Hlt:y < 0
k0:=(1 - up (x / - y))%Z:Z
H0:IZR (up (x / - y)) > x / - y /\ IZR (up (x / - y)) - x / - y <= 1

- (x * / y) < IZR (up (x / - y))
x, y:R
H:y <> 0
Hlt:y < 0
k0:=(1 - up (x / - y))%Z:Z
H0:IZR (up (x / - y)) > x / - y /\ IZR (up (x / - y)) - x / - y <= 1
- y <> 0
x, y:R
H:y <> 0
Hge:y >= 0
k0:=(up (x / y) - 1)%Z:Z
0 <= x - IZR (up (x / y) - 1) * y < Rabs y
x, y:R
H:y <> 0
Hlt:y < 0
k0:=(1 - up (x / - y))%Z:Z
H0:IZR (up (x / - y)) > x / - y /\ IZR (up (x / - y)) - x / - y <= 1

- y <> 0
x, y:R
H:y <> 0
Hge:y >= 0
k0:=(up (x / y) - 1)%Z:Z
0 <= x - IZR (up (x / y) - 1) * y < Rabs y
x, y:R
H:y <> 0
Hge:y >= 0
k0:=(up (x / y) - 1)%Z:Z

0 <= x - IZR (up (x / y) - 1) * y < Rabs y
x, y:R
H:y <> 0
Hge:y >= 0
k0:=(up (x / y) - 1)%Z:Z
H0:IZR (up (x / y)) > x / y /\ IZR (up (x / y)) - x / y <= 1

0 < y -> 0 <= x - (IZR (up (x / y)) - 1) * y < Rabs y
x, y:R
H:y <> 0
Hge:y >= 0
k0:=(up (x / y) - 1)%Z:Z
H0:IZR (up (x / y)) > x / y /\ IZR (up (x / y)) - x / y <= 1
0 < y
x, y:R
H:y <> 0
Hge:y >= 0
k0:=(up (x / y) - 1)%Z:Z
H0:IZR (up (x / y)) > x / y /\ IZR (up (x / y)) - x / y <= 1
H1:0 < y

0 <= x + (1 - IZR (up (x / y))) * y < Rabs y
x, y:R
H:y <> 0
Hge:y >= 0
k0:=(up (x / y) - 1)%Z:Z
H0:IZR (up (x / y)) > x / y /\ IZR (up (x / y)) - x / y <= 1
0 < y
x, y:R
H:y <> 0
Hge:y >= 0
k0:=(up (x / y) - 1)%Z:Z
H0:IZR (up (x / y)) > x / y /\ IZR (up (x / y)) - x / y <= 1
H1:0 < y

0 <= x + (1 - IZR (up (x / y))) * y
x, y:R
H:y <> 0
Hge:y >= 0
k0:=(up (x / y) - 1)%Z:Z
H0:IZR (up (x / y)) > x / y /\ IZR (up (x / y)) - x / y <= 1
H1:0 < y
x + (1 - IZR (up (x / y))) * y < Rabs y
x, y:R
H:y <> 0
Hge:y >= 0
k0:=(up (x / y) - 1)%Z:Z
H0:IZR (up (x / y)) > x / y /\ IZR (up (x / y)) - x / y <= 1
0 < y
x, y:R
H:y <> 0
Hge:y >= 0
k0:=(up (x / y) - 1)%Z:Z
H0:IZR (up (x / y)) > x / y /\ IZR (up (x / y)) - x / y <= 1
H1:0 < y

0 < / y
x, y:R
H:y <> 0
Hge:y >= 0
k0:=(up (x / y) - 1)%Z:Z
H0:IZR (up (x / y)) > x / y /\ IZR (up (x / y)) - x / y <= 1
H1:0 < y
/ y * 0 <= / y * (x + (1 - IZR (up (x / y))) * y)
x, y:R
H:y <> 0
Hge:y >= 0
k0:=(up (x / y) - 1)%Z:Z
H0:IZR (up (x / y)) > x / y /\ IZR (up (x / y)) - x / y <= 1
H1:0 < y
x + (1 - IZR (up (x / y))) * y < Rabs y
x, y:R
H:y <> 0
Hge:y >= 0
k0:=(up (x / y) - 1)%Z:Z
H0:IZR (up (x / y)) > x / y /\ IZR (up (x / y)) - x / y <= 1
0 < y
x, y:R
H:y <> 0
Hge:y >= 0
k0:=(up (x / y) - 1)%Z:Z
H0:IZR (up (x / y)) > x / y /\ IZR (up (x / y)) - x / y <= 1
H1:0 < y

/ y * 0 <= / y * (x + (1 - IZR (up (x / y))) * y)
x, y:R
H:y <> 0
Hge:y >= 0
k0:=(up (x / y) - 1)%Z:Z
H0:IZR (up (x / y)) > x / y /\ IZR (up (x / y)) - x / y <= 1
H1:0 < y
x + (1 - IZR (up (x / y))) * y < Rabs y
x, y:R
H:y <> 0
Hge:y >= 0
k0:=(up (x / y) - 1)%Z:Z
H0:IZR (up (x / y)) > x / y /\ IZR (up (x / y)) - x / y <= 1
0 < y
x, y:R
H:y <> 0
Hge:y >= 0
k0:=(up (x / y) - 1)%Z:Z
H0:IZR (up (x / y)) > x / y /\ IZR (up (x / y)) - x / y <= 1
H1:0 < y

x + (1 - IZR (up (x / y))) * y < Rabs y
x, y:R
H:y <> 0
Hge:y >= 0
k0:=(up (x / y) - 1)%Z:Z
H0:IZR (up (x / y)) > x / y /\ IZR (up (x / y)) - x / y <= 1
0 < y
x, y:R
H:y <> 0
Hge:y >= 0
k0:=(up (x / y) - 1)%Z:Z
H0:IZR (up (x / y)) > x / y /\ IZR (up (x / y)) - x / y <= 1
H1:0 < y

0 < / y
x, y:R
H:y <> 0
Hge:y >= 0
k0:=(up (x / y) - 1)%Z:Z
H0:IZR (up (x / y)) > x / y /\ IZR (up (x / y)) - x / y <= 1
H1:0 < y
/ y * (x + (1 - IZR (up (x / y))) * y) < / y * y
x, y:R
H:y <> 0
Hge:y >= 0
k0:=(up (x / y) - 1)%Z:Z
H0:IZR (up (x / y)) > x / y /\ IZR (up (x / y)) - x / y <= 1
0 < y
x, y:R
H:y <> 0
Hge:y >= 0
k0:=(up (x / y) - 1)%Z:Z
H0:IZR (up (x / y)) > x / y /\ IZR (up (x / y)) - x / y <= 1
H1:0 < y

/ y * (x + (1 - IZR (up (x / y))) * y) < / y * y
x, y:R
H:y <> 0
Hge:y >= 0
k0:=(up (x / y) - 1)%Z:Z
H0:IZR (up (x / y)) > x / y /\ IZR (up (x / y)) - x / y <= 1
0 < y
x, y:R
H:y <> 0
Hge:y >= 0
k0:=(up (x / y) - 1)%Z:Z
H0:IZR (up (x / y)) > x / y /\ IZR (up (x / y)) - x / y <= 1

0 < y
x, y:R
H:y <> 0
Hge:y >= 0
k0:=(up (x / y) - 1)%Z:Z
H0:IZR (up (x / y)) > x / y /\ IZR (up (x / y)) - x / y <= 1
Hlt:0 < y

0 < y
x, y:R
H:y <> 0
Hge:y >= 0
k0:=(up (x / y) - 1)%Z:Z
H0:IZR (up (x / y)) > x / y /\ IZR (up (x / y)) - x / y <= 1
Heq:0 = y
0 < y
x, y:R
H:y <> 0
Hge:y >= 0
k0:=(up (x / y) - 1)%Z:Z
H0:IZR (up (x / y)) > x / y /\ IZR (up (x / y)) - x / y <= 1
Hgt:0 > y
0 < y
x, y:R
H:y <> 0
Hge:y >= 0
k0:=(up (x / y) - 1)%Z:Z
H0:IZR (up (x / y)) > x / y /\ IZR (up (x / y)) - x / y <= 1
Heq:0 = y

0 < y
x, y:R
H:y <> 0
Hge:y >= 0
k0:=(up (x / y) - 1)%Z:Z
H0:IZR (up (x / y)) > x / y /\ IZR (up (x / y)) - x / y <= 1
Hgt:0 > y
0 < y
x, y:R
H:y <> 0
Hge:y >= 0
k0:=(up (x / y) - 1)%Z:Z
H0:IZR (up (x / y)) > x / y /\ IZR (up (x / y)) - x / y <= 1
Hgt:0 > y

0 < y
apply Rge_le in Hge; elim (Rlt_irrefl _ (Rle_lt_trans _ _ _ Hge Hgt)). Qed.

forall n i : nat, (n <= S n + i)%nat

forall n i : nat, (n <= S n + i)%nat
n:nat

(n <= S n + 0)%nat
n, i:nat
Hreci:(n <= S n + i)%nat
(n <= S n + S i)%nat
n, i:nat
Hreci:(n <= S n + i)%nat

(n <= S n + S i)%nat
n, i:nat
Hreci:(n <= S n + i)%nat

(n <= S (S n + i))%nat
n, i:nat
Hreci:(n <= S n + i)%nat
S (S n + i) = (S n + S i)%nat
n, i:nat
Hreci:(n <= S n + i)%nat

S (S n + i) = (S n + S i)%nat
apply INR_eq; rewrite S_INR; do 2 rewrite plus_INR; do 2 rewrite S_INR; ring. Qed.