Coq中实数更强的完整性公理

dav*_*vik 3 coq real-number

这是Coq标准库中定义的完整性公理.

Definition is_upper_bound (E:R -> Prop) (m:R) := forall x:R, E x -> x <= m.

Definition bound (E:R -> Prop) := exists m : R, is_upper_bound E m.

Definition is_lub (E:R -> Prop) (m:R) :=
is_upper_bound E m /\ (forall b:R, is_upper_bound E b -> m <= b).



Axiom completeness :
forall E:R -> Prop,
  bound E -> (exists x : R, E x) -> { m:R | is_lub E m }.
Run Code Online (Sandbox Code Playgroud)

假设我加入

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))}.
Run Code Online (Sandbox Code Playgroud)

这需要吗?(即它是否跟随其他人)是否存在一致性问题?另外,为什么这不是标准库中的定义(我猜这部分是主观的).

Ant*_*nov 6

你的supremum公理等同于排除中间的定律,换句话说,通过引入这个公理,你将古典逻辑带到了表格中.

所述completeness公理已经暗示了弱形式排中的规律,如图中的手段sig_not_dec引理(Rlogic模块),其中规定否定式的可判定:

Lemma sig_not_dec : forall P : Prop, {~~ P} + {~ P}.
Run Code Online (Sandbox Code Playgroud)

supremum 公理意味着LEM

让我们使用sig_not_dec引理的标准证明来表明,通过更强的完备性公理(supremum),我们可以推导出被排除在中的法则的强形式.

Lemma supremum_implies_lem : forall P : Prop, P \/ ~ P.
Proof.
intros P.
set (E := fun x => x = 0 \/ (x = 1 /\ P)).
destruct (supremum E) as (x & H & Hclas).
  exists 1. intros x [->|[-> _]].
  apply Rle_0_1. apply Rle_refl. exists 0; now left.
destruct (Rle_lt_dec 1 x) as [H'|H'].
- left.
  pose proof (Rlt_le_trans 0 1 x Rlt_0_1 H') as Hx0.
  destruct (Hclas 0 Hx0) as (y & [contra | (_ & Hp)] & Hy0).
  + now apply Rgt_not_eq in Hy0.
  + exact Hp.
- right. intros HP.
  apply (Rlt_not_le _ _ H'), H; now right.
Qed.
Run Code Online (Sandbox Code Playgroud)

LEM意味着supremum公理

现在,让我们证明LEM的强大版本意味着supremum公理.我们这样做是通过表明在建设性设置中我们可以得到一个否定形式supremumexists y:R, E y /\ y > x部分被替换的地方~ (forall y, y > x -> ~ E y),然后使用通常的经典事实我们​​表明原始声明也是如此.

Require Import Classical.

Lemma helper (z : R) (E : R -> Prop) :
    (forall y, y > z -> ~ E y) -> is_upper_bound E z.
Proof.
  intros H x Ex.
  destruct (Rle_dec x z).
  - assumption.
  - specialize (H x (Rnot_le_gt x z n)); contradiction.
Qed.

Lemma 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)}.
Proof.
  intros E Hbound Hnonempty.
  pose proof (completeness E Hbound Hnonempty) as [m Hlub].
  clear Hbound Hnonempty.
  exists m. split; auto.
  intros x Hlt.
  assert (~ (forall y, y > x -> ~ E y)) as Hclass.
    intro Hcontra; apply helper in Hcontra.
    destruct Hlub as [Hup Hle].
    specialize (Hle x Hcontra).
    apply Rle_not_lt in Hle; contradiction.
  (* classical part starts here *)
  apply not_all_ex_not in Hclass as [y Hclass]; exists y.
  apply imply_to_and in Hclass as [Hyx HnotnotEy].
  now apply NNPP in HnotnotEy.
Qed.
Run Code Online (Sandbox Code Playgroud)