Debian Codegraph @

test-suite/ssr/multiview.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 ssrbool TestSuite.ssr_mini_mathcomp.
15
16 Goal forall m n p, n <= p -> m <= n -> m <= p.
17 by move=> m n p le_n_p /leq_trans; apply.
18 Undo 1.
19 by move=> m n p le_n_p /leq_trans /(_ le_n_p) le_m_p; exact: le_m_p.
20 Undo 1.
21 by move=> m n p le_n_p /leq_trans ->.
22 Qed.
23
24 Goal forall P Q X : Prop, Q -> (True -> X -> Q = P) -> X -> P.
25 by move=> P Q X q V /V <-.
26 Qed.
27
28 Lemma test0: forall a b, a && a && b -> b.
29 by move=> a b; repeat move=> /andP []; move=> *.
30 Qed.
31
32 Lemma test1 : forall a b, a && b -> b.
33 by move=> a b /andP /andP /andP [] //.
34 Qed.
35
36 Lemma test2 : forall a b, a && b -> b.
37 by move=> a b /andP /andP /(@andP a) [] //.
38 Qed.
39
40 Lemma test3 : forall a b, a && (b && b) -> b.
41 by move=> a b /andP [_ /andP [_ //]].
42 Qed.
43
44 Lemma test4: forall a b, a && b = b && a.
45 by move=> a b; apply/andP/andP=> ?; apply/andP/andP/andP; rewrite andbC; apply/andP.
46 Qed.
47
48 Lemma test5: forall C I A O, (True -> O) -> (O -> A) -> (True -> A -> I) -> (I -> C) -> C.
49 by move=> c i a o O A I C; apply/C/I/A/O.
50 Qed.
51
52 Lemma test6: forall A B, (A -> B) -> A -> B.
53 move=> A B A_to_B a; move/A_to_B in a; exact: a.
54 Qed.
55
56 Lemma test7: forall A B, (A -> B) -> A -> B.
57 move=> A B A_to_B a; apply A_to_B in a; exact: a.
58 Qed.