Coq中实数的强完备性公理
以下是Coq标准库中定义的完整性公理Coq中实数的强完备性公理,coq,real-number,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
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 }.
定义是上界(E:R->Prop)(m:R):=对于所有x:R,ex->x Prop):=存在m:R,是上界em。
定义为润滑(E:R->Prop)(m:R):=
是上界em/\(对于所有b:R,是上界eb->m Prop,
界E->(存在x:R,ex)->{m:R | is_lub E m}。
假设我加进去
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))}.
Axiom supremum:forall E:R->Prop,
(存在l:R,是上界EL)->
(存在x:R,E x)->
{m:R|is_lub E m/\(对于所有x:R,x存在y:R,(ey/\y>x))}。
这是必需的吗?(即它是否遵循其他部分)是否存在一致性问题?此外,为什么这不是标准库中的定义(我猜这部分是主观的).你的
上确界
公理等同于排除中间定律,换句话说,通过引入这一公理,你将经典逻辑带到了桌面上
完备性
公理已经暗示了排除中间定律的一种形式,如sig_not_dec
引理(模块)所示,该引理说明了否定公式的可判定性:
Lemma sig_not_dec : forall P : Prop, {~~ P} + {~ P}.
supremum
axiom意味着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.
LEM意味着上确界
公理
现在,让我们证明LEM的强版本暗示了上确界
公理。我们通过证明在构造设置中,我们可以导出上确界
的否定形式,其中存在y:R,ey/\y>x
部分被替换为~(对于所有y,y>x->~ey)
,然后使用通常的经典事实证明原始语句也成立
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.
需要导入经典。
引理助手(z:R)(E:R->Prop):
(对于所有y,y>z->~eyy)->是上界ez。
证明。
介绍H x Ex。
自毁(Rle_dec x z)。
-假设。
-专门化(hx(Rnot_le_gt xzn));矛盾。
Qed。
上引理:对于所有E:R->Prop,
(存在l:R,是上界EL)->
(存在x:R,E x)->
{m:R | is_lub E m/\(对于所有x:R,x存在y:R,ey/\y>x)}。
证明。
导言E Hbound Hnonempty。
作为[m Hlub]的姿势证明(完整性E Hbound Hnonempty)。
清清楚楚。
存在m.分割;自动。
简介x Hlt。
断言(~(对于所有y,y>x->~eyy))为Hclass。
介绍Hcontra;在Hcontra中应用帮助程序。
将Hlub分解为[Hup-Hle]。
专门化(Hle x Hcontra)。
用矛盾来解决问题。
(*经典部分从这里开始*)
当[y Hclass];存在y时,应用不在Hclass中的所有(不在Hclass中)。
以[Hyx HnotnotEy]的形式将暗示_应用于_和Hclass中。
现在在HnotnotEy中应用NNPP。
Qed。