| 1 |
Set Universe Polymorphism. |
| 2 |
|
| 3 |
Module Segfault. |
| 4 |
|
| 5 |
Inductive decision_tree : Type := . |
| 6 |
|
| 7 |
Fixpoint first_satisfying_helper {A B} (f : A -> option B) (ls : list A) : option B |
| 8 |
:= match ls with |
| 9 |
| nil => None |
| 10 |
| cons x xs |
| 11 |
=> match f x with |
| 12 |
| Some v => Some v |
| 13 |
| None => first_satisfying_helper f xs |
| 14 |
end |
| 15 |
end. |
| 16 |
|
| 17 |
Axiom admit : forall {T}, T. |
| 18 |
Definition dtree4 : option decision_tree := |
| 19 |
match first_satisfying_helper (fun pat : nat => Some pat) (cons 0 nil) |
| 20 |
with |
| 21 |
| Some _ => admit |
| 22 |
| None => admit |
| 23 |
end |
| 24 |
. |
| 25 |
Definition dtree'' := Eval vm_compute in dtree4. (* segfault *) |
| 26 |
|
| 27 |
End Segfault. |
| 28 |
|
| 29 |
Module OtherExample. |
| 30 |
|
| 31 |
Definition bar@{i} := Type@{i}. |
| 32 |
Definition foo@{i j} (x y z : nat) := |
| 33 |
@id Type@{j} bar@{i}. |
| 34 |
Eval vm_compute in foo. |
| 35 |
|
| 36 |
End OtherExample. |
| 37 |
|
| 38 |
Module LocalClosure. |
| 39 |
|
| 40 |
Definition bar@{i} := Type@{i}. |
| 41 |
|
| 42 |
Definition foo@{i j} (x y z : nat) := |
| 43 |
@id (nat -> Type@{j}) (fun _ => Type@{i}). |
| 44 |
Eval vm_compute in foo. |
| 45 |
|
| 46 |
End LocalClosure. |
| 47 |
|
| 48 |
Module QVar. |
| 49 |
|
| 50 |
Definition bar@{q;i|} := Type@{q;i}. |
| 51 |
|
| 52 |
Definition gbar@{q1 q2;i j|} := bar@{q2;i}. |
| 53 |
|
| 54 |
Eval vm_compute in gbar. |
| 55 |
|
| 56 |
Definition gprop := Eval vm_compute in gbar@{Type Prop;Set Set}. |
| 57 |
Check eq_refl : gprop = Prop. |
| 58 |
|
| 59 |
End QVar. |
| 60 |
|
| 61 |
Require Import TestSuite.hurkens. |
| 62 |
Polymorphic Inductive unit := tt. |
| 63 |
|
| 64 |
Polymorphic Definition foo := |
| 65 |
let x := id tt in (x, x, Type). |
| 66 |
|
| 67 |
Lemma bad : False. |
| 68 |
refine (TypeNeqSmallType.paradox (snd foo) _). |
| 69 |
vm_compute. |
| 70 |
Fail reflexivity. |
| 71 |
Abort. |