Skip to content

Commit 0525e92

Browse files
committed
tweaks
1 parent a662358 commit 0525e92

1 file changed

Lines changed: 5 additions & 13 deletions

File tree

Probability/MDP/Risk.lean

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -150,12 +150,6 @@ end Risk
150150

151151
section Risk2
152152

153-
#check Set.preimage
154-
#synth SupSet EReal
155-
#synth SupSet (WithTop ℝ)
156-
#check instSupSetEReal
157-
#check WithTop.instSupSet
158-
159153
variable {n : ℕ} {P : Findist n} {X Y : FinRV n ℚ} {t : ℚ}
160154

161155
--TODO: can we use isLUB
@@ -164,7 +158,7 @@ theorem rv_le_compl_gt : (X ≤ᵣ t) + (X >ᵣ t) = 1 := by
164158
ext ω
165159
unfold FinRV.leq FinRV.gt
166160
simp
167-
grind
161+
exact le_or_gt (X ω) t
168162

169163
theorem prob_le_compl_gt : ℙ[X ≤ᵣ t // P] + ℙ[X >ᵣ t // P] = 1 := by
170164
rw [prob_eq_exp_ind, prob_eq_exp_ind, ← exp_additive_two]
@@ -180,15 +174,13 @@ theorem prob_le_compl_gt : ℙ[X ≤ᵣ t // P] + ℙ[X >ᵣ t // P] = 1 := by
180174
rw [h]
181175
exact exp_one
182176

183-
184177
theorem prob_gt_of_le : ℙ[X >ᵣ t // P] = 1 - ℙ[X ≤ᵣ t // P] := by
185178
rw [← prob_le_compl_gt]
186-
linarith
179+
ring
187180

188181
theorem prob_le_of_gt : ℙ[X ≤ᵣ t // P] = 1 - ℙ[X >ᵣ t // P] := by
189182
rw [← prob_le_compl_gt]
190-
linarith
191-
183+
ring
192184

193185
theorem prob_lt_compl_ge : ℙ[X <ᵣ t // P] + ℙ[X ≥ᵣ t // P] = 1 := by
194186
rw [prob_eq_exp_ind, prob_eq_exp_ind, ← exp_additive_two]
@@ -206,11 +198,11 @@ theorem prob_lt_compl_ge : ℙ[X <ᵣ t // P] + ℙ[X ≥ᵣ t // P] = 1 := by
206198

207199
theorem prob_ge_of_lt : ℙ[X ≥ᵣ t // P] = 1 - ℙ[X <ᵣ t // P] := by
208200
rw [← prob_lt_compl_ge]
209-
linarith
201+
ring
210202

211203
theorem prob_lt_of_ge : ℙ[X <ᵣ t // P] = 1 - ℙ[X ≥ᵣ t // P] := by
212204
rw [← prob_lt_compl_ge]
213-
linarith
205+
ring
214206

215207
variable {n : ℕ} (P : Findist n) (X Y : FinRV n ℚ) (α : ℚ) (q v : ℚ)
216208

0 commit comments

Comments
 (0)