ILE Home Intuitionistic Logic Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  ILE Home  >  Th. List  >  xrmaxiflemab GIF version

Theorem xrmaxiflemab 11210
Description: Lemma for xrmaxif 11214. A variation of xrmaxleim 11207- that is, if we know which of two real numbers is larger, we know the maximum of the two. (Contributed by Jim Kingdon, 26-Apr-2023.)
Hypotheses
Ref Expression
xrmaxiflemab.a (𝜑𝐴 ∈ ℝ*)
xrmaxiflemab.b (𝜑𝐵 ∈ ℝ*)
xrmaxiflemab.ab (𝜑𝐴 < 𝐵)
Assertion
Ref Expression
xrmaxiflemab (𝜑 → if(𝐵 = +∞, +∞, if(𝐵 = -∞, 𝐴, if(𝐴 = +∞, +∞, if(𝐴 = -∞, 𝐵, sup({𝐴, 𝐵}, ℝ, < ))))) = 𝐵)

Proof of Theorem xrmaxiflemab
StepHypRef Expression
1 simpr 109 . . . 4 ((𝜑𝐵 = +∞) → 𝐵 = +∞)
21iftrued 3533 . . 3 ((𝜑𝐵 = +∞) → if(𝐵 = +∞, +∞, if(𝐵 = -∞, 𝐴, if(𝐴 = +∞, +∞, if(𝐴 = -∞, 𝐵, sup({𝐴, 𝐵}, ℝ, < ))))) = +∞)
32, 1eqtr4d 2206 . 2 ((𝜑𝐵 = +∞) → if(𝐵 = +∞, +∞, if(𝐵 = -∞, 𝐴, if(𝐴 = +∞, +∞, if(𝐴 = -∞, 𝐵, sup({𝐴, 𝐵}, ℝ, < ))))) = 𝐵)
4 simpr 109 . . . 4 ((𝜑 ∧ ¬ 𝐵 = +∞) → ¬ 𝐵 = +∞)
54iffalsed 3536 . . 3 ((𝜑 ∧ ¬ 𝐵 = +∞) → if(𝐵 = +∞, +∞, if(𝐵 = -∞, 𝐴, if(𝐴 = +∞, +∞, if(𝐴 = -∞, 𝐵, sup({𝐴, 𝐵}, ℝ, < ))))) = if(𝐵 = -∞, 𝐴, if(𝐴 = +∞, +∞, if(𝐴 = -∞, 𝐵, sup({𝐴, 𝐵}, ℝ, < )))))
6 xrmaxiflemab.ab . . . . . . 7 (𝜑𝐴 < 𝐵)
76ad2antrr 485 . . . . . 6 (((𝜑 ∧ ¬ 𝐵 = +∞) ∧ 𝐵 = -∞) → 𝐴 < 𝐵)
8 simpr 109 . . . . . 6 (((𝜑 ∧ ¬ 𝐵 = +∞) ∧ 𝐵 = -∞) → 𝐵 = -∞)
97, 8breqtrd 4015 . . . . 5 (((𝜑 ∧ ¬ 𝐵 = +∞) ∧ 𝐵 = -∞) → 𝐴 < -∞)
10 xrmaxiflemab.a . . . . . . 7 (𝜑𝐴 ∈ ℝ*)
11 nltmnf 9745 . . . . . . 7 (𝐴 ∈ ℝ* → ¬ 𝐴 < -∞)
1210, 11syl 14 . . . . . 6 (𝜑 → ¬ 𝐴 < -∞)
1312ad2antrr 485 . . . . 5 (((𝜑 ∧ ¬ 𝐵 = +∞) ∧ 𝐵 = -∞) → ¬ 𝐴 < -∞)
149, 13pm2.21dd 615 . . . 4 (((𝜑 ∧ ¬ 𝐵 = +∞) ∧ 𝐵 = -∞) → if(𝐵 = -∞, 𝐴, if(𝐴 = +∞, +∞, if(𝐴 = -∞, 𝐵, sup({𝐴, 𝐵}, ℝ, < )))) = 𝐵)
15 simpr 109 . . . . . 6 (((𝜑 ∧ ¬ 𝐵 = +∞) ∧ ¬ 𝐵 = -∞) → ¬ 𝐵 = -∞)
1615iffalsed 3536 . . . . 5 (((𝜑 ∧ ¬ 𝐵 = +∞) ∧ ¬ 𝐵 = -∞) → if(𝐵 = -∞, 𝐴, if(𝐴 = +∞, +∞, if(𝐴 = -∞, 𝐵, sup({𝐴, 𝐵}, ℝ, < )))) = if(𝐴 = +∞, +∞, if(𝐴 = -∞, 𝐵, sup({𝐴, 𝐵}, ℝ, < ))))
17 simpr 109 . . . . . . . 8 ((((𝜑 ∧ ¬ 𝐵 = +∞) ∧ ¬ 𝐵 = -∞) ∧ 𝐴 = +∞) → 𝐴 = +∞)
186ad3antrrr 489 . . . . . . . 8 ((((𝜑 ∧ ¬ 𝐵 = +∞) ∧ ¬ 𝐵 = -∞) ∧ 𝐴 = +∞) → 𝐴 < 𝐵)
1917, 18eqbrtrrd 4013 . . . . . . 7 ((((𝜑 ∧ ¬ 𝐵 = +∞) ∧ ¬ 𝐵 = -∞) ∧ 𝐴 = +∞) → +∞ < 𝐵)
20 xrmaxiflemab.b . . . . . . . . 9 (𝜑𝐵 ∈ ℝ*)
21 pnfnlt 9744 . . . . . . . . 9 (𝐵 ∈ ℝ* → ¬ +∞ < 𝐵)
2220, 21syl 14 . . . . . . . 8 (𝜑 → ¬ +∞ < 𝐵)
2322ad3antrrr 489 . . . . . . 7 ((((𝜑 ∧ ¬ 𝐵 = +∞) ∧ ¬ 𝐵 = -∞) ∧ 𝐴 = +∞) → ¬ +∞ < 𝐵)
2419, 23pm2.21dd 615 . . . . . 6 ((((𝜑 ∧ ¬ 𝐵 = +∞) ∧ ¬ 𝐵 = -∞) ∧ 𝐴 = +∞) → if(𝐴 = +∞, +∞, if(𝐴 = -∞, 𝐵, sup({𝐴, 𝐵}, ℝ, < ))) = 𝐵)
25 simpr 109 . . . . . . . 8 ((((𝜑 ∧ ¬ 𝐵 = +∞) ∧ ¬ 𝐵 = -∞) ∧ ¬ 𝐴 = +∞) → ¬ 𝐴 = +∞)
2625iffalsed 3536 . . . . . . 7 ((((𝜑 ∧ ¬ 𝐵 = +∞) ∧ ¬ 𝐵 = -∞) ∧ ¬ 𝐴 = +∞) → if(𝐴 = +∞, +∞, if(𝐴 = -∞, 𝐵, sup({𝐴, 𝐵}, ℝ, < ))) = if(𝐴 = -∞, 𝐵, sup({𝐴, 𝐵}, ℝ, < )))
27 simpr 109 . . . . . . . . 9 (((((𝜑 ∧ ¬ 𝐵 = +∞) ∧ ¬ 𝐵 = -∞) ∧ ¬ 𝐴 = +∞) ∧ 𝐴 = -∞) → 𝐴 = -∞)
2827iftrued 3533 . . . . . . . 8 (((((𝜑 ∧ ¬ 𝐵 = +∞) ∧ ¬ 𝐵 = -∞) ∧ ¬ 𝐴 = +∞) ∧ 𝐴 = -∞) → if(𝐴 = -∞, 𝐵, sup({𝐴, 𝐵}, ℝ, < )) = 𝐵)
29 simpr 109 . . . . . . . . . 10 (((((𝜑 ∧ ¬ 𝐵 = +∞) ∧ ¬ 𝐵 = -∞) ∧ ¬ 𝐴 = +∞) ∧ ¬ 𝐴 = -∞) → ¬ 𝐴 = -∞)
3029iffalsed 3536 . . . . . . . . 9 (((((𝜑 ∧ ¬ 𝐵 = +∞) ∧ ¬ 𝐵 = -∞) ∧ ¬ 𝐴 = +∞) ∧ ¬ 𝐴 = -∞) → if(𝐴 = -∞, 𝐵, sup({𝐴, 𝐵}, ℝ, < )) = sup({𝐴, 𝐵}, ℝ, < ))
3125adantr 274 . . . . . . . . . . . 12 (((((𝜑 ∧ ¬ 𝐵 = +∞) ∧ ¬ 𝐵 = -∞) ∧ ¬ 𝐴 = +∞) ∧ ¬ 𝐴 = -∞) → ¬ 𝐴 = +∞)
32 elxr 9733 . . . . . . . . . . . . . 14 (𝐴 ∈ ℝ* ↔ (𝐴 ∈ ℝ ∨ 𝐴 = +∞ ∨ 𝐴 = -∞))
3310, 32sylib 121 . . . . . . . . . . . . 13 (𝜑 → (𝐴 ∈ ℝ ∨ 𝐴 = +∞ ∨ 𝐴 = -∞))
3433ad4antr 491 . . . . . . . . . . . 12 (((((𝜑 ∧ ¬ 𝐵 = +∞) ∧ ¬ 𝐵 = -∞) ∧ ¬ 𝐴 = +∞) ∧ ¬ 𝐴 = -∞) → (𝐴 ∈ ℝ ∨ 𝐴 = +∞ ∨ 𝐴 = -∞))
3531, 29, 34ecase23d 1345 . . . . . . . . . . 11 (((((𝜑 ∧ ¬ 𝐵 = +∞) ∧ ¬ 𝐵 = -∞) ∧ ¬ 𝐴 = +∞) ∧ ¬ 𝐴 = -∞) → 𝐴 ∈ ℝ)
364ad3antrrr 489 . . . . . . . . . . . 12 (((((𝜑 ∧ ¬ 𝐵 = +∞) ∧ ¬ 𝐵 = -∞) ∧ ¬ 𝐴 = +∞) ∧ ¬ 𝐴 = -∞) → ¬ 𝐵 = +∞)
3715ad2antrr 485 . . . . . . . . . . . 12 (((((𝜑 ∧ ¬ 𝐵 = +∞) ∧ ¬ 𝐵 = -∞) ∧ ¬ 𝐴 = +∞) ∧ ¬ 𝐴 = -∞) → ¬ 𝐵 = -∞)
38 elxr 9733 . . . . . . . . . . . . . 14 (𝐵 ∈ ℝ* ↔ (𝐵 ∈ ℝ ∨ 𝐵 = +∞ ∨ 𝐵 = -∞))
3920, 38sylib 121 . . . . . . . . . . . . 13 (𝜑 → (𝐵 ∈ ℝ ∨ 𝐵 = +∞ ∨ 𝐵 = -∞))
4039ad4antr 491 . . . . . . . . . . . 12 (((((𝜑 ∧ ¬ 𝐵 = +∞) ∧ ¬ 𝐵 = -∞) ∧ ¬ 𝐴 = +∞) ∧ ¬ 𝐴 = -∞) → (𝐵 ∈ ℝ ∨ 𝐵 = +∞ ∨ 𝐵 = -∞))
4136, 37, 40ecase23d 1345 . . . . . . . . . . 11 (((((𝜑 ∧ ¬ 𝐵 = +∞) ∧ ¬ 𝐵 = -∞) ∧ ¬ 𝐴 = +∞) ∧ ¬ 𝐴 = -∞) → 𝐵 ∈ ℝ)
4235, 41jca 304 . . . . . . . . . 10 (((((𝜑 ∧ ¬ 𝐵 = +∞) ∧ ¬ 𝐵 = -∞) ∧ ¬ 𝐴 = +∞) ∧ ¬ 𝐴 = -∞) → (𝐴 ∈ ℝ ∧ 𝐵 ∈ ℝ))
436ad4antr 491 . . . . . . . . . . 11 (((((𝜑 ∧ ¬ 𝐵 = +∞) ∧ ¬ 𝐵 = -∞) ∧ ¬ 𝐴 = +∞) ∧ ¬ 𝐴 = -∞) → 𝐴 < 𝐵)
4435, 41, 43ltled 8038 . . . . . . . . . 10 (((((𝜑 ∧ ¬ 𝐵 = +∞) ∧ ¬ 𝐵 = -∞) ∧ ¬ 𝐴 = +∞) ∧ ¬ 𝐴 = -∞) → 𝐴𝐵)
45 maxleim 11169 . . . . . . . . . 10 ((𝐴 ∈ ℝ ∧ 𝐵 ∈ ℝ) → (𝐴𝐵 → sup({𝐴, 𝐵}, ℝ, < ) = 𝐵))
4642, 44, 45sylc 62 . . . . . . . . 9 (((((𝜑 ∧ ¬ 𝐵 = +∞) ∧ ¬ 𝐵 = -∞) ∧ ¬ 𝐴 = +∞) ∧ ¬ 𝐴 = -∞) → sup({𝐴, 𝐵}, ℝ, < ) = 𝐵)
4730, 46eqtrd 2203 . . . . . . . 8 (((((𝜑 ∧ ¬ 𝐵 = +∞) ∧ ¬ 𝐵 = -∞) ∧ ¬ 𝐴 = +∞) ∧ ¬ 𝐴 = -∞) → if(𝐴 = -∞, 𝐵, sup({𝐴, 𝐵}, ℝ, < )) = 𝐵)
48 xrmnfdc 9800 . . . . . . . . . 10 (𝐴 ∈ ℝ*DECID 𝐴 = -∞)
49 exmiddc 831 . . . . . . . . . 10 (DECID 𝐴 = -∞ → (𝐴 = -∞ ∨ ¬ 𝐴 = -∞))
5010, 48, 493syl 17 . . . . . . . . 9 (𝜑 → (𝐴 = -∞ ∨ ¬ 𝐴 = -∞))
5150ad3antrrr 489 . . . . . . . 8 ((((𝜑 ∧ ¬ 𝐵 = +∞) ∧ ¬ 𝐵 = -∞) ∧ ¬ 𝐴 = +∞) → (𝐴 = -∞ ∨ ¬ 𝐴 = -∞))
5228, 47, 51mpjaodan 793 . . . . . . 7 ((((𝜑 ∧ ¬ 𝐵 = +∞) ∧ ¬ 𝐵 = -∞) ∧ ¬ 𝐴 = +∞) → if(𝐴 = -∞, 𝐵, sup({𝐴, 𝐵}, ℝ, < )) = 𝐵)
5326, 52eqtrd 2203 . . . . . 6 ((((𝜑 ∧ ¬ 𝐵 = +∞) ∧ ¬ 𝐵 = -∞) ∧ ¬ 𝐴 = +∞) → if(𝐴 = +∞, +∞, if(𝐴 = -∞, 𝐵, sup({𝐴, 𝐵}, ℝ, < ))) = 𝐵)
54 xrpnfdc 9799 . . . . . . . 8 (𝐴 ∈ ℝ*DECID 𝐴 = +∞)
55 exmiddc 831 . . . . . . . 8 (DECID 𝐴 = +∞ → (𝐴 = +∞ ∨ ¬ 𝐴 = +∞))
5610, 54, 553syl 17 . . . . . . 7 (𝜑 → (𝐴 = +∞ ∨ ¬ 𝐴 = +∞))
5756ad2antrr 485 . . . . . 6 (((𝜑 ∧ ¬ 𝐵 = +∞) ∧ ¬ 𝐵 = -∞) → (𝐴 = +∞ ∨ ¬ 𝐴 = +∞))
5824, 53, 57mpjaodan 793 . . . . 5 (((𝜑 ∧ ¬ 𝐵 = +∞) ∧ ¬ 𝐵 = -∞) → if(𝐴 = +∞, +∞, if(𝐴 = -∞, 𝐵, sup({𝐴, 𝐵}, ℝ, < ))) = 𝐵)
5916, 58eqtrd 2203 . . . 4 (((𝜑 ∧ ¬ 𝐵 = +∞) ∧ ¬ 𝐵 = -∞) → if(𝐵 = -∞, 𝐴, if(𝐴 = +∞, +∞, if(𝐴 = -∞, 𝐵, sup({𝐴, 𝐵}, ℝ, < )))) = 𝐵)
60 xrmnfdc 9800 . . . . . 6 (𝐵 ∈ ℝ*DECID 𝐵 = -∞)
61 exmiddc 831 . . . . . 6 (DECID 𝐵 = -∞ → (𝐵 = -∞ ∨ ¬ 𝐵 = -∞))
6220, 60, 613syl 17 . . . . 5 (𝜑 → (𝐵 = -∞ ∨ ¬ 𝐵 = -∞))
6362adantr 274 . . . 4 ((𝜑 ∧ ¬ 𝐵 = +∞) → (𝐵 = -∞ ∨ ¬ 𝐵 = -∞))
6414, 59, 63mpjaodan 793 . . 3 ((𝜑 ∧ ¬ 𝐵 = +∞) → if(𝐵 = -∞, 𝐴, if(𝐴 = +∞, +∞, if(𝐴 = -∞, 𝐵, sup({𝐴, 𝐵}, ℝ, < )))) = 𝐵)
655, 64eqtrd 2203 . 2 ((𝜑 ∧ ¬ 𝐵 = +∞) → if(𝐵 = +∞, +∞, if(𝐵 = -∞, 𝐴, if(𝐴 = +∞, +∞, if(𝐴 = -∞, 𝐵, sup({𝐴, 𝐵}, ℝ, < ))))) = 𝐵)
66 xrpnfdc 9799 . . 3 (𝐵 ∈ ℝ*DECID 𝐵 = +∞)
67 exmiddc 831 . . 3 (DECID 𝐵 = +∞ → (𝐵 = +∞ ∨ ¬ 𝐵 = +∞))
6820, 66, 673syl 17 . 2 (𝜑 → (𝐵 = +∞ ∨ ¬ 𝐵 = +∞))
693, 65, 68mpjaodan 793 1 (𝜑 → if(𝐵 = +∞, +∞, if(𝐵 = -∞, 𝐴, if(𝐴 = +∞, +∞, if(𝐴 = -∞, 𝐵, sup({𝐴, 𝐵}, ℝ, < ))))) = 𝐵)
Colors of variables: wff set class
Syntax hints:  ¬ wn 3  wi 4  wa 103  wo 703  DECID wdc 829  w3o 972   = wceq 1348  wcel 2141  ifcif 3526  {cpr 3584   class class class wbr 3989  supcsup 6959  cr 7773  +∞cpnf 7951  -∞cmnf 7952  *cxr 7953   < clt 7954  cle 7955
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-ia1 105  ax-ia2 106  ax-ia3 107  ax-in1 609  ax-in2 610  ax-io 704  ax-5 1440  ax-7 1441  ax-gen 1442  ax-ie1 1486  ax-ie2 1487  ax-8 1497  ax-10 1498  ax-11 1499  ax-i12 1500  ax-bndl 1502  ax-4 1503  ax-17 1519  ax-i9 1523  ax-ial 1527  ax-i5r 1528  ax-13 2143  ax-14 2144  ax-ext 2152  ax-sep 4107  ax-pow 4160  ax-pr 4194  ax-un 4418  ax-setind 4521  ax-cnex 7865  ax-resscn 7866  ax-pre-ltirr 7886  ax-pre-lttrn 7888  ax-pre-apti 7889
This theorem depends on definitions:  df-bi 116  df-dc 830  df-3or 974  df-3an 975  df-tru 1351  df-fal 1354  df-nf 1454  df-sb 1756  df-eu 2022  df-mo 2023  df-clab 2157  df-cleq 2163  df-clel 2166  df-nfc 2301  df-ne 2341  df-nel 2436  df-ral 2453  df-rex 2454  df-reu 2455  df-rmo 2456  df-rab 2457  df-v 2732  df-sbc 2956  df-dif 3123  df-un 3125  df-in 3127  df-ss 3134  df-if 3527  df-pw 3568  df-sn 3589  df-pr 3590  df-op 3592  df-uni 3797  df-br 3990  df-opab 4051  df-xp 4617  df-cnv 4619  df-iota 5160  df-riota 5809  df-sup 6961  df-pnf 7956  df-mnf 7957  df-xr 7958  df-ltxr 7959  df-le 7960
This theorem is referenced by:  xrmaxiflemlub  11211
  Copyright terms: Public domain W3C validator