1
0
mirror of https://github.com/nmvdw/HITs-Examples synced 2025-11-03 15:13:51 +01:00

Show that Kf (A + B) -> Kf A

This commit is contained in:
2017-09-25 13:44:11 +02:00
parent 35f0452a6a
commit 0e9fcbc588
2 changed files with 40 additions and 1 deletions

View File

@@ -63,6 +63,28 @@ Section monad_fset.
+ left. by apply HX0.
+ right. by apply HX1.
Defined.
Lemma bind_isIn `{Univalence} {A : Type} (X : FSet (FSet A)) (a : A) :
(exists x, x X * a x) -> a (bind _ X).
Proof.
hinduction X;
try (intros; apply path_forall; intro; apply path_ishprop).
- simpl. intros [x [[] ?]].
- intros x [y [Hx Hy]].
strip_truncations.
rewrite <- Hx.
apply Hy.
- intros x x' IHx IHx'.
intros [z [Hz Ha]].
strip_truncations.
apply tr.
destruct Hz as [Hz | Hz]; [ left | right ].
+ apply IHx.
exists z. split; assumption.
+ apply IHx'.
exists z. split; assumption.
Defined.
End monad_fset.
(** Lemmas relating operations to the membership predicate *)