我正在尝试使用柯西的有理序列构造实数。
(* Some Definitions:
<Q, >Q, <=Q, >=Q: the order in rational
Q0: the zero as a rational number
-Q: the subtractions b/w rationals
Q_abs: the abs value of a rational *)
Definition Cauchy (a: nat -> rational): Prop :=
forall (epsilon: rational), epsilon >Q Q0 ->
exists (N: nat), forall (n m: nat), n > N -> m > N -> Q_abs (a n -Q a m) <Q epsilon.
Definition real: Set := {r: nat -> rational | Cauchy r}.
Definition R_ne_0 (a: nat -> rational): Prop :=
exists epsilon: rational, (
epsilon >Q Q0 /\
forall N: nat, exists n: nat, (n > N /\ Q_abs (a n) >=Q epsilon)
).
Definition R_nonzero: Set := {a : real | R_ne_0 (proj1_sig a)}.
但是,我无法在destruct
中R_ne_0
存在声明,因为它需要对Set
进行案例分析:
Definition R_recip (a: R_nonzero): R_nonzero. (* r |-> 1/r *)
destruct a as [[a c] n].
unfold R_ne_0 in n.
destruct n. (* !!!ERROR!!! *)
有没有办法使用R_nonzero
的适当定义(在构造数学中)定义这种倒数?或者,有什么方法可以避免(或忽略)通常的数学错误?
我知道在mathcomp中,实数被构造为阿基米德场,并且我想知道是否存在一种可能的方法来定义柯西序列。