Section Retracts.
Variables A B : Prop.
Record retract : Prop :=
{i : A -> B; j : B -> A; inv : forall a:A, j (i a) = a}.
Record retract_cond : Prop :=
{i2 : A -> B; j2 : B -> A; inv2 : retract -> forall a:A, j2 (i2 a) = a}.
(** The dependent elimination above implies the axiom of choice: *)
(** The paradoxical set *)
Definition U := forall P:Prop, pow P.
(** Bijection between [U] and [(pow U)] *)
Definition f (u:U) : pow U := u U.
Definition g (h:pow U) : U :=
fun X => let lX := j2 (L1 X U) in let rU := i2 (L1 U U) in lX (rU h).
(** Encoding of Russel's paradox *)
(** The boolean negation. *)
Definition Not_b (b:Bool) := IFProp (b = T) F T.
(** the set of elements not belonging to itself *)
Definition R : U := g (fun u:U => Not_b (u U u)).

Theorem classical_proof_irrelevance : T = F.