| 1 |
From Corelib Require Import ssreflect. |
| 2 |
|
| 3 |
Axiom R : Type. |
| 4 |
Axiom op : nat -> R -> R -> R. |
| 5 |
|
| 6 |
Axiom lemma : forall n x y z, op n (op n x y) z = z. |
| 7 |
|
| 8 |
Arguments op {_} _ _. |
| 9 |
|
| 10 |
Goal forall a b c : R, @op (0+1) (@op 1 a b) c = |
| 11 |
@op 2 (@op 2 a b) c. |
| 12 |
intros a b c. |
| 13 |
Show. |
| 14 |
rewrite lemma. |
| 15 |
Show. |
| 16 |
match goal with |
| 17 |
| |- c = _ => idtac "ok" |
| 18 |
end. |
| 19 |
Abort. |
| 20 |
|
| 21 |
Record foo := F { f : nat }. |
| 22 |
|
| 23 |
Definition c := F (1 + 2). |
| 24 |
|
| 25 |
Goal (forall x, 1 + (1 + x) = 5) -> 1 + f c = 1 + (1 + 7) . |
| 26 |
Show. |
| 27 |
move->. |
| 28 |
Show. |
| 29 |
match goal with |- 5 = 1 + (1 + 7) => idtac "ok" end. |
| 30 |
Abort. |
| 31 |
|
| 32 |
Goal (forall x, 1 + (1 + x) = 5) -> 1 + f c = 1 + (1 + 7) . |
| 33 |
Show. |
| 34 |
Set SsrMatching LegacyFoUnif. |
| 35 |
move->. |
| 36 |
Unset SsrMatching LegacyFoUnif. |
| 37 |
Show. |
| 38 |
match goal with |- 1 + f c = 5 => idtac "ok" end. |
| 39 |
Abort. |
| 40 |
|
| 41 |
Goal (forall x, 1 + (S x) = 5) -> 1 + f c = 1 + (1 + 7) . |
| 42 |
Show. |
| 43 |
move->. |
| 44 |
Show. |
| 45 |
match goal with |- 1 + f c = 1 + 5 => idtac "ok" end. |
| 46 |
Abort. |