Metamath Proof Explorer


Theorem fiuneneq

Description: Two finite sets of equal size have a union of the same size iff they were equal. (Contributed by Stefan O'Rear, 12-Sep-2015)

Ref Expression
Assertion fiuneneq ( ( 𝐴𝐵𝐴 ∈ Fin ) → ( ( 𝐴𝐵 ) ≈ 𝐴𝐴 = 𝐵 ) )

Proof

Step Hyp Ref Expression
1 simp2 ( ( 𝐴𝐵𝐴 ∈ Fin ∧ ( 𝐴𝐵 ) ≈ 𝐴 ) → 𝐴 ∈ Fin )
2 enfi ( 𝐴𝐵 → ( 𝐴 ∈ Fin ↔ 𝐵 ∈ Fin ) )
3 2 3ad2ant1 ( ( 𝐴𝐵𝐴 ∈ Fin ∧ ( 𝐴𝐵 ) ≈ 𝐴 ) → ( 𝐴 ∈ Fin ↔ 𝐵 ∈ Fin ) )
4 1 3 mpbid ( ( 𝐴𝐵𝐴 ∈ Fin ∧ ( 𝐴𝐵 ) ≈ 𝐴 ) → 𝐵 ∈ Fin )
5 unfi ( ( 𝐴 ∈ Fin ∧ 𝐵 ∈ Fin ) → ( 𝐴𝐵 ) ∈ Fin )
6 1 4 5 syl2anc ( ( 𝐴𝐵𝐴 ∈ Fin ∧ ( 𝐴𝐵 ) ≈ 𝐴 ) → ( 𝐴𝐵 ) ∈ Fin )
7 ssun1 𝐴 ⊆ ( 𝐴𝐵 )
8 7 a1i ( ( 𝐴𝐵𝐴 ∈ Fin ∧ ( 𝐴𝐵 ) ≈ 𝐴 ) → 𝐴 ⊆ ( 𝐴𝐵 ) )
9 simp3 ( ( 𝐴𝐵𝐴 ∈ Fin ∧ ( 𝐴𝐵 ) ≈ 𝐴 ) → ( 𝐴𝐵 ) ≈ 𝐴 )
10 9 ensymd ( ( 𝐴𝐵𝐴 ∈ Fin ∧ ( 𝐴𝐵 ) ≈ 𝐴 ) → 𝐴 ≈ ( 𝐴𝐵 ) )
11 fisseneq ( ( ( 𝐴𝐵 ) ∈ Fin ∧ 𝐴 ⊆ ( 𝐴𝐵 ) ∧ 𝐴 ≈ ( 𝐴𝐵 ) ) → 𝐴 = ( 𝐴𝐵 ) )
12 6 8 10 11 syl3anc ( ( 𝐴𝐵𝐴 ∈ Fin ∧ ( 𝐴𝐵 ) ≈ 𝐴 ) → 𝐴 = ( 𝐴𝐵 ) )
13 ssun2 𝐵 ⊆ ( 𝐴𝐵 )
14 13 a1i ( ( 𝐴𝐵𝐴 ∈ Fin ∧ ( 𝐴𝐵 ) ≈ 𝐴 ) → 𝐵 ⊆ ( 𝐴𝐵 ) )
15 simp1 ( ( 𝐴𝐵𝐴 ∈ Fin ∧ ( 𝐴𝐵 ) ≈ 𝐴 ) → 𝐴𝐵 )
16 entr ( ( ( 𝐴𝐵 ) ≈ 𝐴𝐴𝐵 ) → ( 𝐴𝐵 ) ≈ 𝐵 )
17 9 15 16 syl2anc ( ( 𝐴𝐵𝐴 ∈ Fin ∧ ( 𝐴𝐵 ) ≈ 𝐴 ) → ( 𝐴𝐵 ) ≈ 𝐵 )
18 17 ensymd ( ( 𝐴𝐵𝐴 ∈ Fin ∧ ( 𝐴𝐵 ) ≈ 𝐴 ) → 𝐵 ≈ ( 𝐴𝐵 ) )
19 fisseneq ( ( ( 𝐴𝐵 ) ∈ Fin ∧ 𝐵 ⊆ ( 𝐴𝐵 ) ∧ 𝐵 ≈ ( 𝐴𝐵 ) ) → 𝐵 = ( 𝐴𝐵 ) )
20 6 14 18 19 syl3anc ( ( 𝐴𝐵𝐴 ∈ Fin ∧ ( 𝐴𝐵 ) ≈ 𝐴 ) → 𝐵 = ( 𝐴𝐵 ) )
21 12 20 eqtr4d ( ( 𝐴𝐵𝐴 ∈ Fin ∧ ( 𝐴𝐵 ) ≈ 𝐴 ) → 𝐴 = 𝐵 )
22 21 3expia ( ( 𝐴𝐵𝐴 ∈ Fin ) → ( ( 𝐴𝐵 ) ≈ 𝐴𝐴 = 𝐵 ) )
23 enrefg ( 𝐴 ∈ Fin → 𝐴𝐴 )
24 23 adantl ( ( 𝐴𝐵𝐴 ∈ Fin ) → 𝐴𝐴 )
25 unidm ( 𝐴𝐴 ) = 𝐴
26 uneq2 ( 𝐴 = 𝐵 → ( 𝐴𝐴 ) = ( 𝐴𝐵 ) )
27 25 26 eqtr3id ( 𝐴 = 𝐵𝐴 = ( 𝐴𝐵 ) )
28 27 breq1d ( 𝐴 = 𝐵 → ( 𝐴𝐴 ↔ ( 𝐴𝐵 ) ≈ 𝐴 ) )
29 24 28 syl5ibcom ( ( 𝐴𝐵𝐴 ∈ Fin ) → ( 𝐴 = 𝐵 → ( 𝐴𝐵 ) ≈ 𝐴 ) )
30 22 29 impbid ( ( 𝐴𝐵𝐴 ∈ Fin ) → ( ( 𝐴𝐵 ) ≈ 𝐴𝐴 = 𝐵 ) )