Metamath Proof Explorer


Theorem onunel

Description: The union of two ordinals is in a third iff both of the first two are. (Contributed by Scott Fenton, 10-Sep-2024)

Ref Expression
Assertion onunel ( ( 𝐴 ∈ On ∧ 𝐵 ∈ On ∧ 𝐶 ∈ On ) → ( ( 𝐴𝐵 ) ∈ 𝐶 ↔ ( 𝐴𝐶𝐵𝐶 ) ) )

Proof

Step Hyp Ref Expression
1 ssequn1 ( 𝐴𝐵 ↔ ( 𝐴𝐵 ) = 𝐵 )
2 1 biimpi ( 𝐴𝐵 → ( 𝐴𝐵 ) = 𝐵 )
3 2 eleq1d ( 𝐴𝐵 → ( ( 𝐴𝐵 ) ∈ 𝐶𝐵𝐶 ) )
4 3 adantl ( ( ( 𝐴 ∈ On ∧ 𝐵 ∈ On ∧ 𝐶 ∈ On ) ∧ 𝐴𝐵 ) → ( ( 𝐴𝐵 ) ∈ 𝐶𝐵𝐶 ) )
5 ontr2 ( ( 𝐴 ∈ On ∧ 𝐶 ∈ On ) → ( ( 𝐴𝐵𝐵𝐶 ) → 𝐴𝐶 ) )
6 5 3adant2 ( ( 𝐴 ∈ On ∧ 𝐵 ∈ On ∧ 𝐶 ∈ On ) → ( ( 𝐴𝐵𝐵𝐶 ) → 𝐴𝐶 ) )
7 6 expdimp ( ( ( 𝐴 ∈ On ∧ 𝐵 ∈ On ∧ 𝐶 ∈ On ) ∧ 𝐴𝐵 ) → ( 𝐵𝐶𝐴𝐶 ) )
8 7 pm4.71rd ( ( ( 𝐴 ∈ On ∧ 𝐵 ∈ On ∧ 𝐶 ∈ On ) ∧ 𝐴𝐵 ) → ( 𝐵𝐶 ↔ ( 𝐴𝐶𝐵𝐶 ) ) )
9 4 8 bitrd ( ( ( 𝐴 ∈ On ∧ 𝐵 ∈ On ∧ 𝐶 ∈ On ) ∧ 𝐴𝐵 ) → ( ( 𝐴𝐵 ) ∈ 𝐶 ↔ ( 𝐴𝐶𝐵𝐶 ) ) )
10 ssequn2 ( 𝐵𝐴 ↔ ( 𝐴𝐵 ) = 𝐴 )
11 10 biimpi ( 𝐵𝐴 → ( 𝐴𝐵 ) = 𝐴 )
12 11 eleq1d ( 𝐵𝐴 → ( ( 𝐴𝐵 ) ∈ 𝐶𝐴𝐶 ) )
13 12 adantl ( ( ( 𝐴 ∈ On ∧ 𝐵 ∈ On ∧ 𝐶 ∈ On ) ∧ 𝐵𝐴 ) → ( ( 𝐴𝐵 ) ∈ 𝐶𝐴𝐶 ) )
14 ontr2 ( ( 𝐵 ∈ On ∧ 𝐶 ∈ On ) → ( ( 𝐵𝐴𝐴𝐶 ) → 𝐵𝐶 ) )
15 14 3adant1 ( ( 𝐴 ∈ On ∧ 𝐵 ∈ On ∧ 𝐶 ∈ On ) → ( ( 𝐵𝐴𝐴𝐶 ) → 𝐵𝐶 ) )
16 15 expdimp ( ( ( 𝐴 ∈ On ∧ 𝐵 ∈ On ∧ 𝐶 ∈ On ) ∧ 𝐵𝐴 ) → ( 𝐴𝐶𝐵𝐶 ) )
17 16 pm4.71d ( ( ( 𝐴 ∈ On ∧ 𝐵 ∈ On ∧ 𝐶 ∈ On ) ∧ 𝐵𝐴 ) → ( 𝐴𝐶 ↔ ( 𝐴𝐶𝐵𝐶 ) ) )
18 13 17 bitrd ( ( ( 𝐴 ∈ On ∧ 𝐵 ∈ On ∧ 𝐶 ∈ On ) ∧ 𝐵𝐴 ) → ( ( 𝐴𝐵 ) ∈ 𝐶 ↔ ( 𝐴𝐶𝐵𝐶 ) ) )
19 eloni ( 𝐴 ∈ On → Ord 𝐴 )
20 eloni ( 𝐵 ∈ On → Ord 𝐵 )
21 ordtri2or2 ( ( Ord 𝐴 ∧ Ord 𝐵 ) → ( 𝐴𝐵𝐵𝐴 ) )
22 19 20 21 syl2an ( ( 𝐴 ∈ On ∧ 𝐵 ∈ On ) → ( 𝐴𝐵𝐵𝐴 ) )
23 22 3adant3 ( ( 𝐴 ∈ On ∧ 𝐵 ∈ On ∧ 𝐶 ∈ On ) → ( 𝐴𝐵𝐵𝐴 ) )
24 9 18 23 mpjaodan ( ( 𝐴 ∈ On ∧ 𝐵 ∈ On ∧ 𝐶 ∈ On ) → ( ( 𝐴𝐵 ) ∈ 𝐶 ↔ ( 𝐴𝐶𝐵𝐶 ) ) )