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) *)
(************************************************************************)
Properties of the greatest common divisor
Require Import NAxioms NSub NZGcd. Module Type NGcdProp (Import A : NAxiomsSig') (Import B : NSubProp A). Include NZGcdProp A A B.
Results concerning divisibility
Definition divide_1_r n : (n | 1) -> n == 1 := divide_1_r_nonneg n (le_0_l n). Definition divide_antisym n m : (n | m) -> (m | n) -> n == m := divide_antisym_nonneg n m (le_0_l n) (le_0_l m).forall n m p : t, (n | m) -> (n | m + p) -> (n | p)forall n m p : t, (n | m) -> (n | m + p) -> (n | p)n, m, p, q:tHq:m == q * nr:tHr:m + p == r * n(n | p)n, m, p, q:tHq:m == q * nr:tHr:m + p == r * np == (r - q) * nnow rewrite add_comm, add_sub. Qed.n, m, p, q:tHq:m == q * nr:tHr:m + p == r * np == m + p - mforall n m p : t, (n | m) -> (n | p) -> (n | m - p)forall n m p : t, (n | m) -> (n | p) -> (n | m - p)n, m, p:tH:(n | m)H':(n | p)(n | m - p)n, m, p:tH:(n | m)H':(n | p)LE:m <= p(n | m - p)n, m, p:tH:(n | m)H':(n | p)LE:p <= m(n | m - p)n, m, p:tH:(n | m)H':(n | p)LE:m - p == 0(n | m - p)n, m, p:tH:(n | m)H':(n | p)LE:p <= m(n | m - p)n, m, p:tH:(n | m)H':(n | p)LE:m - p == 0(n | 0)n, m, p:tH:(n | m)H':(n | p)LE:p <= m(n | m - p)n, m, p:tH:(n | m)H':(n | p)LE:p <= m(n | m - p)now rewrite add_comm, sub_add. Qed.n, m, p:tH:(n | m)H':(n | p)LE:p <= m(n | p + (m - p))
Properties of gcd
Definition gcd_0_l n : gcd 0 n == n := gcd_0_l_nonneg n (le_0_l n). Definition gcd_0_r n : gcd n 0 == n := gcd_0_r_nonneg n (le_0_l n). Definition gcd_diag n : gcd n n == n := gcd_diag_nonneg n (le_0_l n). Definition gcd_unique' n m p := gcd_unique n m p (le_0_l p). Definition gcd_unique_alt' n m p := gcd_unique_alt n m p (le_0_l p). Definition divide_gcd_iff' n m := divide_gcd_iff n m (le_0_l n).forall n m p : t, gcd n (m + p * n) == gcd n mforall n m p : t, gcd n (m + p * n) == gcd n mn, m, p:tgcd n (m + p * n) == gcd n mn, m, p:tforall q : t, (q | gcd n m) <-> (q | n) /\ (q | m + p * n)n, m, p, q:t(q | gcd n m) <-> (q | n) /\ (q | m + p * n)n, m, p, q:t(q | n) /\ (q | m) <-> (q | n) /\ (q | m + p * n)n, m, p, q:tU:(q | n)V:(q | m)(q | m + p * n)n, m, p, q:tU:(q | n)V:(q | m + p * n)(q | m)n, m, p, q:tU:(q | n)V:(q | m)(q | p * n)n, m, p, q:tU:(q | n)V:(q | m + p * n)(q | m)n, m, p, q:tU:(q | n)V:(q | m + p * n)(q | m)n, m, p, q:tU:(q | n)V:(q | m + p * n)(q | p * n)n, m, p, q:tU:(q | n)V:(q | m + p * n)(q | p * n + m)now rewrite add_comm. Qed.n, m, p, q:tU:(q | n)V:(q | m + p * n)(q | p * n + m)forall n m : t, gcd n (m + n) == gcd n mforall n m : t, gcd n (m + n) == gcd n mn, m:tgcd n (m + n) == gcd n mapply gcd_add_mult_diag_r. Qed.n, m:tgcd n (m + 1 * n) == gcd n mforall n m : t, n <= m -> gcd n (m - n) == gcd n mforall n m : t, n <= m -> gcd n (m - n) == gcd n mn, m:tH:n <= mgcd n (m - n) == gcd n mn, m:tH:n <= mgcd n m == gcd n (m - n)apply gcd_add_diag_r. Qed.n, m:tH:n <= mgcd n (m - n + n) == gcd n (m - n)
On natural numbers, we should use a particular form
for the Bezout identity, since we don't have full subtraction.
Definition Bezout n m p := exists a b, a*n == p + b*m.Proper (eq ==> eq ==> eq ==> iff) BezoutProper (eq ==> eq ==> eq ==> iff) BezoutProper (eq ==> eq ==> eq ==> iff) (fun n m p : t => exists a b : t, a * n == p + b * m)x, x':tHx:x == x'y, y':tHy:y == y'z, z':tHz:z == z'(exists a b : t, a * x == z + b * y) <-> (exists a b : t, a * x' == z' + b * y')x, x':tHx:x == x'y, y':tHy:y == y'z, z':tHz:z == z'(exists a b : t, a * x' == z + b * y) <-> (exists a b : t, a * x' == z' + b * y')now setoid_rewrite Hz. Qed.x, x':tHx:x == x'y, y':tHy:y == y'z, z':tHz:z == z'(exists a b : t, a * x' == z + b * y') <-> (exists a b : t, a * x' == z' + b * y')forall n m : t, Bezout n m 1 -> gcd n m == 1forall n m : t, Bezout n m 1 -> gcd n m == 1n, m, q, r:tH:q * n == 1 + r * mgcd n m == 1n, m, q, r:tH:q * n == 1 + r * mforall q0 : t, (q0 | n) -> (q0 | m) -> (q0 | 1)n, m, q, r:tH:q * n == 1 + r * mp:tHn:(p | n)Hm:(p | m)(p | 1)n, m, q, r:tH:q * n == 1 + r * mp:tHn:(p | n)Hm:(p | m)(p | r * m)n, m, q, r:tH:q * n == 1 + r * mp:tHn:(p | n)Hm:(p | m)(p | r * m + 1)n, m, q, r:tH:q * n == 1 + r * mp:tHn:(p | n)Hm:(p | m)(p | r * m + 1)now apply divide_mul_r. Qed.n, m, q, r:tH:q * n == 1 + r * mp:tHn:(p | n)Hm:(p | m)(p | q * n)
For strictly positive numbers, we have Bezout in the two directions.
forall n : t, 0 < n -> forall m : t, 0 < m -> Bezout n m (gcd n m) /\ Bezout m n (gcd n m)forall n : t, 0 < n -> forall m : t, 0 < m -> Bezout n m (gcd n m) /\ Bezout m n (gcd n m)n:tHn:0 < nforall m : t, 0 < m -> Bezout n m (gcd n m) /\ Bezout m n (gcd n m)n:tHn:1 <= nforall m : t, 0 < m -> Bezout n m (gcd n m) /\ Bezout m n (gcd n m)n:tHn:1 <= n(fun t0 : t => forall m : t, 0 < m -> Bezout t0 m (gcd t0 m) /\ Bezout m t0 (gcd t0 m)) nn:tHn:1 <= nProper (eq ==> iff) (fun t0 : t => forall m : t, 0 < m -> Bezout t0 m (gcd t0 m) /\ Bezout m t0 (gcd t0 m))n:tHn:1 <= nforall n0 : t, 1 <= n0 -> (forall m : t, 1 <= m -> m < n0 -> forall m0 : t, 0 < m0 -> Bezout m m0 (gcd m m0) /\ Bezout m0 m (gcd m m0)) -> forall m : t, 0 < m -> Bezout n0 m (gcd n0 m) /\ Bezout m n0 (gcd n0 m)n:tHn:1 <= nProper (eq ==> iff) (fun t0 : t => forall m : t, 0 < m -> (exists a b : t, a * t0 == gcd t0 m + b * m) /\ (exists a b : t, a * m == gcd t0 m + b * t0))n:tHn:1 <= nforall n0 : t, 1 <= n0 -> (forall m : t, 1 <= m -> m < n0 -> forall m0 : t, 0 < m0 -> Bezout m m0 (gcd m m0) /\ Bezout m0 m (gcd m m0)) -> forall m : t, 0 < m -> Bezout n0 m (gcd n0 m) /\ Bezout m n0 (gcd n0 m)n:tHn:1 <= nforall n0 : t, 1 <= n0 -> (forall m : t, 1 <= m -> m < n0 -> forall m0 : t, 0 < m0 -> Bezout m m0 (gcd m m0) /\ Bezout m0 m (gcd m m0)) -> forall m : t, 0 < m -> Bezout n0 m (gcd n0 m) /\ Bezout m n0 (gcd n0 m)forall n : t, 1 <= n -> (forall m : t, 1 <= m -> m < n -> forall m0 : t, 0 < m0 -> Bezout m m0 (gcd m m0) /\ Bezout m0 m (gcd m m0)) -> forall m : t, 0 < m -> Bezout n m (gcd n m) /\ Bezout m n (gcd n m)n:tHn:1 <= nIHn:forall m : t, 1 <= m -> m < n -> forall m0 : t, 0 < m0 -> Bezout m m0 (gcd m m0) /\ Bezout m0 m (gcd m m0)forall m : t, 0 < m -> Bezout n m (gcd n m) /\ Bezout m n (gcd n m)n:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:0 < mBezout n m (gcd n m) /\ Bezout m n (gcd n m)n:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mBezout n m (gcd n m) /\ Bezout m n (gcd n m)n:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= m(fun t0 : t => Bezout n t0 (gcd n t0) /\ Bezout t0 n (gcd n t0)) mn:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mProper (eq ==> iff) (fun t0 : t => Bezout n t0 (gcd n t0) /\ Bezout t0 n (gcd n t0))n:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mforall n0 : t, 1 <= n0 -> (forall m0 : t, 1 <= m0 -> m0 < n0 -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)) -> Bezout n n0 (gcd n n0) /\ Bezout n0 n (gcd n n0)n:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mProper (eq ==> iff) (fun t0 : t => (exists a b : t, a * n == gcd n t0 + b * t0) /\ (exists a b : t, a * t0 == gcd n t0 + b * n))n:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mforall n0 : t, 1 <= n0 -> (forall m0 : t, 1 <= m0 -> m0 < n0 -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)) -> Bezout n n0 (gcd n n0) /\ Bezout n0 n (gcd n n0)n:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mforall n0 : t, 1 <= n0 -> (forall m0 : t, 1 <= m0 -> m0 < n0 -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)) -> Bezout n n0 (gcd n n0) /\ Bezout n0 n (gcd n n0)n:tHn:1 <= nIHn:forall m : t, 1 <= m -> m < n -> forall m0 : t, 0 < m0 -> Bezout m m0 (gcd m m0) /\ Bezout m0 m (gcd m m0)forall n0 : t, 1 <= n0 -> (forall m : t, 1 <= m -> m < n0 -> Bezout n m (gcd n m) /\ Bezout m n (gcd n m)) -> Bezout n n0 (gcd n n0) /\ Bezout n0 n (gcd n n0)n:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)Bezout n m (gcd n m) /\ Bezout m n (gcd n m)(* n < m *)n:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)LT:n < mBezout n m (gcd n m) /\ Bezout m n (gcd n m)n:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)EQ:n == mBezout n m (gcd n m) /\ Bezout m n (gcd n m)n:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)LT:m < nBezout n m (gcd n m) /\ Bezout m n (gcd n m)n:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)LT:n < m1 <= m - nn:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)LT:n < mm - n < mn:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)LT:n < ma, b:tEQ:a * n == gcd n (m - n) + b * (m - n)a', b':tEQ':a' * (m - n) == gcd n (m - n) + b' * nBezout n m (gcd n m) /\ Bezout m n (gcd n m)n:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)EQ:n == mBezout n m (gcd n m) /\ Bezout m n (gcd n m)n:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)LT:m < nBezout n m (gcd n m) /\ Bezout m n (gcd n m)n:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)LT:n < m0 < m - nn:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)LT:n < mm - n < mn:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)LT:n < ma, b:tEQ:a * n == gcd n (m - n) + b * (m - n)a', b':tEQ':a' * (m - n) == gcd n (m - n) + b' * nBezout n m (gcd n m) /\ Bezout m n (gcd n m)n:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)EQ:n == mBezout n m (gcd n m) /\ Bezout m n (gcd n m)n:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)LT:m < nBezout n m (gcd n m) /\ Bezout m n (gcd n m)n:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)LT:n < mm - n < mn:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)LT:n < ma, b:tEQ:a * n == gcd n (m - n) + b * (m - n)a', b':tEQ':a' * (m - n) == gcd n (m - n) + b' * nBezout n m (gcd n m) /\ Bezout m n (gcd n m)n:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)EQ:n == mBezout n m (gcd n m) /\ Bezout m n (gcd n m)n:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)LT:m < nBezout n m (gcd n m) /\ Bezout m n (gcd n m)n:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)LT:n < ma, b:tEQ:a * n == gcd n (m - n) + b * (m - n)a', b':tEQ':a' * (m - n) == gcd n (m - n) + b' * nBezout n m (gcd n m) /\ Bezout m n (gcd n m)n:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)EQ:n == mBezout n m (gcd n m) /\ Bezout m n (gcd n m)n:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)LT:m < nBezout n m (gcd n m) /\ Bezout m n (gcd n m)n:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)LT:n < ma, b:tEQ:a * n == gcd n (m - n) + b * (m - n)a', b':tEQ':a' * (m - n) == gcd n (m - n) + b' * nBezout n m (gcd n m)n:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)LT:n < ma, b:tEQ:a * n == gcd n (m - n) + b * (m - n)a', b':tEQ':a' * (m - n) == gcd n (m - n) + b' * nBezout m n (gcd n m)n:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)EQ:n == mBezout n m (gcd n m) /\ Bezout m n (gcd n m)n:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)LT:m < nBezout n m (gcd n m) /\ Bezout m n (gcd n m)n:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)LT:n < ma, b:tEQ:a * n == gcd n (m - n) + b * (m - n)a', b':tEQ':a' * (m - n) == gcd n (m - n) + b' * nexists b0 : t, (a + b) * n == gcd n m + b0 * mn:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)LT:n < ma, b:tEQ:a * n == gcd n (m - n) + b * (m - n)a', b':tEQ':a' * (m - n) == gcd n (m - n) + b' * nBezout m n (gcd n m)n:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)EQ:n == mBezout n m (gcd n m) /\ Bezout m n (gcd n m)n:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)LT:m < nBezout n m (gcd n m) /\ Bezout m n (gcd n m)n:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)LT:n < ma, b:tEQ:a * n == gcd n (m - n) + b * (m - n)a', b':tEQ':a' * (m - n) == gcd n (m - n) + b' * n(a + b) * n == gcd n m + b * mn:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)LT:n < ma, b:tEQ:a * n == gcd n (m - n) + b * (m - n)a', b':tEQ':a' * (m - n) == gcd n (m - n) + b' * nBezout m n (gcd n m)n:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)EQ:n == mBezout n m (gcd n m) /\ Bezout m n (gcd n m)n:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)LT:m < nBezout n m (gcd n m) /\ Bezout m n (gcd n m)n:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)LT:n < ma, b:tEQ:a * n == gcd n (m - n) + b * (m - n)a', b':tEQ':a' * (m - n) == gcd n (m - n) + b' * ngcd n (m - n) + (b * m - b * n + b * n) == gcd n m + b * mn:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)LT:n < ma, b:tEQ:a * n == gcd n (m - n) + b * (m - n)a', b':tEQ':a' * (m - n) == gcd n (m - n) + b' * nBezout m n (gcd n m)n:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)EQ:n == mBezout n m (gcd n m) /\ Bezout m n (gcd n m)n:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)LT:m < nBezout n m (gcd n m) /\ Bezout m n (gcd n m)n:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)LT:n < ma, b:tEQ:a * n == gcd n (m - n) + b * (m - n)a', b':tEQ':a' * (m - n) == gcd n (m - n) + b' * ngcd n m + (b * m - b * n + b * n) == gcd n m + b * mn:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)LT:n < ma, b:tEQ:a * n == gcd n (m - n) + b * (m - n)a', b':tEQ':a' * (m - n) == gcd n (m - n) + b' * nBezout m n (gcd n m)n:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)EQ:n == mBezout n m (gcd n m) /\ Bezout m n (gcd n m)n:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)LT:m < nBezout n m (gcd n m) /\ Bezout m n (gcd n m)n:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)LT:n < ma, b:tEQ:a * n == gcd n (m - n) + b * (m - n)a', b':tEQ':a' * (m - n) == gcd n (m - n) + b' * ngcd n m + b * m == gcd n m + b * mn:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)LT:n < ma, b:tEQ:a * n == gcd n (m - n) + b * (m - n)a', b':tEQ':a' * (m - n) == gcd n (m - n) + b' * nb * n <= b * mn:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)LT:n < ma, b:tEQ:a * n == gcd n (m - n) + b * (m - n)a', b':tEQ':a' * (m - n) == gcd n (m - n) + b' * nBezout m n (gcd n m)n:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)EQ:n == mBezout n m (gcd n m) /\ Bezout m n (gcd n m)n:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)LT:m < nBezout n m (gcd n m) /\ Bezout m n (gcd n m)n:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)LT:n < ma, b:tEQ:a * n == gcd n (m - n) + b * (m - n)a', b':tEQ':a' * (m - n) == gcd n (m - n) + b' * nb * n <= b * mn:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)LT:n < ma, b:tEQ:a * n == gcd n (m - n) + b * (m - n)a', b':tEQ':a' * (m - n) == gcd n (m - n) + b' * nBezout m n (gcd n m)n:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)EQ:n == mBezout n m (gcd n m) /\ Bezout m n (gcd n m)n:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)LT:m < nBezout n m (gcd n m) /\ Bezout m n (gcd n m)n:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)LT:n < ma, b:tEQ:a * n == gcd n (m - n) + b * (m - n)a', b':tEQ':a' * (m - n) == gcd n (m - n) + b' * nBezout m n (gcd n m)n:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)EQ:n == mBezout n m (gcd n m) /\ Bezout m n (gcd n m)n:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)LT:m < nBezout n m (gcd n m) /\ Bezout m n (gcd n m)n:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)LT:n < ma, b:tEQ:a * n == gcd n (m - n) + b * (m - n)a', b':tEQ':a' * (m - n) == gcd n (m - n) + b' * nexists b0 : t, a' * m == gcd n m + b0 * nn:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)EQ:n == mBezout n m (gcd n m) /\ Bezout m n (gcd n m)n:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)LT:m < nBezout n m (gcd n m) /\ Bezout m n (gcd n m)n:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)LT:n < ma, b:tEQ:a * n == gcd n (m - n) + b * (m - n)a', b':tEQ':a' * (m - n) == gcd n (m - n) + b' * na' * m == gcd n m + (a' + b') * nn:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)EQ:n == mBezout n m (gcd n m) /\ Bezout m n (gcd n m)n:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)LT:m < nBezout n m (gcd n m) /\ Bezout m n (gcd n m)n:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)LT:n < ma, b:tEQ:a * n == gcd n (m - n) + b * (m - n)a', b':tEQ':a' * (m - n) == gcd n m + b' * na' * m == gcd n m + (a' + b') * nn:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)EQ:n == mBezout n m (gcd n m) /\ Bezout m n (gcd n m)n:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)LT:m < nBezout n m (gcd n m) /\ Bezout m n (gcd n m)n:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)LT:n < ma, b:tEQ:a * n == gcd n (m - n) + b * (m - n)a', b':tEQ':a' * (m - n) == gcd n m + b' * na' * m == a' * (m - n) + a' * nn:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)EQ:n == mBezout n m (gcd n m) /\ Bezout m n (gcd n m)n:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)LT:m < nBezout n m (gcd n m) /\ Bezout m n (gcd n m)n:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)LT:n < ma, b:tEQ:a * n == gcd n (m - n) + b * (m - n)a', b':tEQ':a' * (m - n) == gcd n m + b' * na' * m == a' * mn:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)LT:n < ma, b:tEQ:a * n == gcd n (m - n) + b * (m - n)a', b':tEQ':a' * (m - n) == gcd n m + b' * na' * n <= a' * mn:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)EQ:n == mBezout n m (gcd n m) /\ Bezout m n (gcd n m)n:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)LT:m < nBezout n m (gcd n m) /\ Bezout m n (gcd n m)n:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)LT:n < ma, b:tEQ:a * n == gcd n (m - n) + b * (m - n)a', b':tEQ':a' * (m - n) == gcd n m + b' * na' * n <= a' * mn:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)EQ:n == mBezout n m (gcd n m) /\ Bezout m n (gcd n m)n:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)LT:m < nBezout n m (gcd n m) /\ Bezout m n (gcd n m)(* n = m *)n:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)EQ:n == mBezout n m (gcd n m) /\ Bezout m n (gcd n m)n:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)LT:m < nBezout n m (gcd n m) /\ Bezout m n (gcd n m)n:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)EQ:n == mBezout m m (gcd m m) /\ Bezout m m (gcd m m)n:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)LT:m < nBezout n m (gcd n m) /\ Bezout m n (gcd n m)n:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)EQ:n == mBezout m m m /\ Bezout m m mn:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)LT:m < nBezout n m (gcd n m) /\ Bezout m n (gcd n m)n:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)EQ:n == mBezout m m mn:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)EQ:n == mBezout m m mn:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)LT:m < nBezout n m (gcd n m) /\ Bezout m n (gcd n m)n:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)EQ:n == mexists b : t, 1 * m == m + b * mn:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)EQ:n == mBezout m m mn:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)LT:m < nBezout n m (gcd n m) /\ Bezout m n (gcd n m)n:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)EQ:n == m1 * m == m + 0 * mn:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)EQ:n == mBezout m m mn:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)LT:m < nBezout n m (gcd n m) /\ Bezout m n (gcd n m)n:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)EQ:n == mBezout m m mn:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)LT:m < nBezout n m (gcd n m) /\ Bezout m n (gcd n m)n:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)EQ:n == mexists b : t, 1 * m == m + b * mn:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)LT:m < nBezout n m (gcd n m) /\ Bezout m n (gcd n m)n:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)EQ:n == m1 * m == m + 0 * mn:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)LT:m < nBezout n m (gcd n m) /\ Bezout m n (gcd n m)(* m < n *)n:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)LT:m < nBezout n m (gcd n m) /\ Bezout m n (gcd n m)n:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)LT:m < nBezout m n (gcd m n) /\ Bezout n m (gcd m n)now rewrite <- le_succ_l, <- one_succ. Qed.n:tHn:1 <= nIHn:forall m0 : t, 1 <= m0 -> m0 < n -> forall m1 : t, 0 < m1 -> Bezout m0 m1 (gcd m0 m1) /\ Bezout m1 m0 (gcd m0 m1)m:tHm:1 <= mIHm:forall m0 : t, 1 <= m0 -> m0 < m -> Bezout n m0 (gcd n m0) /\ Bezout m0 n (gcd n m0)LT:m < n0 < nforall n m : t, 0 < n -> Bezout n m (gcd n m)forall n m : t, 0 < n -> Bezout n m (gcd n m)n, m:tHn:0 < nBezout n m (gcd n m)n, m:tHn:0 < nEQ:m == 0Bezout n m (gcd n m)n, m:tHn:0 < nLT:0 < mBezout n m (gcd n m)n, m:tHn:0 < nEQ:m == 0Bezout n 0 nn, m:tHn:0 < nLT:0 < mBezout n m (gcd n m)n, m:tHn:0 < nEQ:m == 0exists b : t, 1 * n == n + b * 0n, m:tHn:0 < nLT:0 < mBezout n m (gcd n m)n, m:tHn:0 < nEQ:m == 01 * n == n + 0 * 0n, m:tHn:0 < nLT:0 < mBezout n m (gcd n m)now apply gcd_bezout_pos_pos. Qed.n, m:tHn:0 < nLT:0 < mBezout n m (gcd n m)
For arbitrary natural numbers, we could only say that at least
one of the Bezout identities holds.
forall n m : t, Bezout n m (gcd n m) \/ Bezout m n (gcd n m)forall n m : t, Bezout n m (gcd n m) \/ Bezout m n (gcd n m)n, m:tBezout n m (gcd n m) \/ Bezout m n (gcd n m)n, m:tEQ:n == 0Bezout n m (gcd n m) \/ Bezout m n (gcd n m)n, m:tLT:0 < nBezout n m (gcd n m) \/ Bezout m n (gcd n m)n, m:tEQ:n == 0Bezout m n (gcd n m)n, m:tLT:0 < nBezout n m (gcd n m) \/ Bezout m n (gcd n m)n, m:tEQ:n == 0Bezout m 0 mn, m:tLT:0 < nBezout n m (gcd n m) \/ Bezout m n (gcd n m)n, m:tEQ:n == 0exists b : t, 1 * m == m + b * 0n, m:tLT:0 < nBezout n m (gcd n m) \/ Bezout m n (gcd n m)n, m:tEQ:n == 01 * m == m + 0 * 0n, m:tLT:0 < nBezout n m (gcd n m) \/ Bezout m n (gcd n m)n, m:tLT:0 < nBezout n m (gcd n m) \/ Bezout m n (gcd n m)now apply gcd_bezout_pos. Qed.n, m:tLT:0 < nBezout n m (gcd n m)forall n m p : t, gcd (p * n) (p * m) == p * gcd n mforall n m p : t, gcd (p * n) (p * m) == p * gcd n mn, m, p:tgcd (p * n) (p * m) == p * gcd n mn, m, p:t(p * gcd n m | p * n)n, m, p:t(p * gcd n m | p * m)n, m, p:tforall q : t, (q | p * n) -> (q | p * m) -> (q | p * gcd n m)n, m, p:t(p * gcd n m | p * m)n, m, p:tforall q : t, (q | p * n) -> (q | p * m) -> (q | p * gcd n m)n, m, p:tforall q : t, (q | p * n) -> (q | p * m) -> (q | p * gcd n m)n, m, p, q:tH:(q | p * n)H':(q | p * m)(q | p * gcd n m)n, m, p, q:tH:(q | p * n)H':(q | p * m)EQ:n == 0(q | p * gcd n m)n, m, p, q:tH:(q | p * n)H':(q | p * m)LT:0 < n(q | p * gcd n m)n, m, p, q:tH:(q | p * 0)H':(q | p * m)EQ:n == 0(q | p * gcd 0 m)n, m, p, q:tH:(q | p * n)H':(q | p * m)LT:0 < n(q | p * gcd n m)n, m, p, q:tH:(q | p * n)H':(q | p * m)LT:0 < n(q | p * gcd n m)n, m, p, q:tH:(q | p * n)H':(q | p * m)LT:0 < na, b:tEQ:a * n == gcd n m + b * m(q | p * gcd n m)n, m, p, q:tH:(q | p * n)H':(q | p * m)LT:0 < na, b:tEQ:a * n == gcd n m + b * m(q | p * m * b)n, m, p, q:tH:(q | p * n)H':(q | p * m)LT:0 < na, b:tEQ:a * n == gcd n m + b * m(q | p * m * b + p * gcd n m)n, m, p, q:tH:(q | p * n)H':(q | p * m)LT:0 < na, b:tEQ:a * n == gcd n m + b * m(q | p * m * b + p * gcd n m)n, m, p, q:tH:(q | p * n)H':(q | p * m)LT:0 < na, b:tEQ:a * n == gcd n m + b * m(q | p * (a * n))now apply divide_mul_l. Qed.n, m, p, q:tH:(q | p * n)H':(q | p * m)LT:0 < na, b:tEQ:a * n == gcd n m + b * m(q | p * n * a)forall n m p : t, gcd (n * p) (m * p) == gcd n m * pforall n m p : t, gcd (n * p) (m * p) == gcd n m * pn, m, p:tgcd (n * p) (m * p) == gcd n m * papply gcd_mul_mono_l. Qed.n, m, p:tgcd (p * n) (p * m) == p * gcd n mforall n m p : t, (n | m * p) -> gcd n m == 1 -> (n | p)forall n m p : t, (n | m * p) -> gcd n m == 1 -> (n | p)n, m, p:tH:(n | m * p)G:gcd n m == 1(n | p)n, m, p:tH:(n | m * p)G:gcd n m == 1EQ:n == 0(n | p)n, m, p:tH:(n | m * p)G:gcd n m == 1LT:0 < n(n | p)n, m, p:tH:(0 | m * p)G:gcd 0 m == 1EQ:n == 0(0 | p)n, m, p:tH:(n | m * p)G:gcd n m == 1LT:0 < n(n | p)n, m, p:tH:(0 | m * p)G:m == 1EQ:n == 0(0 | p)n, m, p:tH:(n | m * p)G:gcd n m == 1LT:0 < n(n | p)n, m, p:tH:(n | m * p)G:gcd n m == 1LT:0 < n(n | p)n, m, p:tH:(n | m * p)G:gcd n m == 1LT:0 < na, b:tEQ:a * n == gcd n m + b * m(n | p)n, m, p:tH:(n | m * p)G:gcd n m == 1LT:0 < na, b:tEQ:a * n == 1 + b * m(n | p)n, m, p:tH:(n | m * p)G:gcd n m == 1LT:0 < na, b:tEQ:a * n == 1 + b * m(n | m * p * b)n, m, p:tH:(n | m * p)G:gcd n m == 1LT:0 < na, b:tEQ:a * n == 1 + b * m(n | m * p * b + p)n, m, p:tH:(n | m * p)G:gcd n m == 1LT:0 < na, b:tEQ:a * n == 1 + b * m(n | m * p * b + p)n, m, p:tH:(n | m * p)G:gcd n m == 1LT:0 < na, b:tEQ:a * n == 1 + b * m(n | b * m * p + p)n, m, p:tH:(n | m * p)G:gcd n m == 1LT:0 < na, b:tEQ:a * n == 1 + b * m(n | b * m * p + 1 * p)now apply divide_mul_l, divide_factor_r. Qed.n, m, p:tH:(n | m * p)G:gcd n m == 1LT:0 < na, b:tEQ:a * n == 1 + b * m(n | a * n * p)forall n m p : t, n ~= 0 -> (n | m * p) -> exists q r : t, n == q * r /\ (q | m) /\ (r | p)forall n m p : t, n ~= 0 -> (n | m * p) -> exists q r : t, n == q * r /\ (q | m) /\ (r | p)n, m, p:tHn:n ~= 0H:(n | m * p)exists q r : t, n == q * r /\ (q | m) /\ (r | p)n, m, p:tHn:n ~= 0H:(n | m * p)G:0 <= gcd n mexists q r : t, n == q * r /\ (q | m) /\ (r | p)n, m, p:tHn:n ~= 0H:(n | m * p)G:0 < gcd n mexists q r : t, n == q * r /\ (q | m) /\ (r | p)n, m, p:tHn:n ~= 0H:(n | m * p)G:0 == gcd n mexists q r : t, n == q * r /\ (q | m) /\ (r | p)n, m, p:tHn:n ~= 0H:(n | m * p)G:0 < gcd n mq:tHq:n == q * gcd n mexists q0 r : t, n == q0 * r /\ (q0 | m) /\ (r | p)n, m, p:tHn:n ~= 0H:(n | m * p)G:0 == gcd n mexists q r : t, n == q * r /\ (q | m) /\ (r | p)n, m, p:tHn:n ~= 0H:(n | m * p)G:0 < gcd n mq:tHq:n == q * gcd n mexists r : t, n == gcd n m * r /\ (gcd n m | m) /\ (r | p)n, m, p:tHn:n ~= 0H:(n | m * p)G:0 == gcd n mexists q r : t, n == q * r /\ (q | m) /\ (r | p)n, m, p:tHn:n ~= 0H:(n | m * p)G:0 < gcd n mq:tHq:n == q * gcd n mn == gcd n m * q /\ (gcd n m | m) /\ (q | p)n, m, p:tHn:n ~= 0H:(n | m * p)G:0 == gcd n mexists q r : t, n == q * r /\ (q | m) /\ (r | p)n, m, p:tHn:n ~= 0H:(n | m * p)G:0 < gcd n mq:tHq:n == q * gcd n mn == gcd n m * qn, m, p:tHn:n ~= 0H:(n | m * p)G:0 < gcd n mq:tHq:n == q * gcd n m(gcd n m | m) /\ (q | p)n, m, p:tHn:n ~= 0H:(n | m * p)G:0 == gcd n mexists q r : t, n == q * r /\ (q | m) /\ (r | p)n, m, p:tHn:n ~= 0H:(n | m * p)G:0 < gcd n mq:tHq:n == q * gcd n m(gcd n m | m) /\ (q | p)n, m, p:tHn:n ~= 0H:(n | m * p)G:0 == gcd n mexists q r : t, n == q * r /\ (q | m) /\ (r | p)n, m, p:tHn:n ~= 0H:(n | m * p)G:0 < gcd n mq:tHq:n == q * gcd n m(gcd n m | m)n, m, p:tHn:n ~= 0H:(n | m * p)G:0 < gcd n mq:tHq:n == q * gcd n m(q | p)n, m, p:tHn:n ~= 0H:(n | m * p)G:0 == gcd n mexists q r : t, n == q * r /\ (q | m) /\ (r | p)n, m, p:tHn:n ~= 0H:(n | m * p)G:0 < gcd n mq:tHq:n == q * gcd n m(q | p)n, m, p:tHn:n ~= 0H:(n | m * p)G:0 == gcd n mexists q r : t, n == q * r /\ (q | m) /\ (r | p)n, m, p:tHn:n ~= 0H:(n | m * p)G:0 < gcd n mq:tHq:n == q * gcd n mr:tHr:m == r * gcd n m(q | p)n, m, p:tHn:n ~= 0H:(n | m * p)G:0 == gcd n mexists q r : t, n == q * r /\ (q | m) /\ (r | p)n, m, p:tHn:n ~= 0G:0 < gcd n mq:tHq:n == q * gcd n mr:tH:(n | r * gcd n m * p)Hr:m == r * gcd n m(q | p)n, m, p:tHn:n ~= 0H:(n | m * p)G:0 == gcd n mexists q r : t, n == q * r /\ (q | m) /\ (r | p)n, m, p:tHn:n ~= 0G:0 < gcd n mq:tHq:n == q * gcd n mr:tH:(q * gcd n m | r * gcd n m * p)Hr:m == r * gcd n m(q | p)n, m, p:tHn:n ~= 0H:(n | m * p)G:0 == gcd n mexists q r : t, n == q * r /\ (q | m) /\ (r | p)n, m, p:tHn:n ~= 0G:0 < gcd n mq:tHq:n == q * gcd n mr:tH:(q * gcd n m | r * p * gcd n m)Hr:m == r * gcd n m(q | p)n, m, p:tHn:n ~= 0H:(n | m * p)G:0 == gcd n mexists q r : t, n == q * r /\ (q | m) /\ (r | p)n, m, p:tHn:n ~= 0G:0 < gcd n mq:tHq:n == q * gcd n mr:tH:(q | r * p)Hr:m == r * gcd n m(q | p)n, m, p:tHn:n ~= 0H:(n | m * p)G:0 == gcd n mexists q r : t, n == q * r /\ (q | m) /\ (r | p)n, m, p:tHn:n ~= 0G:0 < gcd n mq:tHq:n == q * gcd n mr:tH:(q | r * p)Hr:m == r * gcd n mgcd q r == 1n, m, p:tHn:n ~= 0H:(n | m * p)G:0 == gcd n mexists q r : t, n == q * r /\ (q | m) /\ (r | p)n, m, p:tHn:n ~= 0G:0 < gcd n mq:tHq:n == q * gcd n mr:tH:(q | r * p)Hr:m == r * gcd n mgcd q r * gcd n m == 1 * gcd n mn, m, p:tHn:n ~= 0H:(n | m * p)G:0 == gcd n mexists q r : t, n == q * r /\ (q | m) /\ (r | p)n, m, p:tHn:n ~= 0G:0 < gcd n mq:tHq:n == q * gcd n mr:tH:(q | r * p)Hr:m == r * gcd n mgcd q r * gcd n m == gcd n mn, m, p:tHn:n ~= 0H:(n | m * p)G:0 == gcd n mexists q r : t, n == q * r /\ (q | m) /\ (r | p)n, m, p:tHn:n ~= 0H:(n | m * p)G:0 == gcd n mexists q r : t, n == q * r /\ (q | m) /\ (r | p)n, m, p:tHn:n ~= 0H:(n | m * p)G:gcd n m == 0exists q r : t, n == q * r /\ (q | m) /\ (r | p)destruct G as (Hn',_); order. Qed.n, m, p:tHn:n ~= 0H:(n | m * p)G:n == 0 /\ m == 0exists q r : t, n == q * r /\ (q | m) /\ (r | p)
TODO : relation between gcd and division and modulo
TODO : more about rel_prime (i.e. gcd == 1), about prime ...
End NGcdProp.