| 1 |
Set Definitional UIP. |
| 2 |
|
| 3 |
Inductive seq {A} (a:A) : A -> SProp := |
| 4 |
srefl : seq a a. |
| 5 |
Arguments srefl {_ _}. |
| 6 |
|
| 7 |
Module WithProp. |
| 8 |
|
| 9 |
(* Axiom implied by propext (so consistent) *) |
| 10 |
Axiom all_eq : forall (P Q:Prop), P -> Q -> seq P Q. |
| 11 |
|
| 12 |
Definition transport (P Q:Prop) (x:P) (y:Q) : Q |
| 13 |
:= match all_eq P Q x y with srefl => x end. |
| 14 |
|
| 15 |
Definition top : Prop := forall P : Prop, P -> P. |
| 16 |
|
| 17 |
Definition c : top := |
| 18 |
fun P p => |
| 19 |
transport |
| 20 |
(top -> top) |
| 21 |
P |
| 22 |
(fun x : top => x (top -> top) (fun x => x) x) |
| 23 |
p. |
| 24 |
|
| 25 |
(* Fail Timeout 1 Eval lazy in c (top -> top) (fun x => x) c. *) |
| 26 |
(* loops *) |
| 27 |
|
| 28 |
End WithProp. |
| 29 |
|
| 30 |
Module WithoutProp. |
| 31 |
|
| 32 |
(* Axiom implied by propext (so consistent) *) |
| 33 |
Axiom all_eq : forall (P Q:SProp), P -> Q -> seq P Q. |
| 34 |
|
| 35 |
(* go through Set because match from SProp to SProp doesn't have the |
| 36 |
special reduction *) |
| 37 |
Record Box (A:SProp) : Set := box { unbox : A }. |
| 38 |
Arguments box {_}. Arguments unbox {_}. |
| 39 |
|
| 40 |
Definition transport (P Q:SProp) (x:P) (y:Q) : Q |
| 41 |
:= unbox match all_eq P Q x y with srefl => box x end. |
| 42 |
|
| 43 |
Definition top : SProp := forall P : SProp, P -> P. |
| 44 |
|
| 45 |
Definition c : top := |
| 46 |
fun P p => |
| 47 |
transport |
| 48 |
(top -> top) |
| 49 |
P |
| 50 |
(fun x : top => x (top -> top) (fun x => x) x) |
| 51 |
p. |
| 52 |
|
| 53 |
(* Fail Timeout 1 Eval lazy in c (top -> top) (fun x => x) c. *) |
| 54 |
(* loops *) |
| 55 |
|
| 56 |
End WithoutProp. |