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 NAddOrder.

Module NMulOrderProp (Import N : NAxiomsMiniSig').
Include NAddOrderProp N.
Theorems that are either not valid on Z or have different proofs on N and Z

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

forall n m : t, n < m <-> n * n < m * m
intros n m; split; intro; [apply square_lt_mono_nonneg | apply square_lt_simpl_nonneg]; try assumption; apply le_0_l. Qed.

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

forall n m : t, n <= m <-> n * n <= m * m
intros n m; split; intro; [apply square_le_mono_nonneg | apply square_le_simpl_nonneg]; try assumption; apply le_0_l. Qed.

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

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

0 <= p
n, m, p:t
H:n <= m
n <= m
n, m, p:t
H:n <= m

n <= m
assumption. Qed.

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

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

0 <= p
n, m, p:t
H:n <= m
n <= m
n, m, p:t
H:n <= m

n <= m
assumption. Qed.

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

forall n m p q : t, n < m -> p < q -> n * p < m * q
intros; apply mul_lt_mono_nonneg; try assumption; apply le_0_l. Qed.

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

forall n m p q : t, n <= m -> p <= q -> n * p <= m * q
intros; apply mul_le_mono_nonneg; try assumption; apply le_0_l. Qed.

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

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

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

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

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

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

0 < n * m
now apply mul_pos_pos. Qed. Notation mul_pos := lt_0_mul' (only parsing).

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

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

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

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

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

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

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

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

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

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

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

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

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

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

n == 1 /\ m == 1
rewrite H in H3; false_hyp H3 lt_irrefl. Qed.
Alternative name :
Definition mul_eq_1 := eq_mul_1.

End NMulOrderProp.