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%natforall n i : nat, (i < n)%nat -> (n - i)%nat <> 0%natn, i:natH:(i < n)%natH0:(n - i)%nat = 0%natFalsen, i:natH:(i < n)%natH0:(n - i)%nat = 0%nat(forall n0 m : nat, (m <= n0)%nat -> (n0 - m)%nat = 0%nat -> n0 = m) -> Falsen, i:natH:(i < n)%natH0:(n - i)%nat = 0%natforall n0 m : nat, (m <= n0)%nat -> (n0 - m)%nat = 0%nat -> n0 = mn, i:natH:(i < n)%natH0:(n - i)%nat = 0%natforall n0 m : nat, (m <= n0)%nat -> (n0 - m)%nat = 0%nat -> n0 = mn, i:natH:(i < n)%natH0:(n - i)%nat = 0%natR:=fun n0 m : nat => (m <= n0)%nat -> (n0 - m)%nat = 0%nat -> n0 = m:nat -> nat -> Propforall n0 m : nat, (m <= n0)%nat -> (n0 - m)%nat = 0%nat -> n0 = mn, i:natH:(i < n)%natH0:(n - i)%nat = 0%natR:=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 = mn, i:natH:(i < n)%natH0:(n - i)%nat = 0%natR:=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 = mn, i:natH:(i < n)%natH0:(n - i)%nat = 0%natR:=fun n0 m : nat => (m <= n0)%nat -> (n0 - m)%nat = 0%nat -> n0 = m:nat -> nat -> PropH1:(forall n0 m : nat, R n0 m) -> forall n0 m : nat, (m <= n0)%nat -> (n0 - m)%nat = 0%nat -> n0 = mforall n0 m : nat, R n0 mn, i:natH:(i < n)%natH0:(n - i)%nat = 0%natR:=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 = mn, i:natH:(i < n)%natH0:(n - i)%nat = 0%natR:=fun n0 m : nat => (m <= n0)%nat -> (n0 - m)%nat = 0%nat -> n0 = m:nat -> nat -> PropH1:(forall n0 m : nat, R n0 m) -> forall n0 m : nat, (m <= n0)%nat -> (n0 - m)%nat = 0%nat -> n0 = mforall n0 : nat, R 0%nat n0n, i:natH:(i < n)%natH0:(n - i)%nat = 0%natR:=fun n0 m : nat => (m <= n0)%nat -> (n0 - m)%nat = 0%nat -> n0 = m:nat -> nat -> PropH1:(forall n0 m : nat, R n0 m) -> forall n0 m : nat, (m <= n0)%nat -> (n0 - m)%nat = 0%nat -> n0 = mforall n0 : nat, R (S n0) 0%natn, i:natH:(i < n)%natH0:(n - i)%nat = 0%natR:=fun n0 m : nat => (m <= n0)%nat -> (n0 - m)%nat = 0%nat -> n0 = m:nat -> nat -> PropH1:(forall n0 m : nat, R n0 m) -> forall n0 m : nat, (m <= n0)%nat -> (n0 - m)%nat = 0%nat -> n0 = mforall n0 m : nat, R n0 m -> R (S n0) (S m)n, i:natH:(i < n)%natH0:(n - i)%nat = 0%natR:=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 = mn, i:natH:(i < n)%natH0:(n - i)%nat = 0%natR:=fun n0 m : nat => (m <= n0)%nat -> (n0 - m)%nat = 0%nat -> n0 = m:nat -> nat -> PropH1:(forall n0 m : nat, R n0 m) -> forall n0 m : nat, (m <= n0)%nat -> (n0 - m)%nat = 0%nat -> n0 = mforall n0 : nat, R (S n0) 0%natn, i:natH:(i < n)%natH0:(n - i)%nat = 0%natR:=fun n0 m : nat => (m <= n0)%nat -> (n0 - m)%nat = 0%nat -> n0 = m:nat -> nat -> PropH1:(forall n0 m : nat, R n0 m) -> forall n0 m : nat, (m <= n0)%nat -> (n0 - m)%nat = 0%nat -> n0 = mforall n0 m : nat, R n0 m -> R (S n0) (S m)n, i:natH:(i < n)%natH0:(n - i)%nat = 0%natR:=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 = mn, i:natH:(i < n)%natH0:(n - i)%nat = 0%natR:=fun n0 m : nat => (m <= n0)%nat -> (n0 - m)%nat = 0%nat -> n0 = m:nat -> nat -> PropH1:(forall n0 m : nat, R n0 m) -> forall n0 m : nat, (m <= n0)%nat -> (n0 - m)%nat = 0%nat -> n0 = mforall n0 m : nat, R n0 m -> R (S n0) (S m)n, i:natH:(i < n)%natH0:(n - i)%nat = 0%natR:=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 = munfold R; intros; apply H1; assumption. Qed.n, i:natH:(i < n)%natH0:(n - i)%nat = 0%natR:=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 = mforall n i : nat, (i <= n)%nat -> (n - i <= n)%natforall n i : nat, (i <= n)%nat -> (n - i <= n)%natR:=fun m n : nat => (n <= m)%nat -> (m - n <= m)%nat:nat -> nat -> Propforall n i : nat, (i <= n)%nat -> (n - i <= n)%natR:=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)%natR:=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)%natR:=fun m n : nat => (n <= m)%nat -> (m - n <= m)%nat:nat -> nat -> PropH:(forall m n : nat, R m n) -> forall n i : nat, (i <= n)%nat -> (n - i <= n)%natforall m n : nat, R m nR:=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)%natR:=fun m n : nat => (n <= m)%nat -> (m - n <= m)%nat:nat -> nat -> PropH:(forall m n : nat, R m n) -> forall n i : nat, (i <= n)%nat -> (n - i <= n)%natforall n : nat, R 0%nat nR:=fun m n : nat => (n <= m)%nat -> (m - n <= m)%nat:nat -> nat -> PropH:(forall m n : nat, R m n) -> forall n i : nat, (i <= n)%nat -> (n - i <= n)%natforall n : nat, R (S n) 0%natR:=fun m n : nat => (n <= m)%nat -> (m - n <= m)%nat:nat -> nat -> PropH:(forall m n : nat, R m n) -> forall n i : nat, (i <= n)%nat -> (n - i <= n)%natforall 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)%natR:=fun m n : nat => (n <= m)%nat -> (m - n <= m)%nat:nat -> nat -> PropH:(forall m n : nat, R m n) -> forall n i : nat, (i <= n)%nat -> (n - i <= n)%natforall n : nat, R (S n) 0%natR:=fun m n : nat => (n <= m)%nat -> (m - n <= m)%nat:nat -> nat -> PropH:(forall m n : nat, R m n) -> forall n i : nat, (i <= n)%nat -> (n - i <= n)%natforall 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)%natR:=fun m n : nat => (n <= m)%nat -> (m - n <= m)%nat:nat -> nat -> PropH:(forall m n : nat, R m n) -> forall n i : nat, (i <= n)%nat -> (n - i <= n)%natforall 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)%natR:=fun m0 n0 : nat => (n0 <= m0)%nat -> (m0 - n0 <= m0)%nat:nat -> nat -> PropH:(forall m0 n0 : nat, R m0 n0) -> forall n0 i : nat, (i <= n0)%nat -> (n0 - i <= n0)%natn, m:natH0:(m <= n)%nat -> (n - m <= n)%natH1:(S m <= S n)%nat(n - m <= n)%natR:=fun m0 n0 : nat => (n0 <= m0)%nat -> (m0 - n0 <= m0)%nat:nat -> nat -> PropH:(forall m0 n0 : nat, R m0 n0) -> forall n0 i : nat, (i <= n0)%nat -> (n0 - i <= n0)%natn, m:natH0:(m <= n)%nat -> (n - m <= n)%natH1:(S m <= S n)%nat(n <= S n)%natR:=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)%natR:=fun m0 n0 : nat => (n0 <= m0)%nat -> (m0 - n0 <= m0)%nat:nat -> nat -> PropH:(forall m0 n0 : nat, R m0 n0) -> forall n0 i : nat, (i <= n0)%nat -> (n0 - i <= n0)%natn, m:natH0:(m <= n)%nat -> (n - m <= n)%natH1:(S m <= S n)%nat(n <= S n)%natR:=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)%natunfold R; intros; apply H; assumption. Qed.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)%natforall m n : nat, (m < n)%nat -> (0 < n - m)%natintros 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 m n : nat, (m < n)%nat -> (0 < n - m)%natforall 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:natexists p : nat, n = (2 * p)%nat \/ n = S (2 * p)n:natH:even n \/ odd nexists p : nat, n = (2 * p)%nat \/ n = S (2 * p)n:natH:even n \/ odd nn = (2 * Nat.div2 n)%nat \/ n = S (2 * Nat.div2 n)n:natH:even n \/ odd nH0:(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:natH:even n \/ odd nH0:(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:natH:even n \/ odd nH0:(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:natH:even n \/ odd nH0:(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:natH:even n \/ odd nH0:(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:natH:even n \/ odd nH0:(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)%natn:natH:even n \/ odd nH0:(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 nn = Nat.double (Nat.div2 n) \/ n = S (Nat.double (Nat.div2 n))n:natH:even n \/ odd nH0:(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 nn = Nat.double (Nat.div2 n) \/ n = S (Nat.double (Nat.div2 n))n:natH:even n \/ odd nH0:(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)%natn:natH:even n \/ odd nH0:(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 nn = Nat.double (Nat.div2 n)n:natH:even n \/ odd nH0:(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 nn = Nat.double (Nat.div2 n) \/ n = S (Nat.double (Nat.div2 n))n:natH:even n \/ odd nH0:(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)%natn:natH:even n \/ odd nH0:(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 nn = Nat.double (Nat.div2 n) \/ n = S (Nat.double (Nat.div2 n))n:natH:even n \/ odd nH0:(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)%natn:natH:even n \/ odd nH0:(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 nn = S (Nat.double (Nat.div2 n))n:natH:even n \/ odd nH0:(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)%natunfold double;ring. Qed. (* 2m <= 2n => m<=n *)n:natH:even n \/ odd nH0:(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)%natforall m n : nat, (2 * m <= 2 * n)%nat -> (m <= n)%natforall m n : nat, (2 * m <= 2 * n)%nat -> (m <= n)%natm, n:natH:(2 * m <= 2 * n)%natINR m <= INR nm, n:natH:(2 * m <= 2 * n)%natH1:INR (2 * m) <= INR (2 * n)INR m <= INR nm, n:natH:(2 * m <= 2 * n)%natH1:INR 2 * INR m <= INR 2 * INR nINR m <= INR nm, n:natH:(2 * m <= 2 * n)%natH1:INR 2 * INR m <= INR 2 * INR n0 < INR 2m, n:natH:(2 * m <= 2 * n)%natH1:INR 2 * INR m <= INR 2 * INR nINR 2 * INR m <= INR 2 * INR nassumption. Qed.m, n:natH:(2 * m <= 2 * n)%natH1:INR 2 * INR m <= INR 2 * INR nINR 2 * INR m <= INR 2 * INR n
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 yforall x y : R, y <> 0 -> exists (k : Z) (r : R), x = IZR k * y + r /\ 0 <= r < Rabs yx, y:RH:y <> 0exists (k : Z) (r : R), x = IZR k * y + r /\ 0 <= r < Rabs yx, y:RH:y <> 0k0:=if Rcase_abs y then (1 - up (x / - y))%Z else (up (x / y) - 1)%Z:Zexists (k : Z) (r : R), x = IZR k * y + r /\ 0 <= r < Rabs yx, y:RH:y <> 0k0:=if Rcase_abs y then (1 - up (x / - y))%Z else (up (x / y) - 1)%Z:Zexists r : R, x = IZR k0 * y + r /\ 0 <= r < Rabs yx, y:RH:y <> 0k0:=if Rcase_abs y then (1 - up (x / - y))%Z else (up (x / y) - 1)%Z:Zx = IZR k0 * y + (x - IZR k0 * y) /\ 0 <= x - IZR k0 * y < Rabs yx, y:RH:y <> 0k0:=if Rcase_abs y then (1 - up (x / - y))%Z else (up (x / y) - 1)%Z:Zx = IZR k0 * y + (x - IZR k0 * y)x, y:RH:y <> 0k0:=if Rcase_abs y then (1 - up (x / - y))%Z else (up (x / y) - 1)%Z:Z0 <= x - IZR k0 * y < Rabs yx, y:RH:y <> 0k0:=if Rcase_abs y then (1 - up (x / - y))%Z else (up (x / y) - 1)%Z:Z0 <= x - IZR k0 * y < Rabs yx, y:RH:y <> 0Hlt:y < 0k0:=(1 - up (x / - y))%Z:Z0 <= x - IZR (1 - up (x / - y)) * y < Rabs yx, y:RH:y <> 0Hge:y >= 0k0:=(up (x / y) - 1)%Z:Z0 <= x - IZR (up (x / y) - 1) * y < Rabs yx, y:RH:y <> 0Hlt:y < 0k0:=(1 - up (x / - y))%Z:ZH0:IZR (up (x / - y)) > x / - y /\ IZR (up (x / - y)) - x / - y <= 10 <= x + - ((1 + - IZR (up (x / - y))) * y) < Rabs yx, y:RH:y <> 0Hge:y >= 0k0:=(up (x / y) - 1)%Z:Z0 <= x - IZR (up (x / y) - 1) * y < Rabs yx, y:RH:y <> 0Hlt:y < 0k0:=(1 - up (x / - y))%Z:ZH0:IZR (up (x / - y)) > x / - y /\ IZR (up (x / - y)) - x / - y <= 10 <= x + (IZR (up (x / - y)) - 1) * y < Rabs yx, y:RH:y <> 0Hge:y >= 0k0:=(up (x / y) - 1)%Z:Z0 <= x - IZR (up (x / y) - 1) * y < Rabs yx, y:RH:y <> 0Hlt:y < 0k0:=(1 - up (x / - y))%Z:ZH0:IZR (up (x / - y)) > x / - y /\ IZR (up (x / - y)) - x / - y <= 10 <= x + (IZR (up (x / - y)) - 1) * yx, y:RH:y <> 0Hlt:y < 0k0:=(1 - up (x / - y))%Z:ZH0:IZR (up (x / - y)) > x / - y /\ IZR (up (x / - y)) - x / - y <= 1x + (IZR (up (x / - y)) - 1) * y < Rabs yx, y:RH:y <> 0Hge:y >= 0k0:=(up (x / y) - 1)%Z:Z0 <= x - IZR (up (x / y) - 1) * y < Rabs yx, y:RH:y <> 0Hlt:y < 0k0:=(1 - up (x / - y))%Z:ZH0:IZR (up (x / - y)) > x / - y /\ IZR (up (x / - y)) - x / - y <= 10 < / - yx, y:RH:y <> 0Hlt:y < 0k0:=(1 - up (x / - y))%Z:ZH0: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:RH:y <> 0Hlt:y < 0k0:=(1 - up (x / - y))%Z:ZH0:IZR (up (x / - y)) > x / - y /\ IZR (up (x / - y)) - x / - y <= 1x + (IZR (up (x / - y)) - 1) * y < Rabs yx, y:RH:y <> 0Hge:y >= 0k0:=(up (x / y) - 1)%Z:Z0 <= x - IZR (up (x / y) - 1) * y < Rabs yx, y:RH:y <> 0Hlt:y < 0k0:=(1 - up (x / - y))%Z:ZH0: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:RH:y <> 0Hlt:y < 0k0:=(1 - up (x / - y))%Z:ZH0:IZR (up (x / - y)) > x / - y /\ IZR (up (x / - y)) - x / - y <= 1x + (IZR (up (x / - y)) - 1) * y < Rabs yx, y:RH:y <> 0Hge:y >= 0k0:=(up (x / y) - 1)%Z:Z0 <= x - IZR (up (x / y) - 1) * y < Rabs yx, y:RH:y <> 0Hlt:y < 0k0:=(1 - up (x / - y))%Z:ZH0:IZR (up (x / - y)) > x / - y /\ IZR (up (x / - y)) - x / - y <= 10 <= x * - / y + (IZR (up (x / - y)) - 1) * y * - / yx, y:RH:y <> 0Hlt:y < 0k0:=(1 - up (x / - y))%Z:ZH0:IZR (up (x / - y)) > x / - y /\ IZR (up (x / - y)) - x / - y <= 1x + (IZR (up (x / - y)) - 1) * y < Rabs yx, y:RH:y <> 0Hge:y >= 0k0:=(up (x / y) - 1)%Z:Z0 <= x - IZR (up (x / y) - 1) * y < Rabs yx, y:RH:y <> 0Hlt:y < 0k0:=(1 - up (x / - y))%Z:ZH0:IZR (up (x / - y)) > x / - y /\ IZR (up (x / - y)) - x / - y <= 10 <= - (x * / y) + - (IZR (up (x / - y)) - 1)x, y:RH:y <> 0Hlt:y < 0k0:=(1 - up (x / - y))%Z:ZH0:IZR (up (x / - y)) > x / - y /\ IZR (up (x / - y)) - x / - y <= 1x + (IZR (up (x / - y)) - 1) * y < Rabs yx, y:RH:y <> 0Hge:y >= 0k0:=(up (x / y) - 1)%Z:Z0 <= x - IZR (up (x / y) - 1) * y < Rabs yx, y:RH:y <> 0Hlt:y < 0k0:=(1 - up (x / - y))%Z:ZH0:IZR (up (x / - y)) > x / - y /\ IZR (up (x / - y)) - x / - y <= 1IZR (up (x / - y)) - x / - y + 0 <= IZR (up (x / - y)) - x / - y + (- (x * / y) + - (IZR (up (x / - y)) - 1))x, y:RH:y <> 0Hlt:y < 0k0:=(1 - up (x / - y))%Z:ZH0:IZR (up (x / - y)) > x / - y /\ IZR (up (x / - y)) - x / - y <= 1x + (IZR (up (x / - y)) - 1) * y < Rabs yx, y:RH:y <> 0Hge:y >= 0k0:=(up (x / y) - 1)%Z:Z0 <= x - IZR (up (x / y) - 1) * y < Rabs yx, y:RH:y <> 0Hlt:y < 0k0:=(1 - up (x / - y))%Z:ZH0:IZR (up (x / - y)) > x / - y /\ IZR (up (x / - y)) - x / - y <= 1IZR (up (x * / - y)) - x * / - y <= IZR (up (x * / - y)) - x * - / y + (- (x * / y) + - (IZR (up (x * / - y)) - 1))x, y:RH:y <> 0Hlt:y < 0k0:=(1 - up (x / - y))%Z:ZH0:IZR (up (x / - y)) > x / - y /\ IZR (up (x / - y)) - x / - y <= 1x + (IZR (up (x / - y)) - 1) * y < Rabs yx, y:RH:y <> 0Hge:y >= 0k0:=(up (x / y) - 1)%Z:Z0 <= x - IZR (up (x / y) - 1) * y < Rabs yx, y:RH:y <> 0Hlt:y < 0k0:=(1 - up (x / - y))%Z:ZH0:IZR (up (x / - y)) > x / - y /\ IZR (up (x / - y)) - x / - y <= 1IZR (up (x * / - y)) - x * / - y <= 1x, y:RH:y <> 0Hlt:y < 0k0:=(1 - up (x / - y))%Z:ZH0:IZR (up (x / - y)) > x / - y /\ IZR (up (x / - y)) - x / - y <= 1x + (IZR (up (x / - y)) - 1) * y < Rabs yx, y:RH:y <> 0Hge:y >= 0k0:=(up (x / y) - 1)%Z:Z0 <= x - IZR (up (x / y) - 1) * y < Rabs yx, y:RH:y <> 0Hlt:y < 0k0:=(1 - up (x / - y))%Z:ZH0:IZR (up (x / - y)) > x / - y /\ IZR (up (x / - y)) - x / - y <= 1x + (IZR (up (x / - y)) - 1) * y < Rabs yx, y:RH:y <> 0Hge:y >= 0k0:=(up (x / y) - 1)%Z:Z0 <= x - IZR (up (x / y) - 1) * y < Rabs yx, y:RH:y <> 0Hlt:y < 0k0:=(1 - up (x / - y))%Z:ZH0:IZR (up (x / - y)) > x / - y /\ IZR (up (x / - y)) - x / - y <= 10 < / - yx, y:RH:y <> 0Hlt:y < 0k0:=(1 - up (x / - y))%Z:ZH0:IZR (up (x / - y)) > x / - y /\ IZR (up (x / - y)) - x / - y <= 1/ - y * (x + (IZR (up (x / - y)) - 1) * y) < / - y * - yx, y:RH:y <> 0Hge:y >= 0k0:=(up (x / y) - 1)%Z:Z0 <= x - IZR (up (x / y) - 1) * y < Rabs yx, y:RH:y <> 0Hlt:y < 0k0:=(1 - up (x / - y))%Z:ZH0:IZR (up (x / - y)) > x / - y /\ IZR (up (x / - y)) - x / - y <= 1/ - y * (x + (IZR (up (x / - y)) - 1) * y) < / - y * - yx, y:RH:y <> 0Hge:y >= 0k0:=(up (x / y) - 1)%Z:Z0 <= x - IZR (up (x / y) - 1) * y < Rabs yx, y:RH:y <> 0Hlt:y < 0k0:=(1 - up (x / - y))%Z:ZH0:IZR (up (x / - y)) > x / - y /\ IZR (up (x / - y)) - x / - y <= 1/ - y * (x + (IZR (up (x / - y)) - 1) * y) < 1x, y:RH:y <> 0Hlt:y < 0k0:=(1 - up (x / - y))%Z:ZH0:IZR (up (x / - y)) > x / - y /\ IZR (up (x / - y)) - x / - y <= 1- y <> 0x, y:RH:y <> 0Hge:y >= 0k0:=(up (x / y) - 1)%Z:Z0 <= x - IZR (up (x / y) - 1) * y < Rabs yx, y:RH:y <> 0Hlt:y < 0k0:=(1 - up (x / - y))%Z:ZH0:IZR (up (x / - y)) > x / - y /\ IZR (up (x / - y)) - x / - y <= 1x * - / y + (IZR (up (x / - y)) - 1) * y * - / y < 1x, y:RH:y <> 0Hlt:y < 0k0:=(1 - up (x / - y))%Z:ZH0:IZR (up (x / - y)) > x / - y /\ IZR (up (x / - y)) - x / - y <= 1- y <> 0x, y:RH:y <> 0Hge:y >= 0k0:=(up (x / y) - 1)%Z:Z0 <= x - IZR (up (x / y) - 1) * y < Rabs yx, y:RH:y <> 0Hlt:y < 0k0:=(1 - up (x / - y))%Z:ZH0:IZR (up (x / - y)) > x / - y /\ IZR (up (x / - y)) - x / - y <= 1IZR (up (x / - y)) - 1 + (- (x * / y) + - (IZR (up (x / - y)) - 1)) < IZR (up (x / - y)) - 1 + 1x, y:RH:y <> 0Hlt:y < 0k0:=(1 - up (x / - y))%Z:ZH0:IZR (up (x / - y)) > x / - y /\ IZR (up (x / - y)) - x / - y <= 1- y <> 0x, y:RH:y <> 0Hge:y >= 0k0:=(up (x / y) - 1)%Z:Z0 <= x - IZR (up (x / y) - 1) * y < Rabs yx, y:RH:y <> 0Hlt:y < 0k0:=(1 - up (x / - y))%Z:ZH0:IZR (up (x / - y)) > x / - y /\ IZR (up (x / - y)) - x / - y <= 1IZR (up (x / - y)) - 1 + (- (x * / y) + - (IZR (up (x / - y)) - 1)) < IZR (up (x / - y))x, y:RH:y <> 0Hlt:y < 0k0:=(1 - up (x / - y))%Z:ZH0:IZR (up (x / - y)) > x / - y /\ IZR (up (x / - y)) - x / - y <= 1- y <> 0x, y:RH:y <> 0Hge:y >= 0k0:=(up (x / y) - 1)%Z:Z0 <= x - IZR (up (x / y) - 1) * y < Rabs yx, y:RH:y <> 0Hlt:y < 0k0:=(1 - up (x / - y))%Z:ZH0:IZR (up (x / - y)) > x / - y /\ IZR (up (x / - y)) - x / - y <= 1- (x * / y) < IZR (up (x / - y))x, y:RH:y <> 0Hlt:y < 0k0:=(1 - up (x / - y))%Z:ZH0:IZR (up (x / - y)) > x / - y /\ IZR (up (x / - y)) - x / - y <= 1- y <> 0x, y:RH:y <> 0Hge:y >= 0k0:=(up (x / y) - 1)%Z:Z0 <= x - IZR (up (x / y) - 1) * y < Rabs yx, y:RH:y <> 0Hlt:y < 0k0:=(1 - up (x / - y))%Z:ZH0:IZR (up (x / - y)) > x / - y /\ IZR (up (x / - y)) - x / - y <= 1- y <> 0x, y:RH:y <> 0Hge:y >= 0k0:=(up (x / y) - 1)%Z:Z0 <= x - IZR (up (x / y) - 1) * y < Rabs yx, y:RH:y <> 0Hge:y >= 0k0:=(up (x / y) - 1)%Z:Z0 <= x - IZR (up (x / y) - 1) * y < Rabs yx, y:RH:y <> 0Hge:y >= 0k0:=(up (x / y) - 1)%Z:ZH0:IZR (up (x / y)) > x / y /\ IZR (up (x / y)) - x / y <= 10 < y -> 0 <= x - (IZR (up (x / y)) - 1) * y < Rabs yx, y:RH:y <> 0Hge:y >= 0k0:=(up (x / y) - 1)%Z:ZH0:IZR (up (x / y)) > x / y /\ IZR (up (x / y)) - x / y <= 10 < yx, y:RH:y <> 0Hge:y >= 0k0:=(up (x / y) - 1)%Z:ZH0:IZR (up (x / y)) > x / y /\ IZR (up (x / y)) - x / y <= 1H1:0 < y0 <= x + (1 - IZR (up (x / y))) * y < Rabs yx, y:RH:y <> 0Hge:y >= 0k0:=(up (x / y) - 1)%Z:ZH0:IZR (up (x / y)) > x / y /\ IZR (up (x / y)) - x / y <= 10 < yx, y:RH:y <> 0Hge:y >= 0k0:=(up (x / y) - 1)%Z:ZH0:IZR (up (x / y)) > x / y /\ IZR (up (x / y)) - x / y <= 1H1:0 < y0 <= x + (1 - IZR (up (x / y))) * yx, y:RH:y <> 0Hge:y >= 0k0:=(up (x / y) - 1)%Z:ZH0:IZR (up (x / y)) > x / y /\ IZR (up (x / y)) - x / y <= 1H1:0 < yx + (1 - IZR (up (x / y))) * y < Rabs yx, y:RH:y <> 0Hge:y >= 0k0:=(up (x / y) - 1)%Z:ZH0:IZR (up (x / y)) > x / y /\ IZR (up (x / y)) - x / y <= 10 < yx, y:RH:y <> 0Hge:y >= 0k0:=(up (x / y) - 1)%Z:ZH0:IZR (up (x / y)) > x / y /\ IZR (up (x / y)) - x / y <= 1H1:0 < y0 < / yx, y:RH:y <> 0Hge:y >= 0k0:=(up (x / y) - 1)%Z:ZH0:IZR (up (x / y)) > x / y /\ IZR (up (x / y)) - x / y <= 1H1:0 < y/ y * 0 <= / y * (x + (1 - IZR (up (x / y))) * y)x, y:RH:y <> 0Hge:y >= 0k0:=(up (x / y) - 1)%Z:ZH0:IZR (up (x / y)) > x / y /\ IZR (up (x / y)) - x / y <= 1H1:0 < yx + (1 - IZR (up (x / y))) * y < Rabs yx, y:RH:y <> 0Hge:y >= 0k0:=(up (x / y) - 1)%Z:ZH0:IZR (up (x / y)) > x / y /\ IZR (up (x / y)) - x / y <= 10 < yx, y:RH:y <> 0Hge:y >= 0k0:=(up (x / y) - 1)%Z:ZH0:IZR (up (x / y)) > x / y /\ IZR (up (x / y)) - x / y <= 1H1:0 < y/ y * 0 <= / y * (x + (1 - IZR (up (x / y))) * y)x, y:RH:y <> 0Hge:y >= 0k0:=(up (x / y) - 1)%Z:ZH0:IZR (up (x / y)) > x / y /\ IZR (up (x / y)) - x / y <= 1H1:0 < yx + (1 - IZR (up (x / y))) * y < Rabs yx, y:RH:y <> 0Hge:y >= 0k0:=(up (x / y) - 1)%Z:ZH0:IZR (up (x / y)) > x / y /\ IZR (up (x / y)) - x / y <= 10 < yx, y:RH:y <> 0Hge:y >= 0k0:=(up (x / y) - 1)%Z:ZH0:IZR (up (x / y)) > x / y /\ IZR (up (x / y)) - x / y <= 1H1:0 < yx + (1 - IZR (up (x / y))) * y < Rabs yx, y:RH:y <> 0Hge:y >= 0k0:=(up (x / y) - 1)%Z:ZH0:IZR (up (x / y)) > x / y /\ IZR (up (x / y)) - x / y <= 10 < yx, y:RH:y <> 0Hge:y >= 0k0:=(up (x / y) - 1)%Z:ZH0:IZR (up (x / y)) > x / y /\ IZR (up (x / y)) - x / y <= 1H1:0 < y0 < / yx, y:RH:y <> 0Hge:y >= 0k0:=(up (x / y) - 1)%Z:ZH0:IZR (up (x / y)) > x / y /\ IZR (up (x / y)) - x / y <= 1H1:0 < y/ y * (x + (1 - IZR (up (x / y))) * y) < / y * yx, y:RH:y <> 0Hge:y >= 0k0:=(up (x / y) - 1)%Z:ZH0:IZR (up (x / y)) > x / y /\ IZR (up (x / y)) - x / y <= 10 < yx, y:RH:y <> 0Hge:y >= 0k0:=(up (x / y) - 1)%Z:ZH0:IZR (up (x / y)) > x / y /\ IZR (up (x / y)) - x / y <= 1H1:0 < y/ y * (x + (1 - IZR (up (x / y))) * y) < / y * yx, y:RH:y <> 0Hge:y >= 0k0:=(up (x / y) - 1)%Z:ZH0:IZR (up (x / y)) > x / y /\ IZR (up (x / y)) - x / y <= 10 < yx, y:RH:y <> 0Hge:y >= 0k0:=(up (x / y) - 1)%Z:ZH0:IZR (up (x / y)) > x / y /\ IZR (up (x / y)) - x / y <= 10 < yx, y:RH:y <> 0Hge:y >= 0k0:=(up (x / y) - 1)%Z:ZH0:IZR (up (x / y)) > x / y /\ IZR (up (x / y)) - x / y <= 1Hlt:0 < y0 < yx, y:RH:y <> 0Hge:y >= 0k0:=(up (x / y) - 1)%Z:ZH0:IZR (up (x / y)) > x / y /\ IZR (up (x / y)) - x / y <= 1Heq:0 = y0 < yx, y:RH:y <> 0Hge:y >= 0k0:=(up (x / y) - 1)%Z:ZH0:IZR (up (x / y)) > x / y /\ IZR (up (x / y)) - x / y <= 1Hgt:0 > y0 < yx, y:RH:y <> 0Hge:y >= 0k0:=(up (x / y) - 1)%Z:ZH0:IZR (up (x / y)) > x / y /\ IZR (up (x / y)) - x / y <= 1Heq:0 = y0 < yx, y:RH:y <> 0Hge:y >= 0k0:=(up (x / y) - 1)%Z:ZH0:IZR (up (x / y)) > x / y /\ IZR (up (x / y)) - x / y <= 1Hgt:0 > y0 < yapply Rge_le in Hge; elim (Rlt_irrefl _ (Rle_lt_trans _ _ _ Hge Hgt)). Qed.x, y:RH:y <> 0Hge:y >= 0k0:=(up (x / y) - 1)%Z:ZH0:IZR (up (x / y)) > x / y /\ IZR (up (x / y)) - x / y <= 1Hgt:0 > y0 < yforall n i : nat, (n <= S n + i)%natforall n i : nat, (n <= S n + i)%natn:nat(n <= S n + 0)%natn, i:natHreci:(n <= S n + i)%nat(n <= S n + S i)%natn, i:natHreci:(n <= S n + i)%nat(n <= S n + S i)%natn, i:natHreci:(n <= S n + i)%nat(n <= S (S n + i))%natn, i:natHreci:(n <= S n + i)%natS (S n + i) = (S n + S i)%natapply INR_eq; rewrite S_INR; do 2 rewrite plus_INR; do 2 rewrite S_INR; ring. Qed.n, i:natHreci:(n <= S n + i)%natS (S n + i) = (S n + S i)%nat