Theorem zmulzn | index | src |

theorem zmulzn (a b c d: nat):
  $ (a -ZN c) *Z (b -ZN d) = a * b + c * d -ZN (a * d + b * c) $;
StepHypRefExpression
1 zneqb
zfst (a -ZN c) * zfst (b -ZN d) + zsnd (a -ZN c) * zsnd (b -ZN d) -ZN (zfst (a -ZN c) * zsnd (b -ZN d) + zsnd (a -ZN c) * zfst (b -ZN d)) =
    a * b + c * d -ZN (a * d + b * c) <->
  zfst (a -ZN c) * zfst (b -ZN d) + zsnd (a -ZN c) * zsnd (b -ZN d) + (a * d + b * c) =
    a * b + c * d + (zfst (a -ZN c) * zsnd (b -ZN d) + zsnd (a -ZN c) * zfst (b -ZN d))
2 1 conv zmul
(a -ZN c) *Z (b -ZN d) = a * b + c * d -ZN (a * d + b * c) <->
  zfst (a -ZN c) * zfst (b -ZN d) + zsnd (a -ZN c) * zsnd (b -ZN d) + (a * d + b * c) =
    a * b + c * d + (zfst (a -ZN c) * zsnd (b -ZN d) + zsnd (a -ZN c) * zfst (b -ZN d))
3 zneqb
zfst (a -ZN c) -ZN zsnd (a -ZN c) = a -ZN c <-> zfst (a -ZN c) + c = a + zsnd (a -ZN c)
4 zfstsnd
zfst (a -ZN c) -ZN zsnd (a -ZN c) = a -ZN c
5 3, 4 mpbi
zfst (a -ZN c) + c = a + zsnd (a -ZN c)
6 zneqb
zfst (b -ZN d) -ZN zsnd (b -ZN d) = b -ZN d <-> zfst (b -ZN d) + d = b + zsnd (b -ZN d)
7 zfstsnd
zfst (b -ZN d) -ZN zsnd (b -ZN d) = b -ZN d
8 6, 7 mpbi
zfst (b -ZN d) + d = b + zsnd (b -ZN d)
9 5, 8 zmulznlem
zfst (a -ZN c) * zfst (b -ZN d) + zsnd (a -ZN c) * zsnd (b -ZN d) + (a * d + b * c) =
  a * b + c * d + (zfst (a -ZN c) * zsnd (b -ZN d) + zsnd (a -ZN c) * zfst (b -ZN d))
10 2, 9 mpbir
(a -ZN c) *Z (b -ZN d) = a * b + c * d -ZN (a * d + b * c)

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, the0), axs_peano (peano1, peano2, peano5, addeq, muleq, add0, addS, mul0, mulS)