Stronger completeness axiom for real numbers in Coq
Question
Here is the completeness axiom defined in the Coq standard library.
Suppose I add in
Open Scope R_scope. Axiom supremum : forall E : R -> Prop, (exists l : R, is_upper_bound E l) -> (exists x : R, E x) -> {m : R | is_lub E m /\ (forall x : R, x < m -> exists y : R, (E y /\ y > x))}.
Is this required? (i.e does it follow from the others) Would there be any issues with consistency? Also, why is this not the definition in the standard library (I guess this part is subjective).
Answer
Your supremum axiom is equivalent to the law of excluded middle, in other words by introducing this axiom you are bringing classical logic to the table.
The completeness axiom already implies a weak form of the law of excluded middle, as shown by the means of the sig_not_dec lemma (Rlogic module), which states the decidability of negated formulas:
supremum axiom implies LEM
Let's use the standard proof of the sig_not_dec lemma to show that with the stronger completeness axiom (supremum) we can derive the strong form of the law of excluded middle.
Require Import Coq.Reals.RIneq.forall P : Prop, P \/ ~ Pforall P : Prop, P \/ ~ PP: PropP \/ ~ PP: Prop
E:= fun x : R => x = 0 \/ x = 1 /\ P: R -> PropP \/ ~ PP: Prop
E:= fun x : R => x = 0 \/ x = 1 /\ P: R -> Propexists l : R, is_upper_bound E lP: Prop
E:= fun x : R => x = 0 \/ x = 1 /\ P: R -> Propexists x : R, E xP: Prop
E:= fun x : R => x = 0 \/ x = 1 /\ P: R -> Prop
x: R
H: is_lub E x
Hclas: forall x0 : R, x0 < x -> exists y : R, E y /\ y > x0P \/ ~ PP: Prop
E:= fun x : R => x = 0 \/ x = 1 /\ P: R -> Propis_upper_bound E 1P: Prop
E:= fun x : R => x = 0 \/ x = 1 /\ P: R -> Propexists x : R, E xP: Prop
E:= fun x : R => x = 0 \/ x = 1 /\ P: R -> Prop
x: R
H: is_lub E x
Hclas: forall x0 : R, x0 < x -> exists y : R, E y /\ y > x0P \/ ~ PP: Prop
E:= fun x : R => x = 0 \/ x = 1 /\ P: R -> Prop0 <= 1P: Prop
E:= fun x : R => x = 0 \/ x = 1 /\ P: R -> Prop1 <= 1P: Prop
E:= fun x : R => x = 0 \/ x = 1 /\ P: R -> Propexists x : R, E xP: Prop
E:= fun x : R => x = 0 \/ x = 1 /\ P: R -> Prop
x: R
H: is_lub E x
Hclas: forall x0 : R, x0 < x -> exists y : R, E y /\ y > x0P \/ ~ PP: Prop
E:= fun x : R => x = 0 \/ x = 1 /\ P: R -> Prop1 <= 1P: Prop
E:= fun x : R => x = 0 \/ x = 1 /\ P: R -> Propexists x : R, E xP: Prop
E:= fun x : R => x = 0 \/ x = 1 /\ P: R -> Prop
x: R
H: is_lub E x
Hclas: forall x0 : R, x0 < x -> exists y : R, E y /\ y > x0P \/ ~ PP: Prop
E:= fun x : R => x = 0 \/ x = 1 /\ P: R -> Propexists x : R, E xP: Prop
E:= fun x : R => x = 0 \/ x = 1 /\ P: R -> Prop
x: R
H: is_lub E x
Hclas: forall x0 : R, x0 < x -> exists y : R, E y /\ y > x0P \/ ~ PP: Prop
E:= fun x : R => x = 0 \/ x = 1 /\ P: R -> Prop
x: R
H: is_lub E x
Hclas: forall x0 : R, x0 < x -> exists y : R, E y /\ y > x0P \/ ~ PP: Prop
E:= fun x : R => x = 0 \/ x = 1 /\ P: R -> Prop
x: R
H: is_lub E x
Hclas: forall x0 : R, x0 < x -> exists y : R, E y /\ y > x0
H': 1 <= xP \/ ~ PP: Prop
E:= fun x : R => x = 0 \/ x = 1 /\ P: R -> Prop
x: R
H: is_lub E x
Hclas: forall x0 : R, x0 < x -> exists y : R, E y /\ y > x0
H': x < 1P \/ ~ PP: Prop
E:= fun x : R => x = 0 \/ x = 1 /\ P: R -> Prop
x: R
H: is_lub E x
Hclas: forall x0 : R, x0 < x -> exists y : R, E y /\ y > x0
H': 1 <= xP \/ ~ PP: Prop
E:= fun x : R => x = 0 \/ x = 1 /\ P: R -> Prop
x: R
H: is_lub E x
Hclas: forall x0 : R, x0 < x -> exists y : R, E y /\ y > x0
H': 1 <= xPP: Prop
E:= fun x : R => x = 0 \/ x = 1 /\ P: R -> Prop
x: R
H: is_lub E x
Hclas: forall x0 : R, x0 < x -> exists y : R, E y /\ y > x0
H': 1 <= x
Hx0: 0 < xPP: Prop
E:= fun x : R => x = 0 \/ x = 1 /\ P: R -> Prop
x: R
H: is_lub E x
Hclas: forall x0 : R, x0 < x -> exists y : R, E y /\ y > x0
H': 1 <= x
Hx0: 0 < x
y: R
contra: y = 0
Hy0: y > 0PP: Prop
E:= fun x : R => x = 0 \/ x = 1 /\ P: R -> Prop
x: R
H: is_lub E x
Hclas: forall x0 : R, x0 < x -> exists y : R, E y /\ y > x0
H': 1 <= x
Hx0: 0 < x
y: R
Hp: P
Hy0: y > 0Pnow apply Rgt_not_eq in Hy0.P: Prop
E:= fun x : R => x = 0 \/ x = 1 /\ P: R -> Prop
x: R
H: is_lub E x
Hclas: forall x0 : R, x0 < x -> exists y : R, E y /\ y > x0
H': 1 <= x
Hx0: 0 < x
y: R
contra: y = 0
Hy0: y > 0Pexact Hp.P: Prop
E:= fun x : R => x = 0 \/ x = 1 /\ P: R -> Prop
x: R
H: is_lub E x
Hclas: forall x0 : R, x0 < x -> exists y : R, E y /\ y > x0
H': 1 <= x
Hx0: 0 < x
y: R
Hp: P
Hy0: y > 0PP: Prop
E:= fun x : R => x = 0 \/ x = 1 /\ P: R -> Prop
x: R
H: is_lub E x
Hclas: forall x0 : R, x0 < x -> exists y : R, E y /\ y > x0
H': x < 1P \/ ~ PP: Prop
E:= fun x : R => x = 0 \/ x = 1 /\ P: R -> Prop
x: R
H: is_lub E x
Hclas: forall x0 : R, x0 < x -> exists y : R, E y /\ y > x0
H': x < 1~ Papply (Rlt_not_le _ _ H'), H; now right. Qed.P: Prop
E:= fun x : R => x = 0 \/ x = 1 /\ P: R -> Prop
x: R
H: is_lub E x
Hclas: forall x0 : R, x0 < x -> exists y : R, E y /\ y > x0
H': x < 1
HP: PFalse
LEM implies supremum axiom
Now, let us show that the strong version of LEM implies the supremum axiom. We do this by showing that in constructive setting we can derive a negated form of supremum where the exists y:R, E y /\ y > x part gets replaced with ~ (forall y, y > x -> ~ E y), and then using the usual classical facts we show that the original statement holds as well.
Require Import Classical.z: R
E: R -> Prop(forall y : R, y > z -> ~ E y) -> is_upper_bound E zz: R
E: R -> Prop(forall y : R, y > z -> ~ E y) -> is_upper_bound E zz: R
E: R -> Prop
H: forall y : R, y > z -> ~ E y
x: R
Ex: E xx <= zz: R
E: R -> Prop
H: forall y : R, y > z -> ~ E y
x: R
Ex: E x
r: x <= zx <= zz: R
E: R -> Prop
H: forall y : R, y > z -> ~ E y
x: R
Ex: E x
n: ~ x <= zx <= zassumption.z: R
E: R -> Prop
H: forall y : R, y > z -> ~ E y
x: R
Ex: E x
r: x <= zx <= zspecialize (H x (Rnot_le_gt x z n)); contradiction. Qed.z: R
E: R -> Prop
H: forall y : R, y > z -> ~ E y
x: R
Ex: E x
n: ~ x <= zx <= zforall E : R -> Prop, (exists l : R, is_upper_bound E l) -> (exists x : R, E x) -> {m : R | is_lub E m /\ (forall x : R, x < m -> exists y : R, E y /\ y > x)}forall E : R -> Prop, (exists l : R, is_upper_bound E l) -> (exists x : R, E x) -> {m : R | is_lub E m /\ (forall x : R, x < m -> exists y : R, E y /\ y > x)}E: R -> Prop
Hbound: exists l : R, is_upper_bound E l
Hnonempty: exists x : R, E x{m : R | is_lub E m /\ (forall x : R, x < m -> exists y : R, E y /\ y > x)}E: R -> Prop
Hbound: exists l : R, is_upper_bound E l
Hnonempty: exists x : R, E x
m: R
Hlub: is_lub E m{m : R | is_lub E m /\ (forall x : R, x < m -> exists y : R, E y /\ y > x)}E: R -> Prop
m: R
Hlub: is_lub E m{m : R | is_lub E m /\ (forall x : R, x < m -> exists y : R, E y /\ y > x)}E: R -> Prop
m: R
Hlub: is_lub E mis_lub E m /\ (forall x : R, x < m -> exists y : R, E y /\ y > x)E: R -> Prop
m: R
Hlub: is_lub E mforall x : R, x < m -> exists y : R, E y /\ y > xE: R -> Prop
m: R
Hlub: is_lub E m
x: R
Hlt: x < mexists y : R, E y /\ y > xE: R -> Prop
m: R
Hlub: is_lub E m
x: R
Hlt: x < m~ (forall y : R, y > x -> ~ E y)E: R -> Prop
m: R
Hlub: is_lub E m
x: R
Hlt: x < m
Hclass: ~ (forall y : R, y > x -> ~ E y)exists y : R, E y /\ y > xE: R -> Prop
m: R
Hlub: is_lub E m
x: R
Hlt: x < m
Hcontra: is_upper_bound E xFalseE: R -> Prop
m: R
Hlub: is_lub E m
x: R
Hlt: x < m
Hclass: ~ (forall y : R, y > x -> ~ E y)exists y : R, E y /\ y > xE: R -> Prop
m: R
Hup: is_upper_bound E m
Hle: forall b : R, is_upper_bound E b -> m <= b
x: R
Hlt: x < m
Hcontra: is_upper_bound E xFalseE: R -> Prop
m: R
Hlub: is_lub E m
x: R
Hlt: x < m
Hclass: ~ (forall y : R, y > x -> ~ E y)exists y : R, E y /\ y > xE: R -> Prop
m: R
Hup: is_upper_bound E m
x: R
Hle: m <= x
Hlt: x < m
Hcontra: is_upper_bound E xFalseE: R -> Prop
m: R
Hlub: is_lub E m
x: R
Hlt: x < m
Hclass: ~ (forall y : R, y > x -> ~ E y)exists y : R, E y /\ y > x(* classical part starts here *)E: R -> Prop
m: R
Hlub: is_lub E m
x: R
Hlt: x < m
Hclass: ~ (forall y : R, y > x -> ~ E y)exists y : R, E y /\ y > xE: R -> Prop
m: R
Hlub: is_lub E m
x: R
Hlt: x < m
y: R
Hclass: ~ (y > x -> ~ E y)E y /\ y > xnow apply NNPP in HnotnotEy. Qed.E: R -> Prop
m: R
Hlub: is_lub E m
x: R
Hlt: x < m
y: R
Hyx: y > x
HnotnotEy: ~ ~ E yE y /\ y > x