Extensional constructive analysis via locators Auke Booij - - PowerPoint PPT Presentation

extensional constructive analysis via locators
SMART_READER_LITE
LIVE PREVIEW

Extensional constructive analysis via locators Auke Booij - - PowerPoint PPT Presentation

Extensional constructive analysis via locators Auke Booij University of Birmingham 11 April 2019 Real number computation in Haskell 1 We work with the signed unit interval I=[-1,1], using binary notation with signed digits. Alphabet of digits


slide-1
SLIDE 1

Extensional constructive analysis via locators

Auke Booij

University of Birmingham

11 April 2019

slide-2
SLIDE 2

Real number computation in Haskell1

We work with the signed unit interval I=[-1,1], using binary notation with signed digits. Alphabet of digits -1,0,1: > type Digit = Int Representation of the space I=[-1,1]: > type I = [Digit] A sequence ds = [d_0, d_1, ..., d_n, ...] represents the number x = d_0 / 2 + d_1 / 4 + d_2 / 8 + ... + d_n / 2^{n+1} + ... > zero, one, minusHalf :: I > zero = repeat 0 > one = repeat 1 > minusHalf = -1 : repeat 0 Truncated x+1 as a function [-1,1] -> [-1,1], that is, x |-> min(x+1,1): > addOne :: I -> I > addOne ( 1 : x) = one > addOne ( 0 : x) = 1 : addOne x > addOne (-1 : x) = 1 : x

1Martín Escardó,

https://www.cs.bham.ac.uk/~mhe/papers/fun2011.lhs

slide-3
SLIDE 3

Dedekind reals in Coq2

(** A Dedekind cut is represented by the predicates [lower] and [upper], satisfying a number of conditions. *) Structure R := { (* The cuts are represented as propositional functions, rather than subsets, as there are no subsets in type theory. *) lower : Q -> Prop; upper : Q -> Prop; (* The cuts respect equality on Q. *) lower_proper : Proper (Qeq ==> iff) lower; upper_proper : Proper (Qeq ==> iff) upper; (* The cuts are inabited. *) lower_bound : {q : Q | lower q}; upper_bound : {r : Q | upper r}; (* The lower cut is a lower set. *) lower_lower : forall q r, q < r -> lower r -> lower q; (* The lower cut is open. *) lower_open : forall q, lower q -> exists r, q < r /\ lower r; (* The upper cut is an upper set. *) upper_upper : forall q r, q < r -> upper q -> upper r; (* The upper cut is open. *) upper_open : forall r, upper r -> exists q, q < r /\ upper q; (* The cuts are disjoint. *) disjoint : forall q, ~ (lower q /\ upper q); (* There is no gap between the cuts. *) located : forall q r, q < r -> lower q \/ upper r }. (** Strict order. *) Definition Rlt (x y : R) := exists q : Q, upper x q /\ lower y q. (** Non-strict order. *) Definition Rle (x y : R) := forall q, lower x q -> lower y q. (** Equality. *) Definition Req (x y : R) := Rle x y /\ Rle y x.

2Andrej Bauer,

https://github.com/andrejbauer/dedekind-reals

slide-4
SLIDE 4

Logic, types, propositions

Logic Propositions-as-types Univalent logic ⊤ 1 same ⊥ same P ∧ Q P × Q same P ⇒ Q P → Q same P ⇔ Q (P → Q) × (Q → P) same ¬P P → 0 same P ∨ Q P + Q P + Q ∀(x : A).P(x) Π(x : A).P(x) same ∃(x : A).P(x) Σ(x : A).P(x) Σ(x : A).P(x)

slide-5
SLIDE 5

(H)Propositions

For P : U: isHProp(P) ≔ Π(p, q : P).p =P q HProp ≔ Σ(P : U). isHProp(P) Any X : U can be truncated to a proposition: X

  • X

The universal property says that for any Q : HProp we have: X X Q

| · | ∃!

slide-6
SLIDE 6

Dedekind reals (1/2)

Let q, r : Q and x = (L, U) a pair of predicates on Q, that is, L, U : Q → HProp, then we write (q < x) ≔ (q ∈ L) and (x < r) ≔ (r ∈ U). L )( U Q

slide-7
SLIDE 7

Dedekind reals: property or structure?

Axiom Univalent logic lower bounded ∃(q : Q).q < x upper bounded ∃(r : Q).x < r lower closed ∀(q, q′ : Q).(q < q′) ∧ (q′ < x) ⇒ q < x upper closed ∀(r, r′ : Q).(r′ < r) ∧ (x < r′) ⇒ x < r lower open ∀(q : Q).q < x ⇒ ∃(q′ : Q).(q < q′) ∧ (q′ < x) upper open ∀(r : Q).x < r ⇒ ∃(r′ : Q).(r′ < r) ∧ (x < r′) transitive ∀(q, r : Q).(q < x) ∧ (x < r) ⇒ (q < r) located ∀(q, r : Q).(q < r) ⇒ (q < x) ∨ (x < r)

slide-8
SLIDE 8

Dedekind reals: property or structure?

Axiom Propositions-as-types lower bounded Σ(q : Q).q < x upper bounded Σ(r : Q).x < r lower closed Π(q, q′ : Q).(q < q′) × (q′ < x) → q < x upper closed Π(r, r′ : Q).(r′ < r) × (x < r′) → x < r lower open Π(q : Q).q < x → Σ(q′ : Q).(q < q′) × (q′ < x) upper open Π(r : Q).x < r → Σ(r′ : Q).(r′ < r) × (x < r′) transitive Π(q, r : Q).(q < x) × (x < r) → (q < r) located Π(q, r : Q).(q < r) → (q < x) + (x < r)

slide-9
SLIDE 9

Dedekind reals (2/2)

We let isCut(L, U) denote the conjunction of the conditions, phrased in univalent logic. We let isCut§(L, U) denote the conjunction of the conditions, phrased in propositions-as-types. The type of Dedekind reals is RD ≔ { (L, U) : (Q → HProp) × (Q → HProp) | isCut(L, U) } . x < y ≔ ∃(q : Q).x < q < y

slide-10
SLIDE 10

Locators: definition

Recall that x = (L, U) is located if ∀(q, r : Q).(q < r) ⇒ (q < x) ∨ (x < r). A locator for x : RD is the data/structure (not unique for a given x) locator(x) ≔ Π(q, r : Q).q < r → (q < x) + (x < r). The set of all Dedekind reals with locators: RL

D ≔ Σ(x : RD). locator(x)

slide-11
SLIDE 11

Bounders from locators

Given x : RD with ℓ : locator(x), we can obtain a lower bound of x. Precisely, we prove: Π(x : RD). locator(x) → Σ(q : Q).q < x. (By the same argument we will be able to get an upper bound.)

slide-12
SLIDE 12

Bounders from locators (2/2)

Recall that Dedekind reals are bounded in the sense that ∃(q : Q).q < x ≔ Σ(q : Q).q < x. Σ(q : Q).q < x Σ(q : Q).q < x Σ(q : Q).q < x

| · | id ?

slide-13
SLIDE 13

Bounders from locators (2/2)

Recall that Dedekind reals are bounded in the sense that ∃(q : Q).q < x ≔ Σ(q : Q).q < x. Σ(q : Q).q < x Σ(q : Q).q < x Q Σ(q : Q).q < x

| · | ??? ∃! projection

slide-14
SLIDE 14

Locators: visualization

Suppose ℓ : locator(x) and q, r : Q and ν : q < r. What is ℓ(q, r,ν)? (NB: ℓ(q, r,ν) : (q < x) + (x < r).) x q < r RD x q < r RD x q r RD

slide-15
SLIDE 15

Locators: visualization

Suppose ℓ : locator(x) and q, r : Q and ν : q < r. What is ℓ(q, r,ν)? (NB: ℓ(q, r,ν) : (q < x) + (x < r).) x q < r RD A: The locator must have answered q < x, because x < r is false. x q < r RD x q r RD

slide-16
SLIDE 16

Locators: visualization

Suppose ℓ : locator(x) and q, r : Q and ν : q < r. What is ℓ(q, r,ν)? (NB: ℓ(q, r,ν) : (q < x) + (x < r).) x q < r RD A: The locator must have answered q < x, because x < r is false. x q < r RD A: The locator must have answered x < r, because q < x is false. x q r RD

slide-17
SLIDE 17

Locators: visualization

Suppose ℓ : locator(x) and q, r : Q and ν : q < r. What is ℓ(q, r,ν)? (NB: ℓ(q, r,ν) : (q < x) + (x < r).) x q < r RD A: The locator must have answered q < x, because x < r is false. x q < r RD A: The locator must have answered x < r, because q < x is false. x q r RD A: The locator can answer both q < x and x < r.

slide-18
SLIDE 18

Decidable propositions

A proposition P : HProp is decidable if we have P + ¬P. We have the type DHProp ≔ Σ(P : HProp).P + ¬P

  • f decidable propositions.
slide-19
SLIDE 19

Locators as decidable propositions

Lemma

The type locator(x) is equivalent to the type Σ(locatesRight : Π(q, r : Q).q < r → DHProp). (Π(q, r : Q).Π(ν : q < r). locatesRight(q, r,ν) → q < x) × (Π(q, r : Q).Π(ν : q < r).¬ locatesRight(q, r,ν) → x < r).

Proof.

Given a locator ℓ : Π(q, r : Q).q < r → (q < x) + (x < r), define locatesRight(q, r,ν) to be true when the locator determines x to be

  • n the right of the lower bound q, that is, when the locator lands in

the lef summand, and false when the locator determines x to be on the lef of the lower bound r. Straightforwardly, locatesRight satisfies the two conditions. In the other direction, given locatesRight, we obtain a locator by seting ℓ(q, r,ν) to locate q < x when locatesRight(q, r,ν), and to locate x < r otherwise.

slide-20
SLIDE 20

Locator notation

For a real x with a locator ℓ and rationals q, r with ν : q < r, we write locatesRight(q <ℓ

x r)

  • r

locatesRight(q <x r) for the decidable proposition locatesRight(q, r,ν). We write locatesLef(q <ℓ

x r)

  • r

locatesLef(q <x r) for the decidable proposition ¬ locatesRight(q <x r): so it is the proposition which is true if we locate x < r.

slide-21
SLIDE 21

Locators: visualization

Suppose x has a locator. What does the locator say about q < r? x q < r RD locatesRight(q <ℓ

x r):

We locate q < x. x q < r RD locatesLef(q <ℓ

x r):

We locate x < r. x q r RD locatesRight(q <ℓ

x r) or locatesLef(q <ℓ x r)

slide-22
SLIDE 22

Locators: examples (1/2)

By trichotomy of the rationals, namely for all s, t : Q, (s < t) + (s = t) + (s > t), the rationals have locators. r q < Q

slide-23
SLIDE 23

Locators: examples (1/2)

By trichotomy of the rationals, namely for all s, t : Q, (s < t) + (s = t) + (s > t), the rationals have locators. r q < Q ◮ s < q: then s < q < r so we locate s < r (lef) ◮ s = q: then s = q < r so we locate s < r (lef) ◮ s > q: then we locate q < s (right)

slide-24
SLIDE 24

Locators: examples (1/2)

By trichotomy of the rationals, namely for all s, t : Q, (s < t) + (s = t) + (s > t), the rationals have locators. r q < Q ◮ s < r: then we locate s < r (lef) ◮ s = r: then q < r = s so we locate q < s (right) ◮ s > r: then q < r < s so we locate q < s (right)

slide-25
SLIDE 25

Locators: examples (2/2)

◮ 0 and 1 are have locators. ◮ If x and y have locators, then so do −x, x + y, x · y, x−1 (assuming x # 0), min(x, y) and max(x, y). ◮ If all values of a Cauchy sequence with modulus come equipped with locators, then the limit has a locator, too. (As we’ll see later, in some sense, these are the only examples.)

slide-26
SLIDE 26

Bounded search (1/2)3

Let P : N → DHProp. Recall that ∃(n : N).P(n) = Σ(n : N).P(n). Objective: to obtain Σ(n : N).P(n). Σ(n : N).P(n) ∃(n : N).P(n) Σ(n : N).P(n)

| · | id ?

3Escardó 2013

slide-27
SLIDE 27

Bounded search (1/2)3

Let P : N → DHProp. Recall that ∃(n : N).P(n) = Σ(n : N).P(n). Objective: to obtain Σ(n : N).P(n). Σ(n : N).P(n) ∃(n : N).P(n) Σ(n : N).P(n) × minimal(n, P) Σ(n : N).P(n)

| · | bounded search ∃! projection

minimal(n, P) ≔ Π(k ≤ n).P(k) → n = k

3Escardó 2013

slide-28
SLIDE 28

Bounded search (1/2)3

Let e : N ≃ A be an equivalence. Let P : A → DHProp. Recall that ∃(a : A).P(a) = Σ(a : A).P(a). Objective: to obtain Σ(a : A).P(a). Σ(a : A).P(a) ∃(a : A).P(a) Σ(a : A).P(a) × minimal(e−1(a), P ◦ e) Σ(a : A).P(a)

| · | bounded search ∃! projection

minimal(n, P ′) ≔ Π(k ≤ n).P ′(k) → n = k

3Escardó 2013

slide-29
SLIDE 29

Bounded search (2/2)

Corollary

Let A be a type and e : N ≃ A be an equivalence. Let P : A → DHProp. If ∃(a : A).P(a) then we can construct an element of Σ(a : A).P(n).

slide-30
SLIDE 30

Bounders from locators (continued)

Given x : RD, ℓ : locator(x). P(q) ≔ locatesRight(q − 1 <ℓ

x q)

P : Q → DHProp We need ∃(q : Q).P(q).

slide-31
SLIDE 31

Reasoning about ordered numbers

Lemma

For any real x with a locator ℓ and rationals q < r, ¬(q < x) ⇒ locatesLef(q <ℓ

x r),

and ¬(x < r) ⇒ locatesRight(q <ℓ

x r).

slide-32
SLIDE 32

Locators as decidable propositions

Lemma

The type locator(x) is equivalent to the type Σ(locatesRight : Π(q, r : Q).q < r → DHProp). (Π(q, r : Q).Π(ν : q < r). locatesRight(q, r,ν) → q < x) × (Π(q, r : Q).Π(ν : q < r).¬ locatesRight(q, r,ν) → x < r).

Proof.

Given a locator ℓ : Π(q, r : Q).q < r → (q < x) + (x < r), define locatesRight(q, r,ν) to be true when the locator determines x to be

  • n the right of the lower bound q, that is, when the locator lands in

the lef summand, and false when the locator determines x to be on the lef of the lower bound r. Straightforwardly, locatesRight satisfies the two conditions. In the other direction, given locatesRight, we obtain a locator by seting ℓ(q, r,ν) to locate q < x when locatesRight(q, r,ν), and to locate x < r otherwise.

slide-33
SLIDE 33

Reasoning about ordered numbers

Lemma

For any real x with a locator ℓ and rationals q < r, ¬(q < x) ⇒ locatesLef(q <ℓ

x r),

and ¬(x < r) ⇒ locatesRight(q <ℓ

x r).

Proof.

locatesRight(q <ℓ

x r) ⇒ (q < x)

¬(q < x) ⇒ ¬ locatesRight(q <ℓ

x r)

¬ locatesRight(q <ℓ

x r) ⇒ (x < r)

¬(x < r) ⇒ ¬¬ locatesRight(q <ℓ

x r)

slide-34
SLIDE 34

Reasoning about ordered numbers

Lemma

For any real x with a locator ℓ and rationals q < r, ¬(q < x) ⇒ locatesLef(q <ℓ

x r),

and ¬(x < r) ⇒ locatesRight(q <ℓ

x r).

Proof.

locatesRight(q <ℓ

x r) ⇒ (q < x)

¬(q < x) ⇒ ¬ locatesRight(q <ℓ

x r)

¬ locatesRight(q <ℓ

x r) ⇒ (x < r)

¬(x < r) ⇒ ¬¬ locatesRight(q <ℓ

x r)

slide-35
SLIDE 35

Bounders from locators (continued)

Given x : RD, ℓ : locator(x). P(q) ≔ locatesRight(q − 1 <ℓ

x q)

P : Q → DHProp We need ∃(q : Q).P(q). The boundedness property of x gives ∃(q : Q).q < x. For any lower bound q, we have ¬(x < q), and hence P(q). Hence ∃(q : Q).P(q). Hence we obtain Σ(q : Q).P(q), and in particular Σ(q : Q).q − 1 < x and so Σ(q : Q).q < x.

slide-36
SLIDE 36

Bounders from locators (continued)

Given x : RD, ℓ : locator(x). P(q) ≔ locatesRight(q − 1 <ℓ

x q)

P : Q → DHProp We need ∃(q : Q).P(q). The boundedness property of x gives ∃(q : Q).q < x. For any lower bound q, we have ¬(x < q), and hence P(q). Hence ∃(q : Q).P(q). Hence we obtain Σ(q : Q).P(q), and in particular Σ(q : Q).q − 1 < x and so Σ(q : Q).q < x.

slide-37
SLIDE 37

Archimedean principle

By definition of <, all x, y : RD satisfy the archimedean property x < y ⇒ ∃(q : Q).x < q < y.

Theorem

Reals x, y with locators have the archimedean structure x < y → Σ(q : Q).x < q < y.

Proof.

Let (x, ℓx), (y, ℓy) : RL

  • D. By applying the archimedean property twice,

there exist q : Q and ε : Q+ with x < q − ε < q + ε < y. For a given pair (q′,ε′) : Q × Q+, the following property is decidable P(q′,ε′) ≔ locatesLef(q′ − ε′ <ℓx

x q′) ∧ locatesRight(q′ < ℓy y q′ + ε′).

If P(q′,ε′) then x < q′ < y. But necessarily P(q,ε), and hence using bounded search we can find a pair (q′,ε′).

slide-38
SLIDE 38

Dedekind reals: property or structure?

Axiom Propositions-as-types lower bounded Σ(q : Q).q < x upper bounded Σ(r : Q).x < r lower closed Π(q, q′ : Q).(q < q′) × (q′ < x) → q < x upper closed Π(r, r′ : Q).(r′ < r) × (x < r′) → x < r lower open Π(q : Q).q < x → Σ(q′ : Q).(q < q′) × (q′ < x) upper open Π(r : Q).x < r → Σ(r′ : Q).(r′ < r) × (x < r′) transitive Π(q, r : Q).(q < x) × (x < r) → (q < r) located Π(q, r : Q).(q < r) → (q < x) + (x < r)

slide-39
SLIDE 39

Dedekind cuts structure

Lemma

Let x : RL

D be a real equipped with a locator. Then we obtain a lower

  • pener, that is:

Π(q : Q).q < x → Σ(q′ : Q).(q < q′) × (q′ < x).

Proof.

Let q : Q and q < x. The rational number q, seen as a Dedekind real, has a locator, and hence we can apply our archimedean structure to

  • btain Σ(q′ : Q).q < q′ < x.
slide-40
SLIDE 40

Field operations structure

For x, y : RL

D, the definitions of the ring structure on the dedekind

reals can be strengthened. For q, r : Q, we obtain: q < x + y ⇔ Σ(s, t : Q).(q = s + t) ∧ s < x ∧ t < y x + y < r ⇔ Σ(s, t : Q).(r = s + t) ∧ x < s ∧ y < t q < −x ⇔ Σ(r : Q).q = −r ∧ x < r −x < r ⇔ Σ(q : Q).r = −q ∧ q < x q < x · y ⇔ Σ(a, b, c, d : Q).q < min(a · c, a · d, b · c, b · d) ∧ a < x < b ∧ c < y < d . . .

slide-41
SLIDE 41

Strong cotransitivity

Cotransitivity x < y ⇒ x < z ∨ z < y strengthens to x < y → (x < z) + (z < y) for x, y, z : RL

D.

Collectively, these “structure from property” results suggest that many constructions on the Dedekind reals will lif to reals with locators.

slide-42
SLIDE 42

Reals with locators and Cauchy reals (1/3)

Suppose we have a locator for x : RD. We define a Cauchy sequence of rationals that approximates x. To approximate x up to some error ε : Q+, apply the archimedean structure to x − ε < x + ε. This yields a rational xε with x − ε < xε < x + ε, i.e. |x − xε | < 2ε.

slide-43
SLIDE 43

Reals with locators and Cauchy reals (2/3)

Theorem

Given a sequence (xn)n of reals equipped with locators, that is, x· : N → RL

  • D. If (xn)n converges with modulus of Cauchy convergence

M, we can find a locator for the limit.

Corollary

Given a rationally-valued sequence (xn)n, that is, x· : N → Q, with modulus of Cauchy convergence M, we can find a locator for the limit.

slide-44
SLIDE 44

Reals with locators and Cauchy reals (3/3)

Corollary

The following are equivalent for x : RD:

  • 1. locator(x), that is, there exists a locator for x.
  • 2. There exists a signed-digit representation of x.
  • 3. There exists a Cauchy sequence of rationals that x is the limit of.
  • 4. isCauchyReal(x).
slide-45
SLIDE 45

Position of truncation

Let x : RD. Π(q, r : Q).q < r → (q < x) + (x < r) This expresses that x is located (property) in the sense of Dedekind

  • cuts. It is equivalent to:

Π(q, r : Q). q < r → (q < x) + (x < r) . It is not equivalent to Π(q, r : Q).q < r → (q < x) + (x < r) which expresses that there exists a locator (structure) for x.

slide-46
SLIDE 46

Locators and Dedekind reals

Theorem

For a pair x = (L, U) of predicates on the rationals we have the following:

  • 1. isCut§(x) → isCut(x),

2.

  • isCut§(x)
  • ⇒ isCut(x),
  • 3. isCut(x) × locator(x) → isCut§(x),
  • 4. isCut(x) × locator(x) ⇒ isCauchyReal(x), and

5.

  • isCut§(x)
  • ⇒ isCauchyReal(x).
slide-47
SLIDE 47

Do Dedekind reals have signed digit expansions?

Theorem

From an assignment of locators to Dedekind reals, we can construct a discontinuous real function.

Proof.

Such an assignment gives rise to a strongly non-constant map from the reals to the booleans.

  • Theorem

If, for every Dedekind real x, there exists a signed-digit expansion, then the Cauchy reals and the Dedekind reals coincide.

Proof.

x has a locator iff it has a signed digit expansion. A signed digit expansion is a Cauchy approximation whose elements are of a certain form. Conversely, if x is the limit of a rationally-valued Cauchy approximation, then it has a locator.

slide-48
SLIDE 48

Lifing locators

Let f : RD → RD. Say f is lifs locators if, whenever x comes equipped with a locator, we can construct a locator for f (x). “Lifing locators” itself is structure. NB: no coherence conditions. RL

D

RL

D

RD RD

pr1

  • pr1

f

slide-49
SLIDE 49

Continuity

f : RD → RD is continuous at x : RD if ∀(ε : Q+).∃(δ : Q+).∀(y : RD). |x − y| < δ ⇒ |f (x) − f (y)| < ε f is pointwise continuous if it is continuous at all x : RD. f is uniformly continuous on [a, b] if it has a modulus of continuity ω : Q+ → Q+ for [a, b], i.e.: ∀(x, y ∈ [a, b]). |x − y| < ω(ε) ⇒ |f (x) − f (y)| < ε

slide-50
SLIDE 50

Riemann integration

Suppose: ◮ f : RD → RD is uniformly continuous on [a, b], and ◮ a and b have locators, and ◮ f lifs locators then ∫ b

a f (x) dx has a locator.

Proof.

The integral ∫ b

a f (x) dx can be computed as

lim

n→∞

b − a n Σ(k = 0).n−1f

  • a + k · b − a

n

  • .

In this sequence, every value b − a n

n−1

  • k=0

f

  • a + k · b − a

n

  • .

comes equipped with a locator, and the sequence has a modulus of Cauchy convergence. Hence the limit has a locator.

slide-51
SLIDE 51

Riemann integration

Suppose: ◮ f : RD → RD is uniformly continuous on [a, b], and ◮ a and b have locators, and ◮ f lifs locators then ∫ b

a f (x) dx has a locator.

Proof.

The integral ∫ b

a f (x) dx can be computed as

lim

n→∞

b − a n Σ(k = 0).n−1f

  • a + k · b − a

n

  • .

In this sequence, every value b − a n

n−1

  • k=0

f

  • a + k · b − a

n

  • .

comes equipped with a locator, and the sequence has a modulus of Cauchy convergence. Hence the limit has a locator.

slide-52
SLIDE 52

Exact IVT (1/3)

f : RD → RD is locally nonconstant if for all x < y and t : RD, there exists z : RD with x < z < y and f (z) # t (namely, f (z) is apart from t, meaning f (z) > t ∨ f (z) < t). Theorem: Suppose ◮ f is pointwise continuous, and ◮ f is locally nonconstant, and ◮ x, y and t have locators, and ◮ f lifs locators then we can find r : Q with x < r < y and f (r) # t. (“strong local nonconstancy”)

Proof.

Since f is locally nonconstant, there exist z : RD and ε : Q+ with |f (z) − t| > ε. Since f is continuous at z, there exists q : Q with |f (q) − t| > ε/2. Since Q+ and Q are denumerable, we can find r : Q such that there exists η : Q+ with |f (r) − t| > η. In particular r satisfies |f (r) − t| > 0, that is, f (r) # t.

slide-53
SLIDE 53

Exact IVT (2/3)

Theorem

Suppose f is a pointwise continuous function, and a < b are real numbers with locators. Further suppose that f is locally nonconstant, and lifs locators, with f (a) ≤ 0 ≤ f (b). Then we can find a root of f , which comes equipped with a locator.

slide-54
SLIDE 54

Exact IVT (3/3)

Proof.

We define sequences (an)n and (bn)n with an < an+1 < bn+1 < bn, with f (an) ≤ 0 ≤ f (bn), with bn − an ≤ (b − a) 2

3

n, and such that all an and bn have locators. Set a0 = a, b0 = b. Suppose an and bn are defined, and use strong local nonconstancy to find qn with

2an+bn 3

< qn < an+2bn

3

and f (qn) # 0. ◮ If f (qn) > 0, then set an+1 ≔ 2an+bn

3

and bn+1 ≔ qn. ◮ If f (qn) < 0, then set an+1 ≔ qn and bn+1 ≔ an+2bn

3

. For a modulus of Cauchy convergence, we can compute a locator for b − a and from this we can compute a rational B with |bn − an| ≤ B 2

3

  • n. The sequences converge to a number x. For any

ε, we have |f (x)| ≤ ε, hence f (x) = 0.

slide-55
SLIDE 55

Part I Qestions, comments...

slide-56
SLIDE 56

Related work

  • R. O’Connor. “Incompleteness & Completeness: Formalizing Logic

and Analysis in Type Theory”. PhD thesis. Radboud Universiteit Nijmegen, 2009

  • R. Krebbers and B. Spiters. “Type classes for efficient exact real

arithmetic in Coq”. In: Logical Methods in Computer Science 9.1:1 (2013), pp. 1–27. doi: 10.2168/LMCS-9(1:01)2013

  • P. Schuster and H. Schwichtenberg. “Constructive Solutions of

Continuous Equations”. In: de Gruyter Series in Logic and Its

  • Applications. Ed. by G. Link. Walter de Gruyter, Jan. 2004. doi:

10.1515/9783110199680.227

  • D. Lešnik. “Unified Approach to Real Numbers in Various

Mathematical Setings”. In: ArXiv e-prints (Feb. 2014). arXiv: 1402.6645 [math.GM]

  • A. Mahboubi, G. Melquiond, and T. Sibut-Pinote. “Formally Verified

Approximations of Definite Integrals”. In: Interactive Theorem Proving–7th International Conference, ITP 2016, Nancy, France, August 22-25, 2016, Proceedings. 2016, pp. 274–289. doi: 10.1007/978-3-319-43144-4_17