Debian Codegraph @

test-suite/ssr/have_transp.v

raw
1 (************************************************************************)
2 (* * The Rocq Prover / The Rocq Development Team *)
3 (* v * Copyright INRIA, CNRS and contributors *)
4 (* <O___,, * (see version control and CREDITS file for authors & dates) *)
5 (* \VV/ **************************************************************)
6 (* // * This file is distributed under the terms of the *)
7 (* * GNU Lesser General Public License Version 2.1 *)
8 (* * (see LICENSE file for the text of the license) *)
9 (************************************************************************)
10
11 (* (c) Copyright 2006-2016 Microsoft Corporation and Inria. *)
12
13 Require Import ssreflect.
14 Require Import ssrfun ssrbool TestSuite.ssr_mini_mathcomp.
15
16
17 Lemma test1 n : n >= 0.
18 Proof.
19 have [:s1] @h m : 'I_(n+m).+1.
20 apply: Sub 0 _.
21 abstract: s1 m.
22 by auto.
23 cut (forall m, 0 < (n+m).+1); last assumption.
24 rewrite [_ 1 _]/= in s1 h *.
25 by [].
26 Qed.
27
28 Lemma test2 n : n >= 0.
29 Proof.
30 have [:s1] @h m : 'I_(n+m).+1 := Sub 0 (s1 m).
31 move=> m; reflexivity.
32 cut (forall m, 0 < (n+m).+1); last assumption.
33 by [].
34 Qed.
35
36 Lemma test3 n : n >= 0.
37 Proof.
38 Fail have [:s1] @h m : 'I_(n+m).+1 by apply: (Sub 0 (s1 m)); auto.
39 have [:s1] @h m : 'I_(n+m).+1 by apply: (Sub 0); abstract: s1 m; auto.
40 cut (forall m, 0 < (n+m).+1); last assumption.
41 by [].
42 Qed.
43
44 Lemma test4 n : n >= 0.
45 Proof.
46 have @h m : 'I_(n+m).+1 by apply: (Sub 0); abstract auto.
47 by [].
48 Qed.
49
50 Lemma test5 : True.
51 Proof.
52 have @t : nat := 3.
53 have : t = 3 by [].
54 by [].
55 Qed.