Step | Hyp | Ref
| Expression |
1 | | 0re 10977 |
. . . . . 6
⊢ 0 ∈
ℝ |
2 | | 1re 10975 |
. . . . . 6
⊢ 1 ∈
ℝ |
3 | 1, 2 | ifcli 4506 |
. . . . 5
⊢ if(𝑥 = 𝑦, 0, 1) ∈ ℝ |
4 | 3 | rgen2w 3077 |
. . . 4
⊢
∀𝑥 ∈
𝑋 ∀𝑦 ∈ 𝑋 if(𝑥 = 𝑦, 0, 1) ∈ ℝ |
5 | | dscmet.1 |
. . . . 5
⊢ 𝐷 = (𝑥 ∈ 𝑋, 𝑦 ∈ 𝑋 ↦ if(𝑥 = 𝑦, 0, 1)) |
6 | 5 | fmpo 7908 |
. . . 4
⊢
(∀𝑥 ∈
𝑋 ∀𝑦 ∈ 𝑋 if(𝑥 = 𝑦, 0, 1) ∈ ℝ ↔ 𝐷:(𝑋 × 𝑋)⟶ℝ) |
7 | 4, 6 | mpbi 229 |
. . 3
⊢ 𝐷:(𝑋 × 𝑋)⟶ℝ |
8 | | equequ1 2028 |
. . . . . . . . 9
⊢ (𝑥 = 𝑤 → (𝑥 = 𝑦 ↔ 𝑤 = 𝑦)) |
9 | 8 | ifbid 4482 |
. . . . . . . 8
⊢ (𝑥 = 𝑤 → if(𝑥 = 𝑦, 0, 1) = if(𝑤 = 𝑦, 0, 1)) |
10 | | equequ2 2029 |
. . . . . . . . 9
⊢ (𝑦 = 𝑣 → (𝑤 = 𝑦 ↔ 𝑤 = 𝑣)) |
11 | 10 | ifbid 4482 |
. . . . . . . 8
⊢ (𝑦 = 𝑣 → if(𝑤 = 𝑦, 0, 1) = if(𝑤 = 𝑣, 0, 1)) |
12 | | 0nn0 12248 |
. . . . . . . . . 10
⊢ 0 ∈
ℕ0 |
13 | | 1nn0 12249 |
. . . . . . . . . 10
⊢ 1 ∈
ℕ0 |
14 | 12, 13 | ifcli 4506 |
. . . . . . . . 9
⊢ if(𝑤 = 𝑣, 0, 1) ∈
ℕ0 |
15 | 14 | elexi 3451 |
. . . . . . . 8
⊢ if(𝑤 = 𝑣, 0, 1) ∈ V |
16 | 9, 11, 5, 15 | ovmpo 7433 |
. . . . . . 7
⊢ ((𝑤 ∈ 𝑋 ∧ 𝑣 ∈ 𝑋) → (𝑤𝐷𝑣) = if(𝑤 = 𝑣, 0, 1)) |
17 | 16 | eqeq1d 2740 |
. . . . . 6
⊢ ((𝑤 ∈ 𝑋 ∧ 𝑣 ∈ 𝑋) → ((𝑤𝐷𝑣) = 0 ↔ if(𝑤 = 𝑣, 0, 1) = 0)) |
18 | | iffalse 4468 |
. . . . . . . . . 10
⊢ (¬
𝑤 = 𝑣 → if(𝑤 = 𝑣, 0, 1) = 1) |
19 | | ax-1ne0 10940 |
. . . . . . . . . . 11
⊢ 1 ≠
0 |
20 | 19 | a1i 11 |
. . . . . . . . . 10
⊢ (¬
𝑤 = 𝑣 → 1 ≠ 0) |
21 | 18, 20 | eqnetrd 3011 |
. . . . . . . . 9
⊢ (¬
𝑤 = 𝑣 → if(𝑤 = 𝑣, 0, 1) ≠ 0) |
22 | 21 | neneqd 2948 |
. . . . . . . 8
⊢ (¬
𝑤 = 𝑣 → ¬ if(𝑤 = 𝑣, 0, 1) = 0) |
23 | 22 | con4i 114 |
. . . . . . 7
⊢ (if(𝑤 = 𝑣, 0, 1) = 0 → 𝑤 = 𝑣) |
24 | | iftrue 4465 |
. . . . . . 7
⊢ (𝑤 = 𝑣 → if(𝑤 = 𝑣, 0, 1) = 0) |
25 | 23, 24 | impbii 208 |
. . . . . 6
⊢ (if(𝑤 = 𝑣, 0, 1) = 0 ↔ 𝑤 = 𝑣) |
26 | 17, 25 | bitrdi 287 |
. . . . 5
⊢ ((𝑤 ∈ 𝑋 ∧ 𝑣 ∈ 𝑋) → ((𝑤𝐷𝑣) = 0 ↔ 𝑤 = 𝑣)) |
27 | 12, 13 | ifcli 4506 |
. . . . . . . . . . 11
⊢ if(𝑢 = 𝑤, 0, 1) ∈
ℕ0 |
28 | 12, 13 | ifcli 4506 |
. . . . . . . . . . 11
⊢ if(𝑢 = 𝑣, 0, 1) ∈
ℕ0 |
29 | 27, 28 | nn0addcli 12270 |
. . . . . . . . . 10
⊢ (if(𝑢 = 𝑤, 0, 1) + if(𝑢 = 𝑣, 0, 1)) ∈
ℕ0 |
30 | | elnn0 12235 |
. . . . . . . . . 10
⊢
((if(𝑢 = 𝑤, 0, 1) + if(𝑢 = 𝑣, 0, 1)) ∈ ℕ0 ↔
((if(𝑢 = 𝑤, 0, 1) + if(𝑢 = 𝑣, 0, 1)) ∈ ℕ ∨ (if(𝑢 = 𝑤, 0, 1) + if(𝑢 = 𝑣, 0, 1)) = 0)) |
31 | 29, 30 | mpbi 229 |
. . . . . . . . 9
⊢
((if(𝑢 = 𝑤, 0, 1) + if(𝑢 = 𝑣, 0, 1)) ∈ ℕ ∨ (if(𝑢 = 𝑤, 0, 1) + if(𝑢 = 𝑣, 0, 1)) = 0) |
32 | | breq1 5077 |
. . . . . . . . . . . 12
⊢ (0 =
if(𝑤 = 𝑣, 0, 1) → (0 ≤ 1 ↔ if(𝑤 = 𝑣, 0, 1) ≤ 1)) |
33 | | breq1 5077 |
. . . . . . . . . . . 12
⊢ (1 =
if(𝑤 = 𝑣, 0, 1) → (1 ≤ 1 ↔ if(𝑤 = 𝑣, 0, 1) ≤ 1)) |
34 | | 0le1 11498 |
. . . . . . . . . . . 12
⊢ 0 ≤
1 |
35 | 2 | leidi 11509 |
. . . . . . . . . . . 12
⊢ 1 ≤
1 |
36 | 32, 33, 34, 35 | keephyp 4530 |
. . . . . . . . . . 11
⊢ if(𝑤 = 𝑣, 0, 1) ≤ 1 |
37 | | nnge1 12001 |
. . . . . . . . . . 11
⊢
((if(𝑢 = 𝑤, 0, 1) + if(𝑢 = 𝑣, 0, 1)) ∈ ℕ → 1 ≤
(if(𝑢 = 𝑤, 0, 1) + if(𝑢 = 𝑣, 0, 1))) |
38 | 14 | nn0rei 12244 |
. . . . . . . . . . . 12
⊢ if(𝑤 = 𝑣, 0, 1) ∈ ℝ |
39 | 29 | nn0rei 12244 |
. . . . . . . . . . . 12
⊢ (if(𝑢 = 𝑤, 0, 1) + if(𝑢 = 𝑣, 0, 1)) ∈ ℝ |
40 | 38, 2, 39 | letri 11104 |
. . . . . . . . . . 11
⊢
((if(𝑤 = 𝑣, 0, 1) ≤ 1 ∧ 1 ≤
(if(𝑢 = 𝑤, 0, 1) + if(𝑢 = 𝑣, 0, 1))) → if(𝑤 = 𝑣, 0, 1) ≤ (if(𝑢 = 𝑤, 0, 1) + if(𝑢 = 𝑣, 0, 1))) |
41 | 36, 37, 40 | sylancr 587 |
. . . . . . . . . 10
⊢
((if(𝑢 = 𝑤, 0, 1) + if(𝑢 = 𝑣, 0, 1)) ∈ ℕ → if(𝑤 = 𝑣, 0, 1) ≤ (if(𝑢 = 𝑤, 0, 1) + if(𝑢 = 𝑣, 0, 1))) |
42 | 27 | nn0ge0i 12260 |
. . . . . . . . . . . . 13
⊢ 0 ≤
if(𝑢 = 𝑤, 0, 1) |
43 | 28 | nn0ge0i 12260 |
. . . . . . . . . . . . 13
⊢ 0 ≤
if(𝑢 = 𝑣, 0, 1) |
44 | 27 | nn0rei 12244 |
. . . . . . . . . . . . . 14
⊢ if(𝑢 = 𝑤, 0, 1) ∈ ℝ |
45 | 28 | nn0rei 12244 |
. . . . . . . . . . . . . 14
⊢ if(𝑢 = 𝑣, 0, 1) ∈ ℝ |
46 | 44, 45 | add20i 11518 |
. . . . . . . . . . . . 13
⊢ ((0 ≤
if(𝑢 = 𝑤, 0, 1) ∧ 0 ≤ if(𝑢 = 𝑣, 0, 1)) → ((if(𝑢 = 𝑤, 0, 1) + if(𝑢 = 𝑣, 0, 1)) = 0 ↔ (if(𝑢 = 𝑤, 0, 1) = 0 ∧ if(𝑢 = 𝑣, 0, 1) = 0))) |
47 | 42, 43, 46 | mp2an 689 |
. . . . . . . . . . . 12
⊢
((if(𝑢 = 𝑤, 0, 1) + if(𝑢 = 𝑣, 0, 1)) = 0 ↔ (if(𝑢 = 𝑤, 0, 1) = 0 ∧ if(𝑢 = 𝑣, 0, 1) = 0)) |
48 | | equequ2 2029 |
. . . . . . . . . . . . . . . . . . 19
⊢ (𝑣 = 𝑤 → (𝑢 = 𝑣 ↔ 𝑢 = 𝑤)) |
49 | 48 | ifbid 4482 |
. . . . . . . . . . . . . . . . . 18
⊢ (𝑣 = 𝑤 → if(𝑢 = 𝑣, 0, 1) = if(𝑢 = 𝑤, 0, 1)) |
50 | 49 | eqeq1d 2740 |
. . . . . . . . . . . . . . . . 17
⊢ (𝑣 = 𝑤 → (if(𝑢 = 𝑣, 0, 1) = 0 ↔ if(𝑢 = 𝑤, 0, 1) = 0)) |
51 | 50, 48 | bibi12d 346 |
. . . . . . . . . . . . . . . 16
⊢ (𝑣 = 𝑤 → ((if(𝑢 = 𝑣, 0, 1) = 0 ↔ 𝑢 = 𝑣) ↔ (if(𝑢 = 𝑤, 0, 1) = 0 ↔ 𝑢 = 𝑤))) |
52 | | equequ1 2028 |
. . . . . . . . . . . . . . . . . . . 20
⊢ (𝑤 = 𝑢 → (𝑤 = 𝑣 ↔ 𝑢 = 𝑣)) |
53 | 52 | ifbid 4482 |
. . . . . . . . . . . . . . . . . . 19
⊢ (𝑤 = 𝑢 → if(𝑤 = 𝑣, 0, 1) = if(𝑢 = 𝑣, 0, 1)) |
54 | 53 | eqeq1d 2740 |
. . . . . . . . . . . . . . . . . 18
⊢ (𝑤 = 𝑢 → (if(𝑤 = 𝑣, 0, 1) = 0 ↔ if(𝑢 = 𝑣, 0, 1) = 0)) |
55 | 54, 52 | bibi12d 346 |
. . . . . . . . . . . . . . . . 17
⊢ (𝑤 = 𝑢 → ((if(𝑤 = 𝑣, 0, 1) = 0 ↔ 𝑤 = 𝑣) ↔ (if(𝑢 = 𝑣, 0, 1) = 0 ↔ 𝑢 = 𝑣))) |
56 | 55, 25 | chvarvv 2002 |
. . . . . . . . . . . . . . . 16
⊢ (if(𝑢 = 𝑣, 0, 1) = 0 ↔ 𝑢 = 𝑣) |
57 | 51, 56 | chvarvv 2002 |
. . . . . . . . . . . . . . 15
⊢ (if(𝑢 = 𝑤, 0, 1) = 0 ↔ 𝑢 = 𝑤) |
58 | | eqtr2 2762 |
. . . . . . . . . . . . . . 15
⊢ ((𝑢 = 𝑤 ∧ 𝑢 = 𝑣) → 𝑤 = 𝑣) |
59 | 57, 56, 58 | syl2anb 598 |
. . . . . . . . . . . . . 14
⊢
((if(𝑢 = 𝑤, 0, 1) = 0 ∧ if(𝑢 = 𝑣, 0, 1) = 0) → 𝑤 = 𝑣) |
60 | 59 | iftrued 4467 |
. . . . . . . . . . . . 13
⊢
((if(𝑢 = 𝑤, 0, 1) = 0 ∧ if(𝑢 = 𝑣, 0, 1) = 0) → if(𝑤 = 𝑣, 0, 1) = 0) |
61 | 1 | leidi 11509 |
. . . . . . . . . . . . 13
⊢ 0 ≤
0 |
62 | 60, 61 | eqbrtrdi 5113 |
. . . . . . . . . . . 12
⊢
((if(𝑢 = 𝑤, 0, 1) = 0 ∧ if(𝑢 = 𝑣, 0, 1) = 0) → if(𝑤 = 𝑣, 0, 1) ≤ 0) |
63 | 47, 62 | sylbi 216 |
. . . . . . . . . . 11
⊢
((if(𝑢 = 𝑤, 0, 1) + if(𝑢 = 𝑣, 0, 1)) = 0 → if(𝑤 = 𝑣, 0, 1) ≤ 0) |
64 | | id 22 |
. . . . . . . . . . 11
⊢
((if(𝑢 = 𝑤, 0, 1) + if(𝑢 = 𝑣, 0, 1)) = 0 → (if(𝑢 = 𝑤, 0, 1) + if(𝑢 = 𝑣, 0, 1)) = 0) |
65 | 63, 64 | breqtrrd 5102 |
. . . . . . . . . 10
⊢
((if(𝑢 = 𝑤, 0, 1) + if(𝑢 = 𝑣, 0, 1)) = 0 → if(𝑤 = 𝑣, 0, 1) ≤ (if(𝑢 = 𝑤, 0, 1) + if(𝑢 = 𝑣, 0, 1))) |
66 | 41, 65 | jaoi 854 |
. . . . . . . . 9
⊢
(((if(𝑢 = 𝑤, 0, 1) + if(𝑢 = 𝑣, 0, 1)) ∈ ℕ ∨ (if(𝑢 = 𝑤, 0, 1) + if(𝑢 = 𝑣, 0, 1)) = 0) → if(𝑤 = 𝑣, 0, 1) ≤ (if(𝑢 = 𝑤, 0, 1) + if(𝑢 = 𝑣, 0, 1))) |
67 | 31, 66 | mp1i 13 |
. . . . . . . 8
⊢ ((𝑢 ∈ 𝑋 ∧ (𝑤 ∈ 𝑋 ∧ 𝑣 ∈ 𝑋)) → if(𝑤 = 𝑣, 0, 1) ≤ (if(𝑢 = 𝑤, 0, 1) + if(𝑢 = 𝑣, 0, 1))) |
68 | 16 | adantl 482 |
. . . . . . . 8
⊢ ((𝑢 ∈ 𝑋 ∧ (𝑤 ∈ 𝑋 ∧ 𝑣 ∈ 𝑋)) → (𝑤𝐷𝑣) = if(𝑤 = 𝑣, 0, 1)) |
69 | | eqeq12 2755 |
. . . . . . . . . . . 12
⊢ ((𝑥 = 𝑢 ∧ 𝑦 = 𝑤) → (𝑥 = 𝑦 ↔ 𝑢 = 𝑤)) |
70 | 69 | ifbid 4482 |
. . . . . . . . . . 11
⊢ ((𝑥 = 𝑢 ∧ 𝑦 = 𝑤) → if(𝑥 = 𝑦, 0, 1) = if(𝑢 = 𝑤, 0, 1)) |
71 | 27 | elexi 3451 |
. . . . . . . . . . 11
⊢ if(𝑢 = 𝑤, 0, 1) ∈ V |
72 | 70, 5, 71 | ovmpoa 7428 |
. . . . . . . . . 10
⊢ ((𝑢 ∈ 𝑋 ∧ 𝑤 ∈ 𝑋) → (𝑢𝐷𝑤) = if(𝑢 = 𝑤, 0, 1)) |
73 | 72 | adantrr 714 |
. . . . . . . . 9
⊢ ((𝑢 ∈ 𝑋 ∧ (𝑤 ∈ 𝑋 ∧ 𝑣 ∈ 𝑋)) → (𝑢𝐷𝑤) = if(𝑢 = 𝑤, 0, 1)) |
74 | | eqeq12 2755 |
. . . . . . . . . . . 12
⊢ ((𝑥 = 𝑢 ∧ 𝑦 = 𝑣) → (𝑥 = 𝑦 ↔ 𝑢 = 𝑣)) |
75 | 74 | ifbid 4482 |
. . . . . . . . . . 11
⊢ ((𝑥 = 𝑢 ∧ 𝑦 = 𝑣) → if(𝑥 = 𝑦, 0, 1) = if(𝑢 = 𝑣, 0, 1)) |
76 | 28 | elexi 3451 |
. . . . . . . . . . 11
⊢ if(𝑢 = 𝑣, 0, 1) ∈ V |
77 | 75, 5, 76 | ovmpoa 7428 |
. . . . . . . . . 10
⊢ ((𝑢 ∈ 𝑋 ∧ 𝑣 ∈ 𝑋) → (𝑢𝐷𝑣) = if(𝑢 = 𝑣, 0, 1)) |
78 | 77 | adantrl 713 |
. . . . . . . . 9
⊢ ((𝑢 ∈ 𝑋 ∧ (𝑤 ∈ 𝑋 ∧ 𝑣 ∈ 𝑋)) → (𝑢𝐷𝑣) = if(𝑢 = 𝑣, 0, 1)) |
79 | 73, 78 | oveq12d 7293 |
. . . . . . . 8
⊢ ((𝑢 ∈ 𝑋 ∧ (𝑤 ∈ 𝑋 ∧ 𝑣 ∈ 𝑋)) → ((𝑢𝐷𝑤) + (𝑢𝐷𝑣)) = (if(𝑢 = 𝑤, 0, 1) + if(𝑢 = 𝑣, 0, 1))) |
80 | 67, 68, 79 | 3brtr4d 5106 |
. . . . . . 7
⊢ ((𝑢 ∈ 𝑋 ∧ (𝑤 ∈ 𝑋 ∧ 𝑣 ∈ 𝑋)) → (𝑤𝐷𝑣) ≤ ((𝑢𝐷𝑤) + (𝑢𝐷𝑣))) |
81 | 80 | expcom 414 |
. . . . . 6
⊢ ((𝑤 ∈ 𝑋 ∧ 𝑣 ∈ 𝑋) → (𝑢 ∈ 𝑋 → (𝑤𝐷𝑣) ≤ ((𝑢𝐷𝑤) + (𝑢𝐷𝑣)))) |
82 | 81 | ralrimiv 3102 |
. . . . 5
⊢ ((𝑤 ∈ 𝑋 ∧ 𝑣 ∈ 𝑋) → ∀𝑢 ∈ 𝑋 (𝑤𝐷𝑣) ≤ ((𝑢𝐷𝑤) + (𝑢𝐷𝑣))) |
83 | 26, 82 | jca 512 |
. . . 4
⊢ ((𝑤 ∈ 𝑋 ∧ 𝑣 ∈ 𝑋) → (((𝑤𝐷𝑣) = 0 ↔ 𝑤 = 𝑣) ∧ ∀𝑢 ∈ 𝑋 (𝑤𝐷𝑣) ≤ ((𝑢𝐷𝑤) + (𝑢𝐷𝑣)))) |
84 | 83 | rgen2 3120 |
. . 3
⊢
∀𝑤 ∈
𝑋 ∀𝑣 ∈ 𝑋 (((𝑤𝐷𝑣) = 0 ↔ 𝑤 = 𝑣) ∧ ∀𝑢 ∈ 𝑋 (𝑤𝐷𝑣) ≤ ((𝑢𝐷𝑤) + (𝑢𝐷𝑣))) |
85 | 7, 84 | pm3.2i 471 |
. 2
⊢ (𝐷:(𝑋 × 𝑋)⟶ℝ ∧ ∀𝑤 ∈ 𝑋 ∀𝑣 ∈ 𝑋 (((𝑤𝐷𝑣) = 0 ↔ 𝑤 = 𝑣) ∧ ∀𝑢 ∈ 𝑋 (𝑤𝐷𝑣) ≤ ((𝑢𝐷𝑤) + (𝑢𝐷𝑣)))) |
86 | | ismet 23476 |
. 2
⊢ (𝑋 ∈ 𝑉 → (𝐷 ∈ (Met‘𝑋) ↔ (𝐷:(𝑋 × 𝑋)⟶ℝ ∧ ∀𝑤 ∈ 𝑋 ∀𝑣 ∈ 𝑋 (((𝑤𝐷𝑣) = 0 ↔ 𝑤 = 𝑣) ∧ ∀𝑢 ∈ 𝑋 (𝑤𝐷𝑣) ≤ ((𝑢𝐷𝑤) + (𝑢𝐷𝑣)))))) |
87 | 85, 86 | mpbiri 257 |
1
⊢ (𝑋 ∈ 𝑉 → 𝐷 ∈ (Met‘𝑋)) |