Advertisement
Guest User

Untitled

a guest
Nov 24th, 2014
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. Parameter X : Type.
  2. Parameter f : X -> bool.
  3. Parameter x : X.
  4.  
  5. Inductive gRel : X -> bool -> Prop :=
  6. | is_x : gRel x true
  7. | is_not_x : forall y: X, y <> x -> gRel y (f y)
  8. .
  9.  
  10. Definition gdec (h: forall a b: X, {a = b}+{a <> b}) : X -> bool :=
  11. fun a => if h a x then true else f a.
  12.  
  13. Lemma gRel_is_a_fun: (forall a b: X, {a = b}+{a <> b}) ->
  14. exists g : X -> bool, forall a, gRel a (g a).
  15. Proof.
  16. intro hdec.
  17. exists (gdec hdec); unfold gdec.
  18. intro a; destruct (hdec a x).
  19. now subst; apply is_x.
  20. now apply is_not_x.
  21. Qed.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement