1
0
mirror of https://github.com/nmvdw/HITs-Examples synced 2025-11-04 07:33:51 +01:00

Port the codebase to HottClasses

Initial work + use the latest version of HoTT
This commit is contained in:
2017-11-01 17:47:41 +01:00
parent c6f756a856
commit 4fafbf175e
17 changed files with 389 additions and 495 deletions

View File

@@ -62,7 +62,7 @@ Section ListToSet.
Definition empty_empty : list_to_set A = := idpath.
Lemma filter_comprehension (ϕ : A -> Bool) (l : list A) :
list_to_set A (filter ϕ l) = {| list_to_set A l & ϕ |}.
list_to_set A (filter ϕ l) = {| list_to_set A l | ϕ |}.
Proof.
induction l ; cbn in *.
- reflexivity.
@@ -170,11 +170,11 @@ Section refinement_examples.
Defined.
Lemma exist_elim (X : list A) (ϕ : A -> hProp)
: list_exist ϕ X -> hexists (fun a => a X * ϕ a).
: list_exist ϕ X -> hexists (fun a => a X * ϕ a)%type.
Proof.
rewrite list_exist_set.
assert (hexists (fun a : A => a (list_to_set A X) * ϕ a)
-> hexists (fun a : A => a X * ϕ a))
-> hexists (fun a : A => a X * ϕ a))%type
as H2.
{
intros H1.
@@ -240,4 +240,4 @@ Section refinement_examples.
rewrite length_compute, fset_list_memb.
reflexivity.
Defined.
End refinement_examples.
End refinement_examples.