Metamath Proof Explorer


Theorem wfrlem4

Description: Lemma for well-ordered recursion. Properties of the restriction of an acceptable function to the domain of another one. (Contributed by Scott Fenton, 21-Apr-2011) (Revised by AV, 18-Jul-2022)

Ref Expression
Hypothesis wfrlem4.2 𝐵 = { 𝑓 ∣ ∃ 𝑥 ( 𝑓 Fn 𝑥 ∧ ( 𝑥𝐴 ∧ ∀ 𝑦𝑥 Pred ( 𝑅 , 𝐴 , 𝑦 ) ⊆ 𝑥 ) ∧ ∀ 𝑦𝑥 ( 𝑓𝑦 ) = ( 𝐹 ‘ ( 𝑓 ↾ Pred ( 𝑅 , 𝐴 , 𝑦 ) ) ) ) }
Assertion wfrlem4 ( ( 𝑔𝐵𝐵 ) → ( ( 𝑔 ↾ ( dom 𝑔 ∩ dom ) ) Fn ( dom 𝑔 ∩ dom ) ∧ ∀ 𝑎 ∈ ( dom 𝑔 ∩ dom ) ( ( 𝑔 ↾ ( dom 𝑔 ∩ dom ) ) ‘ 𝑎 ) = ( 𝐹 ‘ ( ( 𝑔 ↾ ( dom 𝑔 ∩ dom ) ) ↾ Pred ( 𝑅 , ( dom 𝑔 ∩ dom ) , 𝑎 ) ) ) ) )

Proof

Step Hyp Ref Expression
1 wfrlem4.2 𝐵 = { 𝑓 ∣ ∃ 𝑥 ( 𝑓 Fn 𝑥 ∧ ( 𝑥𝐴 ∧ ∀ 𝑦𝑥 Pred ( 𝑅 , 𝐴 , 𝑦 ) ⊆ 𝑥 ) ∧ ∀ 𝑦𝑥 ( 𝑓𝑦 ) = ( 𝐹 ‘ ( 𝑓 ↾ Pred ( 𝑅 , 𝐴 , 𝑦 ) ) ) ) }
2 1 wfrlem2 ( 𝑔𝐵 → Fun 𝑔 )
3 2 funfnd ( 𝑔𝐵𝑔 Fn dom 𝑔 )
4 fnresin1 ( 𝑔 Fn dom 𝑔 → ( 𝑔 ↾ ( dom 𝑔 ∩ dom ) ) Fn ( dom 𝑔 ∩ dom ) )
5 3 4 syl ( 𝑔𝐵 → ( 𝑔 ↾ ( dom 𝑔 ∩ dom ) ) Fn ( dom 𝑔 ∩ dom ) )
6 5 adantr ( ( 𝑔𝐵𝐵 ) → ( 𝑔 ↾ ( dom 𝑔 ∩ dom ) ) Fn ( dom 𝑔 ∩ dom ) )
7 1 wfrlem1 𝐵 = { 𝑔 ∣ ∃ 𝑏 ( 𝑔 Fn 𝑏 ∧ ( 𝑏𝐴 ∧ ∀ 𝑎𝑏 Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ 𝑏 ) ∧ ∀ 𝑎𝑏 ( 𝑔𝑎 ) = ( 𝐹 ‘ ( 𝑔 ↾ Pred ( 𝑅 , 𝐴 , 𝑎 ) ) ) ) }
8 7 abeq2i ( 𝑔𝐵 ↔ ∃ 𝑏 ( 𝑔 Fn 𝑏 ∧ ( 𝑏𝐴 ∧ ∀ 𝑎𝑏 Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ 𝑏 ) ∧ ∀ 𝑎𝑏 ( 𝑔𝑎 ) = ( 𝐹 ‘ ( 𝑔 ↾ Pred ( 𝑅 , 𝐴 , 𝑎 ) ) ) ) )
9 fndm ( 𝑔 Fn 𝑏 → dom 𝑔 = 𝑏 )
10 9 raleqdv ( 𝑔 Fn 𝑏 → ( ∀ 𝑎 ∈ dom 𝑔 ( 𝑔𝑎 ) = ( 𝐹 ‘ ( 𝑔 ↾ Pred ( 𝑅 , 𝐴 , 𝑎 ) ) ) ↔ ∀ 𝑎𝑏 ( 𝑔𝑎 ) = ( 𝐹 ‘ ( 𝑔 ↾ Pred ( 𝑅 , 𝐴 , 𝑎 ) ) ) ) )
11 10 biimpar ( ( 𝑔 Fn 𝑏 ∧ ∀ 𝑎𝑏 ( 𝑔𝑎 ) = ( 𝐹 ‘ ( 𝑔 ↾ Pred ( 𝑅 , 𝐴 , 𝑎 ) ) ) ) → ∀ 𝑎 ∈ dom 𝑔 ( 𝑔𝑎 ) = ( 𝐹 ‘ ( 𝑔 ↾ Pred ( 𝑅 , 𝐴 , 𝑎 ) ) ) )
12 rsp ( ∀ 𝑎 ∈ dom 𝑔 ( 𝑔𝑎 ) = ( 𝐹 ‘ ( 𝑔 ↾ Pred ( 𝑅 , 𝐴 , 𝑎 ) ) ) → ( 𝑎 ∈ dom 𝑔 → ( 𝑔𝑎 ) = ( 𝐹 ‘ ( 𝑔 ↾ Pred ( 𝑅 , 𝐴 , 𝑎 ) ) ) ) )
13 11 12 syl ( ( 𝑔 Fn 𝑏 ∧ ∀ 𝑎𝑏 ( 𝑔𝑎 ) = ( 𝐹 ‘ ( 𝑔 ↾ Pred ( 𝑅 , 𝐴 , 𝑎 ) ) ) ) → ( 𝑎 ∈ dom 𝑔 → ( 𝑔𝑎 ) = ( 𝐹 ‘ ( 𝑔 ↾ Pred ( 𝑅 , 𝐴 , 𝑎 ) ) ) ) )
14 13 3adant2 ( ( 𝑔 Fn 𝑏 ∧ ( 𝑏𝐴 ∧ ∀ 𝑎𝑏 Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ 𝑏 ) ∧ ∀ 𝑎𝑏 ( 𝑔𝑎 ) = ( 𝐹 ‘ ( 𝑔 ↾ Pred ( 𝑅 , 𝐴 , 𝑎 ) ) ) ) → ( 𝑎 ∈ dom 𝑔 → ( 𝑔𝑎 ) = ( 𝐹 ‘ ( 𝑔 ↾ Pred ( 𝑅 , 𝐴 , 𝑎 ) ) ) ) )
15 14 exlimiv ( ∃ 𝑏 ( 𝑔 Fn 𝑏 ∧ ( 𝑏𝐴 ∧ ∀ 𝑎𝑏 Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ 𝑏 ) ∧ ∀ 𝑎𝑏 ( 𝑔𝑎 ) = ( 𝐹 ‘ ( 𝑔 ↾ Pred ( 𝑅 , 𝐴 , 𝑎 ) ) ) ) → ( 𝑎 ∈ dom 𝑔 → ( 𝑔𝑎 ) = ( 𝐹 ‘ ( 𝑔 ↾ Pred ( 𝑅 , 𝐴 , 𝑎 ) ) ) ) )
16 8 15 sylbi ( 𝑔𝐵 → ( 𝑎 ∈ dom 𝑔 → ( 𝑔𝑎 ) = ( 𝐹 ‘ ( 𝑔 ↾ Pred ( 𝑅 , 𝐴 , 𝑎 ) ) ) ) )
17 elinel1 ( 𝑎 ∈ ( dom 𝑔 ∩ dom ) → 𝑎 ∈ dom 𝑔 )
18 16 17 impel ( ( 𝑔𝐵𝑎 ∈ ( dom 𝑔 ∩ dom ) ) → ( 𝑔𝑎 ) = ( 𝐹 ‘ ( 𝑔 ↾ Pred ( 𝑅 , 𝐴 , 𝑎 ) ) ) )
19 18 adantlr ( ( ( 𝑔𝐵𝐵 ) ∧ 𝑎 ∈ ( dom 𝑔 ∩ dom ) ) → ( 𝑔𝑎 ) = ( 𝐹 ‘ ( 𝑔 ↾ Pred ( 𝑅 , 𝐴 , 𝑎 ) ) ) )
20 fvres ( 𝑎 ∈ ( dom 𝑔 ∩ dom ) → ( ( 𝑔 ↾ ( dom 𝑔 ∩ dom ) ) ‘ 𝑎 ) = ( 𝑔𝑎 ) )
21 20 adantl ( ( ( 𝑔𝐵𝐵 ) ∧ 𝑎 ∈ ( dom 𝑔 ∩ dom ) ) → ( ( 𝑔 ↾ ( dom 𝑔 ∩ dom ) ) ‘ 𝑎 ) = ( 𝑔𝑎 ) )
22 resres ( ( 𝑔 ↾ ( dom 𝑔 ∩ dom ) ) ↾ Pred ( 𝑅 , ( dom 𝑔 ∩ dom ) , 𝑎 ) ) = ( 𝑔 ↾ ( ( dom 𝑔 ∩ dom ) ∩ Pred ( 𝑅 , ( dom 𝑔 ∩ dom ) , 𝑎 ) ) )
23 predss Pred ( 𝑅 , ( dom 𝑔 ∩ dom ) , 𝑎 ) ⊆ ( dom 𝑔 ∩ dom )
24 sseqin2 ( Pred ( 𝑅 , ( dom 𝑔 ∩ dom ) , 𝑎 ) ⊆ ( dom 𝑔 ∩ dom ) ↔ ( ( dom 𝑔 ∩ dom ) ∩ Pred ( 𝑅 , ( dom 𝑔 ∩ dom ) , 𝑎 ) ) = Pred ( 𝑅 , ( dom 𝑔 ∩ dom ) , 𝑎 ) )
25 23 24 mpbi ( ( dom 𝑔 ∩ dom ) ∩ Pred ( 𝑅 , ( dom 𝑔 ∩ dom ) , 𝑎 ) ) = Pred ( 𝑅 , ( dom 𝑔 ∩ dom ) , 𝑎 )
26 1 wfrlem1 𝐵 = { ∣ ∃ 𝑐 ( Fn 𝑐 ∧ ( 𝑐𝐴 ∧ ∀ 𝑎𝑐 Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ 𝑐 ) ∧ ∀ 𝑎𝑐 ( 𝑎 ) = ( 𝐹 ‘ ( ↾ Pred ( 𝑅 , 𝐴 , 𝑎 ) ) ) ) }
27 26 abeq2i ( 𝐵 ↔ ∃ 𝑐 ( Fn 𝑐 ∧ ( 𝑐𝐴 ∧ ∀ 𝑎𝑐 Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ 𝑐 ) ∧ ∀ 𝑎𝑐 ( 𝑎 ) = ( 𝐹 ‘ ( ↾ Pred ( 𝑅 , 𝐴 , 𝑎 ) ) ) ) )
28 3an6 ( ( ( 𝑔 Fn 𝑏 Fn 𝑐 ) ∧ ( ( 𝑏𝐴 ∧ ∀ 𝑎𝑏 Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ 𝑏 ) ∧ ( 𝑐𝐴 ∧ ∀ 𝑎𝑐 Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ 𝑐 ) ) ∧ ( ∀ 𝑎𝑏 ( 𝑔𝑎 ) = ( 𝐹 ‘ ( 𝑔 ↾ Pred ( 𝑅 , 𝐴 , 𝑎 ) ) ) ∧ ∀ 𝑎𝑐 ( 𝑎 ) = ( 𝐹 ‘ ( ↾ Pred ( 𝑅 , 𝐴 , 𝑎 ) ) ) ) ) ↔ ( ( 𝑔 Fn 𝑏 ∧ ( 𝑏𝐴 ∧ ∀ 𝑎𝑏 Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ 𝑏 ) ∧ ∀ 𝑎𝑏 ( 𝑔𝑎 ) = ( 𝐹 ‘ ( 𝑔 ↾ Pred ( 𝑅 , 𝐴 , 𝑎 ) ) ) ) ∧ ( Fn 𝑐 ∧ ( 𝑐𝐴 ∧ ∀ 𝑎𝑐 Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ 𝑐 ) ∧ ∀ 𝑎𝑐 ( 𝑎 ) = ( 𝐹 ‘ ( ↾ Pred ( 𝑅 , 𝐴 , 𝑎 ) ) ) ) ) )
29 28 2exbii ( ∃ 𝑏𝑐 ( ( 𝑔 Fn 𝑏 Fn 𝑐 ) ∧ ( ( 𝑏𝐴 ∧ ∀ 𝑎𝑏 Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ 𝑏 ) ∧ ( 𝑐𝐴 ∧ ∀ 𝑎𝑐 Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ 𝑐 ) ) ∧ ( ∀ 𝑎𝑏 ( 𝑔𝑎 ) = ( 𝐹 ‘ ( 𝑔 ↾ Pred ( 𝑅 , 𝐴 , 𝑎 ) ) ) ∧ ∀ 𝑎𝑐 ( 𝑎 ) = ( 𝐹 ‘ ( ↾ Pred ( 𝑅 , 𝐴 , 𝑎 ) ) ) ) ) ↔ ∃ 𝑏𝑐 ( ( 𝑔 Fn 𝑏 ∧ ( 𝑏𝐴 ∧ ∀ 𝑎𝑏 Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ 𝑏 ) ∧ ∀ 𝑎𝑏 ( 𝑔𝑎 ) = ( 𝐹 ‘ ( 𝑔 ↾ Pred ( 𝑅 , 𝐴 , 𝑎 ) ) ) ) ∧ ( Fn 𝑐 ∧ ( 𝑐𝐴 ∧ ∀ 𝑎𝑐 Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ 𝑐 ) ∧ ∀ 𝑎𝑐 ( 𝑎 ) = ( 𝐹 ‘ ( ↾ Pred ( 𝑅 , 𝐴 , 𝑎 ) ) ) ) ) )
30 exdistrv ( ∃ 𝑏𝑐 ( ( 𝑔 Fn 𝑏 ∧ ( 𝑏𝐴 ∧ ∀ 𝑎𝑏 Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ 𝑏 ) ∧ ∀ 𝑎𝑏 ( 𝑔𝑎 ) = ( 𝐹 ‘ ( 𝑔 ↾ Pred ( 𝑅 , 𝐴 , 𝑎 ) ) ) ) ∧ ( Fn 𝑐 ∧ ( 𝑐𝐴 ∧ ∀ 𝑎𝑐 Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ 𝑐 ) ∧ ∀ 𝑎𝑐 ( 𝑎 ) = ( 𝐹 ‘ ( ↾ Pred ( 𝑅 , 𝐴 , 𝑎 ) ) ) ) ) ↔ ( ∃ 𝑏 ( 𝑔 Fn 𝑏 ∧ ( 𝑏𝐴 ∧ ∀ 𝑎𝑏 Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ 𝑏 ) ∧ ∀ 𝑎𝑏 ( 𝑔𝑎 ) = ( 𝐹 ‘ ( 𝑔 ↾ Pred ( 𝑅 , 𝐴 , 𝑎 ) ) ) ) ∧ ∃ 𝑐 ( Fn 𝑐 ∧ ( 𝑐𝐴 ∧ ∀ 𝑎𝑐 Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ 𝑐 ) ∧ ∀ 𝑎𝑐 ( 𝑎 ) = ( 𝐹 ‘ ( ↾ Pred ( 𝑅 , 𝐴 , 𝑎 ) ) ) ) ) )
31 29 30 bitri ( ∃ 𝑏𝑐 ( ( 𝑔 Fn 𝑏 Fn 𝑐 ) ∧ ( ( 𝑏𝐴 ∧ ∀ 𝑎𝑏 Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ 𝑏 ) ∧ ( 𝑐𝐴 ∧ ∀ 𝑎𝑐 Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ 𝑐 ) ) ∧ ( ∀ 𝑎𝑏 ( 𝑔𝑎 ) = ( 𝐹 ‘ ( 𝑔 ↾ Pred ( 𝑅 , 𝐴 , 𝑎 ) ) ) ∧ ∀ 𝑎𝑐 ( 𝑎 ) = ( 𝐹 ‘ ( ↾ Pred ( 𝑅 , 𝐴 , 𝑎 ) ) ) ) ) ↔ ( ∃ 𝑏 ( 𝑔 Fn 𝑏 ∧ ( 𝑏𝐴 ∧ ∀ 𝑎𝑏 Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ 𝑏 ) ∧ ∀ 𝑎𝑏 ( 𝑔𝑎 ) = ( 𝐹 ‘ ( 𝑔 ↾ Pred ( 𝑅 , 𝐴 , 𝑎 ) ) ) ) ∧ ∃ 𝑐 ( Fn 𝑐 ∧ ( 𝑐𝐴 ∧ ∀ 𝑎𝑐 Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ 𝑐 ) ∧ ∀ 𝑎𝑐 ( 𝑎 ) = ( 𝐹 ‘ ( ↾ Pred ( 𝑅 , 𝐴 , 𝑎 ) ) ) ) ) )
32 ssinss1 ( 𝑏𝐴 → ( 𝑏𝑐 ) ⊆ 𝐴 )
33 32 ad2antrr ( ( ( 𝑏𝐴 ∧ ∀ 𝑎𝑏 Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ 𝑏 ) ∧ ( 𝑐𝐴 ∧ ∀ 𝑎𝑐 Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ 𝑐 ) ) → ( 𝑏𝑐 ) ⊆ 𝐴 )
34 nfra1 𝑎𝑎𝑏 Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ 𝑏
35 nfra1 𝑎𝑎𝑐 Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ 𝑐
36 34 35 nfan 𝑎 ( ∀ 𝑎𝑏 Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ 𝑏 ∧ ∀ 𝑎𝑐 Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ 𝑐 )
37 elinel1 ( 𝑎 ∈ ( 𝑏𝑐 ) → 𝑎𝑏 )
38 rsp ( ∀ 𝑎𝑏 Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ 𝑏 → ( 𝑎𝑏 → Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ 𝑏 ) )
39 37 38 syl5com ( 𝑎 ∈ ( 𝑏𝑐 ) → ( ∀ 𝑎𝑏 Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ 𝑏 → Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ 𝑏 ) )
40 elinel2 ( 𝑎 ∈ ( 𝑏𝑐 ) → 𝑎𝑐 )
41 rsp ( ∀ 𝑎𝑐 Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ 𝑐 → ( 𝑎𝑐 → Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ 𝑐 ) )
42 40 41 syl5com ( 𝑎 ∈ ( 𝑏𝑐 ) → ( ∀ 𝑎𝑐 Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ 𝑐 → Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ 𝑐 ) )
43 39 42 anim12d ( 𝑎 ∈ ( 𝑏𝑐 ) → ( ( ∀ 𝑎𝑏 Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ 𝑏 ∧ ∀ 𝑎𝑐 Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ 𝑐 ) → ( Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ 𝑏 ∧ Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ 𝑐 ) ) )
44 ssin ( ( Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ 𝑏 ∧ Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ 𝑐 ) ↔ Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ ( 𝑏𝑐 ) )
45 44 biimpi ( ( Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ 𝑏 ∧ Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ 𝑐 ) → Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ ( 𝑏𝑐 ) )
46 43 45 syl6com ( ( ∀ 𝑎𝑏 Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ 𝑏 ∧ ∀ 𝑎𝑐 Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ 𝑐 ) → ( 𝑎 ∈ ( 𝑏𝑐 ) → Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ ( 𝑏𝑐 ) ) )
47 36 46 ralrimi ( ( ∀ 𝑎𝑏 Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ 𝑏 ∧ ∀ 𝑎𝑐 Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ 𝑐 ) → ∀ 𝑎 ∈ ( 𝑏𝑐 ) Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ ( 𝑏𝑐 ) )
48 47 ad2ant2l ( ( ( 𝑏𝐴 ∧ ∀ 𝑎𝑏 Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ 𝑏 ) ∧ ( 𝑐𝐴 ∧ ∀ 𝑎𝑐 Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ 𝑐 ) ) → ∀ 𝑎 ∈ ( 𝑏𝑐 ) Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ ( 𝑏𝑐 ) )
49 33 48 jca ( ( ( 𝑏𝐴 ∧ ∀ 𝑎𝑏 Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ 𝑏 ) ∧ ( 𝑐𝐴 ∧ ∀ 𝑎𝑐 Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ 𝑐 ) ) → ( ( 𝑏𝑐 ) ⊆ 𝐴 ∧ ∀ 𝑎 ∈ ( 𝑏𝑐 ) Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ ( 𝑏𝑐 ) ) )
50 fndm ( Fn 𝑐 → dom = 𝑐 )
51 9 50 ineqan12d ( ( 𝑔 Fn 𝑏 Fn 𝑐 ) → ( dom 𝑔 ∩ dom ) = ( 𝑏𝑐 ) )
52 sseq1 ( ( dom 𝑔 ∩ dom ) = ( 𝑏𝑐 ) → ( ( dom 𝑔 ∩ dom ) ⊆ 𝐴 ↔ ( 𝑏𝑐 ) ⊆ 𝐴 ) )
53 sseq2 ( ( dom 𝑔 ∩ dom ) = ( 𝑏𝑐 ) → ( Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ ( dom 𝑔 ∩ dom ) ↔ Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ ( 𝑏𝑐 ) ) )
54 53 raleqbi1dv ( ( dom 𝑔 ∩ dom ) = ( 𝑏𝑐 ) → ( ∀ 𝑎 ∈ ( dom 𝑔 ∩ dom ) Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ ( dom 𝑔 ∩ dom ) ↔ ∀ 𝑎 ∈ ( 𝑏𝑐 ) Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ ( 𝑏𝑐 ) ) )
55 52 54 anbi12d ( ( dom 𝑔 ∩ dom ) = ( 𝑏𝑐 ) → ( ( ( dom 𝑔 ∩ dom ) ⊆ 𝐴 ∧ ∀ 𝑎 ∈ ( dom 𝑔 ∩ dom ) Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ ( dom 𝑔 ∩ dom ) ) ↔ ( ( 𝑏𝑐 ) ⊆ 𝐴 ∧ ∀ 𝑎 ∈ ( 𝑏𝑐 ) Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ ( 𝑏𝑐 ) ) ) )
56 55 imbi2d ( ( dom 𝑔 ∩ dom ) = ( 𝑏𝑐 ) → ( ( ( ( 𝑏𝐴 ∧ ∀ 𝑎𝑏 Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ 𝑏 ) ∧ ( 𝑐𝐴 ∧ ∀ 𝑎𝑐 Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ 𝑐 ) ) → ( ( dom 𝑔 ∩ dom ) ⊆ 𝐴 ∧ ∀ 𝑎 ∈ ( dom 𝑔 ∩ dom ) Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ ( dom 𝑔 ∩ dom ) ) ) ↔ ( ( ( 𝑏𝐴 ∧ ∀ 𝑎𝑏 Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ 𝑏 ) ∧ ( 𝑐𝐴 ∧ ∀ 𝑎𝑐 Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ 𝑐 ) ) → ( ( 𝑏𝑐 ) ⊆ 𝐴 ∧ ∀ 𝑎 ∈ ( 𝑏𝑐 ) Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ ( 𝑏𝑐 ) ) ) ) )
57 51 56 syl ( ( 𝑔 Fn 𝑏 Fn 𝑐 ) → ( ( ( ( 𝑏𝐴 ∧ ∀ 𝑎𝑏 Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ 𝑏 ) ∧ ( 𝑐𝐴 ∧ ∀ 𝑎𝑐 Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ 𝑐 ) ) → ( ( dom 𝑔 ∩ dom ) ⊆ 𝐴 ∧ ∀ 𝑎 ∈ ( dom 𝑔 ∩ dom ) Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ ( dom 𝑔 ∩ dom ) ) ) ↔ ( ( ( 𝑏𝐴 ∧ ∀ 𝑎𝑏 Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ 𝑏 ) ∧ ( 𝑐𝐴 ∧ ∀ 𝑎𝑐 Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ 𝑐 ) ) → ( ( 𝑏𝑐 ) ⊆ 𝐴 ∧ ∀ 𝑎 ∈ ( 𝑏𝑐 ) Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ ( 𝑏𝑐 ) ) ) ) )
58 49 57 mpbiri ( ( 𝑔 Fn 𝑏 Fn 𝑐 ) → ( ( ( 𝑏𝐴 ∧ ∀ 𝑎𝑏 Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ 𝑏 ) ∧ ( 𝑐𝐴 ∧ ∀ 𝑎𝑐 Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ 𝑐 ) ) → ( ( dom 𝑔 ∩ dom ) ⊆ 𝐴 ∧ ∀ 𝑎 ∈ ( dom 𝑔 ∩ dom ) Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ ( dom 𝑔 ∩ dom ) ) ) )
59 58 imp ( ( ( 𝑔 Fn 𝑏 Fn 𝑐 ) ∧ ( ( 𝑏𝐴 ∧ ∀ 𝑎𝑏 Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ 𝑏 ) ∧ ( 𝑐𝐴 ∧ ∀ 𝑎𝑐 Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ 𝑐 ) ) ) → ( ( dom 𝑔 ∩ dom ) ⊆ 𝐴 ∧ ∀ 𝑎 ∈ ( dom 𝑔 ∩ dom ) Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ ( dom 𝑔 ∩ dom ) ) )
60 59 3adant3 ( ( ( 𝑔 Fn 𝑏 Fn 𝑐 ) ∧ ( ( 𝑏𝐴 ∧ ∀ 𝑎𝑏 Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ 𝑏 ) ∧ ( 𝑐𝐴 ∧ ∀ 𝑎𝑐 Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ 𝑐 ) ) ∧ ( ∀ 𝑎𝑏 ( 𝑔𝑎 ) = ( 𝐹 ‘ ( 𝑔 ↾ Pred ( 𝑅 , 𝐴 , 𝑎 ) ) ) ∧ ∀ 𝑎𝑐 ( 𝑎 ) = ( 𝐹 ‘ ( ↾ Pred ( 𝑅 , 𝐴 , 𝑎 ) ) ) ) ) → ( ( dom 𝑔 ∩ dom ) ⊆ 𝐴 ∧ ∀ 𝑎 ∈ ( dom 𝑔 ∩ dom ) Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ ( dom 𝑔 ∩ dom ) ) )
61 60 exlimivv ( ∃ 𝑏𝑐 ( ( 𝑔 Fn 𝑏 Fn 𝑐 ) ∧ ( ( 𝑏𝐴 ∧ ∀ 𝑎𝑏 Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ 𝑏 ) ∧ ( 𝑐𝐴 ∧ ∀ 𝑎𝑐 Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ 𝑐 ) ) ∧ ( ∀ 𝑎𝑏 ( 𝑔𝑎 ) = ( 𝐹 ‘ ( 𝑔 ↾ Pred ( 𝑅 , 𝐴 , 𝑎 ) ) ) ∧ ∀ 𝑎𝑐 ( 𝑎 ) = ( 𝐹 ‘ ( ↾ Pred ( 𝑅 , 𝐴 , 𝑎 ) ) ) ) ) → ( ( dom 𝑔 ∩ dom ) ⊆ 𝐴 ∧ ∀ 𝑎 ∈ ( dom 𝑔 ∩ dom ) Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ ( dom 𝑔 ∩ dom ) ) )
62 31 61 sylbir ( ( ∃ 𝑏 ( 𝑔 Fn 𝑏 ∧ ( 𝑏𝐴 ∧ ∀ 𝑎𝑏 Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ 𝑏 ) ∧ ∀ 𝑎𝑏 ( 𝑔𝑎 ) = ( 𝐹 ‘ ( 𝑔 ↾ Pred ( 𝑅 , 𝐴 , 𝑎 ) ) ) ) ∧ ∃ 𝑐 ( Fn 𝑐 ∧ ( 𝑐𝐴 ∧ ∀ 𝑎𝑐 Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ 𝑐 ) ∧ ∀ 𝑎𝑐 ( 𝑎 ) = ( 𝐹 ‘ ( ↾ Pred ( 𝑅 , 𝐴 , 𝑎 ) ) ) ) ) → ( ( dom 𝑔 ∩ dom ) ⊆ 𝐴 ∧ ∀ 𝑎 ∈ ( dom 𝑔 ∩ dom ) Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ ( dom 𝑔 ∩ dom ) ) )
63 8 27 62 syl2anb ( ( 𝑔𝐵𝐵 ) → ( ( dom 𝑔 ∩ dom ) ⊆ 𝐴 ∧ ∀ 𝑎 ∈ ( dom 𝑔 ∩ dom ) Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ ( dom 𝑔 ∩ dom ) ) )
64 63 adantr ( ( ( 𝑔𝐵𝐵 ) ∧ 𝑎 ∈ ( dom 𝑔 ∩ dom ) ) → ( ( dom 𝑔 ∩ dom ) ⊆ 𝐴 ∧ ∀ 𝑎 ∈ ( dom 𝑔 ∩ dom ) Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ ( dom 𝑔 ∩ dom ) ) )
65 simpr ( ( ( 𝑔𝐵𝐵 ) ∧ 𝑎 ∈ ( dom 𝑔 ∩ dom ) ) → 𝑎 ∈ ( dom 𝑔 ∩ dom ) )
66 preddowncl ( ( ( dom 𝑔 ∩ dom ) ⊆ 𝐴 ∧ ∀ 𝑎 ∈ ( dom 𝑔 ∩ dom ) Pred ( 𝑅 , 𝐴 , 𝑎 ) ⊆ ( dom 𝑔 ∩ dom ) ) → ( 𝑎 ∈ ( dom 𝑔 ∩ dom ) → Pred ( 𝑅 , ( dom 𝑔 ∩ dom ) , 𝑎 ) = Pred ( 𝑅 , 𝐴 , 𝑎 ) ) )
67 64 65 66 sylc ( ( ( 𝑔𝐵𝐵 ) ∧ 𝑎 ∈ ( dom 𝑔 ∩ dom ) ) → Pred ( 𝑅 , ( dom 𝑔 ∩ dom ) , 𝑎 ) = Pred ( 𝑅 , 𝐴 , 𝑎 ) )
68 25 67 eqtrid ( ( ( 𝑔𝐵𝐵 ) ∧ 𝑎 ∈ ( dom 𝑔 ∩ dom ) ) → ( ( dom 𝑔 ∩ dom ) ∩ Pred ( 𝑅 , ( dom 𝑔 ∩ dom ) , 𝑎 ) ) = Pred ( 𝑅 , 𝐴 , 𝑎 ) )
69 68 reseq2d ( ( ( 𝑔𝐵𝐵 ) ∧ 𝑎 ∈ ( dom 𝑔 ∩ dom ) ) → ( 𝑔 ↾ ( ( dom 𝑔 ∩ dom ) ∩ Pred ( 𝑅 , ( dom 𝑔 ∩ dom ) , 𝑎 ) ) ) = ( 𝑔 ↾ Pred ( 𝑅 , 𝐴 , 𝑎 ) ) )
70 22 69 eqtrid ( ( ( 𝑔𝐵𝐵 ) ∧ 𝑎 ∈ ( dom 𝑔 ∩ dom ) ) → ( ( 𝑔 ↾ ( dom 𝑔 ∩ dom ) ) ↾ Pred ( 𝑅 , ( dom 𝑔 ∩ dom ) , 𝑎 ) ) = ( 𝑔 ↾ Pred ( 𝑅 , 𝐴 , 𝑎 ) ) )
71 70 fveq2d ( ( ( 𝑔𝐵𝐵 ) ∧ 𝑎 ∈ ( dom 𝑔 ∩ dom ) ) → ( 𝐹 ‘ ( ( 𝑔 ↾ ( dom 𝑔 ∩ dom ) ) ↾ Pred ( 𝑅 , ( dom 𝑔 ∩ dom ) , 𝑎 ) ) ) = ( 𝐹 ‘ ( 𝑔 ↾ Pred ( 𝑅 , 𝐴 , 𝑎 ) ) ) )
72 19 21 71 3eqtr4d ( ( ( 𝑔𝐵𝐵 ) ∧ 𝑎 ∈ ( dom 𝑔 ∩ dom ) ) → ( ( 𝑔 ↾ ( dom 𝑔 ∩ dom ) ) ‘ 𝑎 ) = ( 𝐹 ‘ ( ( 𝑔 ↾ ( dom 𝑔 ∩ dom ) ) ↾ Pred ( 𝑅 , ( dom 𝑔 ∩ dom ) , 𝑎 ) ) ) )
73 72 ralrimiva ( ( 𝑔𝐵𝐵 ) → ∀ 𝑎 ∈ ( dom 𝑔 ∩ dom ) ( ( 𝑔 ↾ ( dom 𝑔 ∩ dom ) ) ‘ 𝑎 ) = ( 𝐹 ‘ ( ( 𝑔 ↾ ( dom 𝑔 ∩ dom ) ) ↾ Pred ( 𝑅 , ( dom 𝑔 ∩ dom ) , 𝑎 ) ) ) )
74 6 73 jca ( ( 𝑔𝐵𝐵 ) → ( ( 𝑔 ↾ ( dom 𝑔 ∩ dom ) ) Fn ( dom 𝑔 ∩ dom ) ∧ ∀ 𝑎 ∈ ( dom 𝑔 ∩ dom ) ( ( 𝑔 ↾ ( dom 𝑔 ∩ dom ) ) ‘ 𝑎 ) = ( 𝐹 ‘ ( ( 𝑔 ↾ ( dom 𝑔 ∩ dom ) ) ↾ Pred ( 𝑅 , ( dom 𝑔 ∩ dom ) , 𝑎 ) ) ) ) )