Agda, type of proofs and with clause
In AgdaIntro, the view section explains : ..that with doesn’t remember the connection between the with-term and the patterns. That means when you defines data False : Set where record True : Set where isTrue : Bool -> Set isTrue true = True isTrue false = False infixr 30 _:all:_ data All {A : Set}(P : A -> Set) : List A -> Set where all[] : All P [] _:all:_ : forall {x xs} -> P x -> All P xs -> All P (x :: xs) satisfies : {A : Set} -> (A -> Bool) -> A -> Set satisfies p x = isTrue (p x) data Find {A : Set}(p : A -> Bool) : List A -> Set where found : (xs : List A)(y : A) -> satisfies p y ->