| 1 |
Set Universe Polymorphism. |
| 2 |
|
| 3 |
Record Pred@{A} := |
| 4 |
{ car :> Type@{A} |
| 5 |
; P : car -> Prop |
| 6 |
}. |
| 7 |
|
| 8 |
Class All@{A} (A : Pred@{A}) := |
| 9 |
{ proof : forall (a : A), P A a |
| 10 |
}. |
| 11 |
|
| 12 |
Record Pred_All@{A} : Type := |
| 13 |
{ P' :> Pred@{A} |
| 14 |
; P'_All : All P' |
| 15 |
}. |
| 16 |
|
| 17 |
Global Instance Pred_All_instance (A : Pred_All) : All A := P'_All A. |
| 18 |
|
| 19 |
Definition Pred_All_proof {A : Pred_All} (a : A) : P A a. |
| 20 |
Proof. |
| 21 |
Fail solve[auto using proof]. (* Do not implicitly rely on TC resolution *) |
| 22 |
solve[auto using proof, Pred_All_instance]. |
| 23 |
Abort. |