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 ZArith_base ZArithRing Zcomplements Zdiv Znumtheory. Require Export Zpower. Local Open Scope Z_scope.
Properties of the power function over Z
Nota: the usual properties of Z.pow are now already provided
by BinInt.Z. Only remain here some compatibility elements,
as well as more specific results about power and modulo and/or
primality.
Proof (Z.pow_1_r x).x:ZZ.pow_pos x 1 = xp:positiveZ.pow_pos 1 p = 1now apply (Z.pow_1_l (Zpos p)). Qed.p:positiveZ.pow_pos 1 p = 1p:positiveZ.pow_pos 0 p = 0now apply (Z.pow_0_l (Zpos p)). Qed.p:positiveZ.pow_pos 0 p = 0x:Zp:positive0 < x -> 0 < Z.pow_pos x px:Zp:positive0 < x -> 0 < Z.pow_pos x pnow apply (Z.pow_pos_nonneg x (Zpos p)). Qed. Notation Zpower_1_r := Z.pow_1_r (only parsing). Notation Zpower_1_l := Z.pow_1_l (only parsing). Notation Zpower_0_l := Z.pow_0_l' (only parsing). Notation Zpower_0_r := Z.pow_0_r (only parsing). Notation Zpower_2 := Z.pow_2_r (only parsing). Notation Zpower_gt_0 := Z.pow_pos_nonneg (only parsing). Notation Zpower_ge_0 := Z.pow_nonneg (only parsing). Notation Zpower_Zabs := Z.abs_pow (only parsing). Notation Zpower_Zsucc := Z.pow_succ_r (only parsing). Notation Zpower_mult := Z.pow_mul_r (only parsing). Notation Zpower_le_monotone2 := Z.pow_le_mono_r (only parsing).x:Zp:positiveH:0 < x0 < Z.pow_pos x pa, b, c:Z0 < a -> 0 <= b <= c -> a ^ b <= a ^ ca, b, c:Z0 < a -> 0 <= b <= c -> a ^ b <= a ^ cnow apply Z.pow_le_mono_r. Qed.a, b, c:ZH:0 < aH0:0 <= b <= ca ^ b <= a ^ ca, b, c:Z1 < a -> 0 <= b < c -> a ^ b < a ^ ca, b, c:Z1 < a -> 0 <= b < c -> a ^ b < a ^ capply Z.pow_lt_mono_r; auto with zarith. Qed.a, b, c:ZH:1 < aH0:0 <= b < ca ^ b < a ^ cx, y:Z1 < x -> 0 < y -> 1 < x ^ yapply Z.pow_gt_1. Qed.x, y:Z1 < x -> 0 < y -> 1 < x ^ yp, q, r:Z0 <= r -> (p * q) ^ r = p ^ r * q ^ rp, q, r:Z0 <= r -> (p * q) ^ r = p ^ r * q ^ rapply Z.pow_mul_l. Qed. Hint Resolve Z.pow_nonneg Z.pow_pos_nonneg : zarith.p, q, r:ZH:0 <= r(p * q) ^ r = p ^ r * q ^ ra, b, c:Z0 <= c -> 0 <= a <= b -> a ^ c <= b ^ ca, b, c:Z0 <= c -> 0 <= a <= b -> a ^ c <= b ^ cnow apply Z.pow_le_mono_l. Qed.a, b, c:ZH:0 <= cH0:0 <= a <= ba ^ c <= b ^ ca, b, c:Z1 < a -> 0 < b -> a ^ b <= a ^ c -> b <= ca, b, c:Z1 < a -> 0 < b -> a ^ b <= a ^ c -> b <= ca, b, c:ZHa:1 < aHb:0 < bH:a ^ b <= a ^ cb <= ca, b, c:ZHa:1 < aHb:0 < bH:a ^ b <= a ^ c0 <= ca, b, c:ZHa:1 < aHb:0 < bH:a ^ b <= a ^ c1 < a ^ cnow apply Z.pow_gt_1. Qed. Notation Zpower_nat_Zpower := Zpower_nat_Zpower (only parsing).a, b, c:ZHa:1 < aHb:0 < bH:a ^ b <= a ^ c1 < a ^ bn:Z0 <= n -> n < 2 ^ nn:Z0 <= n -> n < 2 ^ nnow apply Z.pow_gt_lin_r. Qed.n:ZH:0 <= nn < 2 ^ nn:Z0 <= n -> n <= 2 ^ nn:Z0 <= n -> n <= 2 ^ nn:ZH:0 <= nn <= 2 ^ nnow apply Z.pow_gt_lin_r. Qed.n:ZH:0 <= nn < 2 ^ nn:natp:positiveZ.pos p < 2 ^ Z.of_nat n <-> (Pos.size_nat p <= n)%natn:natp:positiveZ.pos p < 2 ^ Z.of_nat n <-> (Pos.size_nat p <= n)%natforall p : positive, Z.pos p < 2 ^ Z.of_nat 0 <-> (Pos.size_nat p <= 0)%natn:natIHn:forall p : positive, Z.pos p < 2 ^ Z.of_nat n <-> (Pos.size_nat p <= n)%natforall p : positive, Z.pos p < 2 ^ Z.of_nat (S n) <-> (Pos.size_nat p <= S n)%natn:natIHn:forall p : positive, Z.pos p < 2 ^ Z.of_nat n <-> (Pos.size_nat p <= n)%natforall p : positive, Z.pos p < 2 ^ Z.of_nat (S n) <-> (Pos.size_nat p <= S n)%natn:natIHn:forall p : positive, Z.pos p < 2 ^ Z.of_nat n <-> (Pos.size_nat p <= n)%natHn:0 <= Z.of_nat nforall p : positive, Z.pos p < 2 ^ Z.of_nat (S n) <-> (Pos.size_nat p <= S n)%natn:natIHn:forall p0 : positive, Z.pos p0 < 2 ^ Z.of_nat n <-> (Pos.size_nat p0 <= n)%natHn:0 <= Z.of_nat np:positiveZ.pos p~1 < 2 ^ Z.of_nat (S n) <-> (S (Pos.size_nat p) <= S n)%natn:natIHn:forall p0 : positive, Z.pos p0 < 2 ^ Z.of_nat n <-> (Pos.size_nat p0 <= n)%natHn:0 <= Z.of_nat np:positiveZ.pos p~0 < 2 ^ Z.of_nat (S n) <-> (S (Pos.size_nat p) <= S n)%natn:natIHn:forall p : positive, Z.pos p < 2 ^ Z.of_nat n <-> (Pos.size_nat p <= n)%natHn:0 <= Z.of_nat n1 < 2 ^ Z.of_nat (S n) <-> (1 <= S n)%natn:natIHn:forall p0 : positive, Z.pos p0 < 2 ^ Z.of_nat n <-> (Pos.size_nat p0 <= n)%natHn:0 <= Z.of_nat np:positiveZ.pos p~1 < 2 ^ Z.of_nat (S n) <-> (S (Pos.size_nat p) <= S n)%natrewrite Pos2Z.inj_xI, Nat2Z.inj_succ, Z.pow_succ_r; omega.n:natp:positiveIHn:Z.pos p < 2 ^ Z.of_nat n <-> (Pos.size_nat p <= n)%natHn:0 <= Z.of_nat nZ.pos p~1 < 2 ^ Z.of_nat (S n) <-> (S (Pos.size_nat p) <= S n)%natn:natIHn:forall p0 : positive, Z.pos p0 < 2 ^ Z.of_nat n <-> (Pos.size_nat p0 <= n)%natHn:0 <= Z.of_nat np:positiveZ.pos p~0 < 2 ^ Z.of_nat (S n) <-> (S (Pos.size_nat p) <= S n)%natrewrite Pos2Z.inj_xO, Nat2Z.inj_succ, Z.pow_succ_r; omega.n:natp:positiveIHn:Z.pos p < 2 ^ Z.of_nat n <-> (Pos.size_nat p <= n)%natHn:0 <= Z.of_nat nZ.pos p~0 < 2 ^ Z.of_nat (S n) <-> (S (Pos.size_nat p) <= S n)%natn:natIHn:forall p : positive, Z.pos p < 2 ^ Z.of_nat n <-> (Pos.size_nat p <= n)%natHn:0 <= Z.of_nat n1 < 2 ^ Z.of_nat (S n) <-> (1 <= S n)%natn:natIHn:forall p : positive, Z.pos p < 2 ^ Z.of_nat n <-> (Pos.size_nat p <= n)%natHn:0 <= Z.of_nat n(1 <= S n)%nat -> 1 < 2 ^ Z.of_nat (S n)n:natIHn:forall p : positive, Z.pos p < 2 ^ Z.of_nat n <-> (Pos.size_nat p <= n)%natHn:0 <= Z.of_nat n1 < 2 ^ Z.of_nat (S n)n:natIHn:forall p : positive, Z.pos p < 2 ^ Z.of_nat n <-> (Pos.size_nat p <= n)%natHn:0 <= Z.of_nat n1 < 2n:natIHn:forall p : positive, Z.pos p < 2 ^ Z.of_nat n <-> (Pos.size_nat p <= n)%natHn:0 <= Z.of_nat n0 < Z.of_nat (S n)now rewrite Nat2Z.inj_succ, Z.lt_succ_r. Qed.n:natIHn:forall p : positive, Z.pos p < 2 ^ Z.of_nat n <-> (Pos.size_nat p <= n)%natHn:0 <= Z.of_nat n0 < Z.of_nat (S n)
p, q, n:Z0 < n -> p ^ q mod n = (p mod n) ^ q mod np, q, n:Z0 < n -> p ^ q mod n = (p mod n) ^ q mod np, q, n:ZHn:0 < nH1:0 <= qp ^ q mod n = (p mod n) ^ q mod np, q, n:ZHn:0 < nH1:q < 0p ^ q mod n = (p mod n) ^ q mod np, q, n:ZHn:0 < nH1:0 <= qp ^ q mod n = (p mod n) ^ q mod np, q, n:ZHn:0 < nH1:0 <= qforall x : Z, 0 <= x -> p ^ x mod n = (p mod n) ^ x mod n -> p ^ Z.succ x mod n = (p mod n) ^ Z.succ x mod np, n:ZHn:0 < nforall x : Z, 0 <= x -> p ^ x mod n = (p mod n) ^ x mod n -> p ^ Z.succ x mod n = (p mod n) ^ Z.succ x mod np, n:ZHn:0 < nq:ZHq:0 <= qRec:p ^ q mod n = (p mod n) ^ q mod np ^ Z.succ q mod n = (p mod n) ^ Z.succ q mod np, n:ZHn:0 < nq:ZHq:0 <= qRec:p ^ q mod n = (p mod n) ^ q mod n(p * p ^ q) mod n = (p mod n * (p mod n) ^ q) mod nrewrite Z.mul_mod, Rec, <- Z.mul_mod; auto with zarith.p, n:ZHn:0 < nq:ZHq:0 <= qRec:p ^ q mod n = (p mod n) ^ q mod n(p * p ^ q) mod n = (p * (p mod n) ^ q) mod nrewrite !Z.pow_neg_r; auto with zarith. Qed.p, q, n:ZHn:0 < nH1:q < 0p ^ q mod n = (p mod n) ^ q mod n
A direct way to compute Z.pow modulo
Fixpoint Zpow_mod_pos (a: Z)(m: positive)(n : Z) : Z := match m with | xH => a mod n | xO m' => let z := Zpow_mod_pos a m' n in match z with | 0 => 0 | _ => (z * z) mod n end | xI m' => let z := Zpow_mod_pos a m' n in match z with | 0 => 0 | _ => (z * z * a) mod n end end. Definition Zpow_mod a m n := match m with | 0 => 1 mod n | Zpos p => Zpow_mod_pos a p n | Zneg p => 0 end.a:Zm:positiven:Zn <> 0 -> Zpow_mod_pos a m n = Z.pow_pos a m mod na:Zm:positiven:Zn <> 0 -> Zpow_mod_pos a m n = Z.pow_pos a m mod na:Zm:positiven:ZHn:n <> 0Zpow_mod_pos a m n = Z.pow_pos a m mod na:Zm:positiven:ZHn:n <> 0IHm:Zpow_mod_pos a m n = Z.pow_pos a m mod nZpow_mod_pos a m~1 n = Z.pow_pos a m~1 mod na:Zm:positiven:ZHn:n <> 0IHm:Zpow_mod_pos a m n = Z.pow_pos a m mod nZpow_mod_pos a m~0 n = Z.pow_pos a m~0 mod na, n:ZHn:n <> 0Zpow_mod_pos a 1 n = Z.pow_pos a 1 mod na:Zm:positiven:ZHn:n <> 0IHm:Zpow_mod_pos a m n = Z.pow_pos a m mod nZpow_mod_pos a m~1 n = Z.pow_pos a m~1 mod na:Zm:positiven:ZHn:n <> 0IHm:Zpow_mod_pos a m n = Z.pow_pos a m mod nZpow_mod_pos a m~1 n = Z.pow_pos a (Pos.succ m~0) mod na:Zm:positiven:ZHn:n <> 0IHm:Zpow_mod_pos a m n = Z.pow_pos a m mod nZpow_mod_pos a m~1 n = Z.pow_pos a (m + m + 1) mod na:Zm:positiven:ZHn:n <> 0IHm:Zpow_mod_pos a m n = Z.pow_pos a m mod nZpow_mod_pos a m~1 n = (Z.pow_pos a m * Z.pow_pos a m * a) mod na:Zm:positiven:ZHn:n <> 0IHm:Zpow_mod_pos a m n = Z.pow_pos a m mod nZpow_mod_pos a m~1 n = ((Z.pow_pos a m mod n * (Z.pow_pos a m mod n)) mod n * (a mod n)) mod na:Zm:positiven:ZHn:n <> 0IHm:Zpow_mod_pos a m n = Z.pow_pos a m mod nZpow_mod_pos a m~1 n = (Zpow_mod_pos a m n * Zpow_mod_pos a m n * a) mod nnow destruct (Zpow_mod_pos a m n).a:Zm:positiven:ZHn:n <> 0IHm:Zpow_mod_pos a m n = Z.pow_pos a m mod nmatch Zpow_mod_pos a m n with | 0 => 0 | _ => (Zpow_mod_pos a m n * Zpow_mod_pos a m n * a) mod n end = (Zpow_mod_pos a m n * Zpow_mod_pos a m n * a) mod na:Zm:positiven:ZHn:n <> 0IHm:Zpow_mod_pos a m n = Z.pow_pos a m mod nZpow_mod_pos a m~0 n = Z.pow_pos a m~0 mod na:Zm:positiven:ZHn:n <> 0IHm:Zpow_mod_pos a m n = Z.pow_pos a m mod nZpow_mod_pos a m~0 n = Z.pow_pos a (m + m) mod na:Zm:positiven:ZHn:n <> 0IHm:Zpow_mod_pos a m n = Z.pow_pos a m mod nZpow_mod_pos a m~0 n = (Z.pow_pos a m * Z.pow_pos a m) mod na:Zm:positiven:ZHn:n <> 0IHm:Zpow_mod_pos a m n = Z.pow_pos a m mod nZpow_mod_pos a m~0 n = (Z.pow_pos a m mod n * (Z.pow_pos a m mod n)) mod na:Zm:positiven:ZHn:n <> 0IHm:Zpow_mod_pos a m n = Z.pow_pos a m mod nZpow_mod_pos a m~0 n = (Zpow_mod_pos a m n * Zpow_mod_pos a m n) mod nnow destruct (Zpow_mod_pos a m n).a:Zm:positiven:ZHn:n <> 0IHm:Zpow_mod_pos a m n = Z.pow_pos a m mod nmatch Zpow_mod_pos a m n with | 0 => 0 | _ => (Zpow_mod_pos a m n * Zpow_mod_pos a m n) mod n end = (Zpow_mod_pos a m n * Zpow_mod_pos a m n) mod nnow rewrite Zpower_pos_1_r. Qed.a, n:ZHn:n <> 0Zpow_mod_pos a 1 n = Z.pow_pos a 1 mod na, m, n:Zn <> 0 -> Zpow_mod a m n = a ^ m mod na, m, n:Zn <> 0 -> Zpow_mod a m n = a ^ m mod na, m, n:ZHn:n <> 0Zpow_mod a m n = a ^ m mod na:Zp:positiven:ZHn:n <> 0Zpow_mod_pos a p n = Z.pow_pos a p mod napply Zpow_mod_pos_correct; auto with zarith. Qed. (* Complements about power and number theory. *)a:Zp:positiven:ZHn:n <> 0Zpow_mod_pos a p n = Z.pow_pos a p mod np, q:Z0 < q -> (p | p ^ q)p, q:Z0 < q -> (p | p ^ q)rewrite Z.mul_comm, <- Z.pow_succ_r; f_equal; auto with zarith. Qed.p, q:ZH:0 < qp ^ q = p ^ (q - 1) * pi, p, q:Z0 <= i -> rel_prime p q -> rel_prime p (q ^ i)i, p, q:Z0 <= i -> rel_prime p q -> rel_prime p (q ^ i)i, p, q:ZHi:0 <= iHpq:rel_prime p qrel_prime p (q ^ 0)i, p, q:ZHi:0 <= iHpq:rel_prime p qforall x : Z, 0 <= x -> rel_prime p (q ^ x) -> rel_prime p (q ^ Z.succ x)i, p, q:ZHi:0 <= iHpq:rel_prime p qrel_prime p 1i, p, q:ZHi:0 <= iHpq:rel_prime p qforall x : Z, 0 <= x -> rel_prime p (q ^ x) -> rel_prime p (q ^ Z.succ x)i, p, q:ZHi:0 <= iHpq:rel_prime p qforall x : Z, 0 <= x -> rel_prime p (q ^ x) -> rel_prime p (q ^ Z.succ x)p, q:ZHpq:rel_prime p qforall x : Z, 0 <= x -> rel_prime p (q ^ x) -> rel_prime p (q ^ Z.succ x)apply rel_prime_mult; auto. Qed.p, q:ZHpq:rel_prime p qi:ZHi:0 <= iRec:rel_prime p (q ^ i)rel_prime p (q * q ^ i)i, j, p, q:Z0 <= i -> 0 <= j -> rel_prime p q -> rel_prime (p ^ i) (q ^ j)i, j, p, q:Z0 <= i -> 0 <= j -> rel_prime p q -> rel_prime (p ^ i) (q ^ j)i, j, p, q:ZHi:0 <= iHj:0 <= jH:rel_prime p qrel_prime (p ^ i) (q ^ j)i, j, p, q:ZHi:0 <= iHj:0 <= jH:rel_prime p qrel_prime (p ^ i) qi, j, p, q:ZHi:0 <= iHj:0 <= jH:rel_prime p qrel_prime q (p ^ i)now apply rel_prime_sym. Qed.i, j, p, q:ZHi:0 <= iHj:0 <= jH:rel_prime p qrel_prime q pp, q, n:Z0 <= n -> prime p -> prime q -> (p | q ^ n) -> p = qp, q, n:Z0 <= n -> prime p -> prime q -> (p | q ^ n) -> p = qp, q:ZHp:prime pHq:prime q(p | q ^ 0) -> p = qp, q:ZHp:prime pHq:prime qforall x : Z, 0 <= x -> ((p | q ^ x) -> p = q) -> (p | q ^ Z.succ x) -> p = qp, q:ZHp:prime pHq:prime q(p | q ^ 0) -> p = qp, q:ZHp:prime pHq:prime qH:(p | 1)p = qp, q:ZHp:prime pHq:prime qH:(p | 1)H0:2 <= pp = qomega.p, q:ZHp:prime pHq:prime qH:(p | 1)H0:2 <= pH1:p <= 1p = qp, q:ZHp:prime pHq:prime qforall x : Z, 0 <= x -> ((p | q ^ x) -> p = q) -> (p | q ^ Z.succ x) -> p = qp, q:ZHp:prime pHq:prime qn:ZHn:0 <= nRec:(p | q ^ n) -> p = q(p | q ^ Z.succ n) -> p = qp, q:ZHp:prime pHq:prime qn:ZHn:0 <= nRec:(p | q ^ n) -> p = q(p | q * q ^ n) -> p = qp, q:ZHp:prime pHq:prime qn:ZHn:0 <= nRec:(p | q ^ n) -> p = qH:(p | q * q ^ n)p = qp, q:ZHp:prime pHq:prime qn:ZHn:0 <= nRec:(p | q ^ n) -> p = qH:(p | q * q ^ n)H0:2 <= pp = qp, q:ZHp:prime pHq:prime qn:ZHn:0 <= nRec:(p | q ^ n) -> p = qH:(p | q * q ^ n)H0:2 <= pH1:2 <= qp = qapply prime_div_prime; auto. Qed.p, q:ZHp:prime pHq:prime qn:ZHn:0 <= nRec:(p | q ^ n) -> p = qH:(p | q * q ^ n)H0:2 <= pH1:2 <= qH2:(p | q)p = qx, p, n:Z0 <= n -> 0 <= x -> prime p -> (x | p ^ n) -> exists m : Z, x = p ^ mx, p, n:Z0 <= n -> 0 <= x -> prime p -> (x | p ^ n) -> exists m : Z, x = p ^ mx:ZHx:0 <= xforall p n : Z, 0 <= n -> prime p -> (x | p ^ n) -> exists m : Z, x = p ^ mx:ZHx:0 <= x0 <= x -> forall p n : Z, 0 <= n -> prime p -> (x | p ^ n) -> exists m : Z, x = p ^ mx:ZHx:0 <= xforall x0 : Z, (forall y : Z, 0 <= y < x0 -> 0 <= y -> forall p n : Z, 0 <= n -> prime p -> (y | p ^ n) -> exists m : Z, y = p ^ m) -> 0 <= x0 -> forall p n : Z, 0 <= n -> prime p -> (x0 | p ^ n) -> exists m : Z, x0 = p ^ mx:ZIH:forall y : Z, 0 <= y < x -> 0 <= y -> forall p0 n0 : Z, 0 <= n0 -> prime p0 -> (y | p0 ^ n0) -> exists m : Z, y = p0 ^ mHx:0 <= xp, n:ZHn:0 <= nHp:prime pH:(x | p ^ n)exists m : Z, x = p ^ mx:ZIH:forall y : Z, 0 <= y < x -> 0 <= y -> forall p0 n0 : Z, 0 <= n0 -> prime p0 -> (y | p0 ^ n0) -> exists m : Z, y = p0 ^ mHx:0 < xp, n:ZHn:0 <= nHp:prime pH:(x | p ^ n)exists m : Z, x = p ^ mIH:forall y : Z, 0 <= y < 0 -> 0 <= y -> forall p0 n0 : Z, 0 <= n0 -> prime p0 -> (y | p0 ^ n0) -> exists m : Z, y = p0 ^ mp, n:ZHn:0 <= nHp:prime pH:(0 | p ^ n)exists m : Z, 0 = p ^ mx:ZIH:forall y : Z, 0 <= y < x -> 0 <= y -> forall p0 n0 : Z, 0 <= n0 -> prime p0 -> (y | p0 ^ n0) -> exists m : Z, y = p0 ^ mHx:1 <= xp, n:ZHn:0 <= nHp:prime pH:(x | p ^ n)exists m : Z, x = p ^ mIH:forall y : Z, 0 <= y < 0 -> 0 <= y -> forall p0 n0 : Z, 0 <= n0 -> prime p0 -> (y | p0 ^ n0) -> exists m : Z, y = p0 ^ mp, n:ZHn:0 <= nHp:prime pH:(0 | p ^ n)exists m : Z, 0 = p ^ m(* x > 1 *)x:ZIH:forall y : Z, 0 <= y < x -> 0 <= y -> forall p0 n0 : Z, 0 <= n0 -> prime p0 -> (y | p0 ^ n0) -> exists m : Z, y = p0 ^ mHx:1 < xp, n:ZHn:0 <= nHp:prime pH:(x | p ^ n)exists m : Z, x = p ^ mIH:forall y : Z, 0 <= y < 1 -> 0 <= y -> forall p0 n0 : Z, 0 <= n0 -> prime p0 -> (y | p0 ^ n0) -> exists m : Z, y = p0 ^ mp, n:ZHn:0 <= nHp:prime pH:(1 | p ^ n)exists m : Z, 1 = p ^ mIH:forall y : Z, 0 <= y < 0 -> 0 <= y -> forall p0 n0 : Z, 0 <= n0 -> prime p0 -> (y | p0 ^ n0) -> exists m : Z, y = p0 ^ mp, n:ZHn:0 <= nHp:prime pH:(0 | p ^ n)exists m : Z, 0 = p ^ mx:ZIH:forall y : Z, 0 <= y < x -> 0 <= y -> forall p0 n0 : Z, 0 <= n0 -> prime p0 -> (y | p0 ^ n0) -> exists m : Z, y = p0 ^ mHx:1 < xp, n:ZHn:0 <= nHp:prime pH:(x | p ^ n)Hpr:prime xexists m : Z, x = p ^ mx:ZIH:forall y : Z, 0 <= y < x -> 0 <= y -> forall p0 n0 : Z, 0 <= n0 -> prime p0 -> (y | p0 ^ n0) -> exists m : Z, y = p0 ^ mHx:1 < xp, n:ZHn:0 <= nHp:prime pH:(x | p ^ n)Hpr:~ prime xexists m : Z, x = p ^ mIH:forall y : Z, 0 <= y < 1 -> 0 <= y -> forall p0 n0 : Z, 0 <= n0 -> prime p0 -> (y | p0 ^ n0) -> exists m : Z, y = p0 ^ mp, n:ZHn:0 <= nHp:prime pH:(1 | p ^ n)exists m : Z, 1 = p ^ mIH:forall y : Z, 0 <= y < 0 -> 0 <= y -> forall p0 n0 : Z, 0 <= n0 -> prime p0 -> (y | p0 ^ n0) -> exists m : Z, y = p0 ^ mp, n:ZHn:0 <= nHp:prime pH:(0 | p ^ n)exists m : Z, 0 = p ^ mx:ZIH:forall y : Z, 0 <= y < x -> 0 <= y -> forall p0 n0 : Z, 0 <= n0 -> prime p0 -> (y | p0 ^ n0) -> exists m : Z, y = p0 ^ mHx:1 < xp, n:ZHn:0 <= nHp:prime pH:(x | p ^ n)Hpr:~ prime xexists m : Z, x = p ^ mIH:forall y : Z, 0 <= y < 1 -> 0 <= y -> forall p0 n0 : Z, 0 <= n0 -> prime p0 -> (y | p0 ^ n0) -> exists m : Z, y = p0 ^ mp, n:ZHn:0 <= nHp:prime pH:(1 | p ^ n)exists m : Z, 1 = p ^ mIH:forall y : Z, 0 <= y < 0 -> 0 <= y -> forall p0 n0 : Z, 0 <= n0 -> prime p0 -> (y | p0 ^ n0) -> exists m : Z, y = p0 ^ mp, n:ZHn:0 <= nHp:prime pH:(0 | p ^ n)exists m : Z, 0 = p ^ mx:ZIH:forall y : Z, 0 <= y < x -> 0 <= y -> forall p0 n0 : Z, 0 <= n0 -> prime p0 -> (y | p0 ^ n0) -> exists m : Z, y = p0 ^ mHx:1 < xp, n:ZHn:0 <= nHp:prime pH:(x | p ^ n)Hpr:~ prime xforall x0 : Z, 1 < x0 < x /\ (x0 | x) -> exists m : Z, x = p ^ mIH:forall y : Z, 0 <= y < 1 -> 0 <= y -> forall p0 n0 : Z, 0 <= n0 -> prime p0 -> (y | p0 ^ n0) -> exists m : Z, y = p0 ^ mp, n:ZHn:0 <= nHp:prime pH:(1 | p ^ n)exists m : Z, 1 = p ^ mIH:forall y : Z, 0 <= y < 0 -> 0 <= y -> forall p0 n0 : Z, 0 <= n0 -> prime p0 -> (y | p0 ^ n0) -> exists m : Z, y = p0 ^ mp, n:ZHn:0 <= nHp:prime pH:(0 | p ^ n)exists m : Z, 0 = p ^ mp1, q1:ZHx:1 < q1 * p1IH:forall y : Z, 0 <= y < q1 * p1 -> 0 <= y -> forall p0 n0 : Z, 0 <= n0 -> prime p0 -> (y | p0 ^ n0) -> exists m : Z, y = p0 ^ mp, n:ZHn:0 <= nHp:prime pHpr:~ prime (q1 * p1)H:(q1 * p1 | p ^ n)Hp1:1 < p1Hpq1:p1 < q1 * p1exists m : Z, q1 * p1 = p ^ mIH:forall y : Z, 0 <= y < 1 -> 0 <= y -> forall p0 n0 : Z, 0 <= n0 -> prime p0 -> (y | p0 ^ n0) -> exists m : Z, y = p0 ^ mp, n:ZHn:0 <= nHp:prime pH:(1 | p ^ n)exists m : Z, 1 = p ^ mIH:forall y : Z, 0 <= y < 0 -> 0 <= y -> forall p0 n0 : Z, 0 <= n0 -> prime p0 -> (y | p0 ^ n0) -> exists m : Z, y = p0 ^ mp, n:ZHn:0 <= nHp:prime pH:(0 | p ^ n)exists m : Z, 0 = p ^ mp1, q1:ZHx:1 < q1 * p1IH:forall y : Z, 0 <= y < q1 * p1 -> 0 <= y -> forall p0 n0 : Z, 0 <= n0 -> prime p0 -> (y | p0 ^ n0) -> exists m : Z, y = p0 ^ mp, n:ZHn:0 <= nHp:prime pHpr:~ prime (q1 * p1)H:(q1 * p1 | p ^ n)Hp1:1 < p1Hpq1:p1 < q1 * p1Hq1:0 < q1exists m : Z, q1 * p1 = p ^ mIH:forall y : Z, 0 <= y < 1 -> 0 <= y -> forall p0 n0 : Z, 0 <= n0 -> prime p0 -> (y | p0 ^ n0) -> exists m : Z, y = p0 ^ mp, n:ZHn:0 <= nHp:prime pH:(1 | p ^ n)exists m : Z, 1 = p ^ mIH:forall y : Z, 0 <= y < 0 -> 0 <= y -> forall p0 n0 : Z, 0 <= n0 -> prime p0 -> (y | p0 ^ n0) -> exists m : Z, y = p0 ^ mp, n:ZHn:0 <= nHp:prime pH:(0 | p ^ n)exists m : Z, 0 = p ^ mp1, q1:ZHx:1 < q1 * p1IH:forall y : Z, 0 <= y < q1 * p1 -> 0 <= y -> forall p0 n0 : Z, 0 <= n0 -> prime p0 -> (y | p0 ^ n0) -> exists m : Z, y = p0 ^ mp, n:ZHn:0 <= nHp:prime pHpr:~ prime (q1 * p1)H:(q1 * p1 | p ^ n)Hp1:1 < p1Hpq1:p1 < q1 * p1Hq1:0 < q1(p1 | p ^ n)p1, q1:ZHx:1 < q1 * p1IH:forall y : Z, 0 <= y < q1 * p1 -> 0 <= y -> forall p0 n0 : Z, 0 <= n0 -> prime p0 -> (y | p0 ^ n0) -> exists m : Z, y = p0 ^ mp, n:ZHn:0 <= nHp:prime pHpr:~ prime (q1 * p1)H:(q1 * p1 | p ^ n)Hp1:1 < p1Hpq1:p1 < q1 * p1Hq1:0 < q1r1:ZHr1:p1 = p ^ r1exists m : Z, q1 * p1 = p ^ mIH:forall y : Z, 0 <= y < 1 -> 0 <= y -> forall p0 n0 : Z, 0 <= n0 -> prime p0 -> (y | p0 ^ n0) -> exists m : Z, y = p0 ^ mp, n:ZHn:0 <= nHp:prime pH:(1 | p ^ n)exists m : Z, 1 = p ^ mIH:forall y : Z, 0 <= y < 0 -> 0 <= y -> forall p0 n0 : Z, 0 <= n0 -> prime p0 -> (y | p0 ^ n0) -> exists m : Z, y = p0 ^ mp, n:ZHn:0 <= nHp:prime pH:(0 | p ^ n)exists m : Z, 0 = p ^ mp1, q1:ZHx:1 < q1 * p1IH:forall y : Z, 0 <= y < q1 * p1 -> 0 <= y -> forall p0 n0 : Z, 0 <= n0 -> prime p0 -> (y | p0 ^ n0) -> exists m : Z, y = p0 ^ mp, n:ZHn:0 <= nHp:prime pHpr:~ prime (q1 * p1)H:(q1 * p1 | p ^ n)Hp1:1 < p1Hpq1:p1 < q1 * p1Hq1:0 < q1(p1 | q1 * p1)p1, q1:ZHx:1 < q1 * p1IH:forall y : Z, 0 <= y < q1 * p1 -> 0 <= y -> forall p0 n0 : Z, 0 <= n0 -> prime p0 -> (y | p0 ^ n0) -> exists m : Z, y = p0 ^ mp, n:ZHn:0 <= nHp:prime pHpr:~ prime (q1 * p1)H:(q1 * p1 | p ^ n)Hp1:1 < p1Hpq1:p1 < q1 * p1Hq1:0 < q1r1:ZHr1:p1 = p ^ r1exists m : Z, q1 * p1 = p ^ mIH:forall y : Z, 0 <= y < 1 -> 0 <= y -> forall p0 n0 : Z, 0 <= n0 -> prime p0 -> (y | p0 ^ n0) -> exists m : Z, y = p0 ^ mp, n:ZHn:0 <= nHp:prime pH:(1 | p ^ n)exists m : Z, 1 = p ^ mIH:forall y : Z, 0 <= y < 0 -> 0 <= y -> forall p0 n0 : Z, 0 <= n0 -> prime p0 -> (y | p0 ^ n0) -> exists m : Z, y = p0 ^ mp, n:ZHn:0 <= nHp:prime pH:(0 | p ^ n)exists m : Z, 0 = p ^ mp1, q1:ZHx:1 < q1 * p1IH:forall y : Z, 0 <= y < q1 * p1 -> 0 <= y -> forall p0 n0 : Z, 0 <= n0 -> prime p0 -> (y | p0 ^ n0) -> exists m : Z, y = p0 ^ mp, n:ZHn:0 <= nHp:prime pHpr:~ prime (q1 * p1)H:(q1 * p1 | p ^ n)Hp1:1 < p1Hpq1:p1 < q1 * p1Hq1:0 < q1r1:ZHr1:p1 = p ^ r1exists m : Z, q1 * p1 = p ^ mIH:forall y : Z, 0 <= y < 1 -> 0 <= y -> forall p0 n0 : Z, 0 <= n0 -> prime p0 -> (y | p0 ^ n0) -> exists m : Z, y = p0 ^ mp, n:ZHn:0 <= nHp:prime pH:(1 | p ^ n)exists m : Z, 1 = p ^ mIH:forall y : Z, 0 <= y < 0 -> 0 <= y -> forall p0 n0 : Z, 0 <= n0 -> prime p0 -> (y | p0 ^ n0) -> exists m : Z, y = p0 ^ mp, n:ZHn:0 <= nHp:prime pH:(0 | p ^ n)exists m : Z, 0 = p ^ mp1, q1:ZHx:1 < q1 * p1IH:forall y : Z, 0 <= y < q1 * p1 -> 0 <= y -> forall p0 n0 : Z, 0 <= n0 -> prime p0 -> (y | p0 ^ n0) -> exists m : Z, y = p0 ^ mp, n:ZHn:0 <= nHp:prime pHpr:~ prime (q1 * p1)H:(q1 * p1 | p ^ n)Hp1:1 < p1Hpq1:p1 < q1 * p1Hq1:0 < q1r1:ZHr1:p1 = p ^ r10 <= q1 < q1 * p1p1, q1:ZHx:1 < q1 * p1IH:forall y : Z, 0 <= y < q1 * p1 -> 0 <= y -> forall p0 n0 : Z, 0 <= n0 -> prime p0 -> (y | p0 ^ n0) -> exists m : Z, y = p0 ^ mp, n:ZHn:0 <= nHp:prime pHpr:~ prime (q1 * p1)H:(q1 * p1 | p ^ n)Hp1:1 < p1Hpq1:p1 < q1 * p1Hq1:0 < q1r1:ZHr1:p1 = p ^ r1(q1 | p ^ n)p1, q1:ZHx:1 < q1 * p1IH:forall y : Z, 0 <= y < q1 * p1 -> 0 <= y -> forall p0 n0 : Z, 0 <= n0 -> prime p0 -> (y | p0 ^ n0) -> exists m : Z, y = p0 ^ mp, n:ZHn:0 <= nHp:prime pHpr:~ prime (q1 * p1)H:(q1 * p1 | p ^ n)Hp1:1 < p1Hpq1:p1 < q1 * p1Hq1:0 < q1r1:ZHr1:p1 = p ^ r1r2:ZHr2:q1 = p ^ r2exists m : Z, q1 * p1 = p ^ mIH:forall y : Z, 0 <= y < 1 -> 0 <= y -> forall p0 n0 : Z, 0 <= n0 -> prime p0 -> (y | p0 ^ n0) -> exists m : Z, y = p0 ^ mp, n:ZHn:0 <= nHp:prime pH:(1 | p ^ n)exists m : Z, 1 = p ^ mIH:forall y : Z, 0 <= y < 0 -> 0 <= y -> forall p0 n0 : Z, 0 <= n0 -> prime p0 -> (y | p0 ^ n0) -> exists m : Z, y = p0 ^ mp, n:ZHn:0 <= nHp:prime pH:(0 | p ^ n)exists m : Z, 0 = p ^ mp1, q1:ZHx:1 < q1 * p1IH:forall y : Z, 0 <= y < q1 * p1 -> 0 <= y -> forall p0 n0 : Z, 0 <= n0 -> prime p0 -> (y | p0 ^ n0) -> exists m : Z, y = p0 ^ mp, n:ZHn:0 <= nHp:prime pHpr:~ prime (q1 * p1)H:(q1 * p1 | p ^ n)Hp1:1 < p1Hpq1:p1 < q1 * p1Hq1:0 < q1r1:ZHr1:p1 = p ^ r1q1 < q1 * p1p1, q1:ZHx:1 < q1 * p1IH:forall y : Z, 0 <= y < q1 * p1 -> 0 <= y -> forall p0 n0 : Z, 0 <= n0 -> prime p0 -> (y | p0 ^ n0) -> exists m : Z, y = p0 ^ mp, n:ZHn:0 <= nHp:prime pHpr:~ prime (q1 * p1)H:(q1 * p1 | p ^ n)Hp1:1 < p1Hpq1:p1 < q1 * p1Hq1:0 < q1r1:ZHr1:p1 = p ^ r1(q1 | p ^ n)p1, q1:ZHx:1 < q1 * p1IH:forall y : Z, 0 <= y < q1 * p1 -> 0 <= y -> forall p0 n0 : Z, 0 <= n0 -> prime p0 -> (y | p0 ^ n0) -> exists m : Z, y = p0 ^ mp, n:ZHn:0 <= nHp:prime pHpr:~ prime (q1 * p1)H:(q1 * p1 | p ^ n)Hp1:1 < p1Hpq1:p1 < q1 * p1Hq1:0 < q1r1:ZHr1:p1 = p ^ r1r2:ZHr2:q1 = p ^ r2exists m : Z, q1 * p1 = p ^ mIH:forall y : Z, 0 <= y < 1 -> 0 <= y -> forall p0 n0 : Z, 0 <= n0 -> prime p0 -> (y | p0 ^ n0) -> exists m : Z, y = p0 ^ mp, n:ZHn:0 <= nHp:prime pH:(1 | p ^ n)exists m : Z, 1 = p ^ mIH:forall y : Z, 0 <= y < 0 -> 0 <= y -> forall p0 n0 : Z, 0 <= n0 -> prime p0 -> (y | p0 ^ n0) -> exists m : Z, y = p0 ^ mp, n:ZHn:0 <= nHp:prime pH:(0 | p ^ n)exists m : Z, 0 = p ^ mp1, q1:ZHx:1 < q1 * p1IH:forall y : Z, 0 <= y < q1 * p1 -> 0 <= y -> forall p0 n0 : Z, 0 <= n0 -> prime p0 -> (y | p0 ^ n0) -> exists m : Z, y = p0 ^ mp, n:ZHn:0 <= nHp:prime pHpr:~ prime (q1 * p1)H:(q1 * p1 | p ^ n)Hp1:1 < p1Hpq1:p1 < q1 * p1Hq1:0 < q1r1:ZHr1:p1 = p ^ r1q1 * 1 < q1 * p1p1, q1:ZHx:1 < q1 * p1IH:forall y : Z, 0 <= y < q1 * p1 -> 0 <= y -> forall p0 n0 : Z, 0 <= n0 -> prime p0 -> (y | p0 ^ n0) -> exists m : Z, y = p0 ^ mp, n:ZHn:0 <= nHp:prime pHpr:~ prime (q1 * p1)H:(q1 * p1 | p ^ n)Hp1:1 < p1Hpq1:p1 < q1 * p1Hq1:0 < q1r1:ZHr1:p1 = p ^ r1(q1 | p ^ n)p1, q1:ZHx:1 < q1 * p1IH:forall y : Z, 0 <= y < q1 * p1 -> 0 <= y -> forall p0 n0 : Z, 0 <= n0 -> prime p0 -> (y | p0 ^ n0) -> exists m : Z, y = p0 ^ mp, n:ZHn:0 <= nHp:prime pHpr:~ prime (q1 * p1)H:(q1 * p1 | p ^ n)Hp1:1 < p1Hpq1:p1 < q1 * p1Hq1:0 < q1r1:ZHr1:p1 = p ^ r1r2:ZHr2:q1 = p ^ r2exists m : Z, q1 * p1 = p ^ mIH:forall y : Z, 0 <= y < 1 -> 0 <= y -> forall p0 n0 : Z, 0 <= n0 -> prime p0 -> (y | p0 ^ n0) -> exists m : Z, y = p0 ^ mp, n:ZHn:0 <= nHp:prime pH:(1 | p ^ n)exists m : Z, 1 = p ^ mIH:forall y : Z, 0 <= y < 0 -> 0 <= y -> forall p0 n0 : Z, 0 <= n0 -> prime p0 -> (y | p0 ^ n0) -> exists m : Z, y = p0 ^ mp, n:ZHn:0 <= nHp:prime pH:(0 | p ^ n)exists m : Z, 0 = p ^ mp1, q1:ZHx:1 < q1 * p1IH:forall y : Z, 0 <= y < q1 * p1 -> 0 <= y -> forall p0 n0 : Z, 0 <= n0 -> prime p0 -> (y | p0 ^ n0) -> exists m : Z, y = p0 ^ mp, n:ZHn:0 <= nHp:prime pHpr:~ prime (q1 * p1)H:(q1 * p1 | p ^ n)Hp1:1 < p1Hpq1:p1 < q1 * p1Hq1:0 < q1r1:ZHr1:p1 = p ^ r1(q1 | p ^ n)p1, q1:ZHx:1 < q1 * p1IH:forall y : Z, 0 <= y < q1 * p1 -> 0 <= y -> forall p0 n0 : Z, 0 <= n0 -> prime p0 -> (y | p0 ^ n0) -> exists m : Z, y = p0 ^ mp, n:ZHn:0 <= nHp:prime pHpr:~ prime (q1 * p1)H:(q1 * p1 | p ^ n)Hp1:1 < p1Hpq1:p1 < q1 * p1Hq1:0 < q1r1:ZHr1:p1 = p ^ r1r2:ZHr2:q1 = p ^ r2exists m : Z, q1 * p1 = p ^ mIH:forall y : Z, 0 <= y < 1 -> 0 <= y -> forall p0 n0 : Z, 0 <= n0 -> prime p0 -> (y | p0 ^ n0) -> exists m : Z, y = p0 ^ mp, n:ZHn:0 <= nHp:prime pH:(1 | p ^ n)exists m : Z, 1 = p ^ mIH:forall y : Z, 0 <= y < 0 -> 0 <= y -> forall p0 n0 : Z, 0 <= n0 -> prime p0 -> (y | p0 ^ n0) -> exists m : Z, y = p0 ^ mp, n:ZHn:0 <= nHp:prime pH:(0 | p ^ n)exists m : Z, 0 = p ^ mp1, q1:ZHx:1 < q1 * p1IH:forall y : Z, 0 <= y < q1 * p1 -> 0 <= y -> forall p0 n0 : Z, 0 <= n0 -> prime p0 -> (y | p0 ^ n0) -> exists m : Z, y = p0 ^ mp, n:ZHn:0 <= nHp:prime pHpr:~ prime (q1 * p1)H:(q1 * p1 | p ^ n)Hp1:1 < p1Hpq1:p1 < q1 * p1Hq1:0 < q1r1:ZHr1:p1 = p ^ r1(q1 | q1 * p1)p1, q1:ZHx:1 < q1 * p1IH:forall y : Z, 0 <= y < q1 * p1 -> 0 <= y -> forall p0 n0 : Z, 0 <= n0 -> prime p0 -> (y | p0 ^ n0) -> exists m : Z, y = p0 ^ mp, n:ZHn:0 <= nHp:prime pHpr:~ prime (q1 * p1)H:(q1 * p1 | p ^ n)Hp1:1 < p1Hpq1:p1 < q1 * p1Hq1:0 < q1r1:ZHr1:p1 = p ^ r1r2:ZHr2:q1 = p ^ r2exists m : Z, q1 * p1 = p ^ mIH:forall y : Z, 0 <= y < 1 -> 0 <= y -> forall p0 n0 : Z, 0 <= n0 -> prime p0 -> (y | p0 ^ n0) -> exists m : Z, y = p0 ^ mp, n:ZHn:0 <= nHp:prime pH:(1 | p ^ n)exists m : Z, 1 = p ^ mIH:forall y : Z, 0 <= y < 0 -> 0 <= y -> forall p0 n0 : Z, 0 <= n0 -> prime p0 -> (y | p0 ^ n0) -> exists m : Z, y = p0 ^ mp, n:ZHn:0 <= nHp:prime pH:(0 | p ^ n)exists m : Z, 0 = p ^ mp1, q1:ZHx:1 < q1 * p1IH:forall y : Z, 0 <= y < q1 * p1 -> 0 <= y -> forall p0 n0 : Z, 0 <= n0 -> prime p0 -> (y | p0 ^ n0) -> exists m : Z, y = p0 ^ mp, n:ZHn:0 <= nHp:prime pHpr:~ prime (q1 * p1)H:(q1 * p1 | p ^ n)Hp1:1 < p1Hpq1:p1 < q1 * p1Hq1:0 < q1r1:ZHr1:p1 = p ^ r1r2:ZHr2:q1 = p ^ r2exists m : Z, q1 * p1 = p ^ mIH:forall y : Z, 0 <= y < 1 -> 0 <= y -> forall p0 n0 : Z, 0 <= n0 -> prime p0 -> (y | p0 ^ n0) -> exists m : Z, y = p0 ^ mp, n:ZHn:0 <= nHp:prime pH:(1 | p ^ n)exists m : Z, 1 = p ^ mIH:forall y : Z, 0 <= y < 0 -> 0 <= y -> forall p0 n0 : Z, 0 <= n0 -> prime p0 -> (y | p0 ^ n0) -> exists m : Z, y = p0 ^ mp, n:ZHn:0 <= nHp:prime pH:(0 | p ^ n)exists m : Z, 0 = p ^ mp, r1, r2:ZHx:1 < p ^ r2 * p ^ r1IH:forall y : Z, 0 <= y < p ^ r2 * p ^ r1 -> 0 <= y -> forall p0 n0 : Z, 0 <= n0 -> prime p0 -> (y | p0 ^ n0) -> exists m : Z, y = p0 ^ mn:ZHn:0 <= nHp:prime pHpq1:p ^ r1 < p ^ r2 * p ^ r1Hp1:1 < p ^ r1Hq1:0 < p ^ r2Hpr:~ prime (p ^ r2 * p ^ r1)H:(p ^ r2 * p ^ r1 | p ^ n)p ^ r2 * p ^ r1 = p ^ (r2 + r1)IH:forall y : Z, 0 <= y < 1 -> 0 <= y -> forall p0 n0 : Z, 0 <= n0 -> prime p0 -> (y | p0 ^ n0) -> exists m : Z, y = p0 ^ mp, n:ZHn:0 <= nHp:prime pH:(1 | p ^ n)exists m : Z, 1 = p ^ mIH:forall y : Z, 0 <= y < 0 -> 0 <= y -> forall p0 n0 : Z, 0 <= n0 -> prime p0 -> (y | p0 ^ n0) -> exists m : Z, y = p0 ^ mp, n:ZHn:0 <= nHp:prime pH:(0 | p ^ n)exists m : Z, 0 = p ^ mp, r1, r2:ZHx:1 < p ^ r2 * p ^ r1IH:forall y : Z, 0 <= y < p ^ r2 * p ^ r1 -> 0 <= y -> forall p0 n0 : Z, 0 <= n0 -> prime p0 -> (y | p0 ^ n0) -> exists m : Z, y = p0 ^ mn:ZHn:0 <= nHp:prime pHpq1:p ^ r1 < p ^ r2 * p ^ r1Hp1:1 < p ^ r1Hq1:0 < p ^ r2Hpr:~ prime (p ^ r2 * p ^ r1)H:(p ^ r2 * p ^ r1 | p ^ n)p ^ (r2 + r1) = p ^ r2 * p ^ r1IH:forall y : Z, 0 <= y < 1 -> 0 <= y -> forall p0 n0 : Z, 0 <= n0 -> prime p0 -> (y | p0 ^ n0) -> exists m : Z, y = p0 ^ mp, n:ZHn:0 <= nHp:prime pH:(1 | p ^ n)exists m : Z, 1 = p ^ mIH:forall y : Z, 0 <= y < 0 -> 0 <= y -> forall p0 n0 : Z, 0 <= n0 -> prime p0 -> (y | p0 ^ n0) -> exists m : Z, y = p0 ^ mp, n:ZHn:0 <= nHp:prime pH:(0 | p ^ n)exists m : Z, 0 = p ^ mp, r1, r2:ZHx:1 < p ^ r2 * p ^ r1IH:forall y : Z, 0 <= y < p ^ r2 * p ^ r1 -> 0 <= y -> forall p0 n0 : Z, 0 <= n0 -> prime p0 -> (y | p0 ^ n0) -> exists m : Z, y = p0 ^ mn:ZHn:0 <= nHp:prime pHpq1:p ^ r1 < p ^ r2 * p ^ r1Hp1:1 < p ^ r1Hq1:0 < p ^ r2Hpr:~ prime (p ^ r2 * p ^ r1)H:(p ^ r2 * p ^ r1 | p ^ n)0 <= r2p, r1, r2:ZHx:1 < p ^ r2 * p ^ r1IH:forall y : Z, 0 <= y < p ^ r2 * p ^ r1 -> 0 <= y -> forall p0 n0 : Z, 0 <= n0 -> prime p0 -> (y | p0 ^ n0) -> exists m : Z, y = p0 ^ mn:ZHn:0 <= nHp:prime pHpq1:p ^ r1 < p ^ r2 * p ^ r1Hp1:1 < p ^ r1Hq1:0 < p ^ r2Hpr:~ prime (p ^ r2 * p ^ r1)H:(p ^ r2 * p ^ r1 | p ^ n)0 <= r1IH:forall y : Z, 0 <= y < 1 -> 0 <= y -> forall p0 n0 : Z, 0 <= n0 -> prime p0 -> (y | p0 ^ n0) -> exists m : Z, y = p0 ^ mp, n:ZHn:0 <= nHp:prime pH:(1 | p ^ n)exists m : Z, 1 = p ^ mIH:forall y : Z, 0 <= y < 0 -> 0 <= y -> forall p0 n0 : Z, 0 <= n0 -> prime p0 -> (y | p0 ^ n0) -> exists m : Z, y = p0 ^ mp, n:ZHn:0 <= nHp:prime pH:(0 | p ^ n)exists m : Z, 0 = p ^ mp, r1, r2:ZHx:1 < p ^ r2 * p ^ r1IH:forall y : Z, 0 <= y < p ^ r2 * p ^ r1 -> 0 <= y -> forall p0 n0 : Z, 0 <= n0 -> prime p0 -> (y | p0 ^ n0) -> exists m : Z, y = p0 ^ mn:ZHn:0 <= nHp:prime pHpq1:p ^ r1 < p ^ r2 * p ^ r1Hp1:1 < p ^ r1Hq1:0 < p ^ r2Hpr:~ prime (p ^ r2 * p ^ r1)H:(p ^ r2 * p ^ r1 | p ^ n)0 <= r1IH:forall y : Z, 0 <= y < 1 -> 0 <= y -> forall p0 n0 : Z, 0 <= n0 -> prime p0 -> (y | p0 ^ n0) -> exists m : Z, y = p0 ^ mp, n:ZHn:0 <= nHp:prime pH:(1 | p ^ n)exists m : Z, 1 = p ^ mIH:forall y : Z, 0 <= y < 0 -> 0 <= y -> forall p0 n0 : Z, 0 <= n0 -> prime p0 -> (y | p0 ^ n0) -> exists m : Z, y = p0 ^ mp, n:ZHn:0 <= nHp:prime pH:(0 | p ^ n)exists m : Z, 0 = p ^ m(* x = 1 *)IH:forall y : Z, 0 <= y < 1 -> 0 <= y -> forall p0 n0 : Z, 0 <= n0 -> prime p0 -> (y | p0 ^ n0) -> exists m : Z, y = p0 ^ mp, n:ZHn:0 <= nHp:prime pH:(1 | p ^ n)exists m : Z, 1 = p ^ mIH:forall y : Z, 0 <= y < 0 -> 0 <= y -> forall p0 n0 : Z, 0 <= n0 -> prime p0 -> (y | p0 ^ n0) -> exists m : Z, y = p0 ^ mp, n:ZHn:0 <= nHp:prime pH:(0 | p ^ n)exists m : Z, 0 = p ^ m(* x = 0 *) exists n; destruct H; rewrite Z.mul_0_r in H; auto. Qed.IH:forall y : Z, 0 <= y < 0 -> 0 <= y -> forall p0 n0 : Z, 0 <= n0 -> prime p0 -> (y | p0 ^ n0) -> exists m : Z, y = p0 ^ mp, n:ZHn:0 <= nHp:prime pH:(0 | p ^ n)exists m : Z, 0 = p ^ m
Notation Psquare_correct := Pos.square_spec (only parsing). Notation Zsquare_correct := Z.square_spec (only parsing).