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) *) (************************************************************************) (* Evgeny Makarov, INRIA, 2007 *) (************************************************************************) Require Export ZAddOrder. Module Type ZMulOrderProp (Import Z : ZAxiomsMiniSig'). Include ZAddOrderProp Z.forall n m p q : t, m <= 0 -> n < m -> q <= 0 -> p < q -> m * q < n * pforall n m p q : t, m <= 0 -> n < m -> q <= 0 -> p < q -> m * q < n * pn, m, p, q:tH1:m <= 0H2:n < mH3:q <= 0H4:p < qm * q < n * pn, m, p, q:tH1:m <= 0H2:n < mH3:q <= 0H4:p < qm * q <= m * pn, m, p, q:tH1:m <= 0H2:n < mH3:q <= 0H4:p < qm * p < n * papply -> mul_lt_mono_neg_r; [assumption | now apply lt_le_trans with q]. Qed.n, m, p, q:tH1:m <= 0H2:n < mH3:q <= 0H4:p < qm * p < n * pforall n m p q : t, m <= 0 -> n <= m -> q <= 0 -> p <= q -> m * q <= n * pforall n m p q : t, m <= 0 -> n <= m -> q <= 0 -> p <= q -> m * q <= n * pn, m, p, q:tH1:m <= 0H2:n <= mH3:q <= 0H4:p <= qm * q <= n * pn, m, p, q:tH1:m <= 0H2:n <= mH3:q <= 0H4:p <= qm * q <= m * pn, m, p, q:tH1:m <= 0H2:n <= mH3:q <= 0H4:p <= qm * p <= n * papply mul_le_mono_nonpos_r; [now apply le_trans with q | assumption]. Qed.n, m, p, q:tH1:m <= 0H2:n <= mH3:q <= 0H4:p <= qm * p <= n * pforall n m : t, n <= 0 -> m <= 0 -> 0 <= n * mforall n m : t, n <= 0 -> m <= 0 -> 0 <= n * mn, m:tH1:n <= 0H2:m <= 00 <= n * mnow apply mul_le_mono_nonpos_r. Qed.n, m:tH1:n <= 0H2:m <= 00 * m <= n * mforall n m : t, 0 <= n -> m <= 0 -> n * m <= 0forall n m : t, 0 <= n -> m <= 0 -> n * m <= 0n, m:tH1:0 <= nH2:m <= 0n * m <= 0now apply mul_le_mono_nonpos_r. Qed.n, m:tH1:0 <= nH2:m <= 0n * m <= 0 * mforall n m : t, n <= 0 -> 0 <= m -> n * m <= 0intros; rewrite mul_comm; now apply mul_nonneg_nonpos. Qed. Notation mul_pos := lt_0_mul (only parsing).forall n m : t, n <= 0 -> 0 <= m -> n * m <= 0forall n m : t, n * m < 0 <-> n < 0 < m \/ 0 < n /\ m < 0forall n m : t, n * m < 0 <-> n < 0 < m \/ 0 < n /\ m < 0n, m:tH:n * m < 0n < 0 < m \/ 0 < n /\ m < 0n, m:tH1:n < 0H2:0 < mn * m < 0n, m:tH1:0 < nH2:m < 0n * m < 0n, m:tH:n * m < 0H1:n < 0H2:m < 0n < 0 < m \/ 0 < n /\ m < 0n, m:tH:n * m < 0H1:0 < nH2:0 < mn < 0 < m \/ 0 < n /\ m < 0n, m:tH1:n < 0H2:0 < mn * m < 0n, m:tH1:0 < nH2:m < 0n * m < 0n, m:tH:n * m < 0H1:n < 0H2:m < 0H3:0 < n * mn < 0 < m \/ 0 < n /\ m < 0n, m:tH:n * m < 0H1:0 < nH2:0 < mn < 0 < m \/ 0 < n /\ m < 0n, m:tH1:n < 0H2:0 < mn * m < 0n, m:tH1:0 < nH2:m < 0n * m < 0n, m:tH:n * m < 0H1:0 < nH2:0 < mn < 0 < m \/ 0 < n /\ m < 0n, m:tH1:n < 0H2:0 < mn * m < 0n, m:tH1:0 < nH2:m < 0n * m < 0n, m:tH:n * m < 0H1:0 < nH2:0 < mH3:0 < n * mn < 0 < m \/ 0 < n /\ m < 0n, m:tH1:n < 0H2:0 < mn * m < 0n, m:tH1:0 < nH2:m < 0n * m < 0n, m:tH1:n < 0H2:0 < mn * m < 0n, m:tH1:0 < nH2:m < 0n * m < 0now apply mul_pos_neg. Qed. Notation mul_neg := lt_mul_0 (only parsing).n, m:tH1:0 < nH2:m < 0n * m < 0forall n m : t, 0 <= n * m -> 0 <= n /\ 0 <= m \/ n <= 0 /\ m <= 0forall n m : t, 0 <= n * m -> 0 <= n /\ 0 <= m \/ n <= 0 /\ m <= 0R:forall n : t, 0 == n <-> n == 0forall n m : t, 0 <= n * m -> 0 <= n /\ 0 <= m \/ n <= 0 /\ m <= 0R:forall n0 : t, 0 == n0 <-> n0 == 0n, m:t0 <= n * m -> 0 <= n /\ 0 <= m \/ n <= 0 /\ m <= 0R:forall n0 : t, 0 == n0 <-> n0 == 0n, m:t0 < n * m \/ 0 == n * m -> (0 < n \/ 0 == n) /\ (0 < m \/ 0 == m) \/ (n < 0 \/ n == 0) /\ (m < 0 \/ m == 0)R:forall n0 : t, 0 == n0 <-> n0 == 0n, m:t0 < n * m \/ n * m == 0 -> (0 < n \/ n == 0) /\ (0 < m \/ m == 0) \/ (n < 0 \/ n == 0) /\ (m < 0 \/ m == 0)R:forall n0 : t, 0 == n0 <-> n0 == 0n, m:t(0 < n /\ 0 < m \/ m < 0 /\ n < 0) \/ n == 0 \/ m == 0 -> (0 < n \/ n == 0) /\ (0 < m \/ m == 0) \/ (n < 0 \/ n == 0) /\ (m < 0 \/ m == 0)tauto. Qed. Notation mul_nonneg := le_0_mul (only parsing).R:forall n0 : t, 0 == n0 <-> n0 == 0n, m:tH:n < 0 \/ n == 0 \/ 0 < nH0:m < 0 \/ m == 0 \/ 0 < m(0 < n /\ 0 < m \/ m < 0 /\ n < 0) \/ n == 0 \/ m == 0 -> (0 < n \/ n == 0) /\ (0 < m \/ m == 0) \/ (n < 0 \/ n == 0) /\ (m < 0 \/ m == 0)forall n m : t, n * m <= 0 -> 0 <= n /\ m <= 0 \/ n <= 0 <= mforall n m : t, n * m <= 0 -> 0 <= n /\ m <= 0 \/ n <= 0 <= mR:forall n : t, 0 == n <-> n == 0forall n m : t, n * m <= 0 -> 0 <= n /\ m <= 0 \/ n <= 0 <= mR:forall n0 : t, 0 == n0 <-> n0 == 0n, m:tn * m <= 0 -> 0 <= n /\ m <= 0 \/ n <= 0 <= mR:forall n0 : t, 0 == n0 <-> n0 == 0n, m:tn * m < 0 \/ n * m == 0 -> (0 < n \/ 0 == n) /\ (m < 0 \/ m == 0) \/ (n < 0 \/ n == 0) /\ (0 < m \/ 0 == m)R:forall n0 : t, 0 == n0 <-> n0 == 0n, m:tn * m < 0 \/ n * m == 0 -> (0 < n \/ n == 0) /\ (m < 0 \/ m == 0) \/ (n < 0 \/ n == 0) /\ (0 < m \/ m == 0)R:forall n0 : t, 0 == n0 <-> n0 == 0n, m:t(n < 0 < m \/ 0 < n /\ m < 0) \/ n == 0 \/ m == 0 -> (0 < n \/ n == 0) /\ (m < 0 \/ m == 0) \/ (n < 0 \/ n == 0) /\ (0 < m \/ m == 0)tauto. Qed. Notation mul_nonpos := le_mul_0 (only parsing). Notation le_0_square := square_nonneg (only parsing).R:forall n0 : t, 0 == n0 <-> n0 == 0n, m:tH:n < 0 \/ n == 0 \/ 0 < nH0:m < 0 \/ m == 0 \/ 0 < m(n < 0 < m \/ 0 < n /\ m < 0) \/ n == 0 \/ m == 0 -> (0 < n \/ n == 0) /\ (m < 0 \/ m == 0) \/ (n < 0 \/ n == 0) /\ (0 < m \/ m == 0)forall n : t, ~ n * n < 0forall n : t, ~ n * n < 0n:tH:n * n < 0Falsen:tH:~ 0 <= n * nFalseapply square_nonneg. Qed.n:tH:~ 0 <= n * n0 <= n * nforall n m : t, n <= 0 -> m < n -> n * n < m * mforall n m : t, n <= 0 -> m < n -> n * n < m * mnow apply mul_lt_mono_nonpos. Qed.n, m:tH1:n <= 0H2:m < nn * n < m * mforall n m : t, n <= 0 -> m <= n -> n * n <= m * mforall n m : t, n <= 0 -> m <= n -> n * n <= m * mnow apply mul_le_mono_nonpos. Qed.n, m:tH1:n <= 0H2:m <= nn * n <= m * mforall n m : t, m <= 0 -> n * n < m * m -> m < nforall n m : t, m <= 0 -> n * n < m * m -> m < nn, m:tH1:m <= 0H2:n * n < m * mm < nn, m:tH1:m <= 0H2:n * n < m * mH:n <= 0m < napply square_le_mono_nonpos in GT; order. Qed.n, m:tH1:m <= 0H2:n * n < m * mH:n <= 0GT:n <= mm < nforall n m : t, m <= 0 -> n * n <= m * m -> m <= nforall n m : t, m <= 0 -> n * n <= m * m -> m <= nn, m:tH1:m <= 0H2:n * n <= m * mm <= nn, m:tH1:m <= 0H2:n * n <= m * mH:n <= 0m <= napply square_lt_mono_nonpos in GT; order. Qed.n, m:tH1:m <= 0H2:n * n <= m * mH:n <= 0GT:n < mm <= nforall n m : t, n < -1 -> m < 0 -> 1 < n * mforall n m : t, n < -1 -> m < 0 -> 1 < n * mn, m:tH1:n < -1H2:m < 01 < n * mn, m:tH1:-1 * m < n * mH2:m < 01 < n * mn, m:tH1:n < -1H2:m < 0H:forall n0 m0 : t, m < 0 -> n0 < m0 -> m0 * m < n0 * mm < 0n, m:tH1:-1 * m < n * mH2:0 < - m1 < n * mn, m:tH1:n < -1H2:m < 0H:forall n0 m0 : t, m < 0 -> n0 < m0 -> m0 * m < n0 * mm < 0n, m:tH1:- m < n * mH2:0 < - m1 < n * mn, m:tH1:n < -1H2:m < 0H:forall n0 m0 : t, m < 0 -> n0 < m0 -> m0 * m < n0 * mm < 0assumption. Qed.n, m:tH1:n < -1H2:m < 0H:forall n0 m0 : t, m < 0 -> n0 < m0 -> m0 * m < n0 * mm < 0forall n m : t, 1 < n -> m < 0 -> n * m < -1forall n m : t, 1 < n -> m < 0 -> n * m < -1n, m:tH1:1 < nH2:m < 0n * m < -1n, m:tH1:n * m < 1 * mH2:m < 0n * m < -1n, m:tH1:1 < nH2:m < 0H:forall n0 m0 : t, m < 0 -> n0 < m0 -> m0 * m < n0 * mm < 0n, m:tH1:n * m < mH2:m < 0n * m < -1n, m:tH1:1 < nH2:m < 0H:forall n0 m0 : t, m < 0 -> n0 < m0 -> m0 * m < n0 * mm < 0assumption. Qed.n, m:tH1:1 < nH2:m < 0H:forall n0 m0 : t, m < 0 -> n0 < m0 -> m0 * m < n0 * mm < 0forall n m : t, n < -1 -> 0 < m -> n * m < -1forall n m : t, n < -1 -> 0 < m -> n * m < -1n, m:tH1:n < -1H2:0 < mn * m < -1n, m:tH1:n * m < -1 * mH2:0 < mn * m < -1n, m:tH1:n < -1H2:0 < mH:forall n0 m0 : t, 0 < m -> n0 < m0 -> n0 * m < m0 * m0 < mn, m:tH1:n * m < - mH2:0 < mn * m < -1n, m:tH1:n < -1H2:0 < mH:forall n0 m0 : t, 0 < m -> n0 < m0 -> n0 * m < m0 * m0 < mn, m:tH1:n * m < - mH2:- m < 0n * m < -1n, m:tH1:n < -1H2:0 < mH:forall n0 m0 : t, 0 < m -> n0 < m0 -> n0 * m < m0 * m0 < massumption. Qed.n, m:tH1:n < -1H2:0 < mH:forall n0 m0 : t, 0 < m -> n0 < m0 -> n0 * m < m0 * m0 < mforall n m : t, 1 < n -> n * m < -1 \/ n * m == 0 \/ 1 < n * mforall n m : t, 1 < n -> n * m < -1 \/ n * m == 0 \/ 1 < n * mn, m:tH:1 < nH1:m < 0n * m < -1 \/ n * m == 0 \/ 1 < n * mn, m:tH:1 < nH1:m == 0n * m < -1 \/ n * m == 0 \/ 1 < n * mn, m:tH:1 < nH1:0 < mn * m < -1 \/ n * m == 0 \/ 1 < n * mn, m:tH:1 < nH1:m < 0n * m < -1n, m:tH:1 < nH1:m == 0n * m < -1 \/ n * m == 0 \/ 1 < n * mn, m:tH:1 < nH1:0 < mn * m < -1 \/ n * m == 0 \/ 1 < n * mn, m:tH:1 < nH1:m == 0n * m < -1 \/ n * m == 0 \/ 1 < n * mn, m:tH:1 < nH1:0 < mn * m < -1 \/ n * m == 0 \/ 1 < n * mright; right; now apply lt_1_mul_pos. Qed.n, m:tH:1 < nH1:0 < mn * m < -1 \/ n * m == 0 \/ 1 < n * mforall n m : t, n < -1 -> n * m < -1 \/ n * m == 0 \/ 1 < n * mforall n m : t, n < -1 -> n * m < -1 \/ n * m == 0 \/ 1 < n * mn, m:tH:n < -1H1:m < 0n * m < -1 \/ n * m == 0 \/ 1 < n * mn, m:tH:n < -1H1:m == 0n * m < -1 \/ n * m == 0 \/ 1 < n * mn, m:tH:n < -1H1:0 < mn * m < -1 \/ n * m == 0 \/ 1 < n * mn, m:tH:n < -1H1:m < 01 < n * mn, m:tH:n < -1H1:m == 0n * m < -1 \/ n * m == 0 \/ 1 < n * mn, m:tH:n < -1H1:0 < mn * m < -1 \/ n * m == 0 \/ 1 < n * mn, m:tH:n < -1H1:m == 0n * m < -1 \/ n * m == 0 \/ 1 < n * mn, m:tH:n < -1H1:0 < mn * m < -1 \/ n * m == 0 \/ 1 < n * mn, m:tH:n < -1H1:0 < mn * m < -1 \/ n * m == 0 \/ 1 < n * mnow apply lt_mul_m1_pos. Qed.n, m:tH:n < -1H1:0 < mn * m < -1forall n m : t, n * m == 1 -> n == 1 \/ n == -1forall n m : t, n * m == 1 -> n == 1 \/ n == -1F:-1 < 0forall n m : t, n * m == 1 -> n == 1 \/ n == -1(* n = 0 *)F:-1 < 0forall m : t, 0 * m == 1 -> 0 == 1 \/ 0 == -1F:-1 < 0forall n : t, 0 < n -> (forall m : t, n * m == 1 -> n == 1 \/ n == -1) /\ (forall m : t, - n * m == 1 -> - n == 1 \/ - n == -1)F:-1 < 0m:t0 * m == 1 -> 0 == 1 \/ 0 == -1F:-1 < 0forall n : t, 0 < n -> (forall m : t, n * m == 1 -> n == 1 \/ n == -1) /\ (forall m : t, - n * m == 1 -> - n == 1 \/ - n == -1)F:-1 < 0m:t0 == 1 -> 0 == 1 \/ 0 == -1F:-1 < 0forall n : t, 0 < n -> (forall m : t, n * m == 1 -> n == 1 \/ n == -1) /\ (forall m : t, - n * m == 1 -> - n == 1 \/ - n == -1)(* 0 < n, proving P n /\ P (-n) *)F:-1 < 0forall n : t, 0 < n -> (forall m : t, n * m == 1 -> n == 1 \/ n == -1) /\ (forall m : t, - n * m == 1 -> - n == 1 \/ - n == -1)F:-1 < 0n:tHn:0 < n(forall m : t, n * m == 1 -> n == 1 \/ n == -1) /\ (forall m : t, - n * m == 1 -> - n == 1 \/ - n == -1)F:-1 < 0n:tHn:1 <= n(forall m : t, n * m == 1 -> n == 1 \/ n == -1) /\ (forall m : t, - n * m == 1 -> - n == 1 \/ - n == -1)F:-1 < 0n:tHn:1 < nm:tH:n * m == 1n == 1 \/ n == -1F:-1 < 0n:tHn:1 < nm:tH:- n * m == 1- n == 1 \/ - n == -1F:-1 < 0n:tHn:1 == nm:tH:n * m == 1n == 1 \/ n == -1F:-1 < 0n:tHn:1 == nm:tH:- n * m == 1- n == 1 \/ - n == -1F:-1 < 0n:tHn:1 < nm:tH:- n * m == 1- n == 1 \/ - n == -1F:-1 < 0n:tHn:1 == nm:tH:n * m == 1n == 1 \/ n == -1F:-1 < 0n:tHn:1 == nm:tH:- n * m == 1- n == 1 \/ - n == -1F:-1 < 0n:tHn:1 < nm:tH:n * m == -1- n == 1 \/ - n == -1F:-1 < 0n:tHn:1 == nm:tH:n * m == 1n == 1 \/ n == -1F:-1 < 0n:tHn:1 == nm:tH:- n * m == 1- n == 1 \/ - n == -1F:-1 < 0n:tHn:1 == nm:tH:n * m == 1n == 1 \/ n == -1F:-1 < 0n:tHn:1 == nm:tH:- n * m == 1- n == 1 \/ - n == -1F:-1 < 0n:tHn:1 == nm:tH:- n * m == 1- n == 1 \/ - n == -1now f_equiv. Qed.F:-1 < 0n:tHn:1 == nm:tH:- n * m == 1- n == -1forall n m : t, n < 0 -> 1 < m <-> n * m < nforall n m : t, n < 0 -> 1 < m <-> n * m < nn, m:tH:n < 01 < m <-> n * m < nnow apply mul_lt_mono_neg_l. Qed.n, m:tH:n < 01 < m <-> n * m < n * 1forall n m : t, 0 < n -> 1 < m <-> n < n * mforall n m : t, 0 < n -> 1 < m <-> n < n * mn, m:tH:0 < n1 < m <-> n < n * mnow apply mul_lt_mono_pos_l. Qed.n, m:tH:0 < n1 < m <-> n * 1 < n * mforall n m : t, n < 0 -> 1 <= m <-> n * m <= nforall n m : t, n < 0 -> 1 <= m <-> n * m <= nn, m:tH:n < 01 <= m <-> n * m <= nnow apply mul_le_mono_neg_l. Qed.n, m:tH:n < 01 <= m <-> n * m <= n * 1forall n m : t, 0 < n -> 1 <= m <-> n <= n * mforall n m : t, 0 < n -> 1 <= m <-> n <= n * mn, m:tH:0 < n1 <= m <-> n <= n * mnow apply mul_le_mono_pos_l. Qed.n, m:tH:0 < n1 <= m <-> n * 1 <= n * mforall n m p : t, 0 < n -> 1 < p -> n < m -> n < m * pforall n m p : t, 0 < n -> 1 < p -> n < m -> n < m * pn, m, p:tH:0 < nH0:1 < pH1:n < mn < m * pn, m, p:tH:0 < nH0:1 < pH1:n < mn * 1 < m * pn, m, p:tH:0 < nH0:1 < pH1:n < m0 <= nn, m, p:tH:0 < nH0:1 < pH1:n < mn < mn, m, p:tH:0 < nH0:1 < pH1:n < m0 <= 1n, m, p:tH:0 < nH0:1 < pH1:n < m1 < pn, m, p:tH:0 < nH0:1 < pH1:n < mn < mn, m, p:tH:0 < nH0:1 < pH1:n < m0 <= 1n, m, p:tH:0 < nH0:1 < pH1:n < m1 < pn, m, p:tH:0 < nH0:1 < pH1:n < m0 <= 1n, m, p:tH:0 < nH0:1 < pH1:n < m1 < passumption. Qed.n, m, p:tH:0 < nH0:1 < pH1:n < m1 < p
Alternative name :
Definition mul_eq_1 := eq_mul_1. End ZMulOrderProp.