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

Theorem tsrlemax 16992
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 4582 . . 3 (𝐶 = if(𝐵𝑅𝐶, 𝐶, 𝐵) → (𝐴𝑅𝐶𝐴𝑅if(𝐵𝑅𝐶, 𝐶, 𝐵)))
21bibi1d 332 . 2 (𝐶 = if(𝐵𝑅𝐶, 𝐶, 𝐵) → ((𝐴𝑅𝐶 ↔ (𝐴𝑅𝐵𝐴𝑅𝐶)) ↔ (𝐴𝑅if(𝐵𝑅𝐶, 𝐶, 𝐵) ↔ (𝐴𝑅𝐵𝐴𝑅𝐶))))
3 breq2 4582 . . 3 (𝐵 = if(𝐵𝑅𝐶, 𝐶, 𝐵) → (𝐴𝑅𝐵𝐴𝑅if(𝐵𝑅𝐶, 𝐶, 𝐵)))
43bibi1d 332 . 2 (𝐵 = if(𝐵𝑅𝐶, 𝐶, 𝐵) → ((𝐴𝑅𝐵 ↔ (𝐴𝑅𝐵𝐴𝑅𝐶)) ↔ (𝐴𝑅if(𝐵𝑅𝐶, 𝐶, 𝐵) ↔ (𝐴𝑅𝐵𝐴𝑅𝐶))))
5 olc 398 . . 3 (𝐴𝑅𝐶 → (𝐴𝑅𝐵𝐴𝑅𝐶))
6 eqid 2610 . . . . . . . . . 10 dom 𝑅 = dom 𝑅
76istsr 16989 . . . . . . . . 9 (𝑅 ∈ TosetRel ↔ (𝑅 ∈ PosetRel ∧ (dom 𝑅 × dom 𝑅) ⊆ (𝑅𝑅)))
87simplbi 475 . . . . . . . 8 (𝑅 ∈ TosetRel → 𝑅 ∈ PosetRel)
9 pstr 16983 . . . . . . . . 9 ((𝑅 ∈ PosetRel ∧ 𝐴𝑅𝐵𝐵𝑅𝐶) → 𝐴𝑅𝐶)
1093expib 1260 . . . . . . . 8 (𝑅 ∈ PosetRel → ((𝐴𝑅𝐵𝐵𝑅𝐶) → 𝐴𝑅𝐶))
118, 10syl 17 . . . . . . 7 (𝑅 ∈ TosetRel → ((𝐴𝑅𝐵𝐵𝑅𝐶) → 𝐴𝑅𝐶))
1211adantr 480 . . . . . 6 ((𝑅 ∈ TosetRel ∧ (𝐴𝑋𝐵𝑋𝐶𝑋)) → ((𝐴𝑅𝐵𝐵𝑅𝐶) → 𝐴𝑅𝐶))
1312expdimp 452 . . . . 5 (((𝑅 ∈ TosetRel ∧ (𝐴𝑋𝐵𝑋𝐶𝑋)) ∧ 𝐴𝑅𝐵) → (𝐵𝑅𝐶𝐴𝑅𝐶))
1413impancom 455 . . . 4 (((𝑅 ∈ TosetRel ∧ (𝐴𝑋𝐵𝑋𝐶𝑋)) ∧ 𝐵𝑅𝐶) → (𝐴𝑅𝐵𝐴𝑅𝐶))
15 idd 24 . . . 4 (((𝑅 ∈ TosetRel ∧ (𝐴𝑋𝐵𝑋𝐶𝑋)) ∧ 𝐵𝑅𝐶) → (𝐴𝑅𝐶𝐴𝑅𝐶))
1614, 15jaod 394 . . 3 (((𝑅 ∈ TosetRel ∧ (𝐴𝑋𝐵𝑋𝐶𝑋)) ∧ 𝐵𝑅𝐶) → ((𝐴𝑅𝐵𝐴𝑅𝐶) → 𝐴𝑅𝐶))
175, 16impbid2 215 . 2 (((𝑅 ∈ TosetRel ∧ (𝐴𝑋𝐵𝑋𝐶𝑋)) ∧ 𝐵𝑅𝐶) → (𝐴𝑅𝐶 ↔ (𝐴𝑅𝐵𝐴𝑅𝐶)))
18 orc 399 . . 3 (𝐴𝑅𝐵 → (𝐴𝑅𝐵𝐴𝑅𝐶))
19 idd 24 . . . 4 (((𝑅 ∈ TosetRel ∧ (𝐴𝑋𝐵𝑋𝐶𝑋)) ∧ ¬ 𝐵𝑅𝐶) → (𝐴𝑅𝐵𝐴𝑅𝐵))
20 istsr.1 . . . . . . . 8 𝑋 = dom 𝑅
2120tsrlin 16991 . . . . . . 7 ((𝑅 ∈ TosetRel ∧ 𝐵𝑋𝐶𝑋) → (𝐵𝑅𝐶𝐶𝑅𝐵))
22213adant3r1 1266 . . . . . 6 ((𝑅 ∈ TosetRel ∧ (𝐴𝑋𝐵𝑋𝐶𝑋)) → (𝐵𝑅𝐶𝐶𝑅𝐵))
2322orcanai 950 . . . . 5 (((𝑅 ∈ TosetRel ∧ (𝐴𝑋𝐵𝑋𝐶𝑋)) ∧ ¬ 𝐵𝑅𝐶) → 𝐶𝑅𝐵)
24 pstr 16983 . . . . . . . . . 10 ((𝑅 ∈ PosetRel ∧ 𝐴𝑅𝐶𝐶𝑅𝐵) → 𝐴𝑅𝐵)
25243expib 1260 . . . . . . . . 9 (𝑅 ∈ PosetRel → ((𝐴𝑅𝐶𝐶𝑅𝐵) → 𝐴𝑅𝐵))
268, 25syl 17 . . . . . . . 8 (𝑅 ∈ TosetRel → ((𝐴𝑅𝐶𝐶𝑅𝐵) → 𝐴𝑅𝐵))
2726adantr 480 . . . . . . 7 ((𝑅 ∈ TosetRel ∧ (𝐴𝑋𝐵𝑋𝐶𝑋)) → ((𝐴𝑅𝐶𝐶𝑅𝐵) → 𝐴𝑅𝐵))
2827expdimp 452 . . . . . 6 (((𝑅 ∈ TosetRel ∧ (𝐴𝑋𝐵𝑋𝐶𝑋)) ∧ 𝐴𝑅𝐶) → (𝐶𝑅𝐵𝐴𝑅𝐵))
2928impancom 455 . . . . 5 (((𝑅 ∈ TosetRel ∧ (𝐴𝑋𝐵𝑋𝐶𝑋)) ∧ 𝐶𝑅𝐵) → (𝐴𝑅𝐶𝐴𝑅𝐵))
3023, 29syldan 486 . . . 4 (((𝑅 ∈ TosetRel ∧ (𝐴𝑋𝐵𝑋𝐶𝑋)) ∧ ¬ 𝐵𝑅𝐶) → (𝐴𝑅𝐶𝐴𝑅𝐵))
3119, 30jaod 394 . . 3 (((𝑅 ∈ TosetRel ∧ (𝐴𝑋𝐵𝑋𝐶𝑋)) ∧ ¬ 𝐵𝑅𝐶) → ((𝐴𝑅𝐵𝐴𝑅𝐶) → 𝐴𝑅𝐵))
3218, 31impbid2 215 . 2 (((𝑅 ∈ TosetRel ∧ (𝐴𝑋𝐵𝑋𝐶𝑋)) ∧ ¬ 𝐵𝑅𝐶) → (𝐴𝑅𝐵 ↔ (𝐴𝑅𝐵𝐴𝑅𝐶)))
332, 4, 17, 32ifbothda 4073 1 ((𝑅 ∈ TosetRel ∧ (𝐴𝑋𝐵𝑋𝐶𝑋)) → (𝐴𝑅if(𝐵𝑅𝐶, 𝐶, 𝐵) ↔ (𝐴𝑅𝐵𝐴𝑅𝐶)))
Colors of variables: wff setvar class
Syntax hints:  ¬ wn 3  wi 4  wb 195  wo 382  wa 383  w3a 1031   = wceq 1475  wcel 1977  cun 3538  wss 3540  ifcif 4036   class class class wbr 4578   × cxp 5026  ccnv 5027  dom cdm 5028  PosetRelcps 16970   TosetRel ctsr 16971
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1713  ax-4 1728  ax-5 1827  ax-6 1875  ax-7 1922  ax-9 1986  ax-10 2006  ax-11 2021  ax-12 2034  ax-13 2234  ax-ext 2590  ax-sep 4704  ax-nul 4712  ax-pr 4828
This theorem depends on definitions:  df-bi 196  df-or 384  df-an 385  df-3an 1033  df-tru 1478  df-ex 1696  df-nf 1701  df-sb 1868  df-eu 2462  df-mo 2463  df-clab 2597  df-cleq 2603  df-clel 2606  df-nfc 2740  df-ral 2901  df-rex 2902  df-rab 2905  df-v 3175  df-dif 3543  df-un 3545  df-in 3547  df-ss 3554  df-nul 3875  df-if 4037  df-sn 4126  df-pr 4128  df-op 4132  df-uni 4368  df-br 4579  df-opab 4639  df-id 4943  df-xp 5034  df-rel 5035  df-cnv 5036  df-co 5037  df-dm 5038  df-res 5040  df-ps 16972  df-tsr 16973
This theorem is referenced by:  ordtbaslem  20750
  Copyright terms: Public domain W3C validator