| 1 |
Set Primitive Projections. |
| 2 |
|
| 3 |
Record Box (A:Type) := box { unbox : A }. |
| 4 |
|
| 5 |
Definition ubox := @unbox. |
| 6 |
|
| 7 |
Axiom trip : nat -> nat -> nat -> Prop. |
| 8 |
|
| 9 |
Ltac show_goal := match goal with |- ?g => idtac g end. |
| 10 |
|
| 11 |
Lemma foo (n:Box nat) : |
| 12 |
(* constant, folded, unfolded *) |
| 13 |
trip (ubox _ n) (unbox _ n) (match n with box _ n => n end). |
| 14 |
Proof. |
| 15 |
simpl. (* remove extra letins introduced by match compilation *) |
| 16 |
cbv delta [ubox]. |
| 17 |
show_goal. |
| 18 |
|
| 19 |
Set Printing Unfolded Projection As Match. |
| 20 |
show_goal. |
| 21 |
|
| 22 |
Set Printing Projections. |
| 23 |
show_goal. |
| 24 |
|
| 25 |
Unset Printing Unfolded Projection As Match. |
| 26 |
show_goal. |
| 27 |
|
| 28 |
Arguments unbox {_}. |
| 29 |
show_goal. |
| 30 |
|
| 31 |
Set Printing Unfolded Projection As Match. |
| 32 |
show_goal. |
| 33 |
|
| 34 |
Unset Printing Projections. |
| 35 |
show_goal. |
| 36 |
Abort. |