Library HoTT.Modalities.Notnot
Require Import HoTT.Basics HoTT.Types Universes.HProp.
Require Import Modality.
Local Open Scope path_scope.
Require Import Modality.
Local Open Scope path_scope.
The double negation modality
Definition NotNot `{Funext} : Modality.
Proof.
snrapply easy_modality.
- intros X; exact (~~X).
- exact @not_not_unit.
- cbn beta; intros A B f z nBz.
apply z; intros a.
exact (f a (transport (fun x ⇒ ¬ (B x))
(path_ishprop _ _)
nBz)).
- cbn beta; intros A B f a.
apply path_ishprop.
- cbn beta; intros A z z'.
refine (isequiv_iff_hprop _ _).
intros; apply path_ishprop.
Defined.
Proof.
snrapply easy_modality.
- intros X; exact (~~X).
- exact @not_not_unit.
- cbn beta; intros A B f z nBz.
apply z; intros a.
exact (f a (transport (fun x ⇒ ¬ (B x))
(path_ishprop _ _)
nBz)).
- cbn beta; intros A B f a.
apply path_ishprop.
- cbn beta; intros A z z'.
refine (isequiv_iff_hprop _ _).
intros; apply path_ishprop.
Defined.