Metamath Proof Explorer


Theorem caofcan

Description: Transfer a cancellation law like mulcan to the function operation. (Contributed by Steve Rodriguez, 16-Nov-2015)

Ref Expression
Hypotheses caofcan.1 ( 𝜑𝐴𝑉 )
caofcan.2 ( 𝜑𝐹 : 𝐴𝑇 )
caofcan.3 ( 𝜑𝐺 : 𝐴𝑆 )
caofcan.4 ( 𝜑𝐻 : 𝐴𝑆 )
caofcan.5 ( ( 𝜑 ∧ ( 𝑥𝑇𝑦𝑆𝑧𝑆 ) ) → ( ( 𝑥 𝑅 𝑦 ) = ( 𝑥 𝑅 𝑧 ) ↔ 𝑦 = 𝑧 ) )
Assertion caofcan ( 𝜑 → ( ( 𝐹f 𝑅 𝐺 ) = ( 𝐹f 𝑅 𝐻 ) ↔ 𝐺 = 𝐻 ) )

Proof

Step Hyp Ref Expression
1 caofcan.1 ( 𝜑𝐴𝑉 )
2 caofcan.2 ( 𝜑𝐹 : 𝐴𝑇 )
3 caofcan.3 ( 𝜑𝐺 : 𝐴𝑆 )
4 caofcan.4 ( 𝜑𝐻 : 𝐴𝑆 )
5 caofcan.5 ( ( 𝜑 ∧ ( 𝑥𝑇𝑦𝑆𝑧𝑆 ) ) → ( ( 𝑥 𝑅 𝑦 ) = ( 𝑥 𝑅 𝑧 ) ↔ 𝑦 = 𝑧 ) )
6 2 ffnd ( 𝜑𝐹 Fn 𝐴 )
7 3 ffnd ( 𝜑𝐺 Fn 𝐴 )
8 inidm ( 𝐴𝐴 ) = 𝐴
9 eqidd ( ( 𝜑𝑤𝐴 ) → ( 𝐹𝑤 ) = ( 𝐹𝑤 ) )
10 eqidd ( ( 𝜑𝑤𝐴 ) → ( 𝐺𝑤 ) = ( 𝐺𝑤 ) )
11 6 7 1 1 8 9 10 ofval ( ( 𝜑𝑤𝐴 ) → ( ( 𝐹f 𝑅 𝐺 ) ‘ 𝑤 ) = ( ( 𝐹𝑤 ) 𝑅 ( 𝐺𝑤 ) ) )
12 4 ffnd ( 𝜑𝐻 Fn 𝐴 )
13 eqidd ( ( 𝜑𝑤𝐴 ) → ( 𝐻𝑤 ) = ( 𝐻𝑤 ) )
14 6 12 1 1 8 9 13 ofval ( ( 𝜑𝑤𝐴 ) → ( ( 𝐹f 𝑅 𝐻 ) ‘ 𝑤 ) = ( ( 𝐹𝑤 ) 𝑅 ( 𝐻𝑤 ) ) )
15 11 14 eqeq12d ( ( 𝜑𝑤𝐴 ) → ( ( ( 𝐹f 𝑅 𝐺 ) ‘ 𝑤 ) = ( ( 𝐹f 𝑅 𝐻 ) ‘ 𝑤 ) ↔ ( ( 𝐹𝑤 ) 𝑅 ( 𝐺𝑤 ) ) = ( ( 𝐹𝑤 ) 𝑅 ( 𝐻𝑤 ) ) ) )
16 simpl ( ( 𝜑𝑤𝐴 ) → 𝜑 )
17 2 ffvelrnda ( ( 𝜑𝑤𝐴 ) → ( 𝐹𝑤 ) ∈ 𝑇 )
18 3 ffvelrnda ( ( 𝜑𝑤𝐴 ) → ( 𝐺𝑤 ) ∈ 𝑆 )
19 4 ffvelrnda ( ( 𝜑𝑤𝐴 ) → ( 𝐻𝑤 ) ∈ 𝑆 )
20 5 caovcang ( ( 𝜑 ∧ ( ( 𝐹𝑤 ) ∈ 𝑇 ∧ ( 𝐺𝑤 ) ∈ 𝑆 ∧ ( 𝐻𝑤 ) ∈ 𝑆 ) ) → ( ( ( 𝐹𝑤 ) 𝑅 ( 𝐺𝑤 ) ) = ( ( 𝐹𝑤 ) 𝑅 ( 𝐻𝑤 ) ) ↔ ( 𝐺𝑤 ) = ( 𝐻𝑤 ) ) )
21 16 17 18 19 20 syl13anc ( ( 𝜑𝑤𝐴 ) → ( ( ( 𝐹𝑤 ) 𝑅 ( 𝐺𝑤 ) ) = ( ( 𝐹𝑤 ) 𝑅 ( 𝐻𝑤 ) ) ↔ ( 𝐺𝑤 ) = ( 𝐻𝑤 ) ) )
22 15 21 bitrd ( ( 𝜑𝑤𝐴 ) → ( ( ( 𝐹f 𝑅 𝐺 ) ‘ 𝑤 ) = ( ( 𝐹f 𝑅 𝐻 ) ‘ 𝑤 ) ↔ ( 𝐺𝑤 ) = ( 𝐻𝑤 ) ) )
23 22 ralbidva ( 𝜑 → ( ∀ 𝑤𝐴 ( ( 𝐹f 𝑅 𝐺 ) ‘ 𝑤 ) = ( ( 𝐹f 𝑅 𝐻 ) ‘ 𝑤 ) ↔ ∀ 𝑤𝐴 ( 𝐺𝑤 ) = ( 𝐻𝑤 ) ) )
24 6 7 1 1 8 offn ( 𝜑 → ( 𝐹f 𝑅 𝐺 ) Fn 𝐴 )
25 6 12 1 1 8 offn ( 𝜑 → ( 𝐹f 𝑅 𝐻 ) Fn 𝐴 )
26 eqfnfv ( ( ( 𝐹f 𝑅 𝐺 ) Fn 𝐴 ∧ ( 𝐹f 𝑅 𝐻 ) Fn 𝐴 ) → ( ( 𝐹f 𝑅 𝐺 ) = ( 𝐹f 𝑅 𝐻 ) ↔ ∀ 𝑤𝐴 ( ( 𝐹f 𝑅 𝐺 ) ‘ 𝑤 ) = ( ( 𝐹f 𝑅 𝐻 ) ‘ 𝑤 ) ) )
27 24 25 26 syl2anc ( 𝜑 → ( ( 𝐹f 𝑅 𝐺 ) = ( 𝐹f 𝑅 𝐻 ) ↔ ∀ 𝑤𝐴 ( ( 𝐹f 𝑅 𝐺 ) ‘ 𝑤 ) = ( ( 𝐹f 𝑅 𝐻 ) ‘ 𝑤 ) ) )
28 eqfnfv ( ( 𝐺 Fn 𝐴𝐻 Fn 𝐴 ) → ( 𝐺 = 𝐻 ↔ ∀ 𝑤𝐴 ( 𝐺𝑤 ) = ( 𝐻𝑤 ) ) )
29 7 12 28 syl2anc ( 𝜑 → ( 𝐺 = 𝐻 ↔ ∀ 𝑤𝐴 ( 𝐺𝑤 ) = ( 𝐻𝑤 ) ) )
30 23 27 29 3bitr4d ( 𝜑 → ( ( 𝐹f 𝑅 𝐺 ) = ( 𝐹f 𝑅 𝐻 ) ↔ 𝐺 = 𝐻 ) )