User talk:Wvbailey/Function definitions
Appearance
test cases for article
- f is a subset of u x v
- the projection of f onto u concides with all of u
- each element of u corresponds to exaclty one element of v —Preceding unsigned comment added by Wvbailey (talk • contribs) 22:00, 30 September 2007 (UTC)
- ∀z(z ∈ f ⇒ (∃u1 ∃v1 (u1∈u ⋀ v1∈v ⋀ "z = <u1, v1>")))
- ⋀ ∀u1 (u1∈u ⇒ ∃z(v1∈v ⋀ "z=<u1,v1" ⋀ z∈f))
- ⋀ ∀y1 ∀v1 ∀v2 (∃z1 ∃z2 (z1 ∈f ⋀ z2 ∈f ⋀ "z1 = <u1, v1>" ⋀ "z2 ⋀ <u1, v2>" ) ⇒ v1 = v2
The following is a division algorithm that, in a counter machine, produces the quotient q in register (at location) Q and residue (remainder) r at location R, i.e. [Q] = q and [R] = r. Given an n in N, it computes: n = q + r/x.
- " DEFINITION 1. x is a fraction ⇔ (∃m)(∃n)(n ≠ 0 & x = <m, n>) " (Suppes Axiomatic Set Theory 1972:162)
- The relation ⋍f is defined as follows:
- m1/n1 ⋍f m2/n2 ⇔ m1n2 = m2n2
- " DEFINITION 38. x is a sequence if and only if x is a function on the set ω of natural numbers." (p. 174)
- " DEFINITION 40. If x is a sequence, < x1, x2, . . ., xn, . . .> = x (p. 174)
- "Every real number can be uniquely represented by a non-terminating decimal [i.e. made of a string of integers]" (p. 189)
- "THEOREM 56. Let r be an integer ≥ 2. Every real number x is uniquiely representable with respect to the radix r as a sequence <a, d1, d2, . . ., dn, . . .> such that
- "(i) a is the largest integer equal to or less than x,
- "(ii) for all n, 0 ≤ dn < r and dn is an integer,
- "(iii) it is not the case that there is an N fsuch that for all n > N, dn = r - 1
- "(iv) the sequence whose terms cn are defined recursively by
- "c0 = a
- "cn+1 = cn + dn+1/rn+1
- "is a Cauchy sequence which converges to x. (ibid
A "Cauchy sequence" is one that converges:
- DEFINITION 44. x is a Caucy sequence of real numbers if and only if x is a sequence of real numbers and for every real number e > 0, there is a positive integer N such that for every m,n > N
- |xn - xm| < e "(ibid p. 175)
And finally,
- " DEFINITION 60. If x is a sequence of real numbers and y is the limit of x then
- " lim n→∞ xn = y "(ibid p. 185)
- "Theorem 52. A sequence of real numbers has a limit if and only if it is a Cauchy sequence." (ibid p. 185)
The
Address | Instruction | Register | If [A]=0 goto: | If [A] ≠ 0 goto | Action | Description | |
1 | clr | Q | 2 | 2 | 0 → Q | ; CLEAR: 0 => quotient | |
outer_loop: | 2 | clr | R | 3 | 3 | 0 → R | ; CLEAR: 0 => residue |
restore_D: | 3 | ldA | X | 4 | 4 | [X] → A | ; LOAD_A from X: restore input X to denominator D |
4 | stA | D | 5 | 5 | [A] → D | ; STORE_A in D: put contents of A into denominator A | |
inner_loop: | 5 | jz | D | 10 | 6 | ( [D] = 0 )*10+( [D] ≠ 0 )*6 | ; test D for 0: IF D=0 then go to quotient+1 step 10 else step 6 |
6 | jz | N | 11 | 7 | ( [D] = 0 )*10+( [D] ≠ 0 )*6 | ; test N for 0: IF N=0 then go to done step 11 else step 7 | |
7 | dcr | D | 8 | 8 | [D] - 1 → D | ;decrement denominator D | |
8 | dcr | N | 9 | 9 | [N] - 1 → D | ;decrement numerator N | |
9 | inc | R | 5 | 5 | [N] - 1 → D | ;increment residue, return to inner_loop for another round | |
quotient+1: | 10 | inc | Q | 2 | 2 | [Q] - 1 → D | ;increment quotient, return to outer_loop |
done: | 11 | H | ;halt |