Metamath Proof Explorer


Theorem fvmptnn04ifa

Description: The function value of a mapping from the nonnegative integers with four distinct cases for the first case. (Contributed by AV, 10-Nov-2019)

Ref Expression
Hypotheses fvmptnn04if.g G = n 0 if n = 0 A if n = S C if S < n D B
fvmptnn04if.s φ S
fvmptnn04if.n φ N 0
Assertion fvmptnn04ifa φ N = 0 N / n A V G N = N / n A

Proof

Step Hyp Ref Expression
1 fvmptnn04if.g G = n 0 if n = 0 A if n = S C if S < n D B
2 fvmptnn04if.s φ S
3 fvmptnn04if.n φ N 0
4 2 3ad2ant1 φ N = 0 N / n A V S
5 3 3ad2ant1 φ N = 0 N / n A V N 0
6 simp3 φ N = 0 N / n A V N / n A V
7 eqidd φ N = 0 N / n A V N = 0 N / n A = N / n A
8 simpr φ 0 < N 0 < N
9 8 gt0ne0d φ 0 < N N 0
10 9 neneqd φ 0 < N ¬ N = 0
11 10 pm2.21d φ 0 < N N = 0 N < S N / n A = N / n B
12 11 impancom φ N = 0 0 < N N < S N / n A = N / n B
13 12 3adant3 φ N = 0 N / n A V 0 < N N < S N / n A = N / n B
14 13 3imp φ N = 0 N / n A V 0 < N N < S N / n A = N / n B
15 2 nnne0d φ S 0
16 15 necomd φ 0 S
17 16 adantr φ N = 0 0 S
18 neeq1 N = 0 N S 0 S
19 18 adantl φ N = 0 N S 0 S
20 17 19 mpbird φ N = 0 N S
21 20 3adant3 φ N = 0 N / n A V N S
22 21 neneqd φ N = 0 N / n A V ¬ N = S
23 22 pm2.21d φ N = 0 N / n A V N = S N / n A = N / n C
24 23 imp φ N = 0 N / n A V N = S N / n A = N / n C
25 nnnn0 S S 0
26 nn0nlt0 S 0 ¬ S < 0
27 2 25 26 3syl φ ¬ S < 0
28 27 adantr φ N = 0 ¬ S < 0
29 breq2 N = 0 S < N S < 0
30 29 notbid N = 0 ¬ S < N ¬ S < 0
31 30 adantl φ N = 0 ¬ S < N ¬ S < 0
32 28 31 mpbird φ N = 0 ¬ S < N
33 32 3adant3 φ N = 0 N / n A V ¬ S < N
34 33 pm2.21d φ N = 0 N / n A V S < N N / n A = N / n D
35 34 imp φ N = 0 N / n A V S < N N / n A = N / n D
36 1 4 5 6 7 14 24 35 fvmptnn04if φ N = 0 N / n A V G N = N / n A