The quotient field of interval-Cauchy sequences #
Computableℝ is the quotient of ComputableℝSeq by the equivalence relation of
converging to the same real value. This file equips it with its commutative ring,
field, and linear order structures. The ring operations are executable interval
arithmetic; inversion and the comparison Decidable instances go through the
classical ComputableℝSeq.sign and are noncomputable.
Computable reals, defined as the quotient of ComputableℝSeq sequences -- sequences with Cauchy sequences of lower and upper bounds that converge to the same value -- by the equivalence relation of having the same converged value. This is similar to how reals are quotients of Cauchy sequence (without any guarantees on lower/upper bounds).
Equations
Instances For
Alternate version of mapℝ that doesn't directly refer to f₂, so it stays computable even if f₂ isn't.
Equations
- Computableℝ.mapℝ' f h = Quotient.map f ⋯
Instances For
Given a unary function on sequences that clearly matches function on reals, lift it.
Equations
- Computableℝ.mapℝ f h = Computableℝ.mapℝ' f ⋯
Instances For
Alternate version of map₂ℝ that doesn't directly refer to f₂, so it stays computable even if f₂ isn't.
Equations
- Computableℝ.map₂ℝ' f h = Quotient.map₂ f ⋯
Instances For
Given a binary function that clearly mimics a standard real function, lift that.
Equations
- Computableℝ.map₂ℝ f h = Computableℝ.map₂ℝ' f ⋯
Instances For
Equations
- Computableℝ.instComputableAdd = { add := Computableℝ.map₂ℝ (fun (x1 x2 : ComputableℝSeq) => x1 + x2) ComputableℝSeq.val_add }
Equations
- Computableℝ.instComputableMul = { mul := Computableℝ.map₂ℝ (fun (x1 x2 : ComputableℝSeq) => x1 * x2) ComputableℝSeq.val_mul }
Equations
- Computableℝ.instComputableNeg = { neg := Computableℝ.mapℝ (fun (x : ComputableℝSeq) => -x) ComputableℝSeq.val_neg }
Equations
- Computableℝ.instComputableSub = { sub := Computableℝ.map₂ℝ (fun (x1 x2 : ComputableℝSeq) => x1 - x2) ComputableℝSeq.val_sub }
Equations
- Computableℝ.instComputableZero = { zero := Computableℝ.mk 0 }
Equations
- Computableℝ.instComputableOne = { one := Computableℝ.mk 1 }
Equations
- One or more equations did not get rendered due to their size.
Auxiliary inverse definition that operates on the nonzero Computableℝ values.
Equations
Instances For
Inverse of a nonzero Computableℝ, safe (terminating) as long as x is nonzero.
Equations
- x.safeInv hnz = ↑(Computableℝ.safeInv' ⟨x, hnz⟩)
Instances For
Equations
- Computableℝ.instComputableInv = { inv := Computableℝ.mapℝ' (fun (x : ComputableℝSeq) => x⁻¹) Computableℝ.instComputableInv._proof_1 }
Equations
- One or more equations did not get rendered due to their size.
Definition of lt.
Equations
- x.lt y = Quotient.lift (fun (z : ComputableℝSeq) => z.sign = SignType.pos) Computableℝ.lt._proof_1 (y - x)
Instances For
Equations
- Computableℝ.instLT = { lt := Computableℝ.lt }
Definition of le.
Equations
- x.le y = Quotient.lift (fun (z : ComputableℝSeq) => SignType.zero ≤ z.sign) Computableℝ.le._proof_1 (y - x)
Instances For
Equations
- Computableℝ.instLE = { le := Computableℝ.le }
Equations
- a.instDecidableLE b = id (⋯.mpr inferInstance)
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.