mirror of
				https://github.com/nmvdw/HITs-Examples
				synced 2025-11-04 07:33:51 +01:00 
			
		
		
		
	Decidable equality on FSets
This commit is contained in:
		@@ -191,4 +191,16 @@ Proof.
 | 
				
			|||||||
        apply H2.
 | 
					        apply H2.
 | 
				
			||||||
Defined.
 | 
					Defined.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					(* With extensionality we can prove decidable equality *)
 | 
				
			||||||
 | 
					Instance fsets_dec_eq `{Funext} : DecidablePaths (FSet A).
 | 
				
			||||||
 | 
					Proof.
 | 
				
			||||||
 | 
					  intros X Y.
 | 
				
			||||||
 | 
					  apply (decidable_equiv ((subset Y X = true) * (subset X Y = true)) (eq_subset X Y)^-1). (* TODO: this is so slow?*)
 | 
				
			||||||
 | 
					  destruct (Y ⊆ X), (X ⊆ Y).
 | 
				
			||||||
 | 
					  - left. refine (idpath, idpath).
 | 
				
			||||||
 | 
					  - right. refine (false_ne_true o snd).
 | 
				
			||||||
 | 
					  - right. refine (false_ne_true o fst).
 | 
				
			||||||
 | 
					  - right. refine (false_ne_true o fst).
 | 
				
			||||||
 | 
					Defined.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
End ext.
 | 
					End ext.
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user