theorem nthne0 (l n: nat): $ nth n l != 0 <-> n < len l $;
Step | Hyp | Ref | Expression |
1 |
|
con1 |
(~n < len l -> nth n l = 0) -> ~nth n l = 0 -> n < len l |
2 |
1 |
conv ne |
(~n < len l -> nth n l = 0) -> nth n l != 0 -> n < len l |
3 |
|
ifneg |
~n < len l -> if (n < len l) (suc (listfn l @ n)) 0 = 0 |
4 |
3 |
conv nth |
~n < len l -> nth n l = 0 |
5 |
2, 4 |
ax_mp |
nth n l != 0 -> n < len l |
6 |
|
sucne0 |
nth n l = suc (listfn l @ n) -> nth n l != 0 |
7 |
|
ifpos |
n < len l -> if (n < len l) (suc (listfn l @ n)) 0 = suc (listfn l @ n) |
8 |
7 |
conv nth |
n < len l -> nth n l = suc (listfn l @ n) |
9 |
6, 8 |
syl |
n < len l -> nth n l != 0 |
10 |
5, 9 |
ibii |
nth n l != 0 <-> n < len l |
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)