Metamath Proof Explorer


Theorem fvmptnn04ifb

Description: The function value of a mapping from the nonnegative integers with four distinct cases for the second 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 fvmptnn04ifb φ 0 < N N < S N / n B V G N = N / n B

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 φ 0 < N N < S N / n B V S
5 3 3ad2ant1 φ 0 < N N < S N / n B V N 0
6 simp3 φ 0 < N N < S N / n B V N / n B V
7 nn0re N 0 N
8 nn0ge0 N 0 0 N
9 7 8 jca N 0 N 0 N
10 ne0gt0 N 0 N N 0 0 < N
11 3 9 10 3syl φ N 0 0 < N
12 11 biimprcd 0 < N φ N 0
13 12 adantr 0 < N N < S φ N 0
14 13 impcom φ 0 < N N < S N 0
15 14 3adant3 φ 0 < N N < S N / n B V N 0
16 neneq N 0 ¬ N = 0
17 16 pm2.21d N 0 N = 0 N / n B = N / n A
18 15 17 syl φ 0 < N N < S N / n B V N = 0 N / n B = N / n A
19 18 imp φ 0 < N N < S N / n B V N = 0 N / n B = N / n A
20 eqidd φ 0 < N N < S N / n B V 0 < N N < S N / n B = N / n B
21 3 7 syl φ N
22 21 adantr φ N < S N
23 simpr φ N < S N < S
24 22 23 ltned φ N < S N S
25 24 neneqd φ N < S ¬ N = S
26 25 adantrl φ 0 < N N < S ¬ N = S
27 26 3adant3 φ 0 < N N < S N / n B V ¬ N = S
28 27 pm2.21d φ 0 < N N < S N / n B V N = S N / n B = N / n C
29 28 imp φ 0 < N N < S N / n B V N = S N / n B = N / n C
30 2 nnred φ S
31 ltnsym N S N < S ¬ S < N
32 21 30 31 syl2anc φ N < S ¬ S < N
33 32 com12 N < S φ ¬ S < N
34 33 adantl 0 < N N < S φ ¬ S < N
35 34 impcom φ 0 < N N < S ¬ S < N
36 35 3adant3 φ 0 < N N < S N / n B V ¬ S < N
37 36 pm2.21d φ 0 < N N < S N / n B V S < N N / n B = N / n D
38 37 imp φ 0 < N N < S N / n B V S < N N / n B = N / n D
39 1 4 5 6 19 20 29 38 fvmptnn04if φ 0 < N N < S N / n B V G N = N / n B