Built with Alectryon, running Coq+SerAPI v8.18.0+0.18.3. Bubbles () indicate interactive fragments: hover for details, tap to reveal contents. Use Ctrl+↑ Ctrl+↓ to navigate, Ctrl+🖱️ to focus. On Mac, use instead of Ctrl.
[Loading ML file number_string_notation_plugin.cmxs (using legacy method) ... done]
(** * The law of excluded middle *) Monomorphic Axiom ExcludedMiddle : Type0. Existing Class ExcludedMiddle. (** Mark this axiom as a "global axiom", which some of our tactics will automatically handle. *) Global Instance is_global_axiom_excludedmiddle : IsGlobalAxiom ExcludedMiddle := {}. Axiom LEM : forall `{ExcludedMiddle} (P : Type), IsHProp P -> P + ~P. Definition ExcludedMiddle_type := forall (P : Type), IsHProp P -> P + ~P. (** ** LEM means that all propositions are decidable *) Global Instance decidable_lem `{ExcludedMiddle} (P : Type) `{IsHProp P} : Decidable P := LEM P _. (** ** Double-negation elimination *) Definition DNE_type := forall P, IsHProp P -> ~~P -> P.

ExcludedMiddle -> DNE_type

ExcludedMiddle -> DNE_type
lem: ExcludedMiddle
P: Type
hp: IsHProp P
nnp: ~~ P

P
lem: ExcludedMiddle
P: Type
hp: IsHProp P
nnp: ~~ P

P -> P
lem: ExcludedMiddle
P: Type
hp: IsHProp P
nnp: ~~ P
~ P -> P
lem: ExcludedMiddle
P: Type
hp: IsHProp P
nnp: ~~ P

P -> P
auto.
lem: ExcludedMiddle
P: Type
hp: IsHProp P
nnp: ~~ P

~ P -> P
intros np; elim (nnp np). Defined. (** This direction requires Funext. *)
H: Funext

DNE_type -> ExcludedMiddle_type
H: Funext

DNE_type -> ExcludedMiddle_type
H: Funext
dn: DNE_type
P: Type
hp: IsHProp P

P + ~ P
H: Funext
dn: DNE_type
P: Type
hp: IsHProp P

IsHProp (P + ~ P)
H: Funext
dn: DNE_type
P: Type
hp: IsHProp P
~~ (P + ~ P)
H: Funext
dn: DNE_type
P: Type
hp: IsHProp P

IsHProp (P + ~ P)
H: Funext
dn: DNE_type
P: Type
hp: IsHProp P

IsHProp P
H: Funext
dn: DNE_type
P: Type
hp: IsHProp P
IsHProp (~ P)
H: Funext
dn: DNE_type
P: Type
hp: IsHProp P
P -> ~ P -> Empty
H: Funext
dn: DNE_type
P: Type
hp: IsHProp P

IsHProp P
exact _.
H: Funext
dn: DNE_type
P: Type
hp: IsHProp P

IsHProp (~ P)
exact _.
H: Funext
dn: DNE_type
P: Type
hp: IsHProp P

P -> ~ P -> Empty
intros p np; exact (np p).
H: Funext
dn: DNE_type
P: Type
hp: IsHProp P

~~ (P + ~ P)
H: Funext
dn: DNE_type
P: Type
hp: IsHProp P
nlem: ~ (P + ~ P)

Empty
H: Funext
dn: DNE_type
P: Type
hp: IsHProp P
nlem: ~ (P + ~ P)

P + ~ P
H: Funext
dn: DNE_type
P: Type
hp: IsHProp P
nlem: ~ (P + ~ P)

~ P
H: Funext
dn: DNE_type
P: Type
hp: IsHProp P
nlem: ~ (P + ~ P)
p: P

Empty
H: Funext
dn: DNE_type
P: Type
hp: IsHProp P
nlem: ~ (P + ~ P)
p: P

P + ~ P
H: Funext
dn: DNE_type
P: Type
hp: IsHProp P
nlem: ~ (P + ~ P)
p: P

P
apply p. Defined. (** DNE is equivalent to "every proposition is a negation". *)
H: DNE_type
P: Type
IsHProp0: IsHProp P

{Q : Type & P <-> ~ Q}
H: DNE_type
P: Type
IsHProp0: IsHProp P

{Q : Type & P <-> ~ Q}
H: DNE_type
P: Type
IsHProp0: IsHProp P

P -> ~~ P
H: DNE_type
P: Type
IsHProp0: IsHProp P
~~ P -> P
H: DNE_type
P: Type
IsHProp0: IsHProp P

P -> ~~ P
intros p np; exact (np p).
H: DNE_type
P: Type
IsHProp0: IsHProp P

~~ P -> P
apply H; exact _. Defined.
H: forall P : Type, IsHProp P -> {Q : Type & P <-> ~ Q}

DNE_type
H: forall P : Type, IsHProp P -> {Q : Type & P <-> ~ Q}

DNE_type
H: forall P : Type, IsHProp P -> {Q : Type & P <-> ~ Q}
P: Type
X: IsHProp P
nnp: ~~ P

P
H: forall P : Type, IsHProp P -> {Q : Type & P <-> ~ Q}
P: Type
X: IsHProp P
nnp: ~~ P
Q: Type
e: P <-> ~ Q

P
H: forall P : Type, IsHProp P -> {Q : Type & P <-> ~ Q}
P: Type
X: IsHProp P
nnp: ~~ P
Q: Type
e: P <-> ~ Q

~ Q
H: forall P : Type, IsHProp P -> {Q : Type & P <-> ~ Q}
P: Type
X: IsHProp P
nnp: ~~ P
Q: Type
e: P <-> ~ Q
q: Q

Empty
H: forall P : Type, IsHProp P -> {Q : Type & P <-> ~ Q}
P: Type
X: IsHProp P
nnp: ~~ P
Q: Type
e: P <-> ~ Q
q: Q

~ P
H: forall P : Type, IsHProp P -> {Q : Type & P <-> ~ Q}
P: Type
X: IsHProp P
nnp: ~~ P
Q: Type
e: P <-> ~ Q
q: Q
p: P

Empty
exact (fst e p q). Defined.