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

Theorem tsrlemax 17421
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 4808 . . 3 (𝐶 = if(𝐵𝑅𝐶, 𝐶, 𝐵) → (𝐴𝑅𝐶𝐴𝑅if(𝐵𝑅𝐶, 𝐶, 𝐵)))
21bibi1d 332 . 2 (𝐶 = if(𝐵𝑅𝐶, 𝐶, 𝐵) → ((𝐴𝑅𝐶 ↔ (𝐴𝑅𝐵𝐴𝑅𝐶)) ↔ (𝐴𝑅if(𝐵𝑅𝐶, 𝐶, 𝐵) ↔ (𝐴𝑅𝐵𝐴𝑅𝐶))))
3 breq2 4808 . . 3 (𝐵 = if(𝐵𝑅𝐶, 𝐶, 𝐵) → (𝐴𝑅𝐵𝐴𝑅if(𝐵𝑅𝐶, 𝐶, 𝐵)))
43bibi1d 332 . 2 (𝐵 = if(𝐵𝑅𝐶, 𝐶, 𝐵) → ((𝐴𝑅𝐵 ↔ (𝐴𝑅𝐵𝐴𝑅𝐶)) ↔ (𝐴𝑅if(𝐵𝑅𝐶, 𝐶, 𝐵) ↔ (𝐴𝑅𝐵𝐴𝑅𝐶))))
5 olc 398 . . 3 (𝐴𝑅𝐶 → (𝐴𝑅𝐵𝐴𝑅𝐶))
6 eqid 2760 . . . . . . . . . 10 dom 𝑅 = dom 𝑅
76istsr 17418 . . . . . . . . 9 (𝑅 ∈ TosetRel ↔ (𝑅 ∈ PosetRel ∧ (dom 𝑅 × dom 𝑅) ⊆ (𝑅𝑅)))
87simplbi 478 . . . . . . . 8 (𝑅 ∈ TosetRel → 𝑅 ∈ PosetRel)
9 pstr 17412 . . . . . . . . 9 ((𝑅 ∈ PosetRel ∧ 𝐴𝑅𝐵𝐵𝑅𝐶) → 𝐴𝑅𝐶)
1093expib 1117 . . . . . . . 8 (𝑅 ∈ PosetRel → ((𝐴𝑅𝐵𝐵𝑅𝐶) → 𝐴𝑅𝐶))
118, 10syl 17 . . . . . . 7 (𝑅 ∈ TosetRel → ((𝐴𝑅𝐵𝐵𝑅𝐶) → 𝐴𝑅𝐶))
1211adantr 472 . . . . . 6 ((𝑅 ∈ TosetRel ∧ (𝐴𝑋𝐵𝑋𝐶𝑋)) → ((𝐴𝑅𝐵𝐵𝑅𝐶) → 𝐴𝑅𝐶))
1312expdimp 452 . . . . 5 (((𝑅 ∈ TosetRel ∧ (𝐴𝑋𝐵𝑋𝐶𝑋)) ∧ 𝐴𝑅𝐵) → (𝐵𝑅𝐶𝐴𝑅𝐶))
1413impancom 455 . . . 4 (((𝑅 ∈ TosetRel ∧ (𝐴𝑋𝐵𝑋𝐶𝑋)) ∧ 𝐵𝑅𝐶) → (𝐴𝑅𝐵𝐴𝑅𝐶))
15 idd 24 . . . 4 (((𝑅 ∈ TosetRel ∧ (𝐴𝑋𝐵𝑋𝐶𝑋)) ∧ 𝐵𝑅𝐶) → (𝐴𝑅𝐶𝐴𝑅𝐶))
1614, 15jaod 394 . . 3 (((𝑅 ∈ TosetRel ∧ (𝐴𝑋𝐵𝑋𝐶𝑋)) ∧ 𝐵𝑅𝐶) → ((𝐴𝑅𝐵𝐴𝑅𝐶) → 𝐴𝑅𝐶))
175, 16impbid2 216 . 2 (((𝑅 ∈ TosetRel ∧ (𝐴𝑋𝐵𝑋𝐶𝑋)) ∧ 𝐵𝑅𝐶) → (𝐴𝑅𝐶 ↔ (𝐴𝑅𝐵𝐴𝑅𝐶)))
18 orc 399 . . 3 (𝐴𝑅𝐵 → (𝐴𝑅𝐵𝐴𝑅𝐶))
19 idd 24 . . . 4 (((𝑅 ∈ TosetRel ∧ (𝐴𝑋𝐵𝑋𝐶𝑋)) ∧ ¬ 𝐵𝑅𝐶) → (𝐴𝑅𝐵𝐴𝑅𝐵))
20 istsr.1 . . . . . . . 8 𝑋 = dom 𝑅
2120tsrlin 17420 . . . . . . 7 ((𝑅 ∈ TosetRel ∧ 𝐵𝑋𝐶𝑋) → (𝐵𝑅𝐶𝐶𝑅𝐵))
22213adant3r1 1198 . . . . . 6 ((𝑅 ∈ TosetRel ∧ (𝐴𝑋𝐵𝑋𝐶𝑋)) → (𝐵𝑅𝐶𝐶𝑅𝐵))
2322orcanai 990 . . . . 5 (((𝑅 ∈ TosetRel ∧ (𝐴𝑋𝐵𝑋𝐶𝑋)) ∧ ¬ 𝐵𝑅𝐶) → 𝐶𝑅𝐵)
24 pstr 17412 . . . . . . . . . 10 ((𝑅 ∈ PosetRel ∧ 𝐴𝑅𝐶𝐶𝑅𝐵) → 𝐴𝑅𝐵)
25243expib 1117 . . . . . . . . 9 (𝑅 ∈ PosetRel → ((𝐴𝑅𝐶𝐶𝑅𝐵) → 𝐴𝑅𝐵))
268, 25syl 17 . . . . . . . 8 (𝑅 ∈ TosetRel → ((𝐴𝑅𝐶𝐶𝑅𝐵) → 𝐴𝑅𝐵))
2726adantr 472 . . . . . . 7 ((𝑅 ∈ TosetRel ∧ (𝐴𝑋𝐵𝑋𝐶𝑋)) → ((𝐴𝑅𝐶𝐶𝑅𝐵) → 𝐴𝑅𝐵))
2827expdimp 452 . . . . . 6 (((𝑅 ∈ TosetRel ∧ (𝐴𝑋𝐵𝑋𝐶𝑋)) ∧ 𝐴𝑅𝐶) → (𝐶𝑅𝐵𝐴𝑅𝐵))
2928impancom 455 . . . . 5 (((𝑅 ∈ TosetRel ∧ (𝐴𝑋𝐵𝑋𝐶𝑋)) ∧ 𝐶𝑅𝐵) → (𝐴𝑅𝐶𝐴𝑅𝐵))
3023, 29syldan 488 . . . 4 (((𝑅 ∈ TosetRel ∧ (𝐴𝑋𝐵𝑋𝐶𝑋)) ∧ ¬ 𝐵𝑅𝐶) → (𝐴𝑅𝐶𝐴𝑅𝐵))
3119, 30jaod 394 . . 3 (((𝑅 ∈ TosetRel ∧ (𝐴𝑋𝐵𝑋𝐶𝑋)) ∧ ¬ 𝐵𝑅𝐶) → ((𝐴𝑅𝐵𝐴𝑅𝐶) → 𝐴𝑅𝐵))
3218, 31impbid2 216 . 2 (((𝑅 ∈ TosetRel ∧ (𝐴𝑋𝐵𝑋𝐶𝑋)) ∧ ¬ 𝐵𝑅𝐶) → (𝐴𝑅𝐵 ↔ (𝐴𝑅𝐵𝐴𝑅𝐶)))
332, 4, 17, 32ifbothda 4267 1 ((𝑅 ∈ TosetRel ∧ (𝐴𝑋𝐵𝑋𝐶𝑋)) → (𝐴𝑅if(𝐵𝑅𝐶, 𝐶, 𝐵) ↔ (𝐴𝑅𝐵𝐴𝑅𝐶)))
Colors of variables: wff setvar class
Syntax hints:  ¬ wn 3  wi 4  wb 196  wo 382  wa 383  w3a 1072   = wceq 1632  wcel 2139  cun 3713  wss 3715  ifcif 4230   class class class wbr 4804   × cxp 5264  ccnv 5265  dom cdm 5266  PosetRelcps 17399   TosetRel ctsr 17400
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1871  ax-4 1886  ax-5 1988  ax-6 2054  ax-7 2090  ax-9 2148  ax-10 2168  ax-11 2183  ax-12 2196  ax-13 2391  ax-ext 2740  ax-sep 4933  ax-nul 4941  ax-pr 5055
This theorem depends on definitions:  df-bi 197  df-or 384  df-an 385  df-3an 1074  df-tru 1635  df-ex 1854  df-nf 1859  df-sb 2047  df-eu 2611  df-mo 2612  df-clab 2747  df-cleq 2753  df-clel 2756  df-nfc 2891  df-ral 3055  df-rex 3056  df-rab 3059  df-v 3342  df-dif 3718  df-un 3720  df-in 3722  df-ss 3729  df-nul 4059  df-if 4231  df-sn 4322  df-pr 4324  df-op 4328  df-uni 4589  df-br 4805  df-opab 4865  df-id 5174  df-xp 5272  df-rel 5273  df-cnv 5274  df-co 5275  df-dm 5276  df-res 5278  df-ps 17401  df-tsr 17402
This theorem is referenced by:  ordtbaslem  21194
  Copyright terms: Public domain W3C validator