Metamath Proof Explorer


Theorem sticksstones15

Description: Sticks and stones with almost collapsed definitions for positive integers. (Contributed by metakunt, 7-Oct-2024)

Ref Expression
Hypotheses sticksstones15.1 φ N 0
sticksstones15.2 φ K 0
sticksstones15.3 A = g | g : 1 K + 1 0 i = 1 K + 1 g i = N
Assertion sticksstones15 φ A = ( N + K K)

Proof

Step Hyp Ref Expression
1 sticksstones15.1 φ N 0
2 sticksstones15.2 φ K 0
3 sticksstones15.3 A = g | g : 1 K + 1 0 i = 1 K + 1 g i = N
4 eqid v A z 1 K z + t = 1 z v t = v A z 1 K z + t = 1 z v t
5 eqid u l | l : 1 K 1 N + K x 1 K y 1 K x < y l x < l y if K = 0 1 N w 1 K + 1 if w = K + 1 N + K - u K if w = 1 u 1 1 u w - u w 1 - 1 = u l | l : 1 K 1 N + K x 1 K y 1 K x < y l x < l y if K = 0 1 N w 1 K + 1 if w = K + 1 N + K - u K if w = 1 u 1 1 u w - u w 1 - 1
6 feq1 l = f l : 1 K 1 N + K f : 1 K 1 N + K
7 fveq1 l = f l x = f x
8 fveq1 l = f l y = f y
9 7 8 breq12d l = f l x < l y f x < f y
10 9 imbi2d l = f x < y l x < l y x < y f x < f y
11 10 2ralbidv l = f x 1 K y 1 K x < y l x < l y x 1 K y 1 K x < y f x < f y
12 6 11 anbi12d l = f l : 1 K 1 N + K x 1 K y 1 K x < y l x < l y f : 1 K 1 N + K x 1 K y 1 K x < y f x < f y
13 12 cbvabv l | l : 1 K 1 N + K x 1 K y 1 K x < y l x < l y = f | f : 1 K 1 N + K x 1 K y 1 K x < y f x < f y
14 1 2 4 5 3 13 sticksstones14 φ A = ( N + K K)