| 1 |
Definition foo (n : option nat) : nat := 0. |
| 2 |
Arguments foo !_ /. |
| 3 |
|
| 4 |
Goal forall n, foo (Some n) = 1. |
| 5 |
intros. |
| 6 |
progress cbn. |
| 7 |
Abort. |
| 8 |
|
| 9 |
Goal forall n, foo n = 1. |
| 10 |
intros. |
| 11 |
Fail progress cbn. |
| 12 |
Abort. |
| 13 |
|
| 14 |
Require Import TestSuite.bool. |
| 15 |
|
| 16 |
Definition do_something (p q : bool) (a b : nat) : option nat := |
| 17 |
if Bool.eqb p q then Some a else Some b. |
| 18 |
Arguments do_something !_ !_ _ _ /. |
| 19 |
|
| 20 |
Lemma test a b : |
| 21 |
exists x, do_something false true a b = x. |
| 22 |
Proof. |
| 23 |
intros. eexists. |
| 24 |
|
| 25 |
progress cbn [do_something]. |
| 26 |
match goal with |- (if Bool.eqb false true then Some a else Some b) = _ => idtac end. |
| 27 |
|
| 28 |
progress cbn [Bool.eqb]. |
| 29 |
reflexivity. |
| 30 |
Qed. |