aboutsummaryrefslogtreecommitdiff
path: root/mathcomp/ssrtest/occarrow.v
blob: 4765702c35e2d30c3e34a01791dc8aba6a5378e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
(* (c) Copyright 2006-2015 Microsoft Corporation and Inria.                  *)
(* Distributed under the terms of CeCILL-B.                                  *)
Require Import mathcomp.ssreflect.ssreflect.
From mathcomp
Require Import eqtype ssrnat.

Lemma test1 : forall n m : nat, n = m -> m * m + n * n = n * n + n * n.
move=> n m E; have [{2}-> _] : n * n = m * n /\ True by move: E => {1}<-.
by move: E => {3}->.
Qed.

Lemma test2 : forall n m : nat, True /\ (n = m -> n * n = n * m).
by move=> n m; constructor=> [|{2}->].
Qed.