Theorem appendnth2 | index | src |

theorem appendnth2 (i l1 l2: nat):
  $ len l1 <= i -> nth i (l1 ++ l2) = nth (i - len l1) l2 $;
StepHypRefExpression
1 appendnth2_
nth (len l1 + (i - len l1)) (l1 ++ l2) = nth (i - len l1) l2
2 pncan3
len l1 <= i -> len l1 + (i - len l1) = i
3 2 eqcomd
len l1 <= i -> i = len l1 + (i - len l1)
4 3 ntheq1d
len l1 <= i -> nth i (l1 ++ l2) = nth (len l1 + (i - len l1)) (l1 ++ l2)
5 1, 4 syl6eq
len l1 <= i -> nth i (l1 ++ l2) = nth (i - len l1) l2

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)