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 * p

forall n m p q : t, m <= 0 -> n < m -> q <= 0 -> p < q -> m * q < n * p
n, m, p, q:t
H1:m <= 0
H2:n < m
H3:q <= 0
H4:p < q

m * q < n * p
n, m, p, q:t
H1:m <= 0
H2:n < m
H3:q <= 0
H4:p < q

m * q <= m * p
n, m, p, q:t
H1:m <= 0
H2:n < m
H3:q <= 0
H4:p < q
m * p < n * p
n, m, p, q:t
H1:m <= 0
H2:n < m
H3:q <= 0
H4:p < q

m * p < n * p
apply -> mul_lt_mono_neg_r; [assumption | now apply lt_le_trans with q]. Qed.

forall n m p q : t, m <= 0 -> n <= m -> q <= 0 -> p <= q -> m * q <= n * p

forall n m p q : t, m <= 0 -> n <= m -> q <= 0 -> p <= q -> m * q <= n * p
n, m, p, q:t
H1:m <= 0
H2:n <= m
H3:q <= 0
H4:p <= q

m * q <= n * p
n, m, p, q:t
H1:m <= 0
H2:n <= m
H3:q <= 0
H4:p <= q

m * q <= m * p
n, m, p, q:t
H1:m <= 0
H2:n <= m
H3:q <= 0
H4:p <= q
m * p <= n * p
n, m, p, q:t
H1:m <= 0
H2:n <= m
H3:q <= 0
H4:p <= q

m * p <= n * p
apply mul_le_mono_nonpos_r; [now apply le_trans with q | assumption]. Qed.

forall n m : t, n <= 0 -> m <= 0 -> 0 <= n * m

forall n m : t, n <= 0 -> m <= 0 -> 0 <= n * m
n, m:t
H1:n <= 0
H2:m <= 0

0 <= n * m
n, m:t
H1:n <= 0
H2:m <= 0

0 * m <= n * m
now apply mul_le_mono_nonpos_r. Qed.

forall n m : t, 0 <= n -> m <= 0 -> n * m <= 0

forall n m : t, 0 <= n -> m <= 0 -> n * m <= 0
n, m:t
H1:0 <= n
H2:m <= 0

n * m <= 0
n, m:t
H1:0 <= n
H2:m <= 0

n * m <= 0 * m
now apply mul_le_mono_nonpos_r. Qed.

forall n m : t, n <= 0 -> 0 <= m -> n * m <= 0

forall n m : t, n <= 0 -> 0 <= m -> n * m <= 0
intros; rewrite mul_comm; now apply mul_nonneg_nonpos. Qed. Notation mul_pos := lt_0_mul (only parsing).

forall n m : t, n * m < 0 <-> n < 0 < m \/ 0 < n /\ m < 0

forall n m : t, n * m < 0 <-> n < 0 < m \/ 0 < n /\ m < 0
n, m:t
H:n * m < 0

n < 0 < m \/ 0 < n /\ m < 0
n, m:t
H1:n < 0
H2:0 < m
n * m < 0
n, m:t
H1:0 < n
H2:m < 0
n * m < 0
n, m:t
H:n * m < 0
H1:n < 0
H2:m < 0

n < 0 < m \/ 0 < n /\ m < 0
n, m:t
H:n * m < 0
H1:0 < n
H2:0 < m
n < 0 < m \/ 0 < n /\ m < 0
n, m:t
H1:n < 0
H2:0 < m
n * m < 0
n, m:t
H1:0 < n
H2:m < 0
n * m < 0
n, m:t
H:n * m < 0
H1:n < 0
H2:m < 0
H3:0 < n * m

n < 0 < m \/ 0 < n /\ m < 0
n, m:t
H:n * m < 0
H1:0 < n
H2:0 < m
n < 0 < m \/ 0 < n /\ m < 0
n, m:t
H1:n < 0
H2:0 < m
n * m < 0
n, m:t
H1:0 < n
H2:m < 0
n * m < 0
n, m:t
H:n * m < 0
H1:0 < n
H2:0 < m

n < 0 < m \/ 0 < n /\ m < 0
n, m:t
H1:n < 0
H2:0 < m
n * m < 0
n, m:t
H1:0 < n
H2:m < 0
n * m < 0
n, m:t
H:n * m < 0
H1:0 < n
H2:0 < m
H3:0 < n * m

n < 0 < m \/ 0 < n /\ m < 0
n, m:t
H1:n < 0
H2:0 < m
n * m < 0
n, m:t
H1:0 < n
H2:m < 0
n * m < 0
n, m:t
H1:n < 0
H2:0 < m

n * m < 0
n, m:t
H1:0 < n
H2:m < 0
n * m < 0
n, m:t
H1:0 < n
H2:m < 0

n * m < 0
now apply mul_pos_neg. Qed. Notation mul_neg := lt_mul_0 (only parsing).

forall n m : t, 0 <= n * m -> 0 <= n /\ 0 <= m \/ n <= 0 /\ m <= 0

forall n m : t, 0 <= n * m -> 0 <= n /\ 0 <= m \/ n <= 0 /\ m <= 0
R:forall n : t, 0 == n <-> n == 0

forall n m : t, 0 <= n * m -> 0 <= n /\ 0 <= m \/ n <= 0 /\ m <= 0
R:forall n0 : t, 0 == n0 <-> n0 == 0
n, m:t

0 <= n * m -> 0 <= n /\ 0 <= m \/ n <= 0 /\ m <= 0
R:forall n0 : t, 0 == n0 <-> n0 == 0
n, m:t

0 < 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 == 0
n, m:t

0 < 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 == 0
n, 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)
R:forall n0 : t, 0 == n0 <-> n0 == 0
n, m:t
H:n < 0 \/ n == 0 \/ 0 < n
H0: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)
tauto. Qed. Notation mul_nonneg := le_0_mul (only parsing).

forall n m : t, n * m <= 0 -> 0 <= n /\ m <= 0 \/ n <= 0 <= m

forall n m : t, n * m <= 0 -> 0 <= n /\ m <= 0 \/ n <= 0 <= m
R:forall n : t, 0 == n <-> n == 0

forall n m : t, n * m <= 0 -> 0 <= n /\ m <= 0 \/ n <= 0 <= m
R:forall n0 : t, 0 == n0 <-> n0 == 0
n, m:t

n * m <= 0 -> 0 <= n /\ m <= 0 \/ n <= 0 <= m
R:forall n0 : t, 0 == n0 <-> n0 == 0
n, m:t

n * 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 == 0
n, m:t

n * 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 == 0
n, 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)
R:forall n0 : t, 0 == n0 <-> n0 == 0
n, m:t
H:n < 0 \/ n == 0 \/ 0 < n
H0: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)
tauto. Qed. Notation mul_nonpos := le_mul_0 (only parsing). Notation le_0_square := square_nonneg (only parsing).

forall n : t, ~ n * n < 0

forall n : t, ~ n * n < 0
n:t
H:n * n < 0

False
n:t
H:~ 0 <= n * n

False
n:t
H:~ 0 <= n * n

0 <= n * n
apply square_nonneg. Qed.

forall n m : t, n <= 0 -> m < n -> n * n < m * m

forall n m : t, n <= 0 -> m < n -> n * n < m * m
n, m:t
H1:n <= 0
H2:m < n

n * n < m * m
now apply mul_lt_mono_nonpos. Qed.

forall n m : t, n <= 0 -> m <= n -> n * n <= m * m

forall n m : t, n <= 0 -> m <= n -> n * n <= m * m
n, m:t
H1:n <= 0
H2:m <= n

n * n <= m * m
now apply mul_le_mono_nonpos. Qed.

forall n m : t, m <= 0 -> n * n < m * m -> m < n

forall n m : t, m <= 0 -> n * n < m * m -> m < n
n, m:t
H1:m <= 0
H2:n * n < m * m

m < n
n, m:t
H1:m <= 0
H2:n * n < m * m
H:n <= 0

m < n
n, m:t
H1:m <= 0
H2:n * n < m * m
H:n <= 0
GT:n <= m

m < n
apply square_le_mono_nonpos in GT; order. Qed.

forall n m : t, m <= 0 -> n * n <= m * m -> m <= n

forall n m : t, m <= 0 -> n * n <= m * m -> m <= n
n, m:t
H1:m <= 0
H2:n * n <= m * m

m <= n
n, m:t
H1:m <= 0
H2:n * n <= m * m
H:n <= 0

m <= n
n, m:t
H1:m <= 0
H2:n * n <= m * m
H:n <= 0
GT:n < m

m <= n
apply square_lt_mono_nonpos in GT; order. Qed.

forall n m : t, n < -1 -> m < 0 -> 1 < n * m

forall n m : t, n < -1 -> m < 0 -> 1 < n * m
n, m:t
H1:n < -1
H2:m < 0

1 < n * m
n, m:t
H1:-1 * m < n * m
H2:m < 0

1 < n * m
n, m:t
H1:n < -1
H2:m < 0
H:forall n0 m0 : t, m < 0 -> n0 < m0 -> m0 * m < n0 * m
m < 0
n, m:t
H1:-1 * m < n * m
H2:0 < - m

1 < n * m
n, m:t
H1:n < -1
H2:m < 0
H:forall n0 m0 : t, m < 0 -> n0 < m0 -> m0 * m < n0 * m
m < 0
n, m:t
H1:- m < n * m
H2:0 < - m

1 < n * m
n, m:t
H1:n < -1
H2:m < 0
H:forall n0 m0 : t, m < 0 -> n0 < m0 -> m0 * m < n0 * m
m < 0
n, m:t
H1:n < -1
H2:m < 0
H:forall n0 m0 : t, m < 0 -> n0 < m0 -> m0 * m < n0 * m

m < 0
assumption. Qed.

forall n m : t, 1 < n -> m < 0 -> n * m < -1

forall n m : t, 1 < n -> m < 0 -> n * m < -1
n, m:t
H1:1 < n
H2:m < 0

n * m < -1
n, m:t
H1:n * m < 1 * m
H2:m < 0

n * m < -1
n, m:t
H1:1 < n
H2:m < 0
H:forall n0 m0 : t, m < 0 -> n0 < m0 -> m0 * m < n0 * m
m < 0
n, m:t
H1:n * m < m
H2:m < 0

n * m < -1
n, m:t
H1:1 < n
H2:m < 0
H:forall n0 m0 : t, m < 0 -> n0 < m0 -> m0 * m < n0 * m
m < 0
n, m:t
H1:1 < n
H2:m < 0
H:forall n0 m0 : t, m < 0 -> n0 < m0 -> m0 * m < n0 * m

m < 0
assumption. Qed.

forall n m : t, n < -1 -> 0 < m -> n * m < -1

forall n m : t, n < -1 -> 0 < m -> n * m < -1
n, m:t
H1:n < -1
H2:0 < m

n * m < -1
n, m:t
H1:n * m < -1 * m
H2:0 < m

n * m < -1
n, m:t
H1:n < -1
H2:0 < m
H:forall n0 m0 : t, 0 < m -> n0 < m0 -> n0 * m < m0 * m
0 < m
n, m:t
H1:n * m < - m
H2:0 < m

n * m < -1
n, m:t
H1:n < -1
H2:0 < m
H:forall n0 m0 : t, 0 < m -> n0 < m0 -> n0 * m < m0 * m
0 < m
n, m:t
H1:n * m < - m
H2:- m < 0

n * m < -1
n, m:t
H1:n < -1
H2:0 < m
H:forall n0 m0 : t, 0 < m -> n0 < m0 -> n0 * m < m0 * m
0 < m
n, m:t
H1:n < -1
H2:0 < m
H:forall n0 m0 : t, 0 < m -> n0 < m0 -> n0 * m < m0 * m

0 < m
assumption. Qed.

forall n m : t, 1 < n -> n * m < -1 \/ n * m == 0 \/ 1 < n * m

forall n m : t, 1 < n -> n * m < -1 \/ n * m == 0 \/ 1 < n * m
n, m:t
H:1 < n
H1:m < 0

n * m < -1 \/ n * m == 0 \/ 1 < n * m
n, m:t
H:1 < n
H1:m == 0
n * m < -1 \/ n * m == 0 \/ 1 < n * m
n, m:t
H:1 < n
H1:0 < m
n * m < -1 \/ n * m == 0 \/ 1 < n * m
n, m:t
H:1 < n
H1:m < 0

n * m < -1
n, m:t
H:1 < n
H1:m == 0
n * m < -1 \/ n * m == 0 \/ 1 < n * m
n, m:t
H:1 < n
H1:0 < m
n * m < -1 \/ n * m == 0 \/ 1 < n * m
n, m:t
H:1 < n
H1:m == 0

n * m < -1 \/ n * m == 0 \/ 1 < n * m
n, m:t
H:1 < n
H1:0 < m
n * m < -1 \/ n * m == 0 \/ 1 < n * m
n, m:t
H:1 < n
H1:0 < m

n * m < -1 \/ n * m == 0 \/ 1 < n * m
right; right; now apply lt_1_mul_pos. Qed.

forall n m : t, n < -1 -> n * m < -1 \/ n * m == 0 \/ 1 < n * m

forall n m : t, n < -1 -> n * m < -1 \/ n * m == 0 \/ 1 < n * m
n, m:t
H:n < -1
H1:m < 0

n * m < -1 \/ n * m == 0 \/ 1 < n * m
n, m:t
H:n < -1
H1:m == 0
n * m < -1 \/ n * m == 0 \/ 1 < n * m
n, m:t
H:n < -1
H1:0 < m
n * m < -1 \/ n * m == 0 \/ 1 < n * m
n, m:t
H:n < -1
H1:m < 0

1 < n * m
n, m:t
H:n < -1
H1:m == 0
n * m < -1 \/ n * m == 0 \/ 1 < n * m
n, m:t
H:n < -1
H1:0 < m
n * m < -1 \/ n * m == 0 \/ 1 < n * m
n, m:t
H:n < -1
H1:m == 0

n * m < -1 \/ n * m == 0 \/ 1 < n * m
n, m:t
H:n < -1
H1:0 < m
n * m < -1 \/ n * m == 0 \/ 1 < n * m
n, m:t
H:n < -1
H1:0 < m

n * m < -1 \/ n * m == 0 \/ 1 < n * m
n, m:t
H:n < -1
H1:0 < m

n * m < -1
now apply lt_mul_m1_pos. Qed.

forall n m : t, n * m == 1 -> n == 1 \/ n == -1

forall n m : t, n * m == 1 -> n == 1 \/ n == -1
F:-1 < 0

forall n m : t, n * m == 1 -> n == 1 \/ n == -1
F:-1 < 0

forall m : t, 0 * m == 1 -> 0 == 1 \/ 0 == -1
F:-1 < 0
forall n : t, 0 < n -> (forall m : t, n * m == 1 -> n == 1 \/ n == -1) /\ (forall m : t, - n * m == 1 -> - n == 1 \/ - n == -1)
(* n = 0 *)
F:-1 < 0
m:t

0 * m == 1 -> 0 == 1 \/ 0 == -1
F:-1 < 0
forall 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 < 0
m:t

0 == 1 -> 0 == 1 \/ 0 == -1
F:-1 < 0
forall 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 < 0

forall 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 < 0
n:t
Hn:0 < n

(forall m : t, n * m == 1 -> n == 1 \/ n == -1) /\ (forall m : t, - n * m == 1 -> - n == 1 \/ - n == -1)
F:-1 < 0
n:t
Hn:1 <= n

(forall m : t, n * m == 1 -> n == 1 \/ n == -1) /\ (forall m : t, - n * m == 1 -> - n == 1 \/ - n == -1)
F:-1 < 0
n:t
Hn:1 < n
m:t
H:n * m == 1

n == 1 \/ n == -1
F:-1 < 0
n:t
Hn:1 < n
m:t
H:- n * m == 1
- n == 1 \/ - n == -1
F:-1 < 0
n:t
Hn:1 == n
m:t
H:n * m == 1
n == 1 \/ n == -1
F:-1 < 0
n:t
Hn:1 == n
m:t
H:- n * m == 1
- n == 1 \/ - n == -1
F:-1 < 0
n:t
Hn:1 < n
m:t
H:- n * m == 1

- n == 1 \/ - n == -1
F:-1 < 0
n:t
Hn:1 == n
m:t
H:n * m == 1
n == 1 \/ n == -1
F:-1 < 0
n:t
Hn:1 == n
m:t
H:- n * m == 1
- n == 1 \/ - n == -1
F:-1 < 0
n:t
Hn:1 < n
m:t
H:n * m == -1

- n == 1 \/ - n == -1
F:-1 < 0
n:t
Hn:1 == n
m:t
H:n * m == 1
n == 1 \/ n == -1
F:-1 < 0
n:t
Hn:1 == n
m:t
H:- n * m == 1
- n == 1 \/ - n == -1
F:-1 < 0
n:t
Hn:1 == n
m:t
H:n * m == 1

n == 1 \/ n == -1
F:-1 < 0
n:t
Hn:1 == n
m:t
H:- n * m == 1
- n == 1 \/ - n == -1
F:-1 < 0
n:t
Hn:1 == n
m:t
H:- n * m == 1

- n == 1 \/ - n == -1
F:-1 < 0
n:t
Hn:1 == n
m:t
H:- n * m == 1

- n == -1
now f_equiv. Qed.

forall n m : t, n < 0 -> 1 < m <-> n * m < n

forall n m : t, n < 0 -> 1 < m <-> n * m < n
n, m:t
H:n < 0

1 < m <-> n * m < n
n, m:t
H:n < 0

1 < m <-> n * m < n * 1
now apply mul_lt_mono_neg_l. Qed.

forall n m : t, 0 < n -> 1 < m <-> n < n * m

forall n m : t, 0 < n -> 1 < m <-> n < n * m
n, m:t
H:0 < n

1 < m <-> n < n * m
n, m:t
H:0 < n

1 < m <-> n * 1 < n * m
now apply mul_lt_mono_pos_l. Qed.

forall n m : t, n < 0 -> 1 <= m <-> n * m <= n

forall n m : t, n < 0 -> 1 <= m <-> n * m <= n
n, m:t
H:n < 0

1 <= m <-> n * m <= n
n, m:t
H:n < 0

1 <= m <-> n * m <= n * 1
now apply mul_le_mono_neg_l. Qed.

forall n m : t, 0 < n -> 1 <= m <-> n <= n * m

forall n m : t, 0 < n -> 1 <= m <-> n <= n * m
n, m:t
H:0 < n

1 <= m <-> n <= n * m
n, m:t
H:0 < n

1 <= m <-> n * 1 <= n * m
now apply mul_le_mono_pos_l. Qed.

forall n m p : t, 0 < n -> 1 < p -> n < m -> n < m * p

forall n m p : t, 0 < n -> 1 < p -> n < m -> n < m * p
n, m, p:t
H:0 < n
H0:1 < p
H1:n < m

n < m * p
n, m, p:t
H:0 < n
H0:1 < p
H1:n < m

n * 1 < m * p
n, m, p:t
H:0 < n
H0:1 < p
H1:n < m

0 <= n
n, m, p:t
H:0 < n
H0:1 < p
H1:n < m
n < m
n, m, p:t
H:0 < n
H0:1 < p
H1:n < m
0 <= 1
n, m, p:t
H:0 < n
H0:1 < p
H1:n < m
1 < p
n, m, p:t
H:0 < n
H0:1 < p
H1:n < m

n < m
n, m, p:t
H:0 < n
H0:1 < p
H1:n < m
0 <= 1
n, m, p:t
H:0 < n
H0:1 < p
H1:n < m
1 < p
n, m, p:t
H:0 < n
H0:1 < p
H1:n < m

0 <= 1
n, m, p:t
H:0 < n
H0:1 < p
H1:n < m
1 < p
n, m, p:t
H:0 < n
H0:1 < p
H1:n < m

1 < p
assumption. Qed.
Alternative name :
Definition mul_eq_1 := eq_mul_1.

End ZMulOrderProp.