You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
theoremRat.mul_lt_mul_right(x y z:Rat) (hxy: x < y) (hz: z.isPos) : x * z < y * z := bysorry
283
+
theoremRat.mul_lt_mul_right{x y z:Rat} (hxy: x < y) (hz: z.isPos) : x * z < y * z := bysorry
282
284
283
285
/-- (Not from textbook) The order is decidable. This exercise is only recommended for Lean experts. Alternatively, one can establish this fact in classical logic via `classical; exact Classical.decRel _` -/
284
286
instanceRat.decidableRel : DecidableRel (· ≤ · : Rat → Rat → Prop) := by
/-- (Not from textbook) Real has the structure of a linear ordering. The order is not computable, and so classical logic is required to impose decidability.-/
166
+
noncomputableinstanceReal.instLinearOrder : LinearOrder Real where
167
+
le_refl := sorry
168
+
le_trans := sorry
169
+
lt_iff_le_not_le := sorry
170
+
le_antisymm := sorry
171
+
le_total := sorry
172
+
toDecidableLE := by
173
+
classical
174
+
exact Classical.decRel _
175
+
176
+
/-- Proposition 5.4.8 -/
177
+
theoremReal.inv_of_pos {x:Real} (hx: x.isPos) : x⁻¹.isPos := by
178
+
have hnon: x ≠ 0 := nonzero_of_pos hx
179
+
have hident := inv_mul_self hnon
180
+
have hinv_non: x⁻¹ ≠ 0 := by contrapose! hident; simp [hident]
181
+
have hnonneg : ¬ x⁻¹.isNeg := by
182
+
intro h
183
+
have := mul_pos_neg hx h
184
+
have id : -(1:Real) = (-1:ℚ) := by simp
185
+
simp only [hident, neg_iff_pos_of_neg, id, pos_of_coe] at this
186
+
linarith
187
+
have trich := Real.trichotomous x⁻¹
188
+
simp [hinv_non, hnonneg] at trich
189
+
assumption
190
+
191
+
theoremReal.inv_of_gt {x y:Real} (hx: x.isPos) (hy: y.isPos) (hxy: x > y) : x⁻¹ < y⁻¹ := by
192
+
have hxnon: x ≠ 0 := nonzero_of_pos hx
193
+
have hynon: y ≠ 0 := nonzero_of_pos hy
194
+
have hxinv : x⁻¹.isPos := inv_of_pos hx
195
+
have hyinv : y⁻¹.isPos := inv_of_pos hy
196
+
by_contra! this
197
+
have : (1:Real) > 1 := calc
198
+
1 = x * x⁻¹ := (inv_mul_self hxnon).symm
199
+
_ > y * x⁻¹ := mul_lt_mul_right hxy hxinv
200
+
_ ≥ y * y⁻¹ := mul_le_mul_left this hy
201
+
_ = _ := inv_mul_self hynon
202
+
simp at this
203
+
204
+
/-- (Not from textbook) Real has the structure of a strict ordered ring. -/
205
+
instanceReal.instIsStrictOrderedRing : IsStrictOrderedRing Real where
0 commit comments