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 Mult. Require Import Compare_dec. Require Import Wf_nat. Local Open Scope nat_scope. Implicit Types a b n q r : nat. Inductive diveucl a b : Set := divex : forall q r, b > r -> a = q * b + r -> diveucl a b.forall n : nat, n > 0 -> forall m : nat, diveucl m nforall n : nat, n > 0 -> forall m : nat, diveucl m nn:natH:n > 0m:natH0:forall m0 : nat, m > m0 -> diveucl m0 ndiveucl m nn:natH:n > 0m:natH0:forall m0 : nat, m > m0 -> diveucl m0 nHlebn:n <= mdiveucl m nn:natH:n > 0m:natH0:forall m0 : nat, m > m0 -> diveucl m0 nHgtbn:n > mdiveucl m nn:natH:n > 0m:natH0:forall m0 : nat, m > m0 -> diveucl m0 nHlebn:n <= mq, r:natHge0:n > rHeq:m - n = q * n + rdiveucl m nn:natH:n > 0m:natH0:forall m0 : nat, m > m0 -> diveucl m0 nHgtbn:n > mdiveucl m nn:natH:n > 0m:natH0:forall m0 : nat, m > m0 -> diveucl m0 nHlebn:n <= mq, r:natHge0:n > rHeq:m - n = q * n + rm = S q * n + rn:natH:n > 0m:natH0:forall m0 : nat, m > m0 -> diveucl m0 nHgtbn:n > mdiveucl m napply divex with 0 m; simpl; trivial. Defined.n:natH:n > 0m:natH0:forall m0 : nat, m > m0 -> diveucl m0 nHgtbn:n > mdiveucl m nforall n : nat, n > 0 -> forall m : nat, {q : nat | exists r : nat, m = q * n + r /\ n > r}forall n : nat, n > 0 -> forall m : nat, {q : nat | exists r : nat, m = q * n + r /\ n > r}n:natH:n > 0m:natH0:forall m0 : nat, m > m0 -> {q : nat | exists r : nat, m0 = q * n + r /\ n > r}{q : nat | exists r : nat, m = q * n + r /\ n > r}n:natH:n > 0m:natH0:forall m0 : nat, m > m0 -> {q : nat | exists r : nat, m0 = q * n + r /\ n > r}Hlebn:n <= m{q : nat | exists r : nat, m = q * n + r /\ n > r}n:natH:n > 0m:natH0:forall m0 : nat, m > m0 -> {q : nat | exists r : nat, m0 = q * n + r /\ n > r}Hgtbn:n > m{q : nat | exists r : nat, m = q * n + r /\ n > r}n:natH:n > 0m:natH0:forall m0 : nat, m > m0 -> {q0 : nat | exists r : nat, m0 = q0 * n + r /\ n > r}Hlebn:n <= mq:natHq:exists r : nat, m - n = q * n + r /\ n > rexists r : nat, m = S q * n + r /\ n > rn:natH:n > 0m:natH0:forall m0 : nat, m > m0 -> {q : nat | exists r : nat, m0 = q * n + r /\ n > r}Hgtbn:n > m{q : nat | exists r : nat, m = q * n + r /\ n > r}n:natH:n > 0m:natH0:forall m0 : nat, m > m0 -> {q0 : nat | exists r0 : nat, m0 = q0 * n + r0 /\ n > r0}Hlebn:n <= mq, r:natHeq:m - n = q * n + rHgt:n > rm = S q * n + rn:natH:n > 0m:natH0:forall m0 : nat, m > m0 -> {q : nat | exists r : nat, m0 = q * n + r /\ n > r}Hgtbn:n > m{q : nat | exists r : nat, m = q * n + r /\ n > r}exists 0; exists m; simpl; auto with arith. Defined.n:natH:n > 0m:natH0:forall m0 : nat, m > m0 -> {q : nat | exists r : nat, m0 = q * n + r /\ n > r}Hgtbn:n > m{q : nat | exists r : nat, m = q * n + r /\ n > r}forall n : nat, n > 0 -> forall m : nat, {r : nat | exists q : nat, m = q * n + r /\ n > r}forall n : nat, n > 0 -> forall m : nat, {r : nat | exists q : nat, m = q * n + r /\ n > r}n:natH:n > 0m:natH0:forall m0 : nat, m > m0 -> {r : nat | exists q : nat, m0 = q * n + r /\ n > r}{r : nat | exists q : nat, m = q * n + r /\ n > r}n:natH:n > 0m:natH0:forall m0 : nat, m > m0 -> {r : nat | exists q : nat, m0 = q * n + r /\ n > r}Hlebn:n <= m{r : nat | exists q : nat, m = q * n + r /\ n > r}n:natH:n > 0m:natH0:forall m0 : nat, m > m0 -> {r : nat | exists q : nat, m0 = q * n + r /\ n > r}Hgtbn:n > m{r : nat | exists q : nat, m = q * n + r /\ n > r}n:natH:n > 0m:natH0:forall m0 : nat, m > m0 -> {r0 : nat | exists q : nat, m0 = q * n + r0 /\ n > r0}Hlebn:n <= mr:natHr:exists q : nat, m - n = q * n + r /\ n > rexists q : nat, m = q * n + r /\ n > rn:natH:n > 0m:natH0:forall m0 : nat, m > m0 -> {r : nat | exists q : nat, m0 = q * n + r /\ n > r}Hgtbn:n > m{r : nat | exists q : nat, m = q * n + r /\ n > r}n:natH:n > 0m:natH0:forall m0 : nat, m > m0 -> {r0 : nat | exists q0 : nat, m0 = q0 * n + r0 /\ n > r0}Hlebn:n <= mr, q:natHeq:m - n = q * n + rHgt:n > rm = S q * n + rn:natH:n > 0m:natH0:forall m0 : nat, m > m0 -> {r : nat | exists q : nat, m0 = q * n + r /\ n > r}Hgtbn:n > m{r : nat | exists q : nat, m = q * n + r /\ n > r}exists m; exists 0; simpl; auto with arith. Defined.n:natH:n > 0m:natH0:forall m0 : nat, m > m0 -> {r : nat | exists q : nat, m0 = q * n + r /\ n > r}Hgtbn:n > m{r : nat | exists q : nat, m = q * n + r /\ n > r}