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

Theorem xrmaxiflemab 11188
Description: Lemma for xrmaxif 11192. A variation of xrmaxleim 11185- 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 3527 . . 3 ((𝜑𝐵 = +∞) → if(𝐵 = +∞, +∞, if(𝐵 = -∞, 𝐴, if(𝐴 = +∞, +∞, if(𝐴 = -∞, 𝐵, sup({𝐴, 𝐵}, ℝ, < ))))) = +∞)
32, 1eqtr4d 2201 . 2 ((𝜑𝐵 = +∞) → if(𝐵 = +∞, +∞, if(𝐵 = -∞, 𝐴, if(𝐴 = +∞, +∞, if(𝐴 = -∞, 𝐵, sup({𝐴, 𝐵}, ℝ, < ))))) = 𝐵)
4 simpr 109 . . . 4 ((𝜑 ∧ ¬ 𝐵 = +∞) → ¬ 𝐵 = +∞)
54iffalsed 3530 . . 3 ((𝜑 ∧ ¬ 𝐵 = +∞) → if(𝐵 = +∞, +∞, if(𝐵 = -∞, 𝐴, if(𝐴 = +∞, +∞, if(𝐴 = -∞, 𝐵, sup({𝐴, 𝐵}, ℝ, < ))))) = if(𝐵 = -∞, 𝐴, if(𝐴 = +∞, +∞, if(𝐴 = -∞, 𝐵, sup({𝐴, 𝐵}, ℝ, < )))))
6 xrmaxiflemab.ab . . . . . . 7 (𝜑𝐴 < 𝐵)
76ad2antrr 480 . . . . . 6 (((𝜑 ∧ ¬ 𝐵 = +∞) ∧ 𝐵 = -∞) → 𝐴 < 𝐵)
8 simpr 109 . . . . . 6 (((𝜑 ∧ ¬ 𝐵 = +∞) ∧ 𝐵 = -∞) → 𝐵 = -∞)
97, 8breqtrd 4008 . . . . 5 (((𝜑 ∧ ¬ 𝐵 = +∞) ∧ 𝐵 = -∞) → 𝐴 < -∞)
10 xrmaxiflemab.a . . . . . . 7 (𝜑𝐴 ∈ ℝ*)
11 nltmnf 9724 . . . . . . 7 (𝐴 ∈ ℝ* → ¬ 𝐴 < -∞)
1210, 11syl 14 . . . . . 6 (𝜑 → ¬ 𝐴 < -∞)
1312ad2antrr 480 . . . . 5 (((𝜑 ∧ ¬ 𝐵 = +∞) ∧ 𝐵 = -∞) → ¬ 𝐴 < -∞)
149, 13pm2.21dd 610 . . . 4 (((𝜑 ∧ ¬ 𝐵 = +∞) ∧ 𝐵 = -∞) → if(𝐵 = -∞, 𝐴, if(𝐴 = +∞, +∞, if(𝐴 = -∞, 𝐵, sup({𝐴, 𝐵}, ℝ, < )))) = 𝐵)
15 simpr 109 . . . . . 6 (((𝜑 ∧ ¬ 𝐵 = +∞) ∧ ¬ 𝐵 = -∞) → ¬ 𝐵 = -∞)
1615iffalsed 3530 . . . . 5 (((𝜑 ∧ ¬ 𝐵 = +∞) ∧ ¬ 𝐵 = -∞) → if(𝐵 = -∞, 𝐴, if(𝐴 = +∞, +∞, if(𝐴 = -∞, 𝐵, sup({𝐴, 𝐵}, ℝ, < )))) = if(𝐴 = +∞, +∞, if(𝐴 = -∞, 𝐵, sup({𝐴, 𝐵}, ℝ, < ))))
17 simpr 109 . . . . . . . 8 ((((𝜑 ∧ ¬ 𝐵 = +∞) ∧ ¬ 𝐵 = -∞) ∧ 𝐴 = +∞) → 𝐴 = +∞)
186ad3antrrr 484 . . . . . . . 8 ((((𝜑 ∧ ¬ 𝐵 = +∞) ∧ ¬ 𝐵 = -∞) ∧ 𝐴 = +∞) → 𝐴 < 𝐵)
1917, 18eqbrtrrd 4006 . . . . . . 7 ((((𝜑 ∧ ¬ 𝐵 = +∞) ∧ ¬ 𝐵 = -∞) ∧ 𝐴 = +∞) → +∞ < 𝐵)
20 xrmaxiflemab.b . . . . . . . . 9 (𝜑𝐵 ∈ ℝ*)
21 pnfnlt 9723 . . . . . . . . 9 (𝐵 ∈ ℝ* → ¬ +∞ < 𝐵)
2220, 21syl 14 . . . . . . . 8 (𝜑 → ¬ +∞ < 𝐵)
2322ad3antrrr 484 . . . . . . 7 ((((𝜑 ∧ ¬ 𝐵 = +∞) ∧ ¬ 𝐵 = -∞) ∧ 𝐴 = +∞) → ¬ +∞ < 𝐵)
2419, 23pm2.21dd 610 . . . . . 6 ((((𝜑 ∧ ¬ 𝐵 = +∞) ∧ ¬ 𝐵 = -∞) ∧ 𝐴 = +∞) → if(𝐴 = +∞, +∞, if(𝐴 = -∞, 𝐵, sup({𝐴, 𝐵}, ℝ, < ))) = 𝐵)
25 simpr 109 . . . . . . . 8 ((((𝜑 ∧ ¬ 𝐵 = +∞) ∧ ¬ 𝐵 = -∞) ∧ ¬ 𝐴 = +∞) → ¬ 𝐴 = +∞)
2625iffalsed 3530 . . . . . . 7 ((((𝜑 ∧ ¬ 𝐵 = +∞) ∧ ¬ 𝐵 = -∞) ∧ ¬ 𝐴 = +∞) → if(𝐴 = +∞, +∞, if(𝐴 = -∞, 𝐵, sup({𝐴, 𝐵}, ℝ, < ))) = if(𝐴 = -∞, 𝐵, sup({𝐴, 𝐵}, ℝ, < )))
27 simpr 109 . . . . . . . . 9 (((((𝜑 ∧ ¬ 𝐵 = +∞) ∧ ¬ 𝐵 = -∞) ∧ ¬ 𝐴 = +∞) ∧ 𝐴 = -∞) → 𝐴 = -∞)
2827iftrued 3527 . . . . . . . 8 (((((𝜑 ∧ ¬ 𝐵 = +∞) ∧ ¬ 𝐵 = -∞) ∧ ¬ 𝐴 = +∞) ∧ 𝐴 = -∞) → if(𝐴 = -∞, 𝐵, sup({𝐴, 𝐵}, ℝ, < )) = 𝐵)
29 simpr 109 . . . . . . . . . 10 (((((𝜑 ∧ ¬ 𝐵 = +∞) ∧ ¬ 𝐵 = -∞) ∧ ¬ 𝐴 = +∞) ∧ ¬ 𝐴 = -∞) → ¬ 𝐴 = -∞)
3029iffalsed 3530 . . . . . . . . 9 (((((𝜑 ∧ ¬ 𝐵 = +∞) ∧ ¬ 𝐵 = -∞) ∧ ¬ 𝐴 = +∞) ∧ ¬ 𝐴 = -∞) → if(𝐴 = -∞, 𝐵, sup({𝐴, 𝐵}, ℝ, < )) = sup({𝐴, 𝐵}, ℝ, < ))
3125adantr 274 . . . . . . . . . . . 12 (((((𝜑 ∧ ¬ 𝐵 = +∞) ∧ ¬ 𝐵 = -∞) ∧ ¬ 𝐴 = +∞) ∧ ¬ 𝐴 = -∞) → ¬ 𝐴 = +∞)
32 elxr 9712 . . . . . . . . . . . . . 14 (𝐴 ∈ ℝ* ↔ (𝐴 ∈ ℝ ∨ 𝐴 = +∞ ∨ 𝐴 = -∞))
3310, 32sylib 121 . . . . . . . . . . . . 13 (𝜑 → (𝐴 ∈ ℝ ∨ 𝐴 = +∞ ∨ 𝐴 = -∞))
3433ad4antr 486 . . . . . . . . . . . 12 (((((𝜑 ∧ ¬ 𝐵 = +∞) ∧ ¬ 𝐵 = -∞) ∧ ¬ 𝐴 = +∞) ∧ ¬ 𝐴 = -∞) → (𝐴 ∈ ℝ ∨ 𝐴 = +∞ ∨ 𝐴 = -∞))
3531, 29, 34ecase23d 1340 . . . . . . . . . . 11 (((((𝜑 ∧ ¬ 𝐵 = +∞) ∧ ¬ 𝐵 = -∞) ∧ ¬ 𝐴 = +∞) ∧ ¬ 𝐴 = -∞) → 𝐴 ∈ ℝ)
364ad3antrrr 484 . . . . . . . . . . . 12 (((((𝜑 ∧ ¬ 𝐵 = +∞) ∧ ¬ 𝐵 = -∞) ∧ ¬ 𝐴 = +∞) ∧ ¬ 𝐴 = -∞) → ¬ 𝐵 = +∞)
3715ad2antrr 480 . . . . . . . . . . . 12 (((((𝜑 ∧ ¬ 𝐵 = +∞) ∧ ¬ 𝐵 = -∞) ∧ ¬ 𝐴 = +∞) ∧ ¬ 𝐴 = -∞) → ¬ 𝐵 = -∞)
38 elxr 9712 . . . . . . . . . . . . . 14 (𝐵 ∈ ℝ* ↔ (𝐵 ∈ ℝ ∨ 𝐵 = +∞ ∨ 𝐵 = -∞))
3920, 38sylib 121 . . . . . . . . . . . . 13 (𝜑 → (𝐵 ∈ ℝ ∨ 𝐵 = +∞ ∨ 𝐵 = -∞))
4039ad4antr 486 . . . . . . . . . . . 12 (((((𝜑 ∧ ¬ 𝐵 = +∞) ∧ ¬ 𝐵 = -∞) ∧ ¬ 𝐴 = +∞) ∧ ¬ 𝐴 = -∞) → (𝐵 ∈ ℝ ∨ 𝐵 = +∞ ∨ 𝐵 = -∞))
4136, 37, 40ecase23d 1340 . . . . . . . . . . 11 (((((𝜑 ∧ ¬ 𝐵 = +∞) ∧ ¬ 𝐵 = -∞) ∧ ¬ 𝐴 = +∞) ∧ ¬ 𝐴 = -∞) → 𝐵 ∈ ℝ)
4235, 41jca 304 . . . . . . . . . 10 (((((𝜑 ∧ ¬ 𝐵 = +∞) ∧ ¬ 𝐵 = -∞) ∧ ¬ 𝐴 = +∞) ∧ ¬ 𝐴 = -∞) → (𝐴 ∈ ℝ ∧ 𝐵 ∈ ℝ))
436ad4antr 486 . . . . . . . . . . 11 (((((𝜑 ∧ ¬ 𝐵 = +∞) ∧ ¬ 𝐵 = -∞) ∧ ¬ 𝐴 = +∞) ∧ ¬ 𝐴 = -∞) → 𝐴 < 𝐵)
4435, 41, 43ltled 8017 . . . . . . . . . 10 (((((𝜑 ∧ ¬ 𝐵 = +∞) ∧ ¬ 𝐵 = -∞) ∧ ¬ 𝐴 = +∞) ∧ ¬ 𝐴 = -∞) → 𝐴𝐵)
45 maxleim 11147 . . . . . . . . . 10 ((𝐴 ∈ ℝ ∧ 𝐵 ∈ ℝ) → (𝐴𝐵 → sup({𝐴, 𝐵}, ℝ, < ) = 𝐵))
4642, 44, 45sylc 62 . . . . . . . . 9 (((((𝜑 ∧ ¬ 𝐵 = +∞) ∧ ¬ 𝐵 = -∞) ∧ ¬ 𝐴 = +∞) ∧ ¬ 𝐴 = -∞) → sup({𝐴, 𝐵}, ℝ, < ) = 𝐵)
4730, 46eqtrd 2198 . . . . . . . 8 (((((𝜑 ∧ ¬ 𝐵 = +∞) ∧ ¬ 𝐵 = -∞) ∧ ¬ 𝐴 = +∞) ∧ ¬ 𝐴 = -∞) → if(𝐴 = -∞, 𝐵, sup({𝐴, 𝐵}, ℝ, < )) = 𝐵)
48 xrmnfdc 9779 . . . . . . . . . 10 (𝐴 ∈ ℝ*DECID 𝐴 = -∞)
49 exmiddc 826 . . . . . . . . . 10 (DECID 𝐴 = -∞ → (𝐴 = -∞ ∨ ¬ 𝐴 = -∞))
5010, 48, 493syl 17 . . . . . . . . 9 (𝜑 → (𝐴 = -∞ ∨ ¬ 𝐴 = -∞))
5150ad3antrrr 484 . . . . . . . 8 ((((𝜑 ∧ ¬ 𝐵 = +∞) ∧ ¬ 𝐵 = -∞) ∧ ¬ 𝐴 = +∞) → (𝐴 = -∞ ∨ ¬ 𝐴 = -∞))
5228, 47, 51mpjaodan 788 . . . . . . 7 ((((𝜑 ∧ ¬ 𝐵 = +∞) ∧ ¬ 𝐵 = -∞) ∧ ¬ 𝐴 = +∞) → if(𝐴 = -∞, 𝐵, sup({𝐴, 𝐵}, ℝ, < )) = 𝐵)
5326, 52eqtrd 2198 . . . . . 6 ((((𝜑 ∧ ¬ 𝐵 = +∞) ∧ ¬ 𝐵 = -∞) ∧ ¬ 𝐴 = +∞) → if(𝐴 = +∞, +∞, if(𝐴 = -∞, 𝐵, sup({𝐴, 𝐵}, ℝ, < ))) = 𝐵)
54 xrpnfdc 9778 . . . . . . . 8 (𝐴 ∈ ℝ*DECID 𝐴 = +∞)
55 exmiddc 826 . . . . . . . 8 (DECID 𝐴 = +∞ → (𝐴 = +∞ ∨ ¬ 𝐴 = +∞))
5610, 54, 553syl 17 . . . . . . 7 (𝜑 → (𝐴 = +∞ ∨ ¬ 𝐴 = +∞))
5756ad2antrr 480 . . . . . 6 (((𝜑 ∧ ¬ 𝐵 = +∞) ∧ ¬ 𝐵 = -∞) → (𝐴 = +∞ ∨ ¬ 𝐴 = +∞))
5824, 53, 57mpjaodan 788 . . . . 5 (((𝜑 ∧ ¬ 𝐵 = +∞) ∧ ¬ 𝐵 = -∞) → if(𝐴 = +∞, +∞, if(𝐴 = -∞, 𝐵, sup({𝐴, 𝐵}, ℝ, < ))) = 𝐵)
5916, 58eqtrd 2198 . . . 4 (((𝜑 ∧ ¬ 𝐵 = +∞) ∧ ¬ 𝐵 = -∞) → if(𝐵 = -∞, 𝐴, if(𝐴 = +∞, +∞, if(𝐴 = -∞, 𝐵, sup({𝐴, 𝐵}, ℝ, < )))) = 𝐵)
60 xrmnfdc 9779 . . . . . 6 (𝐵 ∈ ℝ*DECID 𝐵 = -∞)
61 exmiddc 826 . . . . . 6 (DECID 𝐵 = -∞ → (𝐵 = -∞ ∨ ¬ 𝐵 = -∞))
6220, 60, 613syl 17 . . . . 5 (𝜑 → (𝐵 = -∞ ∨ ¬ 𝐵 = -∞))
6362adantr 274 . . . 4 ((𝜑 ∧ ¬ 𝐵 = +∞) → (𝐵 = -∞ ∨ ¬ 𝐵 = -∞))
6414, 59, 63mpjaodan 788 . . 3 ((𝜑 ∧ ¬ 𝐵 = +∞) → if(𝐵 = -∞, 𝐴, if(𝐴 = +∞, +∞, if(𝐴 = -∞, 𝐵, sup({𝐴, 𝐵}, ℝ, < )))) = 𝐵)
655, 64eqtrd 2198 . 2 ((𝜑 ∧ ¬ 𝐵 = +∞) → if(𝐵 = +∞, +∞, if(𝐵 = -∞, 𝐴, if(𝐴 = +∞, +∞, if(𝐴 = -∞, 𝐵, sup({𝐴, 𝐵}, ℝ, < ))))) = 𝐵)
66 xrpnfdc 9778 . . 3 (𝐵 ∈ ℝ*DECID 𝐵 = +∞)
67 exmiddc 826 . . 3 (DECID 𝐵 = +∞ → (𝐵 = +∞ ∨ ¬ 𝐵 = +∞))
6820, 66, 673syl 17 . 2 (𝜑 → (𝐵 = +∞ ∨ ¬ 𝐵 = +∞))
693, 65, 68mpjaodan 788 1 (𝜑 → if(𝐵 = +∞, +∞, if(𝐵 = -∞, 𝐴, if(𝐴 = +∞, +∞, if(𝐴 = -∞, 𝐵, sup({𝐴, 𝐵}, ℝ, < ))))) = 𝐵)
Colors of variables: wff set class
Syntax hints:  ¬ wn 3  wi 4  wa 103  wo 698  DECID wdc 824  w3o 967   = wceq 1343  wcel 2136  ifcif 3520  {cpr 3577   class class class wbr 3982  supcsup 6947  cr 7752  +∞cpnf 7930  -∞cmnf 7931  *cxr 7932   < clt 7933  cle 7934
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 604  ax-in2 605  ax-io 699  ax-5 1435  ax-7 1436  ax-gen 1437  ax-ie1 1481  ax-ie2 1482  ax-8 1492  ax-10 1493  ax-11 1494  ax-i12 1495  ax-bndl 1497  ax-4 1498  ax-17 1514  ax-i9 1518  ax-ial 1522  ax-i5r 1523  ax-13 2138  ax-14 2139  ax-ext 2147  ax-sep 4100  ax-pow 4153  ax-pr 4187  ax-un 4411  ax-setind 4514  ax-cnex 7844  ax-resscn 7845  ax-pre-ltirr 7865  ax-pre-lttrn 7867  ax-pre-apti 7868
This theorem depends on definitions:  df-bi 116  df-dc 825  df-3or 969  df-3an 970  df-tru 1346  df-fal 1349  df-nf 1449  df-sb 1751  df-eu 2017  df-mo 2018  df-clab 2152  df-cleq 2158  df-clel 2161  df-nfc 2297  df-ne 2337  df-nel 2432  df-ral 2449  df-rex 2450  df-reu 2451  df-rmo 2452  df-rab 2453  df-v 2728  df-sbc 2952  df-dif 3118  df-un 3120  df-in 3122  df-ss 3129  df-if 3521  df-pw 3561  df-sn 3582  df-pr 3583  df-op 3585  df-uni 3790  df-br 3983  df-opab 4044  df-xp 4610  df-cnv 4612  df-iota 5153  df-riota 5798  df-sup 6949  df-pnf 7935  df-mnf 7936  df-xr 7937  df-ltxr 7938  df-le 7939
This theorem is referenced by:  xrmaxiflemlub  11189
  Copyright terms: Public domain W3C validator