Metamath Proof Explorer


Theorem fsneq

Description: Equality condition for two functions defined on a singleton. (Contributed by Glauco Siliprandi, 3-Mar-2021)

Ref Expression
Hypotheses fsneq.a ( 𝜑𝐴𝑉 )
fsneq.b 𝐵 = { 𝐴 }
fsneq.f ( 𝜑𝐹 Fn 𝐵 )
fsneq.g ( 𝜑𝐺 Fn 𝐵 )
Assertion fsneq ( 𝜑 → ( 𝐹 = 𝐺 ↔ ( 𝐹𝐴 ) = ( 𝐺𝐴 ) ) )

Proof

Step Hyp Ref Expression
1 fsneq.a ( 𝜑𝐴𝑉 )
2 fsneq.b 𝐵 = { 𝐴 }
3 fsneq.f ( 𝜑𝐹 Fn 𝐵 )
4 fsneq.g ( 𝜑𝐺 Fn 𝐵 )
5 eqfnfv ( ( 𝐹 Fn 𝐵𝐺 Fn 𝐵 ) → ( 𝐹 = 𝐺 ↔ ∀ 𝑥𝐵 ( 𝐹𝑥 ) = ( 𝐺𝑥 ) ) )
6 3 4 5 syl2anc ( 𝜑 → ( 𝐹 = 𝐺 ↔ ∀ 𝑥𝐵 ( 𝐹𝑥 ) = ( 𝐺𝑥 ) ) )
7 snidg ( 𝐴𝑉𝐴 ∈ { 𝐴 } )
8 1 7 syl ( 𝜑𝐴 ∈ { 𝐴 } )
9 2 eqcomi { 𝐴 } = 𝐵
10 9 a1i ( 𝜑 → { 𝐴 } = 𝐵 )
11 8 10 eleqtrd ( 𝜑𝐴𝐵 )
12 11 adantr ( ( 𝜑 ∧ ∀ 𝑥𝐵 ( 𝐹𝑥 ) = ( 𝐺𝑥 ) ) → 𝐴𝐵 )
13 simpr ( ( 𝜑 ∧ ∀ 𝑥𝐵 ( 𝐹𝑥 ) = ( 𝐺𝑥 ) ) → ∀ 𝑥𝐵 ( 𝐹𝑥 ) = ( 𝐺𝑥 ) )
14 fveq2 ( 𝑥 = 𝐴 → ( 𝐹𝑥 ) = ( 𝐹𝐴 ) )
15 fveq2 ( 𝑥 = 𝐴 → ( 𝐺𝑥 ) = ( 𝐺𝐴 ) )
16 14 15 eqeq12d ( 𝑥 = 𝐴 → ( ( 𝐹𝑥 ) = ( 𝐺𝑥 ) ↔ ( 𝐹𝐴 ) = ( 𝐺𝐴 ) ) )
17 16 rspcva ( ( 𝐴𝐵 ∧ ∀ 𝑥𝐵 ( 𝐹𝑥 ) = ( 𝐺𝑥 ) ) → ( 𝐹𝐴 ) = ( 𝐺𝐴 ) )
18 12 13 17 syl2anc ( ( 𝜑 ∧ ∀ 𝑥𝐵 ( 𝐹𝑥 ) = ( 𝐺𝑥 ) ) → ( 𝐹𝐴 ) = ( 𝐺𝐴 ) )
19 18 ex ( 𝜑 → ( ∀ 𝑥𝐵 ( 𝐹𝑥 ) = ( 𝐺𝑥 ) → ( 𝐹𝐴 ) = ( 𝐺𝐴 ) ) )
20 simpl ( ( ( 𝐹𝐴 ) = ( 𝐺𝐴 ) ∧ 𝑥𝐵 ) → ( 𝐹𝐴 ) = ( 𝐺𝐴 ) )
21 2 eleq2i ( 𝑥𝐵𝑥 ∈ { 𝐴 } )
22 21 biimpi ( 𝑥𝐵𝑥 ∈ { 𝐴 } )
23 velsn ( 𝑥 ∈ { 𝐴 } ↔ 𝑥 = 𝐴 )
24 22 23 sylib ( 𝑥𝐵𝑥 = 𝐴 )
25 24 fveq2d ( 𝑥𝐵 → ( 𝐹𝑥 ) = ( 𝐹𝐴 ) )
26 25 adantl ( ( ( 𝐹𝐴 ) = ( 𝐺𝐴 ) ∧ 𝑥𝐵 ) → ( 𝐹𝑥 ) = ( 𝐹𝐴 ) )
27 24 fveq2d ( 𝑥𝐵 → ( 𝐺𝑥 ) = ( 𝐺𝐴 ) )
28 27 adantl ( ( ( 𝐹𝐴 ) = ( 𝐺𝐴 ) ∧ 𝑥𝐵 ) → ( 𝐺𝑥 ) = ( 𝐺𝐴 ) )
29 20 26 28 3eqtr4d ( ( ( 𝐹𝐴 ) = ( 𝐺𝐴 ) ∧ 𝑥𝐵 ) → ( 𝐹𝑥 ) = ( 𝐺𝑥 ) )
30 29 adantll ( ( ( 𝜑 ∧ ( 𝐹𝐴 ) = ( 𝐺𝐴 ) ) ∧ 𝑥𝐵 ) → ( 𝐹𝑥 ) = ( 𝐺𝑥 ) )
31 30 ralrimiva ( ( 𝜑 ∧ ( 𝐹𝐴 ) = ( 𝐺𝐴 ) ) → ∀ 𝑥𝐵 ( 𝐹𝑥 ) = ( 𝐺𝑥 ) )
32 31 ex ( 𝜑 → ( ( 𝐹𝐴 ) = ( 𝐺𝐴 ) → ∀ 𝑥𝐵 ( 𝐹𝑥 ) = ( 𝐺𝑥 ) ) )
33 19 32 impbid ( 𝜑 → ( ∀ 𝑥𝐵 ( 𝐹𝑥 ) = ( 𝐺𝑥 ) ↔ ( 𝐹𝐴 ) = ( 𝐺𝐴 ) ) )
34 6 33 bitrd ( 𝜑 → ( 𝐹 = 𝐺 ↔ ( 𝐹𝐴 ) = ( 𝐺𝐴 ) ) )