| 1 |
|
| 2 |
#[refine] Definition test : { x : nat | x < 4 } := exist _ 3 _. |
| 3 |
Proof. |
| 4 |
constructor. |
| 5 |
Defined. |
| 6 |
|
| 7 |
#[refine] Fixpoint fixtest (n : nat) := |
| 8 |
match n with |
| 9 |
| 0 => _ |
| 10 |
| S k => _ |
| 11 |
end. |
| 12 |
Proof. |
| 13 |
1: shelve. |
| 14 |
- exact 1. |
| 15 |
- refine (n * _). |
| 16 |
apply fixtest. |
| 17 |
apply k. |
| 18 |
Defined. |
| 19 |
|
| 20 |
|
| 21 |
#[refine] Definition infer_test := 1 + _. |
| 22 |
Proof. |
| 23 |
apply fixtest, 1. |
| 24 |
Qed. |
| 25 |
|
| 26 |
#[refine] Definition true_infer_test := _. |
| 27 |
Proof. |
| 28 |
2: exact (if true as b return if b then _ else _ then 0 else false). |
| 29 |
Qed. |
| 30 |
|
| 31 |
(* Cannot use Eval with #[refine]. *) |
| 32 |
Fail #[refine] Definition notest := Eval lazy in 0 + 0. |