(** Hurkens' paradox still holds with a retract from the _negative_ fragment of [Prop] into [bool], hence weak classical logic, i.e. [forall A, ~A\/~~A], is enough for deriving a weak version of proof-irrelevance. This is enough to derive a contradiction from a [Set]-bound weak excluded middle with an impredicative [Set] universe. *)
Section Proof_irrelevance_WEM_CC.
Variable or : Prop -> Prop -> Prop.
Variable or_introl : forall A B:Prop, A -> or A B.
Variable or_intror : forall A B:Prop, B -> or A B.
Hypothesis or_elim : forall A B C:Prop, (A -> C) -> (B -> C) -> or A B -> C.
Hypothesis
or_elim_redl :
forall (A B C:Prop) (f:A -> C) (g:B -> C) (a:A),
f a = or_elim A B C f g (or_introl A B a).
Hypothesis
or_elim_redr :
forall (A B C:Prop) (f:A -> C) (g:B -> C) (b:B),
g b = or_elim A B C f g (or_intror A B b).
Hypothesis
or_dep_elim :
forall (A B:Prop) (P:or A B -> Prop),
(forall a:A, P (or_introl A B a)) ->
(forall b:B, P (or_intror A B b)) -> forall b:or A B, P b.
Hypothesis wem : forall A:Prop, or (~~A) (~ A).
Local Notation NProp := NoRetractToNegativeProp.NProp.
Local Notation El := NoRetractToNegativeProp.El.
Variable B : Prop.
Variables b1 b2 : B.
(** [p2b] and [b2p] form a retract if [~b1=b2] *)
Let p2b (A:NProp) := or_elim (~~El A) (~El A) B (fun _ => b1) (fun _ => b2) (wem (El A)).
Let b2p b : NProp := exist (fun P=>~~P -> P) (~~(b1 = b)) (fun h x => h (fun k => k x)).

(* Specifications: *)
Lemma wp2p1 : forall A:NProp, El A -> El (b2p (p2b A)).
Lemma wp2p2 : b1 <> b2 -> forall A:NProp, El (b2p (p2b A)) -> El A.
(** By Hurkens's paradox, we get a weak form of proof irrelevance. *)
Theorem wproof_irrelevance_cc : ~~(b1 = b2).
End Proof_irrelevance_WEM_CC.