theorem maxcom (a b: nat): $ max a b = max b a $;
Step | Hyp | Ref | Expression |
1 |
|
ifpos |
a < b -> if (a < b) b a = b |
2 |
1 |
conv max |
a < b -> max a b = b |
3 |
|
ifneg |
~b < a -> if (b < a) a b = b |
4 |
3 |
conv max |
~b < a -> max b a = b |
5 |
|
ltnlt |
a < b -> ~b < a |
6 |
4, 5 |
syl |
a < b -> max b a = b |
7 |
2, 6 |
eqtr4d |
a < b -> max a b = max b a |
8 |
|
ifneg |
~a < b -> if (a < b) b a = a |
9 |
8 |
conv max |
~a < b -> max a b = a |
10 |
|
lenlt |
b <= a <-> ~a < b |
11 |
|
eqmax2 |
b <= a -> max b a = a |
12 |
10, 11 |
sylbir |
~a < b -> max b a = a |
13 |
9, 12 |
eqtr4d |
~a < b -> max a b = max b a |
14 |
7, 13 |
cases |
max a b = max b a |
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,
add0,
addS)