mirror of
				https://github.com/nmvdw/HITs-Examples
				synced 2025-11-03 15:13:51 +01:00 
			
		
		
		
	A simple proof that Bfin implies Kfin
This commit is contained in:
		@@ -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.
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user