(************************************************************************)
(*         *   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)         *)
(************************************************************************)
(* (c) Copyright 2006-2016 Microsoft Corporation and Inria.                  *)
gen have lt2le, /andP[H1 H2] : n ngt0 / (0 <= n) && (n != 0).
match goal with |- is_true((0 <= n) && (n != 0)) => myadmit end.
Check (lt2le : forall n : nat, 0 < n -> (0 <= n) && (n != 0)).
Check (H1 : 0 <= n).
Check (H2 : n != 0).
myadmit.
Qed.
gen have _, /andP[H1 H2] : n ngt0 / (0 <= n) && (n != 0).
match goal with |- is_true((0 <= n) && (n != 0)) => myadmit end.
lazymatch goal with
| lt2le : forall n : nat, is_true(0 < n) -> is_true((0 <= n) && (n != 0))
|- _ => fail "not cleared"
| _ => idtac end.
Check (H1 : 0 <= n).
Check (H2 : n != 0).
myadmit.
Qed.
gen have H : n ngt0 / (0 <= n) && (n != 0).
match goal with |- is_true((0 <= n) && (n != 0)) => myadmit end.
Check (H : forall n : nat, 0 < n -> (0 <= n) && (n != 0)).
myadmit.
Qed.
gen have : n ngt0 / (0 <= n) && (n != 0).
match goal with |- is_true((0 <= n) && (n != 0)) => myadmit end.
move=> H.
Check(H : forall n : nat, 0 < n -> (0 <= n) && (n != 0)).
myadmit.
Qed.
wlog suff : n ngt0 / (0 <= n) && (n != 0); last first.
match goal with |- is_true((0 <= n) && (n != 0)) => myadmit end.
move=> H.
Check(H : forall n : nat, 0 < n -> (0 <= n) && (n != 0)).
myadmit.
Qed.
Fail gen have : / (0 <= n) && (n != 0).
Abort.
gen have : n ngt0 / (0 <= n) && (n != 0) by myadmit.
Abort.
Fail gen have : n / (0 <= n) && (n != 0).
Abort.
gen have H : (m := n) ngt0 / (0 <= m) && (m != 0).
match goal with
ngt0 : is_true(0 < m) |- is_true((0 <= m) && (m != 0)) => myadmit end.
Check (H : forall n : nat, 0 < n -> (0 <= n) && (n != 0)).
myadmit.
Qed.
gen have H : {n} (m := n) (n := 0) ngt0 / (0 <= m) && (m != n).
match goal with
ngt0 : is_true(n < m) |- is_true((0 <= m) && (m != n)) => myadmit end.
Check (H : forall m n : nat, n < m -> (0 <= m) && (m != n)).
myadmit.
Qed.
wlog H : (z := 0) (m := n) ngt0 / m != 0.
match goal with
|- (forall z m,
is_true(z < m) -> is_true(m != 0) -> is_true(m <= z)) ->
is_true(n <= 0) => myadmit end.
Check(n : nat).
Check(m : nat).
Check(z : nat).
Check(ngt0 : z < m).
Check(H : m != 0).
myadmit.
Qed.

Lemma testw2 n (ngt0 : 0 < n) : n <= 0.