A simple proof that Bfin implies Kfin

This commit is contained in:
Dan Frumin 2017-08-24 18:41:31 +02:00
parent c7aa3d581f
commit b17a726608
1 changed files with 21 additions and 2 deletions

View File

@ -310,9 +310,28 @@ Section dec_membership.
End dec_membership. End dec_membership.
Section bfin_kfin. Section bfin_kfin.
Variable (A : Type).
Context `{Univalence}. Context `{Univalence}.
Definition bfin_to_kfin : forall (P : Sub A), Bfin P -> Kf_sub _ P. Lemma bfin_to_kfin : forall (B : Type), Finite B -> Kf B.
Proof.
apply finite_ind_hprop.
- intros. apply _.
- apply Kf_unfold.
exists . intros [].
- intros B [n f] IH.
strip_truncations.
apply Kf_unfold in IH.
destruct IH as [X HX].
apply Kf_unfold.
Require Import fsets.monad.
exists ((ffmap inl X) {|inr tt|}); simpl.
intros [a | []]; apply tr.
+ left.
apply fmap_isIn.
apply (HX a).
+ right. apply (tr idpath).
Defined.
Definition bfin_to_kfin_sub A : forall (P : Sub A), Bfin P -> Kf_sub _ P.
Proof. Proof.
intros P [n f]. intros P [n f].
strip_truncations. strip_truncations.