Metamath Proof Explorer


Theorem frrlem12

Description: Lemma for well-founded recursion. Next, we calculate the value of C . (Contributed by Scott Fenton, 7-Dec-2022)

Ref Expression
Hypotheses frrlem11.1 B = f | x f Fn x x A y x Pred R A y x y x f y = y G f Pred R A y
frrlem11.2 F = frecs R A G
frrlem11.3 φ g B h B x g u x h v u = v
frrlem11.4 C = F S z z G F Pred R A z
frrlem12.5 φ R Fr A
frrlem12.6 φ z A Pred R A z S
frrlem12.7 φ z A w S Pred R A w S
Assertion frrlem12 φ z A dom F w S dom F z C w = w G C Pred R A w

Proof

Step Hyp Ref Expression
1 frrlem11.1 B = f | x f Fn x x A y x Pred R A y x y x f y = y G f Pred R A y
2 frrlem11.2 F = frecs R A G
3 frrlem11.3 φ g B h B x g u x h v u = v
4 frrlem11.4 C = F S z z G F Pred R A z
5 frrlem12.5 φ R Fr A
6 frrlem12.6 φ z A Pred R A z S
7 frrlem12.7 φ z A w S Pred R A w S
8 elun w S dom F z w S dom F w z
9 velsn w z w = z
10 9 orbi2i w S dom F w z w S dom F w = z
11 8 10 bitri w S dom F z w S dom F w = z
12 elinel2 w S dom F w dom F
13 1 frrlem1 B = p | q p Fn q q A w q Pred R A w q w q p w = w G p Pred R A w
14 breq1 x = q x g u q g u
15 breq1 x = q x h v q h v
16 14 15 anbi12d x = q x g u x h v q g u q h v
17 16 imbi1d x = q x g u x h v u = v q g u q h v u = v
18 17 imbi2d x = q φ g B h B x g u x h v u = v φ g B h B q g u q h v u = v
19 18 3 chvarvv φ g B h B q g u q h v u = v
20 13 2 19 frrlem10 φ w dom F F w = w G F Pred R A w
21 12 20 sylan2 φ w S dom F F w = w G F Pred R A w
22 21 adantlr φ z A dom F w S dom F F w = w G F Pred R A w
23 4 fveq1i C w = F S z z G F Pred R A z w
24 1 2 3 frrlem9 φ Fun F
25 24 funresd φ Fun F S
26 dmres dom F S = S dom F
27 df-fn F S Fn S dom F Fun F S dom F S = S dom F
28 25 26 27 sylanblrc φ F S Fn S dom F
29 28 adantr φ z A dom F F S Fn S dom F
30 29 adantr φ z A dom F w S dom F F S Fn S dom F
31 vex z V
32 ovex z G F Pred R A z V
33 31 32 fnsn z z G F Pred R A z Fn z
34 33 a1i φ z A dom F w S dom F z z G F Pred R A z Fn z
35 eldifn z A dom F ¬ z dom F
36 elinel2 z S dom F z dom F
37 35 36 nsyl z A dom F ¬ z S dom F
38 disjsn S dom F z = ¬ z S dom F
39 37 38 sylibr z A dom F S dom F z =
40 39 adantl φ z A dom F S dom F z =
41 40 adantr φ z A dom F w S dom F S dom F z =
42 simpr φ z A dom F w S dom F w S dom F
43 fvun1 F S Fn S dom F z z G F Pred R A z Fn z S dom F z = w S dom F F S z z G F Pred R A z w = F S w
44 30 34 41 42 43 syl112anc φ z A dom F w S dom F F S z z G F Pred R A z w = F S w
45 23 44 eqtrid φ z A dom F w S dom F C w = F S w
46 elinel1 w S dom F w S
47 46 adantl φ z A dom F w S dom F w S
48 47 fvresd φ z A dom F w S dom F F S w = F w
49 45 48 eqtrd φ z A dom F w S dom F C w = F w
50 1 2 3 4 frrlem11 φ z A dom F C Fn S dom F z
51 fnfun C Fn S dom F z Fun C
52 50 51 syl φ z A dom F Fun C
53 52 adantr φ z A dom F w S dom F Fun C
54 ssun1 F S F S z z G F Pred R A z
55 54 4 sseqtrri F S C
56 55 a1i φ z A dom F w S dom F F S C
57 eldifi z A dom F z A
58 57 7 sylan2 φ z A dom F w S Pred R A w S
59 rspa w S Pred R A w S w S Pred R A w S
60 58 46 59 syl2an φ z A dom F w S dom F Pred R A w S
61 1 2 frrlem8 w dom F Pred R A w dom F
62 12 61 syl w S dom F Pred R A w dom F
63 62 adantl φ z A dom F w S dom F Pred R A w dom F
64 60 63 ssind φ z A dom F w S dom F Pred R A w S dom F
65 64 26 sseqtrrdi φ z A dom F w S dom F Pred R A w dom F S
66 fun2ssres Fun C F S C Pred R A w dom F S C Pred R A w = F S Pred R A w
67 53 56 65 66 syl3anc φ z A dom F w S dom F C Pred R A w = F S Pred R A w
68 60 resabs1d φ z A dom F w S dom F F S Pred R A w = F Pred R A w
69 67 68 eqtrd φ z A dom F w S dom F C Pred R A w = F Pred R A w
70 69 oveq2d φ z A dom F w S dom F w G C Pred R A w = w G F Pred R A w
71 22 49 70 3eqtr4d φ z A dom F w S dom F C w = w G C Pred R A w
72 71 ex φ z A dom F w S dom F C w = w G C Pred R A w
73 31 32 fvsn z z G F Pred R A z z = z G F Pred R A z
74 4 fveq1i C z = F S z z G F Pred R A z z
75 33 a1i φ z A dom F z z G F Pred R A z Fn z
76 vsnid z z
77 76 a1i φ z A dom F z z
78 fvun2 F S Fn S dom F z z G F Pred R A z Fn z S dom F z = z z F S z z G F Pred R A z z = z z G F Pred R A z z
79 29 75 40 77 78 syl112anc φ z A dom F F S z z G F Pred R A z z = z z G F Pred R A z z
80 74 79 eqtrid φ z A dom F C z = z z G F Pred R A z z
81 4 reseq1i C Pred R A z = F S z z G F Pred R A z Pred R A z
82 resundir F S z z G F Pred R A z Pred R A z = F S Pred R A z z z G F Pred R A z Pred R A z
83 81 82 eqtri C Pred R A z = F S Pred R A z z z G F Pred R A z Pred R A z
84 57 6 sylan2 φ z A dom F Pred R A z S
85 84 resabs1d φ z A dom F F S Pred R A z = F Pred R A z
86 predfrirr R Fr A ¬ z Pred R A z
87 5 86 syl φ ¬ z Pred R A z
88 87 adantr φ z A dom F ¬ z Pred R A z
89 ressnop0 ¬ z Pred R A z z z G F Pred R A z Pred R A z =
90 88 89 syl φ z A dom F z z G F Pred R A z Pred R A z =
91 85 90 uneq12d φ z A dom F F S Pred R A z z z G F Pred R A z Pred R A z = F Pred R A z
92 un0 F Pred R A z = F Pred R A z
93 91 92 eqtrdi φ z A dom F F S Pred R A z z z G F Pred R A z Pred R A z = F Pred R A z
94 83 93 eqtrid φ z A dom F C Pred R A z = F Pred R A z
95 94 oveq2d φ z A dom F z G C Pred R A z = z G F Pred R A z
96 73 80 95 3eqtr4a φ z A dom F C z = z G C Pred R A z
97 fveq2 w = z C w = C z
98 id w = z w = z
99 predeq3 w = z Pred R A w = Pred R A z
100 99 reseq2d w = z C Pred R A w = C Pred R A z
101 98 100 oveq12d w = z w G C Pred R A w = z G C Pred R A z
102 97 101 eqeq12d w = z C w = w G C Pred R A w C z = z G C Pred R A z
103 96 102 syl5ibrcom φ z A dom F w = z C w = w G C Pred R A w
104 72 103 jaod φ z A dom F w S dom F w = z C w = w G C Pred R A w
105 11 104 syl5bi φ z A dom F w S dom F z C w = w G C Pred R A w
106 105 3impia φ z A dom F w S dom F z C w = w G C Pred R A w