Theorem eqdivmod | index | src |

theorem eqdivmod (G: wff) (Q R a b: nat):
  $ G -> R < b $ >
  $ G -> b * Q + R = a $ >
  $ G -> a // b = Q /\ a % b = R $;
StepHypRefExpression
1 hyp h1
G -> R < b
2 hyp h2
G -> b * Q + R = a
3 1, 2 divlem2
G -> (E. r (r < b /\ b * q + r = a) <-> q = Q)
4 3 eqtheabd
G -> the {q | E. r (r < b /\ b * q + r = a)} = Q
5 4 conv div
G -> a // b = Q
6 eqsub2
b * (a // b) + R = a -> a - b * (a // b) = R
7 6 conv mod
b * (a // b) + R = a -> a % b = R
8 5 muleq2d
G -> b * (a // b) = b * Q
9 8 addeq1d
G -> b * (a // b) + R = b * Q + R
10 9, 2 eqtrd
G -> b * (a // b) + R = a
11 7, 10 syl
G -> a % b = R
12 5, 11 iand
G -> a // b = Q /\ a % b = R

Axiom use

axs_prop_calc (ax_1, ax_2, ax_3, ax_mp, itru), axs_pred_calc (ax_gen, ax_4, ax_5, ax_6, ax_7, ax_10, ax_11, ax_12), axs_set (elab, ax_8), axs_the (theid), axs_peano (peano1, peano2, peano5, addeq, muleq, add0, addS, mul0, mulS)