Main derivation
S01 · definition
Before
a=\tfrac{33}{100},\ x=\tfrac{1}{3}After
e_{\mathrm{abs}}=|a-x|,\ e_{\mathrm{rel}}=\frac{|a-x|}{|x|}\ (x\neq 0),\ \text{within }\tau\iff |a-x|\le\tauConditions: \tau\ge 0
Rule: mko_error_def · Uses: G1, G2
Leaf basis: mko_error_def + def_intro
State the three definitions from the MKO. Absolute error keeps the scale of the quantity; relative error is defined only for x≠0 and compares the error with the reference; 'within tolerance' uses ≤, so equality counts as within.
S02 · equivalent
Before
a-x=\tfrac{33}{100}-\tfrac{1}{3}After
a-x=-\tfrac{1}{300}Conditions: 100\neq 0,\ 3\neq 0
Rule: frac_rules · Uses: G1
Leaf basis: frac_rules + numeric_evaluation
Bring both to the common denominator 300 and subtract; details in S02.1 and S02.2. The result is negative, so the approximation is below the reference.
S03 · equivalent
Before
|a-x|=\left|-\tfrac{1}{300}\right|After
|a-x|=\tfrac{1}{300}Conditions: -\tfrac{1}{300}<0
Rule: abs_rules · Uses: S02
Leaf basis: abs_rules + neg_mul
Since −1/300<0, the definition |u|=−u gives 1/300. This is the absolute error, in the same units as x.
S04 · implies
Before
x=\tfrac{1}{3}After
x\neq 0,\ |x|=\tfrac{1}{3}Conditions: \tfrac{1}{3}>0
Rule: abs_rules · Uses: G1
Leaf basis: abs_rules + order_basics
1/3>0, so x≠0 and |x|=x=1/3. This is the MKO's precondition for computing the relative error.
S05 · equivalent
Before
e_{\mathrm{rel}}=\frac{1/300}{1/3}After
e_{\mathrm{rel}}=\tfrac{1}{100}Conditions: \tfrac{1}{3}\neq 0
Rule: frac_rules · Uses: S03, S04
Leaf basis: frac_rules + mul_inverse_nonzero
By (a/b)/(c/d)=(ad)/(bc) with c≠0: (1·3)/(300·1)=3/300=1/100. The relative error is a dimensionless ratio, that is 1%.
S06 · equivalent
Before
\tfrac{1}{300}\le\tfrac{1}{250}After
250\le 300\ (\text{true}),\ \text{so }a\ \text{within }\tau_1Conditions: 300>0,\ 250>0
Rule: frac_compare · Uses: S03, G2
Leaf basis: frac_compare + order_basics
By comparison of fractions, multiplying both sides by the positive number 300·250: 1/300≤1/250 ⇔ 1·250≤1·300, which is true. So |a−x|≤τ₁ and a is within tolerance τ₁.
S07 · equivalent
Before
|a-x|\le\tau
After
x-\tau\le a\le x+\tau
Conditions: \tau\ge 0
Rule: L_tol_interval · Uses: L_tol_interval
Leaf basis: abs_rules + order_basics + case_analysis
By Lemma L_tol_interval (proved by cases in S07.1 to S07.3), the error bound is equivalent to a lying in the closed interval [x−τ, x+τ], as the MKO's second paragraph says. The library rule abs_rules gives only the strict version |u|<r, so the non-strict version is proved here.
S08 · implies
Before
[x-\tau_1,\ x+\tau_1]
After
\left[\tfrac{247}{750},\ \tfrac{253}{750}\right]\ni\tfrac{33}{100}Conditions: \tau_1\ge 0
Rule: L_tol_interval · Uses: S07, G1, G2, S06
Leaf basis: L_tol_interval + frac_compare + numeric_evaluation
A second route to S06: 1/3−1/250=250/750−3/750=247/750 and 1/3+1/250=253/750. Cross-multiplying: 33·750=24750≥247·100=24700 and 24750≤253·100=25300, so 247/750≤33/100≤253/750. By L_tol_interval this is equivalent to |a−x|≤τ₁, agreeing with S06.
S09 · equivalent
Before
\tfrac{1}{300}\le\tfrac{1}{400}\ ?After
400\le 300\ \text{false};\ \tfrac{1}{300}>\tfrac{1}{400};\ a\ \text{not within }\tau_2Conditions: 300>0,\ 400>0
Rule: frac_compare · Uses: S03, G2
Leaf basis: frac_compare + order_basics
By comparison of fractions, 1/300≤1/400 ⇔ 400≤300, which is false, so |a−x|>τ₂ and a is not within tolerance τ₂. With equal numerators 1, the fraction with the larger denominator is smaller.
S10 · implies
Before
|a-x|=\tfrac{1}{300}=\tau_3After
|a-x|\le\tau_3,\ a=x-\tau_3\ \text{(left endpoint)}Conditions: \tau_3\ge 0
Rule: mko_error_def · Uses: S03, S07, G2
Leaf basis: mko_error_def + eq_refl_symm_trans + order_basics
With τ₃=1/300 we have |a−x|=τ₃, and the definition uses ≤, so a is within tolerance. In fact x−τ₃=1/3−1/300=99/300=33/100=a, so a sits exactly at the left endpoint; the MKO says endpoints are included.
S11 · implies
Before
a'=330,\ x'=\tfrac{1000}{3}After
|a'-x'|=\tfrac{10}{3},\ \frac{|a'-x'|}{|x'|}=\tfrac{1}{100}Conditions: x'\neq 0
Rule: mko_error_def · Uses: G3, mko_error_def
Leaf basis: mko_error_def + frac_rules + abs_rules
330=990/3, so a′−x′=−10/3 and the absolute error is 10/3; x′=1000/3≠0 and the relative error is (10/3)/(1000/3)=1/100. Scaling both quantities by 1000 scales the absolute error by 1000 (10/3=1000·1/300) and leaves the relative error unchanged. The two errors answer different questions.
S12 · implies
Before
a_0=\tfrac{1}{1000},\ x_0=0After
|a_0-x_0|=\tfrac{1}{1000},\ \frac{|a_0-x_0|}{|x_0|}\ \text{undefined}Conditions: x_0=0
Rule: mul_inverse_nonzero · Uses: G4, mko_error_def
Leaf basis: mul_inverse_nonzero + abs_rules
The absolute error is computed as usual: |1/1000−0|=1/1000. The relative error would divide by |x₀|=0, but 0 has no inverse and v/0 is undefined, so by MKO assumption a2 the relative error is not evaluated; it may not be written as infinity or silently replaced by another denominator.
S13 · implies
Before
\text{error }\tfrac{1}{300}\ \text{for }0.33After
\text{rounding and truncation both give }\tfrac{33}{100};\ \text{source not determined by the value}Conditions: none
Rule: mko_error_sources · Uses: G1, G5, mko_error_sources
Leaf basis: mko_error_sources + frac_compare + numeric_evaluation
33/100≤1/3<34/100, and the distance from 1/3 to 33/100, 1/300, is smaller than the distance to 34/100, 2/300, so both rounding and truncation give 33/100, with the same error 1/300. One error value can come from two different procedures, so the value itself cannot tell us the source. For 2/3 the two differ: rounding gives 67/100 (error 1/300) and truncation gives 66/100 (error 1/150).
S14 · implies
Before
\text{computed and proved facts}After
e_{\mathrm{abs}}=\tfrac{1}{300},\ e_{\mathrm{rel}}=\tfrac{1}{100};\ \text{within }\tau_1,\tau_3;\ \text{not within }\tau_2Conditions: none
Rule: and_intro_elim · Uses: S03, S05, S06, S09, S10, S12, S13
Leaf basis: and_intro_elim
Combine the conclusions: absolute error 1/300 and relative error 1/100; within τ₁ and τ₃ (endpoint), not within τ₂; for a zero reference the relative error is undefined; the error value does not determine its source.
Substeps and lemmas
S02.1 · equivalent
Before
\tfrac{33}{100},\ \tfrac{1}{3}After
\tfrac{99}{300},\ \tfrac{100}{300}Conditions: 3\neq 0,\ 100\neq 0
Rule: frac_rules · Uses: G1
Leaf basis: frac_rules
By a/b=(ak)/(bk) with k≠0: multiplying numerator and denominator of 33/100 by 3 gives 99/300, and of 1/3 by 100 gives 100/300.
S02.2 · equivalent
Before
\tfrac{99}{300}-\tfrac{100}{300}After
-\tfrac{1}{300}Conditions: none
Rule: frac_rules · Uses: S02.1
Leaf basis: frac_rules + numeric_evaluation
Subtract over the common denominator: (99−100)/300=−1/300.
S07.1 · equivalent
Before
u\ge 0:\ |u|\le\tau
After
-\tau\le u\le\tau
Conditions: u\ge 0; \tau\ge 0
Rule: abs_rules · Uses: abs_rules
Leaf basis: abs_rules + order_basics
Let u=a−x with u≥0. Then |u|=u, so |u|≤τ ⇔ u≤τ. And −τ≤0≤u holds automatically (since τ≥0), so u≤τ ⇔ −τ≤u≤τ.
S07.2 · equivalent
Before
u<0:\ |u|\le\tau
After
-\tau\le u\le\tau
Conditions: u<0; \tau\ge 0
Rule: abs_rules · Uses: abs_rules
Leaf basis: abs_rules + order_basics + neg_mul
Let u<0. Then |u|=−u, and −u≤τ ⇔ −τ≤u (multiplying by −1 reverses the inequality). And u<0≤τ makes u≤τ automatic, so −u≤τ ⇔ −τ≤u≤τ.
S07.3 · equivalent
Before
|a-x|\le\tau\iff -\tau\le a-x\le\tau
After
|a-x|\le\tau\iff x-\tau\le a\le x+\tau
Conditions: \tau\ge 0
Rule: case_analysis · Uses: S07.1, S07.2
Leaf basis: case_analysis + order_basics
u≥0 and u<0 cover every real number (trichotomy), and both cases give the same equivalence, so by cases it holds for every u=a−x. Finally adding x to all three parts gives x−τ≤a≤x+τ. S07.1 to S07.3 together prove Lemma L_tol_interval.