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

Theorem tsrlemax 17958
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 5044 . . 3 (𝐶 = if(𝐵𝑅𝐶, 𝐶, 𝐵) → (𝐴𝑅𝐶𝐴𝑅if(𝐵𝑅𝐶, 𝐶, 𝐵)))
21bibi1d 347 . 2 (𝐶 = if(𝐵𝑅𝐶, 𝐶, 𝐵) → ((𝐴𝑅𝐶 ↔ (𝐴𝑅𝐵𝐴𝑅𝐶)) ↔ (𝐴𝑅if(𝐵𝑅𝐶, 𝐶, 𝐵) ↔ (𝐴𝑅𝐵𝐴𝑅𝐶))))
3 breq2 5044 . . 3 (𝐵 = if(𝐵𝑅𝐶, 𝐶, 𝐵) → (𝐴𝑅𝐵𝐴𝑅if(𝐵𝑅𝐶, 𝐶, 𝐵)))
43bibi1d 347 . 2 (𝐵 = if(𝐵𝑅𝐶, 𝐶, 𝐵) → ((𝐴𝑅𝐵 ↔ (𝐴𝑅𝐵𝐴𝑅𝐶)) ↔ (𝐴𝑅if(𝐵𝑅𝐶, 𝐶, 𝐵) ↔ (𝐴𝑅𝐵𝐴𝑅𝐶))))
5 olc 867 . . 3 (𝐴𝑅𝐶 → (𝐴𝑅𝐵𝐴𝑅𝐶))
6 eqid 2739 . . . . . . . . . 10 dom 𝑅 = dom 𝑅
76istsr 17955 . . . . . . . . 9 (𝑅 ∈ TosetRel ↔ (𝑅 ∈ PosetRel ∧ (dom 𝑅 × dom 𝑅) ⊆ (𝑅𝑅)))
87simplbi 501 . . . . . . . 8 (𝑅 ∈ TosetRel → 𝑅 ∈ PosetRel)
9 pstr 17949 . . . . . . . . 9 ((𝑅 ∈ PosetRel ∧ 𝐴𝑅𝐵𝐵𝑅𝐶) → 𝐴𝑅𝐶)
1093expib 1123 . . . . . . . 8 (𝑅 ∈ PosetRel → ((𝐴𝑅𝐵𝐵𝑅𝐶) → 𝐴𝑅𝐶))
118, 10syl 17 . . . . . . 7 (𝑅 ∈ TosetRel → ((𝐴𝑅𝐵𝐵𝑅𝐶) → 𝐴𝑅𝐶))
1211adantr 484 . . . . . 6 ((𝑅 ∈ TosetRel ∧ (𝐴𝑋𝐵𝑋𝐶𝑋)) → ((𝐴𝑅𝐵𝐵𝑅𝐶) → 𝐴𝑅𝐶))
1312expdimp 456 . . . . 5 (((𝑅 ∈ TosetRel ∧ (𝐴𝑋𝐵𝑋𝐶𝑋)) ∧ 𝐴𝑅𝐵) → (𝐵𝑅𝐶𝐴𝑅𝐶))
1413impancom 455 . . . 4 (((𝑅 ∈ TosetRel ∧ (𝐴𝑋𝐵𝑋𝐶𝑋)) ∧ 𝐵𝑅𝐶) → (𝐴𝑅𝐵𝐴𝑅𝐶))
15 idd 24 . . . 4 (((𝑅 ∈ TosetRel ∧ (𝐴𝑋𝐵𝑋𝐶𝑋)) ∧ 𝐵𝑅𝐶) → (𝐴𝑅𝐶𝐴𝑅𝐶))
1614, 15jaod 858 . . 3 (((𝑅 ∈ TosetRel ∧ (𝐴𝑋𝐵𝑋𝐶𝑋)) ∧ 𝐵𝑅𝐶) → ((𝐴𝑅𝐵𝐴𝑅𝐶) → 𝐴𝑅𝐶))
175, 16impbid2 229 . 2 (((𝑅 ∈ TosetRel ∧ (𝐴𝑋𝐵𝑋𝐶𝑋)) ∧ 𝐵𝑅𝐶) → (𝐴𝑅𝐶 ↔ (𝐴𝑅𝐵𝐴𝑅𝐶)))
18 orc 866 . . 3 (𝐴𝑅𝐵 → (𝐴𝑅𝐵𝐴𝑅𝐶))
19 idd 24 . . . 4 (((𝑅 ∈ TosetRel ∧ (𝐴𝑋𝐵𝑋𝐶𝑋)) ∧ ¬ 𝐵𝑅𝐶) → (𝐴𝑅𝐵𝐴𝑅𝐵))
20 istsr.1 . . . . . . . 8 𝑋 = dom 𝑅
2120tsrlin 17957 . . . . . . 7 ((𝑅 ∈ TosetRel ∧ 𝐵𝑋𝐶𝑋) → (𝐵𝑅𝐶𝐶𝑅𝐵))
22213adant3r1 1183 . . . . . 6 ((𝑅 ∈ TosetRel ∧ (𝐴𝑋𝐵𝑋𝐶𝑋)) → (𝐵𝑅𝐶𝐶𝑅𝐵))
2322orcanai 1002 . . . . 5 (((𝑅 ∈ TosetRel ∧ (𝐴𝑋𝐵𝑋𝐶𝑋)) ∧ ¬ 𝐵𝑅𝐶) → 𝐶𝑅𝐵)
24 pstr 17949 . . . . . . . . . 10 ((𝑅 ∈ PosetRel ∧ 𝐴𝑅𝐶𝐶𝑅𝐵) → 𝐴𝑅𝐵)
25243expib 1123 . . . . . . . . 9 (𝑅 ∈ PosetRel → ((𝐴𝑅𝐶𝐶𝑅𝐵) → 𝐴𝑅𝐵))
268, 25syl 17 . . . . . . . 8 (𝑅 ∈ TosetRel → ((𝐴𝑅𝐶𝐶𝑅𝐵) → 𝐴𝑅𝐵))
2726adantr 484 . . . . . . 7 ((𝑅 ∈ TosetRel ∧ (𝐴𝑋𝐵𝑋𝐶𝑋)) → ((𝐴𝑅𝐶𝐶𝑅𝐵) → 𝐴𝑅𝐵))
2827expdimp 456 . . . . . 6 (((𝑅 ∈ TosetRel ∧ (𝐴𝑋𝐵𝑋𝐶𝑋)) ∧ 𝐴𝑅𝐶) → (𝐶𝑅𝐵𝐴𝑅𝐵))
2928impancom 455 . . . . 5 (((𝑅 ∈ TosetRel ∧ (𝐴𝑋𝐵𝑋𝐶𝑋)) ∧ 𝐶𝑅𝐵) → (𝐴𝑅𝐶𝐴𝑅𝐵))
3023, 29syldan 594 . . . 4 (((𝑅 ∈ TosetRel ∧ (𝐴𝑋𝐵𝑋𝐶𝑋)) ∧ ¬ 𝐵𝑅𝐶) → (𝐴𝑅𝐶𝐴𝑅𝐵))
3119, 30jaod 858 . . 3 (((𝑅 ∈ TosetRel ∧ (𝐴𝑋𝐵𝑋𝐶𝑋)) ∧ ¬ 𝐵𝑅𝐶) → ((𝐴𝑅𝐵𝐴𝑅𝐶) → 𝐴𝑅𝐵))
3218, 31impbid2 229 . 2 (((𝑅 ∈ TosetRel ∧ (𝐴𝑋𝐵𝑋𝐶𝑋)) ∧ ¬ 𝐵𝑅𝐶) → (𝐴𝑅𝐵 ↔ (𝐴𝑅𝐵𝐴𝑅𝐶)))
332, 4, 17, 32ifbothda 4462 1 ((𝑅 ∈ TosetRel ∧ (𝐴𝑋𝐵𝑋𝐶𝑋)) → (𝐴𝑅if(𝐵𝑅𝐶, 𝐶, 𝐵) ↔ (𝐴𝑅𝐵𝐴𝑅𝐶)))
Colors of variables: wff setvar class
Syntax hints:  ¬ wn 3  wi 4  wb 209  wa 399  wo 846  w3a 1088   = wceq 1542  wcel 2114  cun 3851  wss 3853  ifcif 4424   class class class wbr 5040   × cxp 5533  ccnv 5534  dom cdm 5535  PosetRelcps 17936   TosetRel ctsr 17937
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1802  ax-4 1816  ax-5 1917  ax-6 1975  ax-7 2020  ax-8 2116  ax-9 2124  ax-11 2162  ax-12 2179  ax-ext 2711  ax-sep 5177  ax-nul 5184  ax-pr 5306
This theorem depends on definitions:  df-bi 210  df-an 400  df-or 847  df-3an 1090  df-tru 1545  df-fal 1555  df-ex 1787  df-sb 2075  df-clab 2718  df-cleq 2731  df-clel 2812  df-ral 3059  df-rex 3060  df-rab 3063  df-v 3402  df-dif 3856  df-un 3858  df-in 3860  df-ss 3870  df-nul 4222  df-if 4425  df-sn 4527  df-pr 4529  df-op 4533  df-uni 4807  df-br 5041  df-opab 5103  df-id 5439  df-xp 5541  df-rel 5542  df-cnv 5543  df-co 5544  df-dm 5545  df-res 5547  df-ps 17938  df-tsr 17939
This theorem is referenced by:  ordtbaslem  21951
  Copyright terms: Public domain W3C validator