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

Theorem tsrlemax 18304
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 5078 . . 3 (𝐶 = if(𝐵𝑅𝐶, 𝐶, 𝐵) → (𝐴𝑅𝐶𝐴𝑅if(𝐵𝑅𝐶, 𝐶, 𝐵)))
21bibi1d 344 . 2 (𝐶 = if(𝐵𝑅𝐶, 𝐶, 𝐵) → ((𝐴𝑅𝐶 ↔ (𝐴𝑅𝐵𝐴𝑅𝐶)) ↔ (𝐴𝑅if(𝐵𝑅𝐶, 𝐶, 𝐵) ↔ (𝐴𝑅𝐵𝐴𝑅𝐶))))
3 breq2 5078 . . 3 (𝐵 = if(𝐵𝑅𝐶, 𝐶, 𝐵) → (𝐴𝑅𝐵𝐴𝑅if(𝐵𝑅𝐶, 𝐶, 𝐵)))
43bibi1d 344 . 2 (𝐵 = if(𝐵𝑅𝐶, 𝐶, 𝐵) → ((𝐴𝑅𝐵 ↔ (𝐴𝑅𝐵𝐴𝑅𝐶)) ↔ (𝐴𝑅if(𝐵𝑅𝐶, 𝐶, 𝐵) ↔ (𝐴𝑅𝐵𝐴𝑅𝐶))))
5 olc 865 . . 3 (𝐴𝑅𝐶 → (𝐴𝑅𝐵𝐴𝑅𝐶))
6 eqid 2738 . . . . . . . . . 10 dom 𝑅 = dom 𝑅
76istsr 18301 . . . . . . . . 9 (𝑅 ∈ TosetRel ↔ (𝑅 ∈ PosetRel ∧ (dom 𝑅 × dom 𝑅) ⊆ (𝑅𝑅)))
87simplbi 498 . . . . . . . 8 (𝑅 ∈ TosetRel → 𝑅 ∈ PosetRel)
9 pstr 18295 . . . . . . . . 9 ((𝑅 ∈ PosetRel ∧ 𝐴𝑅𝐵𝐵𝑅𝐶) → 𝐴𝑅𝐶)
1093expib 1121 . . . . . . . 8 (𝑅 ∈ PosetRel → ((𝐴𝑅𝐵𝐵𝑅𝐶) → 𝐴𝑅𝐶))
118, 10syl 17 . . . . . . 7 (𝑅 ∈ TosetRel → ((𝐴𝑅𝐵𝐵𝑅𝐶) → 𝐴𝑅𝐶))
1211adantr 481 . . . . . 6 ((𝑅 ∈ TosetRel ∧ (𝐴𝑋𝐵𝑋𝐶𝑋)) → ((𝐴𝑅𝐵𝐵𝑅𝐶) → 𝐴𝑅𝐶))
1312expdimp 453 . . . . 5 (((𝑅 ∈ TosetRel ∧ (𝐴𝑋𝐵𝑋𝐶𝑋)) ∧ 𝐴𝑅𝐵) → (𝐵𝑅𝐶𝐴𝑅𝐶))
1413impancom 452 . . . 4 (((𝑅 ∈ TosetRel ∧ (𝐴𝑋𝐵𝑋𝐶𝑋)) ∧ 𝐵𝑅𝐶) → (𝐴𝑅𝐵𝐴𝑅𝐶))
15 idd 24 . . . 4 (((𝑅 ∈ TosetRel ∧ (𝐴𝑋𝐵𝑋𝐶𝑋)) ∧ 𝐵𝑅𝐶) → (𝐴𝑅𝐶𝐴𝑅𝐶))
1614, 15jaod 856 . . 3 (((𝑅 ∈ TosetRel ∧ (𝐴𝑋𝐵𝑋𝐶𝑋)) ∧ 𝐵𝑅𝐶) → ((𝐴𝑅𝐵𝐴𝑅𝐶) → 𝐴𝑅𝐶))
175, 16impbid2 225 . 2 (((𝑅 ∈ TosetRel ∧ (𝐴𝑋𝐵𝑋𝐶𝑋)) ∧ 𝐵𝑅𝐶) → (𝐴𝑅𝐶 ↔ (𝐴𝑅𝐵𝐴𝑅𝐶)))
18 orc 864 . . 3 (𝐴𝑅𝐵 → (𝐴𝑅𝐵𝐴𝑅𝐶))
19 idd 24 . . . 4 (((𝑅 ∈ TosetRel ∧ (𝐴𝑋𝐵𝑋𝐶𝑋)) ∧ ¬ 𝐵𝑅𝐶) → (𝐴𝑅𝐵𝐴𝑅𝐵))
20 istsr.1 . . . . . . . 8 𝑋 = dom 𝑅
2120tsrlin 18303 . . . . . . 7 ((𝑅 ∈ TosetRel ∧ 𝐵𝑋𝐶𝑋) → (𝐵𝑅𝐶𝐶𝑅𝐵))
22213adant3r1 1181 . . . . . 6 ((𝑅 ∈ TosetRel ∧ (𝐴𝑋𝐵𝑋𝐶𝑋)) → (𝐵𝑅𝐶𝐶𝑅𝐵))
2322orcanai 1000 . . . . 5 (((𝑅 ∈ TosetRel ∧ (𝐴𝑋𝐵𝑋𝐶𝑋)) ∧ ¬ 𝐵𝑅𝐶) → 𝐶𝑅𝐵)
24 pstr 18295 . . . . . . . . . 10 ((𝑅 ∈ PosetRel ∧ 𝐴𝑅𝐶𝐶𝑅𝐵) → 𝐴𝑅𝐵)
25243expib 1121 . . . . . . . . 9 (𝑅 ∈ PosetRel → ((𝐴𝑅𝐶𝐶𝑅𝐵) → 𝐴𝑅𝐵))
268, 25syl 17 . . . . . . . 8 (𝑅 ∈ TosetRel → ((𝐴𝑅𝐶𝐶𝑅𝐵) → 𝐴𝑅𝐵))
2726adantr 481 . . . . . . 7 ((𝑅 ∈ TosetRel ∧ (𝐴𝑋𝐵𝑋𝐶𝑋)) → ((𝐴𝑅𝐶𝐶𝑅𝐵) → 𝐴𝑅𝐵))
2827expdimp 453 . . . . . 6 (((𝑅 ∈ TosetRel ∧ (𝐴𝑋𝐵𝑋𝐶𝑋)) ∧ 𝐴𝑅𝐶) → (𝐶𝑅𝐵𝐴𝑅𝐵))
2928impancom 452 . . . . 5 (((𝑅 ∈ TosetRel ∧ (𝐴𝑋𝐵𝑋𝐶𝑋)) ∧ 𝐶𝑅𝐵) → (𝐴𝑅𝐶𝐴𝑅𝐵))
3023, 29syldan 591 . . . 4 (((𝑅 ∈ TosetRel ∧ (𝐴𝑋𝐵𝑋𝐶𝑋)) ∧ ¬ 𝐵𝑅𝐶) → (𝐴𝑅𝐶𝐴𝑅𝐵))
3119, 30jaod 856 . . 3 (((𝑅 ∈ TosetRel ∧ (𝐴𝑋𝐵𝑋𝐶𝑋)) ∧ ¬ 𝐵𝑅𝐶) → ((𝐴𝑅𝐵𝐴𝑅𝐶) → 𝐴𝑅𝐵))
3218, 31impbid2 225 . 2 (((𝑅 ∈ TosetRel ∧ (𝐴𝑋𝐵𝑋𝐶𝑋)) ∧ ¬ 𝐵𝑅𝐶) → (𝐴𝑅𝐵 ↔ (𝐴𝑅𝐵𝐴𝑅𝐶)))
332, 4, 17, 32ifbothda 4497 1 ((𝑅 ∈ TosetRel ∧ (𝐴𝑋𝐵𝑋𝐶𝑋)) → (𝐴𝑅if(𝐵𝑅𝐶, 𝐶, 𝐵) ↔ (𝐴𝑅𝐵𝐴𝑅𝐶)))
Colors of variables: wff setvar class
Syntax hints:  ¬ wn 3  wi 4  wb 205  wa 396  wo 844  w3a 1086   = wceq 1539  wcel 2106  cun 3885  wss 3887  ifcif 4459   class class class wbr 5074   × cxp 5587  ccnv 5588  dom cdm 5589  PosetRelcps 18282   TosetRel ctsr 18283
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1798  ax-4 1812  ax-5 1913  ax-6 1971  ax-7 2011  ax-8 2108  ax-9 2116  ax-11 2154  ax-ext 2709  ax-sep 5223  ax-nul 5230  ax-pr 5352
This theorem depends on definitions:  df-bi 206  df-an 397  df-or 845  df-3an 1088  df-tru 1542  df-fal 1552  df-ex 1783  df-sb 2068  df-clab 2716  df-cleq 2730  df-clel 2816  df-ral 3069  df-rex 3070  df-rab 3073  df-v 3434  df-dif 3890  df-un 3892  df-in 3894  df-ss 3904  df-nul 4257  df-if 4460  df-sn 4562  df-pr 4564  df-op 4568  df-uni 4840  df-br 5075  df-opab 5137  df-id 5489  df-xp 5595  df-rel 5596  df-cnv 5597  df-co 5598  df-dm 5599  df-res 5601  df-ps 18284  df-tsr 18285
This theorem is referenced by:  ordtbaslem  22339
  Copyright terms: Public domain W3C validator