Metamath Proof Explorer


Theorem ioounsn

Description: The union of an open interval with its upper endpoint is a left-open right-closed interval. (Contributed by Jon Pennant, 8-Jun-2019)

Ref Expression
Assertion ioounsn ( ( 𝐴 ∈ ℝ*𝐵 ∈ ℝ*𝐴 < 𝐵 ) → ( ( 𝐴 (,) 𝐵 ) ∪ { 𝐵 } ) = ( 𝐴 (,] 𝐵 ) )

Proof

Step Hyp Ref Expression
1 simp2 ( ( 𝐴 ∈ ℝ*𝐵 ∈ ℝ*𝐴 < 𝐵 ) → 𝐵 ∈ ℝ* )
2 iccid ( 𝐵 ∈ ℝ* → ( 𝐵 [,] 𝐵 ) = { 𝐵 } )
3 1 2 syl ( ( 𝐴 ∈ ℝ*𝐵 ∈ ℝ*𝐴 < 𝐵 ) → ( 𝐵 [,] 𝐵 ) = { 𝐵 } )
4 3 uneq2d ( ( 𝐴 ∈ ℝ*𝐵 ∈ ℝ*𝐴 < 𝐵 ) → ( ( 𝐴 (,) 𝐵 ) ∪ ( 𝐵 [,] 𝐵 ) ) = ( ( 𝐴 (,) 𝐵 ) ∪ { 𝐵 } ) )
5 simp1 ( ( 𝐴 ∈ ℝ*𝐵 ∈ ℝ*𝐴 < 𝐵 ) → 𝐴 ∈ ℝ* )
6 simp3 ( ( 𝐴 ∈ ℝ*𝐵 ∈ ℝ*𝐴 < 𝐵 ) → 𝐴 < 𝐵 )
7 1 xrleidd ( ( 𝐴 ∈ ℝ*𝐵 ∈ ℝ*𝐴 < 𝐵 ) → 𝐵𝐵 )
8 df-ioo (,) = ( 𝑥 ∈ ℝ* , 𝑦 ∈ ℝ* ↦ { 𝑧 ∈ ℝ* ∣ ( 𝑥 < 𝑧𝑧 < 𝑦 ) } )
9 df-icc [,] = ( 𝑥 ∈ ℝ* , 𝑦 ∈ ℝ* ↦ { 𝑧 ∈ ℝ* ∣ ( 𝑥𝑧𝑧𝑦 ) } )
10 xrlenlt ( ( 𝐵 ∈ ℝ*𝑤 ∈ ℝ* ) → ( 𝐵𝑤 ↔ ¬ 𝑤 < 𝐵 ) )
11 df-ioc (,] = ( 𝑥 ∈ ℝ* , 𝑦 ∈ ℝ* ↦ { 𝑧 ∈ ℝ* ∣ ( 𝑥 < 𝑧𝑧𝑦 ) } )
12 simpl1 ( ( ( 𝑤 ∈ ℝ*𝐵 ∈ ℝ*𝐵 ∈ ℝ* ) ∧ ( 𝑤 < 𝐵𝐵𝐵 ) ) → 𝑤 ∈ ℝ* )
13 simpl2 ( ( ( 𝑤 ∈ ℝ*𝐵 ∈ ℝ*𝐵 ∈ ℝ* ) ∧ ( 𝑤 < 𝐵𝐵𝐵 ) ) → 𝐵 ∈ ℝ* )
14 simprl ( ( ( 𝑤 ∈ ℝ*𝐵 ∈ ℝ*𝐵 ∈ ℝ* ) ∧ ( 𝑤 < 𝐵𝐵𝐵 ) ) → 𝑤 < 𝐵 )
15 12 13 14 xrltled ( ( ( 𝑤 ∈ ℝ*𝐵 ∈ ℝ*𝐵 ∈ ℝ* ) ∧ ( 𝑤 < 𝐵𝐵𝐵 ) ) → 𝑤𝐵 )
16 15 ex ( ( 𝑤 ∈ ℝ*𝐵 ∈ ℝ*𝐵 ∈ ℝ* ) → ( ( 𝑤 < 𝐵𝐵𝐵 ) → 𝑤𝐵 ) )
17 xrltletr ( ( 𝐴 ∈ ℝ*𝐵 ∈ ℝ*𝑤 ∈ ℝ* ) → ( ( 𝐴 < 𝐵𝐵𝑤 ) → 𝐴 < 𝑤 ) )
18 8 9 10 11 16 17 ixxun ( ( ( 𝐴 ∈ ℝ*𝐵 ∈ ℝ*𝐵 ∈ ℝ* ) ∧ ( 𝐴 < 𝐵𝐵𝐵 ) ) → ( ( 𝐴 (,) 𝐵 ) ∪ ( 𝐵 [,] 𝐵 ) ) = ( 𝐴 (,] 𝐵 ) )
19 5 1 1 6 7 18 syl32anc ( ( 𝐴 ∈ ℝ*𝐵 ∈ ℝ*𝐴 < 𝐵 ) → ( ( 𝐴 (,) 𝐵 ) ∪ ( 𝐵 [,] 𝐵 ) ) = ( 𝐴 (,] 𝐵 ) )
20 4 19 eqtr3d ( ( 𝐴 ∈ ℝ*𝐵 ∈ ℝ*𝐴 < 𝐵 ) → ( ( 𝐴 (,) 𝐵 ) ∪ { 𝐵 } ) = ( 𝐴 (,] 𝐵 ) )