Last active
September 3, 2019 22:47
-
-
Save MarcelineVQ/5152c66371c047860157dad597144502 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module Foo | |
| data Singleton : (x : k) -> Type where | |
| With : (y : a) -> x = y -> Singleton x | |
| inspect : (x : a) -> Singleton x | |
| inspect x = With x Refl | |
| all_values_filtered : (xs:List a) -> (f:a -> Bool) -> (all f (filter f xs) = True) | |
| all_values_filtered [] f = Refl | |
| all_values_filtered (x :: xs) f with (inspect (f x)) | |
| all_values_filtered (x :: xs) f | (With False prf) = | |
| rewrite prf in all_values_filtered xs f | |
| all_values_filtered (x :: xs) f | (With True prf) = | |
| rewrite prf | |
| in rewrite prf | |
| in rewrite all_values_filtered xs f | |
| in Refl | |
| -- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment