Debian Codegraph @

test-suite/ssr/gen_pattern.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 Notation "( a 'in' c )" := (a + c) (only parsing) : myscope.
17 Delimit Scope myscope with myscope.
18
19 Notation "( a 'in' c )" := (a + c) (only parsing).
20
21 Lemma foo x y : x + x.+1 = x.+1 + y.
22 move: {x} (x.+1) {1}x y (x.+1 in RHS).
23 match goal with |- forall a b c d, b + a = d + c => idtac end.
24 Admitted.
25
26 Lemma bar x y : x + x.+1 = x.+1 + y.
27 move E: ((x.+1 in y)) => w.
28 match goal with |- x + x.+1 = w => rewrite -{w}E end.
29 move E: (x.+1 in y)%myscope => w.
30 match goal with |- x + x.+1 = w => rewrite -{w}E end.
31 move E: ((x + y).+1 as RHS) => w.
32 match goal with |- x + x.+1 = w => rewrite -{}E -addSn end.
33 Admitted.