Metamath Proof Explorer


Theorem fin23lem25

Description: Lemma for fin23 . In a chain of finite sets, equinumerosity is equivalent to equality. (Contributed by Stefan O'Rear, 1-Nov-2014)

Ref Expression
Assertion fin23lem25 ( ( 𝐴 ∈ Fin ∧ 𝐵 ∈ Fin ∧ ( 𝐴𝐵𝐵𝐴 ) ) → ( 𝐴𝐵𝐴 = 𝐵 ) )

Proof

Step Hyp Ref Expression
1 dfpss2 ( 𝐴𝐵 ↔ ( 𝐴𝐵 ∧ ¬ 𝐴 = 𝐵 ) )
2 php3 ( ( 𝐵 ∈ Fin ∧ 𝐴𝐵 ) → 𝐴𝐵 )
3 sdomnen ( 𝐴𝐵 → ¬ 𝐴𝐵 )
4 2 3 syl ( ( 𝐵 ∈ Fin ∧ 𝐴𝐵 ) → ¬ 𝐴𝐵 )
5 4 ex ( 𝐵 ∈ Fin → ( 𝐴𝐵 → ¬ 𝐴𝐵 ) )
6 1 5 syl5bir ( 𝐵 ∈ Fin → ( ( 𝐴𝐵 ∧ ¬ 𝐴 = 𝐵 ) → ¬ 𝐴𝐵 ) )
7 6 adantl ( ( 𝐴 ∈ Fin ∧ 𝐵 ∈ Fin ) → ( ( 𝐴𝐵 ∧ ¬ 𝐴 = 𝐵 ) → ¬ 𝐴𝐵 ) )
8 7 expd ( ( 𝐴 ∈ Fin ∧ 𝐵 ∈ Fin ) → ( 𝐴𝐵 → ( ¬ 𝐴 = 𝐵 → ¬ 𝐴𝐵 ) ) )
9 dfpss2 ( 𝐵𝐴 ↔ ( 𝐵𝐴 ∧ ¬ 𝐵 = 𝐴 ) )
10 eqcom ( 𝐵 = 𝐴𝐴 = 𝐵 )
11 10 notbii ( ¬ 𝐵 = 𝐴 ↔ ¬ 𝐴 = 𝐵 )
12 11 anbi2i ( ( 𝐵𝐴 ∧ ¬ 𝐵 = 𝐴 ) ↔ ( 𝐵𝐴 ∧ ¬ 𝐴 = 𝐵 ) )
13 9 12 bitri ( 𝐵𝐴 ↔ ( 𝐵𝐴 ∧ ¬ 𝐴 = 𝐵 ) )
14 php3 ( ( 𝐴 ∈ Fin ∧ 𝐵𝐴 ) → 𝐵𝐴 )
15 sdomnen ( 𝐵𝐴 → ¬ 𝐵𝐴 )
16 ensym ( 𝐴𝐵𝐵𝐴 )
17 15 16 nsyl ( 𝐵𝐴 → ¬ 𝐴𝐵 )
18 14 17 syl ( ( 𝐴 ∈ Fin ∧ 𝐵𝐴 ) → ¬ 𝐴𝐵 )
19 18 ex ( 𝐴 ∈ Fin → ( 𝐵𝐴 → ¬ 𝐴𝐵 ) )
20 13 19 syl5bir ( 𝐴 ∈ Fin → ( ( 𝐵𝐴 ∧ ¬ 𝐴 = 𝐵 ) → ¬ 𝐴𝐵 ) )
21 20 adantr ( ( 𝐴 ∈ Fin ∧ 𝐵 ∈ Fin ) → ( ( 𝐵𝐴 ∧ ¬ 𝐴 = 𝐵 ) → ¬ 𝐴𝐵 ) )
22 21 expd ( ( 𝐴 ∈ Fin ∧ 𝐵 ∈ Fin ) → ( 𝐵𝐴 → ( ¬ 𝐴 = 𝐵 → ¬ 𝐴𝐵 ) ) )
23 8 22 jaod ( ( 𝐴 ∈ Fin ∧ 𝐵 ∈ Fin ) → ( ( 𝐴𝐵𝐵𝐴 ) → ( ¬ 𝐴 = 𝐵 → ¬ 𝐴𝐵 ) ) )
24 23 3impia ( ( 𝐴 ∈ Fin ∧ 𝐵 ∈ Fin ∧ ( 𝐴𝐵𝐵𝐴 ) ) → ( ¬ 𝐴 = 𝐵 → ¬ 𝐴𝐵 ) )
25 24 con4d ( ( 𝐴 ∈ Fin ∧ 𝐵 ∈ Fin ∧ ( 𝐴𝐵𝐵𝐴 ) ) → ( 𝐴𝐵𝐴 = 𝐵 ) )
26 eqeng ( 𝐴 ∈ Fin → ( 𝐴 = 𝐵𝐴𝐵 ) )
27 26 3ad2ant1 ( ( 𝐴 ∈ Fin ∧ 𝐵 ∈ Fin ∧ ( 𝐴𝐵𝐵𝐴 ) ) → ( 𝐴 = 𝐵𝐴𝐵 ) )
28 25 27 impbid ( ( 𝐴 ∈ Fin ∧ 𝐵 ∈ Fin ∧ ( 𝐴𝐵𝐵𝐴 ) ) → ( 𝐴𝐵𝐴 = 𝐵 ) )