MPE Home Metamath Proof Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  MPE Home  >  Th. List  >  tsrlemax Structured version   Visualization version   GIF version

Theorem tsrlemax 18219
Description: Two ways of saying a number is less than or equal to the maximum of two others. (Contributed by Mario Carneiro, 9-Sep-2015.)
Hypothesis
Ref Expression
istsr.1 𝑋 = dom 𝑅
Assertion
Ref Expression
tsrlemax ((𝑅 ∈ TosetRel ∧ (𝐴𝑋𝐵𝑋𝐶𝑋)) → (𝐴𝑅if(𝐵𝑅𝐶, 𝐶, 𝐵) ↔ (𝐴𝑅𝐵𝐴𝑅𝐶)))

Proof of Theorem tsrlemax
StepHypRef Expression
1 breq2 5074 . . 3 (𝐶 = if(𝐵𝑅𝐶, 𝐶, 𝐵) → (𝐴𝑅𝐶𝐴𝑅if(𝐵𝑅𝐶, 𝐶, 𝐵)))
21bibi1d 343 . 2 (𝐶 = if(𝐵𝑅𝐶, 𝐶, 𝐵) → ((𝐴𝑅𝐶 ↔ (𝐴𝑅𝐵𝐴𝑅𝐶)) ↔ (𝐴𝑅if(𝐵𝑅𝐶, 𝐶, 𝐵) ↔ (𝐴𝑅𝐵𝐴𝑅𝐶))))
3 breq2 5074 . . 3 (𝐵 = if(𝐵𝑅𝐶, 𝐶, 𝐵) → (𝐴𝑅𝐵𝐴𝑅if(𝐵𝑅𝐶, 𝐶, 𝐵)))
43bibi1d 343 . 2 (𝐵 = if(𝐵𝑅𝐶, 𝐶, 𝐵) → ((𝐴𝑅𝐵 ↔ (𝐴𝑅𝐵𝐴𝑅𝐶)) ↔ (𝐴𝑅if(𝐵𝑅𝐶, 𝐶, 𝐵) ↔ (𝐴𝑅𝐵𝐴𝑅𝐶))))
5 olc 864 . . 3 (𝐴𝑅𝐶 → (𝐴𝑅𝐵𝐴𝑅𝐶))
6 eqid 2738 . . . . . . . . . 10 dom 𝑅 = dom 𝑅
76istsr 18216 . . . . . . . . 9 (𝑅 ∈ TosetRel ↔ (𝑅 ∈ PosetRel ∧ (dom 𝑅 × dom 𝑅) ⊆ (𝑅𝑅)))
87simplbi 497 . . . . . . . 8 (𝑅 ∈ TosetRel → 𝑅 ∈ PosetRel)
9 pstr 18210 . . . . . . . . 9 ((𝑅 ∈ PosetRel ∧ 𝐴𝑅𝐵𝐵𝑅𝐶) → 𝐴𝑅𝐶)
1093expib 1120 . . . . . . . 8 (𝑅 ∈ PosetRel → ((𝐴𝑅𝐵𝐵𝑅𝐶) → 𝐴𝑅𝐶))
118, 10syl 17 . . . . . . 7 (𝑅 ∈ TosetRel → ((𝐴𝑅𝐵𝐵𝑅𝐶) → 𝐴𝑅𝐶))
1211adantr 480 . . . . . 6 ((𝑅 ∈ TosetRel ∧ (𝐴𝑋𝐵𝑋𝐶𝑋)) → ((𝐴𝑅𝐵𝐵𝑅𝐶) → 𝐴𝑅𝐶))
1312expdimp 452 . . . . 5 (((𝑅 ∈ TosetRel ∧ (𝐴𝑋𝐵𝑋𝐶𝑋)) ∧ 𝐴𝑅𝐵) → (𝐵𝑅𝐶𝐴𝑅𝐶))
1413impancom 451 . . . 4 (((𝑅 ∈ TosetRel ∧ (𝐴𝑋𝐵𝑋𝐶𝑋)) ∧ 𝐵𝑅𝐶) → (𝐴𝑅𝐵𝐴𝑅𝐶))
15 idd 24 . . . 4 (((𝑅 ∈ TosetRel ∧ (𝐴𝑋𝐵𝑋𝐶𝑋)) ∧ 𝐵𝑅𝐶) → (𝐴𝑅𝐶𝐴𝑅𝐶))
1614, 15jaod 855 . . 3 (((𝑅 ∈ TosetRel ∧ (𝐴𝑋𝐵𝑋𝐶𝑋)) ∧ 𝐵𝑅𝐶) → ((𝐴𝑅𝐵𝐴𝑅𝐶) → 𝐴𝑅𝐶))
175, 16impbid2 225 . 2 (((𝑅 ∈ TosetRel ∧ (𝐴𝑋𝐵𝑋𝐶𝑋)) ∧ 𝐵𝑅𝐶) → (𝐴𝑅𝐶 ↔ (𝐴𝑅𝐵𝐴𝑅𝐶)))
18 orc 863 . . 3 (𝐴𝑅𝐵 → (𝐴𝑅𝐵𝐴𝑅𝐶))
19 idd 24 . . . 4 (((𝑅 ∈ TosetRel ∧ (𝐴𝑋𝐵𝑋𝐶𝑋)) ∧ ¬ 𝐵𝑅𝐶) → (𝐴𝑅𝐵𝐴𝑅𝐵))
20 istsr.1 . . . . . . . 8 𝑋 = dom 𝑅
2120tsrlin 18218 . . . . . . 7 ((𝑅 ∈ TosetRel ∧ 𝐵𝑋𝐶𝑋) → (𝐵𝑅𝐶𝐶𝑅𝐵))
22213adant3r1 1180 . . . . . 6 ((𝑅 ∈ TosetRel ∧ (𝐴𝑋𝐵𝑋𝐶𝑋)) → (𝐵𝑅𝐶𝐶𝑅𝐵))
2322orcanai 999 . . . . 5 (((𝑅 ∈ TosetRel ∧ (𝐴𝑋𝐵𝑋𝐶𝑋)) ∧ ¬ 𝐵𝑅𝐶) → 𝐶𝑅𝐵)
24 pstr 18210 . . . . . . . . . 10 ((𝑅 ∈ PosetRel ∧ 𝐴𝑅𝐶𝐶𝑅𝐵) → 𝐴𝑅𝐵)
25243expib 1120 . . . . . . . . 9 (𝑅 ∈ PosetRel → ((𝐴𝑅𝐶𝐶𝑅𝐵) → 𝐴𝑅𝐵))
268, 25syl 17 . . . . . . . 8 (𝑅 ∈ TosetRel → ((𝐴𝑅𝐶𝐶𝑅𝐵) → 𝐴𝑅𝐵))
2726adantr 480 . . . . . . 7 ((𝑅 ∈ TosetRel ∧ (𝐴𝑋𝐵𝑋𝐶𝑋)) → ((𝐴𝑅𝐶𝐶𝑅𝐵) → 𝐴𝑅𝐵))
2827expdimp 452 . . . . . 6 (((𝑅 ∈ TosetRel ∧ (𝐴𝑋𝐵𝑋𝐶𝑋)) ∧ 𝐴𝑅𝐶) → (𝐶𝑅𝐵𝐴𝑅𝐵))
2928impancom 451 . . . . 5 (((𝑅 ∈ TosetRel ∧ (𝐴𝑋𝐵𝑋𝐶𝑋)) ∧ 𝐶𝑅𝐵) → (𝐴𝑅𝐶𝐴𝑅𝐵))
3023, 29syldan 590 . . . 4 (((𝑅 ∈ TosetRel ∧ (𝐴𝑋𝐵𝑋𝐶𝑋)) ∧ ¬ 𝐵𝑅𝐶) → (𝐴𝑅𝐶𝐴𝑅𝐵))
3119, 30jaod 855 . . 3 (((𝑅 ∈ TosetRel ∧ (𝐴𝑋𝐵𝑋𝐶𝑋)) ∧ ¬ 𝐵𝑅𝐶) → ((𝐴𝑅𝐵𝐴𝑅𝐶) → 𝐴𝑅𝐵))
3218, 31impbid2 225 . 2 (((𝑅 ∈ TosetRel ∧ (𝐴𝑋𝐵𝑋𝐶𝑋)) ∧ ¬ 𝐵𝑅𝐶) → (𝐴𝑅𝐵 ↔ (𝐴𝑅𝐵𝐴𝑅𝐶)))
332, 4, 17, 32ifbothda 4494 1 ((𝑅 ∈ TosetRel ∧ (𝐴𝑋𝐵𝑋𝐶𝑋)) → (𝐴𝑅if(𝐵𝑅𝐶, 𝐶, 𝐵) ↔ (𝐴𝑅𝐵𝐴𝑅𝐶)))
Colors of variables: wff setvar class
Syntax hints:  ¬ wn 3  wi 4  wb 205  wa 395  wo 843  w3a 1085   = wceq 1539  wcel 2108  cun 3881  wss 3883  ifcif 4456   class class class wbr 5070   × cxp 5578  ccnv 5579  dom cdm 5580  PosetRelcps 18197   TosetRel ctsr 18198
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1799  ax-4 1813  ax-5 1914  ax-6 1972  ax-7 2012  ax-8 2110  ax-9 2118  ax-11 2156  ax-12 2173  ax-ext 2709  ax-sep 5218  ax-nul 5225  ax-pr 5347
This theorem depends on definitions:  df-bi 206  df-an 396  df-or 844  df-3an 1087  df-tru 1542  df-fal 1552  df-ex 1784  df-sb 2069  df-clab 2716  df-cleq 2730  df-clel 2817  df-ral 3068  df-rex 3069  df-rab 3072  df-v 3424  df-dif 3886  df-un 3888  df-in 3890  df-ss 3900  df-nul 4254  df-if 4457  df-sn 4559  df-pr 4561  df-op 4565  df-uni 4837  df-br 5071  df-opab 5133  df-id 5480  df-xp 5586  df-rel 5587  df-cnv 5588  df-co 5589  df-dm 5590  df-res 5592  df-ps 18199  df-tsr 18200
This theorem is referenced by:  ordtbaslem  22247
  Copyright terms: Public domain W3C validator