The least upper bound property
Analysis I, Section 5.5: The least upper bound property
I have attempted to make the translation as faithful a paraphrasing as possible of the original text. When there is a choice between a more idiomatic Lean solution and a more faithful translation, I have generally chosen the latter. In particular, there will be places where the Lean code could be "golfed" to be more elegant and idiomatic, but I have consciously avoided doing so.
Main constructions and results of this section:
-
Upper bound and least upper bound on the real line
Tips from past users
Users of the companion who have completed the exercises in this section are welcome to send their tips for future users in this section as PRs.
-
(Add tip here)
namespace Chapter5
Definition 5.5.1 (upper bounds). Here we use the upperBounds set defined in Mathlib.
theorem Real.upperBound_def (E: Set Real) (M: Real) : M ∈ upperBounds E ↔ ∀ x ∈ E, x ≤ M :=
mem_upperBoundstheorem Real.lowerBound_def (E: Set Real) (M: Real) : M ∈ lowerBounds E ↔ ∀ x ∈ E, x ≥ M :=
mem_lowerBounds
API for Example 5.5.2
theorem Real.mem_Icc (x y z:Real) : z ∈ Set.Icc x y ↔ x ≤ z ∧ z ≤ y := x:Realy:Realz:Real⊢ z ∈ Set.Icc x y ↔ x ≤ z ∧ z ≤ y All goals completed! 🐙Example 5.5.2
example (M: Real) : M ∈ upperBounds (.Icc 0 1) ↔ M ≥ 1 := M:Real⊢ M ∈ upperBounds (Set.Icc 0 1) ↔ M ≥ 1 All goals completed! 🐙Example 5.5.3
example : ¬ ∃ M : Real, M ∈ upperBounds (.Ioi 0) := ⊢ ¬∃ M, M ∈ upperBounds (Set.Ioi 0) All goals completed! 🐙Example 5.5.4
example : ∀ M, M ∈ upperBounds (∅ : Set Real) := ⊢ ∀ (M : Real), M ∈ upperBounds ∅ All goals completed! 🐙theorem Real.upperBound_upper {M M': Real} (h: M ≤ M') {E: Set Real} (hb: M ∈ upperBounds E) :
M' ∈ upperBounds E := M:RealM':Realh:M ≤ M'E:Set Realhb:M ∈ upperBounds E⊢ M' ∈ upperBounds E All goals completed! 🐙
Definition 5.5.5 (least upper bound). Here we use the isLUB predicate defined in Mathlib.
theorem Real.isLUB_def (E: Set Real) (M: Real) :
IsLUB E M ↔ M ∈ upperBounds E ∧ ∀ M' ∈ upperBounds E, M' ≥ M := E:Set RealM:Real⊢ IsLUB E M ↔ M ∈ upperBounds E ∧ ∀ M' ∈ upperBounds E, M' ≥ M All goals completed! 🐙theorem Real.isGLB_def (E: Set Real) (M: Real) :
IsGLB E M ↔ M ∈ lowerBounds E ∧ ∀ M' ∈ lowerBounds E, M' ≤ M := E:Set RealM:Real⊢ IsGLB E M ↔ M ∈ lowerBounds E ∧ ∀ M' ∈ lowerBounds E, M' ≤ M All goals completed! 🐙Example 5.5.6
example : IsLUB (.Icc 0 1) (1 : Real) := ⊢ IsLUB (Set.Icc 0 1) 1 All goals completed! 🐙Proposition 5.5.8 (Uniqueness of least upper bound)
theorem Real.LUB_unique {E: Set Real} {M M': Real} (h1: IsLUB E M) (h2: IsLUB E M') : M = M' := E:Set RealM:RealM':Realh1:IsLUB E Mh2:IsLUB E M'⊢ M = M'
All goals completed! 🐙definition of "bounded above", using Mathlib notation
theorem Real.bddAbove_def (E: Set Real) : BddAbove E ↔ ∃ M, M ∈ upperBounds E := Set.nonempty_deftheorem Real.bddBelow_def (E: Set Real) : BddBelow E ↔ ∃ M, M ∈ lowerBounds E := Set.nonempty_defExercise 5.5.2
theorem Real.upperBound_between {E: Set Real} {n:ℕ} {L K:ℤ} (hLK: L < K)
(hK: K*((1/(n+1):ℚ):Real) ∈ upperBounds E) (hL: L*((1/(n+1):ℚ):Real) ∉ upperBounds E) :
∃ m, L < m
∧ m ≤ K
∧ m*((1/(n+1):ℚ):Real) ∈ upperBounds E
∧ (m-1)*((1/(n+1):ℚ):Real) ∉ upperBounds E := E:Set Realn:ℕL:ℤK:ℤhLK:L < KhK:↑K * ↑(1 / (↑n + 1)) ∈ upperBounds EhL:↑L * ↑(1 / (↑n + 1)) ∉ upperBounds E⊢ ∃ m, L < m ∧ m ≤ K ∧ ↑m * ↑(1 / (↑n + 1)) ∈ upperBounds E ∧ (↑m - 1) * ↑(1 / (↑n + 1)) ∉ upperBounds E All goals completed! 🐙Exercise 5.5.3
theorem Real.upperBound_discrete_unique {E: Set Real} {n:ℕ} {m m':ℤ}
(hm1: (((m:ℚ) / (n+1):ℚ):Real) ∈ upperBounds E)
(hm2: (((m:ℚ) / (n+1) - 1 / (n+1):ℚ):Real) ∉ upperBounds E)
(hm'1: (((m':ℚ) / (n+1):ℚ):Real) ∈ upperBounds E)
(hm'2: (((m':ℚ) / (n+1) - 1 / (n+1):ℚ):Real) ∉ upperBounds E) :
m = m' := E:Set Realn:ℕm:ℤm':ℤhm1:↑(↑m / (↑n + 1)) ∈ upperBounds Ehm2:↑(↑m / (↑n + 1) - 1 / (↑n + 1)) ∉ upperBounds Ehm'1:↑(↑m' / (↑n + 1)) ∈ upperBounds Ehm'2:↑(↑m' / (↑n + 1) - 1 / (↑n + 1)) ∉ upperBounds E⊢ m = m' All goals completed! 🐙Lemmas that can be helpful for proving 5.5.4
theorem Sequence.IsCauchy.abs {a:ℕ → ℚ} (ha: (a:Sequence).IsCauchy):
((|a| : ℕ → ℚ) : Sequence).IsCauchy := a:ℕ → ℚha:(↑a).IsCauchy⊢ (↑|a|).IsCauchy All goals completed! 🐙theorem Real.LIM.abs_eq {a b:ℕ → ℚ} (ha: (a: Sequence).IsCauchy)
(hb: (b: Sequence).IsCauchy) (h: LIM a = LIM b): LIM |a| = LIM |b| := a:ℕ → ℚb:ℕ → ℚha:(↑a).IsCauchyhb:(↑b).IsCauchyh:LIM a = LIM b⊢ LIM |a| = LIM |b| All goals completed! 🐙theorem Real.LIM.abs_eq_pos {a: ℕ → ℚ} (h: LIM a > 0) (ha: (a:Sequence).IsCauchy):
LIM a = LIM |a| := a:ℕ → ℚh:LIM a > 0ha:(↑a).IsCauchy⊢ LIM a = LIM |a| All goals completed! 🐙theorem Real.LIM_abs {a:ℕ → ℚ} (ha: (a:Sequence).IsCauchy): |LIM a| = LIM |a| := a:ℕ → ℚha:(↑a).IsCauchy⊢ |LIM a| = LIM |a| All goals completed! 🐙theorem Real.LIM_of_le' {x:Real} {a:ℕ → ℚ} (hcauchy: (a:Sequence).IsCauchy)
(h: ∃ N, ∀ n ≥ N, a n ≤ x) : LIM a ≤ x := x:Reala:ℕ → ℚhcauchy:(↑a).IsCauchyh:∃ N, ∀ n ≥ N, ↑(a n) ≤ x⊢ LIM a ≤ x All goals completed! 🐙Exercise 5.5.4
theorem Real.LIM_of_Cauchy {q:ℕ → ℚ} (hq: ∀ M, ∀ n ≥ M, ∀ n' ≥ M, |q n - q n'| ≤ 1 / (M+1)) :
(q:Sequence).IsCauchy ∧ ∀ M, |q M - LIM q| ≤ 1 / (M+1) := q:ℕ → ℚhq:∀ (M n : ℕ), n ≥ M → ∀ n' ≥ M, |q n - q n'| ≤ 1 / (↑M + 1)⊢ (↑q).IsCauchy ∧ ∀ (M : ℕ), |↑(q M) - LIM q| ≤ 1 / (↑M + 1) All goals completed! 🐙The sequence m₁, m₂, … is well-defined. This proof uses a different indexing convention than the text
lemma Real.LUB_claim1 (n : ℕ) {E: Set Real} (hE: Set.Nonempty E) (hbound: BddAbove E)
: ∃! m:ℤ,
(((m:ℚ) / (n+1):ℚ):Real) ∈ upperBounds E
∧ ¬ (((m:ℚ) / (n+1) - 1 / (n+1):ℚ):Real) ∈ upperBounds E := n:ℕE:Set RealhE:E.Nonemptyhbound:BddAbove E⊢ ∃! m, ↑(↑m / (↑n + 1)) ∈ upperBounds E ∧ ↑(↑m / (↑n + 1) - 1 / (↑n + 1)) ∉ upperBounds E
n:ℕE:Set RealhE:E.Nonemptyhbound:BddAbove Ex₀:Real := hE.some⊢ ∃! m, ↑(↑m / (↑n + 1)) ∈ upperBounds E ∧ ↑(↑m / (↑n + 1) - 1 / (↑n + 1)) ∉ upperBounds E
n:ℕE:Set RealhE:E.Nonemptyhbound:BddAbove Ex₀:Real := hE.somehx₀:hE.some ∈ E⊢ ∃! m, ↑(↑m / (↑n + 1)) ∈ upperBounds E ∧ ↑(↑m / (↑n + 1) - 1 / (↑n + 1)) ∉ upperBounds E
n:ℕE:Set RealhE:E.Nonemptyhbound:BddAbove Ex₀:Real := hE.somehx₀:hE.some ∈ Eε:Real := ↑(1 / (↑n + 1))⊢ ∃! m, ↑(↑m / (↑n + 1)) ∈ upperBounds E ∧ ↑(↑m / (↑n + 1) - 1 / (↑n + 1)) ∉ upperBounds E
have hpos : ε.IsPos := n:ℕE:Set RealhE:E.Nonemptyhbound:BddAbove E⊢ ∃! m, ↑(↑m / (↑n + 1)) ∈ upperBounds E ∧ ↑(↑m / (↑n + 1) - 1 / (↑n + 1)) ∉ upperBounds E n:ℕE:Set RealhE:E.Nonemptyhbound:BddAbove Ex₀:Real := hE.somehx₀:hE.some ∈ Eε:Real := ↑(1 / (↑n + 1))⊢ 0 < ↑n + 1; All goals completed! 🐙
n:ℕE:Set RealhE:E.Nonemptyhbound:BddAbove Ex₀:Real := hE.somehx₀:hE.some ∈ Eε:Real := ↑(1 / (↑n + 1))hpos:ε.IsPos :=
Eq.mpr
(id
(Eq.trans
(Eq.trans
(congrArg IsPos
(Eq.trans (Rat.cast_div 1 (↑n + 1))
(Eq.trans
(congr (congrArg HDiv.hDiv Rat.cast_one)
(Eq.trans (Rat.cast_add (↑n) 1) (congr (congrArg HAdd.hAdd (Rat.cast_natCast n)) Rat.cast_one)))
(one_div (↑n + 1)))))
(LUB_claim1._simp_1 (↑n + 1)⁻¹))
(Eq.trans gt_iff_lt._simp_1 inv_pos._simp_1)))
(Right.add_pos_of_nonneg_of_pos (Nat.cast_nonneg' n)
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_one) (Eq.refl (Nat.ble 1 1))))⊢ ∃ x, ↑(↑x / (↑n + 1)) ∈ upperBounds E ∧ ↑(↑x / (↑n + 1) - 1 / (↑n + 1)) ∉ upperBounds En:ℕE:Set RealhE:E.Nonemptyhbound:BddAbove Ex₀:Real := hE.somehx₀:hE.some ∈ Eε:Real := ↑(1 / (↑n + 1))hpos:ε.IsPos :=
Eq.mpr
(id
(Eq.trans
(Eq.trans
(congrArg IsPos
(Eq.trans (Rat.cast_div 1 (↑n + 1))
(Eq.trans
(congr (congrArg HDiv.hDiv Rat.cast_one)
(Eq.trans (Rat.cast_add (↑n) 1) (congr (congrArg HAdd.hAdd (Rat.cast_natCast n)) Rat.cast_one)))
(one_div (↑n + 1)))))
(LUB_claim1._simp_1 (↑n + 1)⁻¹))
(Eq.trans gt_iff_lt._simp_1 inv_pos._simp_1)))
(Right.add_pos_of_nonneg_of_pos (Nat.cast_nonneg' n)
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_one) (Eq.refl (Nat.ble 1 1))))⊢ ∀ (y₁ y₂ : ℤ),
↑(↑y₁ / (↑n + 1)) ∈ upperBounds E ∧ ↑(↑y₁ / (↑n + 1) - 1 / (↑n + 1)) ∉ upperBounds E →
↑(↑y₂ / (↑n + 1)) ∈ upperBounds E ∧ ↑(↑y₂ / (↑n + 1) - 1 / (↑n + 1)) ∉ upperBounds E → y₁ = y₂
n:ℕE:Set RealhE:E.Nonemptyhbound:BddAbove Ex₀:Real := hE.somehx₀:hE.some ∈ Eε:Real := ↑(1 / (↑n + 1))hpos:ε.IsPos :=
Eq.mpr
(id
(Eq.trans
(Eq.trans
(congrArg IsPos
(Eq.trans (Rat.cast_div 1 (↑n + 1))
(Eq.trans
(congr (congrArg HDiv.hDiv Rat.cast_one)
(Eq.trans (Rat.cast_add (↑n) 1) (congr (congrArg HAdd.hAdd (Rat.cast_natCast n)) Rat.cast_one)))
(one_div (↑n + 1)))))
(LUB_claim1._simp_1 (↑n + 1)⁻¹))
(Eq.trans gt_iff_lt._simp_1 inv_pos._simp_1)))
(Right.add_pos_of_nonneg_of_pos (Nat.cast_nonneg' n)
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_one) (Eq.refl (Nat.ble 1 1))))⊢ ∃ x, ↑(↑x / (↑n + 1)) ∈ upperBounds E ∧ ↑(↑x / (↑n + 1) - 1 / (↑n + 1)) ∉ upperBounds E n:ℕE:Set RealhE:E.Nonemptyhbound:∃ M, M ∈ upperBounds Ex₀:Real := hE.somehx₀:hE.some ∈ Eε:Real := ↑(1 / (↑n + 1))hpos:ε.IsPos⊢ ∃ x, ↑(↑x / (↑n + 1)) ∈ upperBounds E ∧ ↑(↑x / (↑n + 1) - 1 / (↑n + 1)) ∉ upperBounds E; n:ℕE:Set RealhE:E.Nonemptyx₀:Real := hE.somehx₀:hE.some ∈ Eε:Real := ↑(1 / (↑n + 1))hpos:ε.IsPosM:Realhbound:M ∈ upperBounds E⊢ ∃ x, ↑(↑x / (↑n + 1)) ∈ upperBounds E ∧ ↑(↑x / (↑n + 1) - 1 / (↑n + 1)) ∉ upperBounds E
n:ℕE:Set RealhE:E.Nonemptyx₀:Real := hE.somehx₀:hE.some ∈ Eε:Real := ↑(1 / (↑n + 1))hpos:ε.IsPosM:Realhbound:M ∈ upperBounds EK:ℕh✝:K > 0hK:↑K * ε > M⊢ ∃ x, ↑(↑x / (↑n + 1)) ∈ upperBounds E ∧ ↑(↑x / (↑n + 1) - 1 / (↑n + 1)) ∉ upperBounds E
n:ℕE:Set RealhE:E.Nonemptyx₀:Real := hE.somehx₀:hE.some ∈ Eε:Real := ↑(1 / (↑n + 1))hpos:ε.IsPosM:Realhbound:M ∈ upperBounds EK:ℕh✝¹:K > 0hK:↑K * ε > ML':ℕh✝:L' > 0hL:↑L' * ε > -x₀⊢ ∃ x, ↑(↑x / (↑n + 1)) ∈ upperBounds E ∧ ↑(↑x / (↑n + 1) - 1 / (↑n + 1)) ∉ upperBounds E
n:ℕE:Set RealhE:E.Nonemptyx₀:Real := hE.somehx₀:hE.some ∈ Eε:Real := ↑(1 / (↑n + 1))hpos:ε.IsPosM:Realhbound:M ∈ upperBounds EK:ℕh✝¹:K > 0hK:↑K * ε > ML':ℕh✝:L' > 0hL:↑L' * ε > -x₀L:ℤ := -↑L'⊢ ∃ x, ↑(↑x / (↑n + 1)) ∈ upperBounds E ∧ ↑(↑x / (↑n + 1) - 1 / (↑n + 1)) ∉ upperBounds E
have claim1_1 : L * ε < x₀ := n:ℕE:Set RealhE:E.Nonemptyhbound:BddAbove E⊢ ∃! m, ↑(↑m / (↑n + 1)) ∈ upperBounds E ∧ ↑(↑m / (↑n + 1) - 1 / (↑n + 1)) ∉ upperBounds E n:ℕE:Set RealhE:E.Nonemptyx₀:Real := hE.somehx₀:hE.some ∈ Eε:Real := ↑(1 / (↑n + 1))hpos:ε.IsPosM:Realhbound:M ∈ upperBounds EK:ℕh✝¹:K > 0hK:↑K * ε > ML':ℕh✝:L' > 0hL:↑L' * ε > -x₀L:ℤ := -↑L'⊢ -(↑L' * ε) < x₀; All goals completed! 🐙
have claim1_2 : L * ε ∉ upperBounds E := n:ℕE:Set RealhE:E.Nonemptyhbound:BddAbove E⊢ ∃! m, ↑(↑m / (↑n + 1)) ∈ upperBounds E ∧ ↑(↑m / (↑n + 1) - 1 / (↑n + 1)) ∉ upperBounds E All goals completed! 🐙
have claim1_3 : (K:Real) > (L:Real) := n:ℕE:Set RealhE:E.Nonemptyhbound:BddAbove E⊢ ∃! m, ↑(↑m / (↑n + 1)) ∈ upperBounds E ∧ ↑(↑m / (↑n + 1) - 1 / (↑n + 1)) ∉ upperBounds E
n:ℕE:Set RealhE:E.Nonemptyx₀:Real := hE.somehx₀:hE.some ∈ Eε:Real := ↑(1 / (↑n + 1))hpos:ε.IsPosM:Realhbound:M ∈ upperBounds EK:ℕh✝¹:K > 0hK:↑K * ε > ML':ℕh✝:L' > 0hL:↑L' * ε > -x₀L:ℤ := -↑L'claim1_1:↑L * ε < x₀ :=
Eq.mpr
(id
(congrFun'
(congrArg LT.lt
(Eq.trans
(congrFun' (congrArg HMul.hMul (Eq.trans (Int.cast_neg ↑L') (congrArg Neg.neg (Int.cast_natCast L')))) ε)
(neg_mul (↑L') ε)))
x₀))
(lt_of_not_ge fun a =>
Mathlib.Tactic.Linarith.lt_irrefl
(Eq.mp
(congrArg (fun _a => _a < 0)
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.sub_congr
(Mathlib.Tactic.Ring.neg_congr (Mathlib.Tactic.Ring.atom_pf x₀)
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul x₀ (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1))))))
Mathlib.Tactic.Ring.neg_zero))
(Mathlib.Tactic.Ring.mul_congr (Mathlib.Tactic.Ring.atom_pf ↑L') (Mathlib.Tactic.Ring.atom_pf ε)
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.mul_pf_right ε (Nat.rawCast 1)
(Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1))))
(Mathlib.Tactic.Ring.mul_zero (↑L' ^ Nat.rawCast 1 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * Nat.rawCast 1) + 0)))
(Mathlib.Tactic.Ring.zero_mul (ε ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * Nat.rawCast 1) + 0))))
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_mul ε (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1)))))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_lt (x₀ ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast)
(Mathlib.Tactic.Ring.add_pf_zero_add
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast) + 0)))))
(Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf x₀)
(Mathlib.Tactic.Ring.neg_congr
(Mathlib.Tactic.Ring.mul_congr (Mathlib.Tactic.Ring.atom_pf ↑L') (Mathlib.Tactic.Ring.atom_pf ε)
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.mul_pf_right ε (Nat.rawCast 1)
(Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1))))
(Mathlib.Tactic.Ring.mul_zero (↑L' ^ Nat.rawCast 1 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * Nat.rawCast 1) + 0)))
(Mathlib.Tactic.Ring.zero_mul (ε ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * Nat.rawCast 1) + 0))))
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_mul ε (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1)))))))
Mathlib.Tactic.Ring.neg_zero))
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_mul ε (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsNat.to_raw_eq
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1)) (Eq.refl (Int.ofNat 1))))))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_lt (x₀ ^ Nat.rawCast 1 * Nat.rawCast 1)
(Mathlib.Tactic.Ring.add_pf_zero_add
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * Nat.rawCast 1) + 0)))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Tactic.Ring.add_overlap_pf_zero x₀ (Nat.rawCast 1)
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0)))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Tactic.Ring.add_overlap_pf_zero (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.add_overlap_pf_zero ε (Nat.rawCast 1)
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0))))))
(Mathlib.Tactic.Ring.add_pf_zero_add 0))))
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))))
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le (Mathlib.Tactic.Linarith.sub_neg_of_lt hL)
(Mathlib.Tactic.Linarith.sub_nonpos_of_le a))))claim1_2:↑K ≤ ↑L⊢ ↑L * ε ∈ upperBounds E
n:ℕE:Set RealhE:E.Nonemptyx₀:Real := hE.somehx₀:hE.some ∈ Eε:Real := ↑(1 / (↑n + 1))hpos:ε.IsPosM:Realhbound:M ∈ upperBounds EK:ℕh✝¹:K > 0hK:↑K * ε > ML':ℕh✝:L' > 0hL:↑L' * ε > -x₀L:ℤ := -↑L'claim1_1:↑L * ε < x₀ :=
Eq.mpr
(id
(congrFun'
(congrArg LT.lt
(Eq.trans
(congrFun' (congrArg HMul.hMul (Eq.trans (Int.cast_neg ↑L') (congrArg Neg.neg (Int.cast_natCast L')))) ε)
(neg_mul (↑L') ε)))
x₀))
(lt_of_not_ge fun a =>
Mathlib.Tactic.Linarith.lt_irrefl
(Eq.mp
(congrArg (fun _a => _a < 0)
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.sub_congr
(Mathlib.Tactic.Ring.neg_congr (Mathlib.Tactic.Ring.atom_pf x₀)
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul x₀ (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1))))))
Mathlib.Tactic.Ring.neg_zero))
(Mathlib.Tactic.Ring.mul_congr (Mathlib.Tactic.Ring.atom_pf ↑L') (Mathlib.Tactic.Ring.atom_pf ε)
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.mul_pf_right ε (Nat.rawCast 1)
(Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1))))
(Mathlib.Tactic.Ring.mul_zero (↑L' ^ Nat.rawCast 1 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * Nat.rawCast 1) + 0)))
(Mathlib.Tactic.Ring.zero_mul (ε ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * Nat.rawCast 1) + 0))))
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_mul ε (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1)))))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_lt (x₀ ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast)
(Mathlib.Tactic.Ring.add_pf_zero_add
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast) + 0)))))
(Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf x₀)
(Mathlib.Tactic.Ring.neg_congr
(Mathlib.Tactic.Ring.mul_congr (Mathlib.Tactic.Ring.atom_pf ↑L') (Mathlib.Tactic.Ring.atom_pf ε)
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.mul_pf_right ε (Nat.rawCast 1)
(Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1))))
(Mathlib.Tactic.Ring.mul_zero (↑L' ^ Nat.rawCast 1 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * Nat.rawCast 1) + 0)))
(Mathlib.Tactic.Ring.zero_mul (ε ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * Nat.rawCast 1) + 0))))
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_mul ε (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1)))))))
Mathlib.Tactic.Ring.neg_zero))
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_mul ε (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsNat.to_raw_eq
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1)) (Eq.refl (Int.ofNat 1))))))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_lt (x₀ ^ Nat.rawCast 1 * Nat.rawCast 1)
(Mathlib.Tactic.Ring.add_pf_zero_add
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * Nat.rawCast 1) + 0)))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Tactic.Ring.add_overlap_pf_zero x₀ (Nat.rawCast 1)
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0)))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Tactic.Ring.add_overlap_pf_zero (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.add_overlap_pf_zero ε (Nat.rawCast 1)
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0))))))
(Mathlib.Tactic.Ring.add_pf_zero_add 0))))
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))))
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le (Mathlib.Tactic.Linarith.sub_neg_of_lt hL)
(Mathlib.Tactic.Linarith.sub_nonpos_of_le a))))claim1_2:ε * ↑K ≤ ε * ↑L := mul_le_mul_left _fvar.53307 hpos⊢ ↑L * ε ∈ upperBounds E
simp_rw n:ℕE:Set RealhE:E.Nonemptyx₀:Real := hE.somehx₀:hE.some ∈ Eε:Real := ↑(1 / (↑n + 1))hpos:ε.IsPosM:Realhbound:M ∈ upperBounds EK:ℕh✝¹:K > 0hK:↑K * ε > ML':ℕh✝:L' > 0hL:↑L' * ε > -x₀L:ℤ := -↑L'claim1_1:↑L * ε < x₀ :=
Eq.mpr
(id
(congrFun'
(congrArg LT.lt
(Eq.trans
(congrFun' (congrArg HMul.hMul (Eq.trans (Int.cast_neg ↑L') (congrArg Neg.neg (Int.cast_natCast L')))) ε)
(neg_mul (↑L') ε)))
x₀))
(lt_of_not_ge fun a =>
Mathlib.Tactic.Linarith.lt_irrefl
(Eq.mp
(congrArg (fun _a => _a < 0)
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.sub_congr
(Mathlib.Tactic.Ring.neg_congr (Mathlib.Tactic.Ring.atom_pf x₀)
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul x₀ (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1))))))
Mathlib.Tactic.Ring.neg_zero))
(Mathlib.Tactic.Ring.mul_congr (Mathlib.Tactic.Ring.atom_pf ↑L') (Mathlib.Tactic.Ring.atom_pf ε)
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.mul_pf_right ε (Nat.rawCast 1)
(Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1))))
(Mathlib.Tactic.Ring.mul_zero (↑L' ^ Nat.rawCast 1 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * Nat.rawCast 1) + 0)))
(Mathlib.Tactic.Ring.zero_mul (ε ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * Nat.rawCast 1) + 0))))
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_mul ε (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1)))))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_lt (x₀ ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast)
(Mathlib.Tactic.Ring.add_pf_zero_add
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast) + 0)))))
(Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf x₀)
(Mathlib.Tactic.Ring.neg_congr
(Mathlib.Tactic.Ring.mul_congr (Mathlib.Tactic.Ring.atom_pf ↑L') (Mathlib.Tactic.Ring.atom_pf ε)
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.mul_pf_right ε (Nat.rawCast 1)
(Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1))))
(Mathlib.Tactic.Ring.mul_zero (↑L' ^ Nat.rawCast 1 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * Nat.rawCast 1) + 0)))
(Mathlib.Tactic.Ring.zero_mul (ε ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * Nat.rawCast 1) + 0))))
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_mul ε (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1)))))))
Mathlib.Tactic.Ring.neg_zero))
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_mul ε (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsNat.to_raw_eq
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1)) (Eq.refl (Int.ofNat 1))))))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_lt (x₀ ^ Nat.rawCast 1 * Nat.rawCast 1)
(Mathlib.Tactic.Ring.add_pf_zero_add
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * Nat.rawCast 1) + 0)))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Tactic.Ring.add_overlap_pf_zero x₀ (Nat.rawCast 1)
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0)))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Tactic.Ring.add_overlap_pf_zero (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.add_overlap_pf_zero ε (Nat.rawCast 1)
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0))))))
(Mathlib.Tactic.Ring.add_pf_zero_add 0))))
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))))
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le (Mathlib.Tactic.Linarith.sub_neg_of_lt hL)
(Mathlib.Tactic.Linarith.sub_nonpos_of_le a))))claim1_2:ε * ↑K ≤ ε * ↑L := mul_le_mul_left _fvar.53307 hpos⊢ ↑L * ε ∈ upperBounds Emul_comm] at claim1_2
replace claim1_2 : M ≤ L * ε := n:ℕE:Set RealhE:E.Nonemptyhbound:BddAbove E⊢ ∃! m, ↑(↑m / (↑n + 1)) ∈ upperBounds E ∧ ↑(↑m / (↑n + 1) - 1 / (↑n + 1)) ∉ upperBounds E All goals completed! 🐙
All goals completed! 🐙
have claim1_4 : ∃ m:ℤ, L < m ∧ m ≤ K ∧ m*ε ∈ upperBounds E ∧ (m-1)*ε ∉ upperBounds E := n:ℕE:Set RealhE:E.Nonemptyhbound:BddAbove E⊢ ∃! m, ↑(↑m / (↑n + 1)) ∈ upperBounds E ∧ ↑(↑m / (↑n + 1) - 1 / (↑n + 1)) ∉ upperBounds E
n:ℕE:Set RealhE:E.Nonemptyx₀:Real := hE.somehx₀:hE.some ∈ Eε:Real := ↑(1 / (↑n + 1))hpos:ε.IsPosM:Realhbound:M ∈ upperBounds EK:ℕh✝¹:K > 0hK:↑K * ε > ML':ℕh✝:L' > 0hL:↑L' * ε > -x₀L:ℤ := -↑L'claim1_1:↑L * ε < x₀ :=
Eq.mpr
(id
(congrFun'
(congrArg LT.lt
(Eq.trans
(congrFun' (congrArg HMul.hMul (Eq.trans (Int.cast_neg ↑L') (congrArg Neg.neg (Int.cast_natCast L')))) ε)
(neg_mul (↑L') ε)))
x₀))
(lt_of_not_ge fun a =>
Mathlib.Tactic.Linarith.lt_irrefl
(Eq.mp
(congrArg (fun _a => _a < 0)
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.sub_congr
(Mathlib.Tactic.Ring.neg_congr (Mathlib.Tactic.Ring.atom_pf x₀)
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul x₀ (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1))))))
Mathlib.Tactic.Ring.neg_zero))
(Mathlib.Tactic.Ring.mul_congr (Mathlib.Tactic.Ring.atom_pf ↑L') (Mathlib.Tactic.Ring.atom_pf ε)
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.mul_pf_right ε (Nat.rawCast 1)
(Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1))))
(Mathlib.Tactic.Ring.mul_zero (↑L' ^ Nat.rawCast 1 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * Nat.rawCast 1) + 0)))
(Mathlib.Tactic.Ring.zero_mul (ε ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * Nat.rawCast 1) + 0))))
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_mul ε (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1)))))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_lt (x₀ ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast)
(Mathlib.Tactic.Ring.add_pf_zero_add
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast) + 0)))))
(Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf x₀)
(Mathlib.Tactic.Ring.neg_congr
(Mathlib.Tactic.Ring.mul_congr (Mathlib.Tactic.Ring.atom_pf ↑L') (Mathlib.Tactic.Ring.atom_pf ε)
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.mul_pf_right ε (Nat.rawCast 1)
(Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1))))
(Mathlib.Tactic.Ring.mul_zero (↑L' ^ Nat.rawCast 1 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * Nat.rawCast 1) + 0)))
(Mathlib.Tactic.Ring.zero_mul (ε ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * Nat.rawCast 1) + 0))))
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_mul ε (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1)))))))
Mathlib.Tactic.Ring.neg_zero))
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_mul ε (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsNat.to_raw_eq
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1)) (Eq.refl (Int.ofNat 1))))))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_lt (x₀ ^ Nat.rawCast 1 * Nat.rawCast 1)
(Mathlib.Tactic.Ring.add_pf_zero_add
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * Nat.rawCast 1) + 0)))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Tactic.Ring.add_overlap_pf_zero x₀ (Nat.rawCast 1)
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0)))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Tactic.Ring.add_overlap_pf_zero (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.add_overlap_pf_zero ε (Nat.rawCast 1)
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0))))))
(Mathlib.Tactic.Ring.add_pf_zero_add 0))))
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))))
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le (Mathlib.Tactic.Linarith.sub_neg_of_lt hL)
(Mathlib.Tactic.Linarith.sub_nonpos_of_le a))))claim1_2:↑L * ε ∉ upperBounds E := LUB_claim1._proof_2 n hE hx₀ L' claim1_1claim1_3:↑K > ↑L :=
Mathlib.Tactic.Contrapose.contrapose₂
(Eq.mpr (id (implies_congr not_lt._simp_1 (Eq.refl (↑L * ε ∈ upperBounds E)))) fun claim1_2 =>
have claim1_2 := mul_le_mul_left claim1_2 hpos;
have claim1_2 :=
Decidable.byContradiction fun h =>
ne_of_lt (Eq.mp not_le._simp_1 h)
(le_antisymm (le_trans (le_of_lt (Eq.mp not_le._simp_1 h)) (le_refl M))
(le_trans (le_of_lt hK)
(le_trans (Eq.mp (congr (congrArg LE.le (mul_comm ε ↑K)) (mul_comm ε ↑L)) claim1_2) (le_refl (↑L * ε)))));
LUB_claim1._proof_3 n M hbound L' claim1_2)
claim1_2⊢ L < ↑Kn:ℕE:Set RealhE:E.Nonemptyx₀:Real := hE.somehx₀:hE.some ∈ Eε:Real := ↑(1 / (↑n + 1))hpos:ε.IsPosM:Realhbound:M ∈ upperBounds EK:ℕh✝¹:K > 0hK:↑K * ε > ML':ℕh✝:L' > 0hL:↑L' * ε > -x₀L:ℤ := -↑L'claim1_1:↑L * ε < x₀ :=
Eq.mpr
(id
(congrFun'
(congrArg LT.lt
(Eq.trans
(congrFun' (congrArg HMul.hMul (Eq.trans (Int.cast_neg ↑L') (congrArg Neg.neg (Int.cast_natCast L')))) ε)
(neg_mul (↑L') ε)))
x₀))
(lt_of_not_ge fun a =>
Mathlib.Tactic.Linarith.lt_irrefl
(Eq.mp
(congrArg (fun _a => _a < 0)
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.sub_congr
(Mathlib.Tactic.Ring.neg_congr (Mathlib.Tactic.Ring.atom_pf x₀)
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul x₀ (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1))))))
Mathlib.Tactic.Ring.neg_zero))
(Mathlib.Tactic.Ring.mul_congr (Mathlib.Tactic.Ring.atom_pf ↑L') (Mathlib.Tactic.Ring.atom_pf ε)
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.mul_pf_right ε (Nat.rawCast 1)
(Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1))))
(Mathlib.Tactic.Ring.mul_zero (↑L' ^ Nat.rawCast 1 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * Nat.rawCast 1) + 0)))
(Mathlib.Tactic.Ring.zero_mul (ε ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * Nat.rawCast 1) + 0))))
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_mul ε (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1)))))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_lt (x₀ ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast)
(Mathlib.Tactic.Ring.add_pf_zero_add
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast) + 0)))))
(Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf x₀)
(Mathlib.Tactic.Ring.neg_congr
(Mathlib.Tactic.Ring.mul_congr (Mathlib.Tactic.Ring.atom_pf ↑L') (Mathlib.Tactic.Ring.atom_pf ε)
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.mul_pf_right ε (Nat.rawCast 1)
(Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1))))
(Mathlib.Tactic.Ring.mul_zero (↑L' ^ Nat.rawCast 1 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * Nat.rawCast 1) + 0)))
(Mathlib.Tactic.Ring.zero_mul (ε ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * Nat.rawCast 1) + 0))))
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_mul ε (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1)))))))
Mathlib.Tactic.Ring.neg_zero))
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_mul ε (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsNat.to_raw_eq
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1)) (Eq.refl (Int.ofNat 1))))))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_lt (x₀ ^ Nat.rawCast 1 * Nat.rawCast 1)
(Mathlib.Tactic.Ring.add_pf_zero_add
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * Nat.rawCast 1) + 0)))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Tactic.Ring.add_overlap_pf_zero x₀ (Nat.rawCast 1)
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0)))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Tactic.Ring.add_overlap_pf_zero (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.add_overlap_pf_zero ε (Nat.rawCast 1)
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0))))))
(Mathlib.Tactic.Ring.add_pf_zero_add 0))))
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))))
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le (Mathlib.Tactic.Linarith.sub_neg_of_lt hL)
(Mathlib.Tactic.Linarith.sub_nonpos_of_le a))))claim1_2:↑L * ε ∉ upperBounds E := LUB_claim1._proof_2 n hE hx₀ L' claim1_1claim1_3:↑K > ↑L :=
Mathlib.Tactic.Contrapose.contrapose₂
(Eq.mpr (id (implies_congr not_lt._simp_1 (Eq.refl (↑L * ε ∈ upperBounds E)))) fun claim1_2 =>
have claim1_2 := mul_le_mul_left claim1_2 hpos;
have claim1_2 :=
Decidable.byContradiction fun h =>
ne_of_lt (Eq.mp not_le._simp_1 h)
(le_antisymm (le_trans (le_of_lt (Eq.mp not_le._simp_1 h)) (le_refl M))
(le_trans (le_of_lt hK)
(le_trans (Eq.mp (congr (congrArg LE.le (mul_comm ε ↑K)) (mul_comm ε ↑L)) claim1_2) (le_refl (↑L * ε)))));
LUB_claim1._proof_3 n M hbound L' claim1_2)
claim1_2⊢ ↑↑K * ↑(1 / (↑n + 1)) ∈ upperBounds E
n:ℕE:Set RealhE:E.Nonemptyx₀:Real := hE.somehx₀:hE.some ∈ Eε:Real := ↑(1 / (↑n + 1))hpos:ε.IsPosM:Realhbound:M ∈ upperBounds EK:ℕh✝¹:K > 0hK:↑K * ε > ML':ℕh✝:L' > 0hL:↑L' * ε > -x₀L:ℤ := -↑L'claim1_1:↑L * ε < x₀ :=
Eq.mpr
(id
(congrFun'
(congrArg LT.lt
(Eq.trans
(congrFun' (congrArg HMul.hMul (Eq.trans (Int.cast_neg ↑L') (congrArg Neg.neg (Int.cast_natCast L')))) ε)
(neg_mul (↑L') ε)))
x₀))
(lt_of_not_ge fun a =>
Mathlib.Tactic.Linarith.lt_irrefl
(Eq.mp
(congrArg (fun _a => _a < 0)
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.sub_congr
(Mathlib.Tactic.Ring.neg_congr (Mathlib.Tactic.Ring.atom_pf x₀)
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul x₀ (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1))))))
Mathlib.Tactic.Ring.neg_zero))
(Mathlib.Tactic.Ring.mul_congr (Mathlib.Tactic.Ring.atom_pf ↑L') (Mathlib.Tactic.Ring.atom_pf ε)
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.mul_pf_right ε (Nat.rawCast 1)
(Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1))))
(Mathlib.Tactic.Ring.mul_zero (↑L' ^ Nat.rawCast 1 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * Nat.rawCast 1) + 0)))
(Mathlib.Tactic.Ring.zero_mul (ε ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * Nat.rawCast 1) + 0))))
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_mul ε (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1)))))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_lt (x₀ ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast)
(Mathlib.Tactic.Ring.add_pf_zero_add
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast) + 0)))))
(Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf x₀)
(Mathlib.Tactic.Ring.neg_congr
(Mathlib.Tactic.Ring.mul_congr (Mathlib.Tactic.Ring.atom_pf ↑L') (Mathlib.Tactic.Ring.atom_pf ε)
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.mul_pf_right ε (Nat.rawCast 1)
(Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1))))
(Mathlib.Tactic.Ring.mul_zero (↑L' ^ Nat.rawCast 1 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * Nat.rawCast 1) + 0)))
(Mathlib.Tactic.Ring.zero_mul (ε ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * Nat.rawCast 1) + 0))))
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_mul ε (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1)))))))
Mathlib.Tactic.Ring.neg_zero))
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_mul ε (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsNat.to_raw_eq
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1)) (Eq.refl (Int.ofNat 1))))))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_lt (x₀ ^ Nat.rawCast 1 * Nat.rawCast 1)
(Mathlib.Tactic.Ring.add_pf_zero_add
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * Nat.rawCast 1) + 0)))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Tactic.Ring.add_overlap_pf_zero x₀ (Nat.rawCast 1)
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0)))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Tactic.Ring.add_overlap_pf_zero (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.add_overlap_pf_zero ε (Nat.rawCast 1)
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0))))))
(Mathlib.Tactic.Ring.add_pf_zero_add 0))))
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))))
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le (Mathlib.Tactic.Linarith.sub_neg_of_lt hL)
(Mathlib.Tactic.Linarith.sub_nonpos_of_le a))))claim1_2:↑L * ε ∉ upperBounds E := LUB_claim1._proof_2 n hE hx₀ L' claim1_1claim1_3:↑K > ↑L :=
Mathlib.Tactic.Contrapose.contrapose₂
(Eq.mpr (id (implies_congr not_lt._simp_1 (Eq.refl (↑L * ε ∈ upperBounds E)))) fun claim1_2 =>
have claim1_2 := mul_le_mul_left claim1_2 hpos;
have claim1_2 :=
Decidable.byContradiction fun h =>
ne_of_lt (Eq.mp not_le._simp_1 h)
(le_antisymm (le_trans (le_of_lt (Eq.mp not_le._simp_1 h)) (le_refl M))
(le_trans (le_of_lt hK)
(le_trans (Eq.mp (congr (congrArg LE.le (mul_comm ε ↑K)) (mul_comm ε ↑L)) claim1_2) (le_refl (↑L * ε)))));
LUB_claim1._proof_3 n M hbound L' claim1_2)
claim1_2⊢ L < ↑K n:ℕE:Set RealhE:E.Nonemptyx₀:Real := hE.somehx₀:hE.some ∈ Eε:Real := ↑(1 / (↑n + 1))hpos:ε.IsPosM:Realhbound:M ∈ upperBounds EK:ℕh✝¹:K > 0hK:↑K * ε > ML':ℕh✝:L' > 0hL:↑L' * ε > -x₀L:ℤ := -↑L'claim1_1:↑L * ε < x₀ :=
Eq.mpr
(id
(congrFun'
(congrArg LT.lt
(Eq.trans
(congrFun' (congrArg HMul.hMul (Eq.trans (Int.cast_neg ↑L') (congrArg Neg.neg (Int.cast_natCast L')))) ε)
(neg_mul (↑L') ε)))
x₀))
(lt_of_not_ge fun a =>
Mathlib.Tactic.Linarith.lt_irrefl
(Eq.mp
(congrArg (fun _a => _a < 0)
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.sub_congr
(Mathlib.Tactic.Ring.neg_congr (Mathlib.Tactic.Ring.atom_pf x₀)
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul x₀ (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1))))))
Mathlib.Tactic.Ring.neg_zero))
(Mathlib.Tactic.Ring.mul_congr (Mathlib.Tactic.Ring.atom_pf ↑L') (Mathlib.Tactic.Ring.atom_pf ε)
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.mul_pf_right ε (Nat.rawCast 1)
(Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1))))
(Mathlib.Tactic.Ring.mul_zero (↑L' ^ Nat.rawCast 1 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * Nat.rawCast 1) + 0)))
(Mathlib.Tactic.Ring.zero_mul (ε ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * Nat.rawCast 1) + 0))))
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_mul ε (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1)))))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_lt (x₀ ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast)
(Mathlib.Tactic.Ring.add_pf_zero_add
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast) + 0)))))
(Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf x₀)
(Mathlib.Tactic.Ring.neg_congr
(Mathlib.Tactic.Ring.mul_congr (Mathlib.Tactic.Ring.atom_pf ↑L') (Mathlib.Tactic.Ring.atom_pf ε)
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.mul_pf_right ε (Nat.rawCast 1)
(Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1))))
(Mathlib.Tactic.Ring.mul_zero (↑L' ^ Nat.rawCast 1 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * Nat.rawCast 1) + 0)))
(Mathlib.Tactic.Ring.zero_mul (ε ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * Nat.rawCast 1) + 0))))
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_mul ε (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1)))))))
Mathlib.Tactic.Ring.neg_zero))
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_mul ε (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsNat.to_raw_eq
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1)) (Eq.refl (Int.ofNat 1))))))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_lt (x₀ ^ Nat.rawCast 1 * Nat.rawCast 1)
(Mathlib.Tactic.Ring.add_pf_zero_add
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * Nat.rawCast 1) + 0)))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Tactic.Ring.add_overlap_pf_zero x₀ (Nat.rawCast 1)
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0)))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Tactic.Ring.add_overlap_pf_zero (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.add_overlap_pf_zero ε (Nat.rawCast 1)
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0))))))
(Mathlib.Tactic.Ring.add_pf_zero_add 0))))
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))))
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le (Mathlib.Tactic.Linarith.sub_neg_of_lt hL)
(Mathlib.Tactic.Linarith.sub_nonpos_of_le a))))claim1_2:↑L * ε ∉ upperBounds E := LUB_claim1._proof_2 n hE hx₀ L' claim1_1claim1_3:↑K > ↑L :=
Mathlib.Tactic.Contrapose.contrapose₂
(Eq.mpr (id (implies_congr not_lt._simp_1 (Eq.refl (↑L * ε ∈ upperBounds E)))) fun claim1_2 =>
have claim1_2 := mul_le_mul_left claim1_2 hpos;
have claim1_2 :=
Decidable.byContradiction fun h =>
ne_of_lt (Eq.mp not_le._simp_1 h)
(le_antisymm (le_trans (le_of_lt (Eq.mp not_le._simp_1 h)) (le_refl M))
(le_trans (le_of_lt hK)
(le_trans (Eq.mp (congr (congrArg LE.le (mul_comm ε ↑K)) (mul_comm ε ↑L)) claim1_2) (le_refl (↑L * ε)))));
LUB_claim1._proof_3 n M hbound L' claim1_2)
claim1_2⊢ ↑L < ↑K; rwa [←gt_iff_lt, gt_of_coen:ℕE:Set RealhE:E.Nonemptyx₀:Real := hE.somehx₀:hE.some ∈ Eε:Real := ↑(1 / (↑n + 1))hpos:ε.IsPosM:Realhbound:M ∈ upperBounds EK:ℕh✝¹:K > 0hK:↑K * ε > ML':ℕh✝:L' > 0hL:↑L' * ε > -x₀L:ℤ := -↑L'claim1_1:↑L * ε < x₀ :=
Eq.mpr
(id
(congrFun'
(congrArg LT.lt
(Eq.trans
(congrFun' (congrArg HMul.hMul (Eq.trans (Int.cast_neg ↑L') (congrArg Neg.neg (Int.cast_natCast L')))) ε)
(neg_mul (↑L') ε)))
x₀))
(lt_of_not_ge fun a =>
Mathlib.Tactic.Linarith.lt_irrefl
(Eq.mp
(congrArg (fun _a => _a < 0)
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.sub_congr
(Mathlib.Tactic.Ring.neg_congr (Mathlib.Tactic.Ring.atom_pf x₀)
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul x₀ (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1))))))
Mathlib.Tactic.Ring.neg_zero))
(Mathlib.Tactic.Ring.mul_congr (Mathlib.Tactic.Ring.atom_pf ↑L') (Mathlib.Tactic.Ring.atom_pf ε)
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.mul_pf_right ε (Nat.rawCast 1)
(Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1))))
(Mathlib.Tactic.Ring.mul_zero (↑L' ^ Nat.rawCast 1 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * Nat.rawCast 1) + 0)))
(Mathlib.Tactic.Ring.zero_mul (ε ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * Nat.rawCast 1) + 0))))
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_mul ε (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1)))))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_lt (x₀ ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast)
(Mathlib.Tactic.Ring.add_pf_zero_add
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast) + 0)))))
(Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf x₀)
(Mathlib.Tactic.Ring.neg_congr
(Mathlib.Tactic.Ring.mul_congr (Mathlib.Tactic.Ring.atom_pf ↑L') (Mathlib.Tactic.Ring.atom_pf ε)
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.mul_pf_right ε (Nat.rawCast 1)
(Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1))))
(Mathlib.Tactic.Ring.mul_zero (↑L' ^ Nat.rawCast 1 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * Nat.rawCast 1) + 0)))
(Mathlib.Tactic.Ring.zero_mul (ε ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * Nat.rawCast 1) + 0))))
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_mul ε (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1)))))))
Mathlib.Tactic.Ring.neg_zero))
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_mul ε (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsNat.to_raw_eq
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1)) (Eq.refl (Int.ofNat 1))))))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_lt (x₀ ^ Nat.rawCast 1 * Nat.rawCast 1)
(Mathlib.Tactic.Ring.add_pf_zero_add
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * Nat.rawCast 1) + 0)))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Tactic.Ring.add_overlap_pf_zero x₀ (Nat.rawCast 1)
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0)))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Tactic.Ring.add_overlap_pf_zero (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.add_overlap_pf_zero ε (Nat.rawCast 1)
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0))))))
(Mathlib.Tactic.Ring.add_pf_zero_add 0))))
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))))
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le (Mathlib.Tactic.Linarith.sub_neg_of_lt hL)
(Mathlib.Tactic.Linarith.sub_nonpos_of_le a))))claim1_2:↑L * ε ∉ upperBounds E := LUB_claim1._proof_2 n hE hx₀ L' claim1_1claim1_3:↑K > ↑L :=
Mathlib.Tactic.Contrapose.contrapose₂
(Eq.mpr (id (implies_congr not_lt._simp_1 (Eq.refl (↑L * ε ∈ upperBounds E)))) fun claim1_2 =>
have claim1_2 := mul_le_mul_left claim1_2 hpos;
have claim1_2 :=
Decidable.byContradiction fun h =>
ne_of_lt (Eq.mp not_le._simp_1 h)
(le_antisymm (le_trans (le_of_lt (Eq.mp not_le._simp_1 h)) (le_refl M))
(le_trans (le_of_lt hK)
(le_trans (Eq.mp (congr (congrArg LE.le (mul_comm ε ↑K)) (mul_comm ε ↑L)) claim1_2) (le_refl (↑L * ε)))));
LUB_claim1._proof_3 n M hbound L' claim1_2)
claim1_2⊢ ↑↑K > ↑↑L
n:ℕE:Set RealhE:E.Nonemptyx₀:Real := hE.somehx₀:hE.some ∈ Eε:Real := ↑(1 / (↑n + 1))M:Realhbound:M ∈ upperBounds EK:ℕL':ℕL:ℤ := -↑L'hpos:(↑n + 1)⁻¹.IsPosh✝¹:0 < KhK:M < ↑K * (↑n + 1)⁻¹h✝:0 < L'hL:-x₀ < ↑L' * (↑n + 1)⁻¹claim1_1:↑L * (↑n + 1)⁻¹ < x₀claim1_2:↑L * (↑n + 1)⁻¹ ∉ upperBounds Eclaim1_3:↑L < ↑K⊢ ↑K * (↑n + 1)⁻¹ ∈ upperBounds E; n:ℕE:Set RealhE:E.Nonemptyx₀:Real := hE.somehx₀:hE.some ∈ Eε:Real := ↑(1 / (↑n + 1))M:Realhbound:M ∈ upperBounds EK:ℕL':ℕL:ℤ := -↑L'hpos:(↑n + 1)⁻¹.IsPosh✝¹:0 < KhK:M < ↑K * (↑n + 1)⁻¹h✝:0 < L'hL:-x₀ < ↑L' * (↑n + 1)⁻¹claim1_1:↑L * (↑n + 1)⁻¹ < x₀claim1_2:↑L * (↑n + 1)⁻¹ ∉ upperBounds Eclaim1_3:↑L < ↑K⊢ M ≤ ↑K * (↑n + 1)⁻¹; All goals completed! 🐙
n:ℕE:Set RealhE:E.Nonemptyx₀:Real := hE.somehx₀:hE.some ∈ Eε:Real := ↑(1 / (↑n + 1))hpos:ε.IsPosM:Realhbound:M ∈ upperBounds EK:ℕh✝³:K > 0hK:↑K * ε > ML':ℕh✝²:L' > 0hL:↑L' * ε > -x₀L:ℤ := -↑L'claim1_1:↑L * ε < x₀ :=
Eq.mpr
(id
(congrFun'
(congrArg LT.lt
(Eq.trans
(congrFun' (congrArg HMul.hMul (Eq.trans (Int.cast_neg ↑L') (congrArg Neg.neg (Int.cast_natCast L')))) ε)
(neg_mul (↑L') ε)))
x₀))
(lt_of_not_ge fun a =>
Mathlib.Tactic.Linarith.lt_irrefl
(Eq.mp
(congrArg (fun _a => _a < 0)
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.sub_congr
(Mathlib.Tactic.Ring.neg_congr (Mathlib.Tactic.Ring.atom_pf x₀)
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul x₀ (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1))))))
Mathlib.Tactic.Ring.neg_zero))
(Mathlib.Tactic.Ring.mul_congr (Mathlib.Tactic.Ring.atom_pf ↑L') (Mathlib.Tactic.Ring.atom_pf ε)
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.mul_pf_right ε (Nat.rawCast 1)
(Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1))))
(Mathlib.Tactic.Ring.mul_zero (↑L' ^ Nat.rawCast 1 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * Nat.rawCast 1) + 0)))
(Mathlib.Tactic.Ring.zero_mul (ε ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * Nat.rawCast 1) + 0))))
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_mul ε (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1)))))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_lt (x₀ ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast)
(Mathlib.Tactic.Ring.add_pf_zero_add
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast) + 0)))))
(Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf x₀)
(Mathlib.Tactic.Ring.neg_congr
(Mathlib.Tactic.Ring.mul_congr (Mathlib.Tactic.Ring.atom_pf ↑L') (Mathlib.Tactic.Ring.atom_pf ε)
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.mul_pf_right ε (Nat.rawCast 1)
(Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1))))
(Mathlib.Tactic.Ring.mul_zero (↑L' ^ Nat.rawCast 1 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * Nat.rawCast 1) + 0)))
(Mathlib.Tactic.Ring.zero_mul (ε ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * Nat.rawCast 1) + 0))))
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_mul ε (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1)))))))
Mathlib.Tactic.Ring.neg_zero))
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_mul ε (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsNat.to_raw_eq
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1)) (Eq.refl (Int.ofNat 1))))))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_lt (x₀ ^ Nat.rawCast 1 * Nat.rawCast 1)
(Mathlib.Tactic.Ring.add_pf_zero_add
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * Nat.rawCast 1) + 0)))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Tactic.Ring.add_overlap_pf_zero x₀ (Nat.rawCast 1)
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0)))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Tactic.Ring.add_overlap_pf_zero (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.add_overlap_pf_zero ε (Nat.rawCast 1)
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0))))))
(Mathlib.Tactic.Ring.add_pf_zero_add 0))))
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))))
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le (Mathlib.Tactic.Linarith.sub_neg_of_lt hL)
(Mathlib.Tactic.Linarith.sub_nonpos_of_le a))))claim1_2:↑L * ε ∉ upperBounds E := LUB_claim1._proof_2 n hE hx₀ L' claim1_1claim1_3:↑K > ↑L :=
Mathlib.Tactic.Contrapose.contrapose₂
(Eq.mpr (id (implies_congr not_lt._simp_1 (Eq.refl (↑L * ε ∈ upperBounds E)))) fun claim1_2 =>
have claim1_2 := mul_le_mul_left claim1_2 hpos;
have claim1_2 :=
Decidable.byContradiction fun h =>
ne_of_lt (Eq.mp not_le._simp_1 h)
(le_antisymm (le_trans (le_of_lt (Eq.mp not_le._simp_1 h)) (le_refl M))
(le_trans (le_of_lt hK)
(le_trans (Eq.mp (congr (congrArg LE.le (mul_comm ε ↑K)) (mul_comm ε ↑L)) claim1_2) (le_refl (↑L * ε)))));
LUB_claim1._proof_3 n M hbound L' claim1_2)
claim1_2m:ℤh✝¹:L < mh✝:m ≤ ↑Khm:↑m * ε ∈ upperBounds Ehm':(↑m - 1) * ε ∉ upperBounds E⊢ ∃ x, ↑(↑x / (↑n + 1)) ∈ upperBounds E ∧ ↑(↑x / (↑n + 1) - 1 / (↑n + 1)) ∉ upperBounds E; n:ℕE:Set RealhE:E.Nonemptyx₀:Real := hE.somehx₀:hE.some ∈ Eε:Real := ↑(1 / (↑n + 1))hpos:ε.IsPosM:Realhbound:M ∈ upperBounds EK:ℕh✝³:K > 0hK:↑K * ε > ML':ℕh✝²:L' > 0hL:↑L' * ε > -x₀L:ℤ := -↑L'claim1_1:↑L * ε < x₀ :=
Eq.mpr
(id
(congrFun'
(congrArg LT.lt
(Eq.trans
(congrFun' (congrArg HMul.hMul (Eq.trans (Int.cast_neg ↑L') (congrArg Neg.neg (Int.cast_natCast L')))) ε)
(neg_mul (↑L') ε)))
x₀))
(lt_of_not_ge fun a =>
Mathlib.Tactic.Linarith.lt_irrefl
(Eq.mp
(congrArg (fun _a => _a < 0)
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.sub_congr
(Mathlib.Tactic.Ring.neg_congr (Mathlib.Tactic.Ring.atom_pf x₀)
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul x₀ (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1))))))
Mathlib.Tactic.Ring.neg_zero))
(Mathlib.Tactic.Ring.mul_congr (Mathlib.Tactic.Ring.atom_pf ↑L') (Mathlib.Tactic.Ring.atom_pf ε)
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.mul_pf_right ε (Nat.rawCast 1)
(Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1))))
(Mathlib.Tactic.Ring.mul_zero (↑L' ^ Nat.rawCast 1 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * Nat.rawCast 1) + 0)))
(Mathlib.Tactic.Ring.zero_mul (ε ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * Nat.rawCast 1) + 0))))
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_mul ε (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1)))))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_lt (x₀ ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast)
(Mathlib.Tactic.Ring.add_pf_zero_add
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast) + 0)))))
(Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf x₀)
(Mathlib.Tactic.Ring.neg_congr
(Mathlib.Tactic.Ring.mul_congr (Mathlib.Tactic.Ring.atom_pf ↑L') (Mathlib.Tactic.Ring.atom_pf ε)
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.mul_pf_right ε (Nat.rawCast 1)
(Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1))))
(Mathlib.Tactic.Ring.mul_zero (↑L' ^ Nat.rawCast 1 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * Nat.rawCast 1) + 0)))
(Mathlib.Tactic.Ring.zero_mul (ε ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * Nat.rawCast 1) + 0))))
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_mul ε (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1)))))))
Mathlib.Tactic.Ring.neg_zero))
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_mul ε (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsNat.to_raw_eq
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1)) (Eq.refl (Int.ofNat 1))))))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_lt (x₀ ^ Nat.rawCast 1 * Nat.rawCast 1)
(Mathlib.Tactic.Ring.add_pf_zero_add
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * Nat.rawCast 1) + 0)))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Tactic.Ring.add_overlap_pf_zero x₀ (Nat.rawCast 1)
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0)))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Tactic.Ring.add_overlap_pf_zero (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.add_overlap_pf_zero ε (Nat.rawCast 1)
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0))))))
(Mathlib.Tactic.Ring.add_pf_zero_add 0))))
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))))
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le (Mathlib.Tactic.Linarith.sub_neg_of_lt hL)
(Mathlib.Tactic.Linarith.sub_nonpos_of_le a))))claim1_2:↑L * ε ∉ upperBounds E := LUB_claim1._proof_2 n hE hx₀ L' claim1_1claim1_3:↑K > ↑L :=
Mathlib.Tactic.Contrapose.contrapose₂
(Eq.mpr (id (implies_congr not_lt._simp_1 (Eq.refl (↑L * ε ∈ upperBounds E)))) fun claim1_2 =>
have claim1_2 := mul_le_mul_left claim1_2 hpos;
have claim1_2 :=
Decidable.byContradiction fun h =>
ne_of_lt (Eq.mp not_le._simp_1 h)
(le_antisymm (le_trans (le_of_lt (Eq.mp not_le._simp_1 h)) (le_refl M))
(le_trans (le_of_lt hK)
(le_trans (Eq.mp (congr (congrArg LE.le (mul_comm ε ↑K)) (mul_comm ε ↑L)) claim1_2) (le_refl (↑L * ε)))));
LUB_claim1._proof_3 n M hbound L' claim1_2)
claim1_2m:ℤh✝¹:L < mh✝:m ≤ ↑Khm:↑m * ε ∈ upperBounds Ehm':(↑m - 1) * ε ∉ upperBounds E⊢ ↑(↑m / (↑n + 1)) ∈ upperBounds E ∧ ↑(↑m / (↑n + 1) - 1 / (↑n + 1)) ∉ upperBounds E
have : (m/(n+1):ℚ) = m*ε := n:ℕE:Set RealhE:E.Nonemptyhbound:BddAbove E⊢ ∃! m, ↑(↑m / (↑n + 1)) ∈ upperBounds E ∧ ↑(↑m / (↑n + 1) - 1 / (↑n + 1)) ∉ upperBounds E n:ℕE:Set RealhE:E.Nonemptyx₀:Real := hE.somehx₀:hE.some ∈ Eε:Real := ↑(1 / (↑n + 1))hpos:ε.IsPosM:Realhbound:M ∈ upperBounds EK:ℕh✝³:K > 0hK:↑K * ε > ML':ℕh✝²:L' > 0hL:↑L' * ε > -x₀L:ℤ := -↑L'claim1_1:↑L * ε < x₀ :=
Eq.mpr
(id
(congrFun'
(congrArg LT.lt
(Eq.trans
(congrFun' (congrArg HMul.hMul (Eq.trans (Int.cast_neg ↑L') (congrArg Neg.neg (Int.cast_natCast L')))) ε)
(neg_mul (↑L') ε)))
x₀))
(lt_of_not_ge fun a =>
Mathlib.Tactic.Linarith.lt_irrefl
(Eq.mp
(congrArg (fun _a => _a < 0)
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.sub_congr
(Mathlib.Tactic.Ring.neg_congr (Mathlib.Tactic.Ring.atom_pf x₀)
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul x₀ (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1))))))
Mathlib.Tactic.Ring.neg_zero))
(Mathlib.Tactic.Ring.mul_congr (Mathlib.Tactic.Ring.atom_pf ↑L') (Mathlib.Tactic.Ring.atom_pf ε)
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.mul_pf_right ε (Nat.rawCast 1)
(Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1))))
(Mathlib.Tactic.Ring.mul_zero (↑L' ^ Nat.rawCast 1 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * Nat.rawCast 1) + 0)))
(Mathlib.Tactic.Ring.zero_mul (ε ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * Nat.rawCast 1) + 0))))
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_mul ε (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1)))))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_lt (x₀ ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast)
(Mathlib.Tactic.Ring.add_pf_zero_add
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast) + 0)))))
(Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf x₀)
(Mathlib.Tactic.Ring.neg_congr
(Mathlib.Tactic.Ring.mul_congr (Mathlib.Tactic.Ring.atom_pf ↑L') (Mathlib.Tactic.Ring.atom_pf ε)
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.mul_pf_right ε (Nat.rawCast 1)
(Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1))))
(Mathlib.Tactic.Ring.mul_zero (↑L' ^ Nat.rawCast 1 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * Nat.rawCast 1) + 0)))
(Mathlib.Tactic.Ring.zero_mul (ε ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * Nat.rawCast 1) + 0))))
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_mul ε (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1)))))))
Mathlib.Tactic.Ring.neg_zero))
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_mul ε (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsNat.to_raw_eq
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1)) (Eq.refl (Int.ofNat 1))))))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_lt (x₀ ^ Nat.rawCast 1 * Nat.rawCast 1)
(Mathlib.Tactic.Ring.add_pf_zero_add
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * Nat.rawCast 1) + 0)))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Tactic.Ring.add_overlap_pf_zero x₀ (Nat.rawCast 1)
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0)))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Tactic.Ring.add_overlap_pf_zero (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.add_overlap_pf_zero ε (Nat.rawCast 1)
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0))))))
(Mathlib.Tactic.Ring.add_pf_zero_add 0))))
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))))
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le (Mathlib.Tactic.Linarith.sub_neg_of_lt hL)
(Mathlib.Tactic.Linarith.sub_nonpos_of_le a))))claim1_2:↑L * ε ∉ upperBounds E := LUB_claim1._proof_2 n hE hx₀ L' claim1_1claim1_3:↑K > ↑L :=
Mathlib.Tactic.Contrapose.contrapose₂
(Eq.mpr (id (implies_congr not_lt._simp_1 (Eq.refl (↑L * ε ∈ upperBounds E)))) fun claim1_2 =>
have claim1_2 := mul_le_mul_left claim1_2 hpos;
have claim1_2 :=
Decidable.byContradiction fun h =>
ne_of_lt (Eq.mp not_le._simp_1 h)
(le_antisymm (le_trans (le_of_lt (Eq.mp not_le._simp_1 h)) (le_refl M))
(le_trans (le_of_lt hK)
(le_trans (Eq.mp (congr (congrArg LE.le (mul_comm ε ↑K)) (mul_comm ε ↑L)) claim1_2) (le_refl (↑L * ε)))));
LUB_claim1._proof_3 n M hbound L' claim1_2)
claim1_2m:ℤh✝¹:L < mh✝:m ≤ ↑Khm:↑m * ε ∈ upperBounds Ehm':(↑m - 1) * ε ∉ upperBounds E⊢ ↑m / (↑n + 1) = ↑m * (↑n + 1)⁻¹; All goals completed! 🐙
exact ⟨ n:ℕE:Set RealhE:E.Nonemptyx₀:Real := hE.somehx₀:hE.some ∈ Eε:Real := ↑(1 / (↑n + 1))hpos:ε.IsPosM:Realhbound:M ∈ upperBounds EK:ℕh✝³:K > 0hK:↑K * ε > ML':ℕh✝²:L' > 0hL:↑L' * ε > -x₀L:ℤ := -↑L'claim1_1:↑L * ε < x₀ :=
Eq.mpr
(id
(congrFun'
(congrArg LT.lt
(Eq.trans
(congrFun' (congrArg HMul.hMul (Eq.trans (Int.cast_neg ↑L') (congrArg Neg.neg (Int.cast_natCast L')))) ε)
(neg_mul (↑L') ε)))
x₀))
(lt_of_not_ge fun a =>
Mathlib.Tactic.Linarith.lt_irrefl
(Eq.mp
(congrArg (fun _a => _a < 0)
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.sub_congr
(Mathlib.Tactic.Ring.neg_congr (Mathlib.Tactic.Ring.atom_pf x₀)
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul x₀ (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1))))))
Mathlib.Tactic.Ring.neg_zero))
(Mathlib.Tactic.Ring.mul_congr (Mathlib.Tactic.Ring.atom_pf ↑L') (Mathlib.Tactic.Ring.atom_pf ε)
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.mul_pf_right ε (Nat.rawCast 1)
(Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1))))
(Mathlib.Tactic.Ring.mul_zero (↑L' ^ Nat.rawCast 1 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * Nat.rawCast 1) + 0)))
(Mathlib.Tactic.Ring.zero_mul (ε ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * Nat.rawCast 1) + 0))))
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_mul ε (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1)))))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_lt (x₀ ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast)
(Mathlib.Tactic.Ring.add_pf_zero_add
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast) + 0)))))
(Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf x₀)
(Mathlib.Tactic.Ring.neg_congr
(Mathlib.Tactic.Ring.mul_congr (Mathlib.Tactic.Ring.atom_pf ↑L') (Mathlib.Tactic.Ring.atom_pf ε)
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.mul_pf_right ε (Nat.rawCast 1)
(Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1))))
(Mathlib.Tactic.Ring.mul_zero (↑L' ^ Nat.rawCast 1 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * Nat.rawCast 1) + 0)))
(Mathlib.Tactic.Ring.zero_mul (ε ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * Nat.rawCast 1) + 0))))
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_mul ε (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1)))))))
Mathlib.Tactic.Ring.neg_zero))
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_mul ε (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsNat.to_raw_eq
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1)) (Eq.refl (Int.ofNat 1))))))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_lt (x₀ ^ Nat.rawCast 1 * Nat.rawCast 1)
(Mathlib.Tactic.Ring.add_pf_zero_add
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * Nat.rawCast 1) + 0)))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Tactic.Ring.add_overlap_pf_zero x₀ (Nat.rawCast 1)
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0)))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Tactic.Ring.add_overlap_pf_zero (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.add_overlap_pf_zero ε (Nat.rawCast 1)
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0))))))
(Mathlib.Tactic.Ring.add_pf_zero_add 0))))
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))))
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le (Mathlib.Tactic.Linarith.sub_neg_of_lt hL)
(Mathlib.Tactic.Linarith.sub_nonpos_of_le a))))claim1_2:↑L * ε ∉ upperBounds E := LUB_claim1._proof_2 n hE hx₀ L' claim1_1claim1_3:↑K > ↑L :=
Mathlib.Tactic.Contrapose.contrapose₂
(Eq.mpr (id (implies_congr not_lt._simp_1 (Eq.refl (↑L * ε ∈ upperBounds E)))) fun claim1_2 =>
have claim1_2 := mul_le_mul_left claim1_2 hpos;
have claim1_2 :=
Decidable.byContradiction fun h =>
ne_of_lt (Eq.mp not_le._simp_1 h)
(le_antisymm (le_trans (le_of_lt (Eq.mp not_le._simp_1 h)) (le_refl M))
(le_trans (le_of_lt hK)
(le_trans (Eq.mp (congr (congrArg LE.le (mul_comm ε ↑K)) (mul_comm ε ↑L)) claim1_2) (le_refl (↑L * ε)))));
LUB_claim1._proof_3 n M hbound L' claim1_2)
claim1_2m:ℤh✝¹:L < mh✝:m ≤ ↑Khm:↑m * ε ∈ upperBounds Ehm':(↑m - 1) * ε ∉ upperBounds Ethis:↑(↑m / (↑n + 1)) = ↑m * ε :=
Eq.mpr
(id
(congr
(congrArg Eq
(Eq.trans (Rat.cast_div (↑m) (↑n + 1))
(congr (congrArg HDiv.hDiv (Rat.cast_intCast m))
(Eq.trans (Rat.cast_add (↑n) 1) (congr (congrArg HAdd.hAdd (Rat.cast_natCast n)) Rat.cast_one)))))
(congrArg (HMul.hMul ↑m)
(Eq.trans (Rat.cast_div 1 (↑n + 1))
(Eq.trans
(congr (congrArg HDiv.hDiv Rat.cast_one)
(Eq.trans (Rat.cast_add (↑n) 1) (congr (congrArg HAdd.hAdd (Rat.cast_natCast n)) Rat.cast_one)))
(one_div (↑n + 1)))))))
(of_eq_true
(Eq.trans
(Mathlib.Tactic.FieldSimp.eq_eq_cancel_eq
(Mathlib.Tactic.FieldSimp.eq_mul_of_eq_eq_eq_mul (Eq.trans (congr_arg₂ HDiv.hDiv rfl rfl) rfl)
(Eq.trans
(Mathlib.Tactic.FieldSimp.NF.div_eq_eval
(Eq.trans (Eq.refl ↑m) (Mathlib.Tactic.FieldSimp.NF.atom_eq_eval ↑m))
(Mathlib.Tactic.FieldSimp.subst_add
(Mathlib.Tactic.FieldSimp.eq_mul_of_eq_eq_eq_mul rfl
(Eq.trans (Eq.trans (Eq.refl ↑n) (Mathlib.Tactic.FieldSimp.NF.atom_eq_eval ↑n))
(Eq.symm
(Mathlib.Tactic.FieldSimp.NF.eval_mul_eval_cons 1 (↑n)
(one_mul (Mathlib.Tactic.FieldSimp.NF.eval [])))))
rfl
(Mathlib.Tactic.FieldSimp.eq_div_of_eq_one_of_subst
(Mathlib.Tactic.FieldSimp.NF.cons_eq_div_of_eq_div 1 (↑n) (Eq.symm (div_one 1)))
(Eq.mpr (id (congrArg (fun _a => _a = ↑n) (Mathlib.Tactic.FieldSimp.NF.eval_cons (1, ↑n) [])))
(Eq.trans (one_mul (Mathlib.Tactic.FieldSimp.zpow' (1, ↑n).2 (1, ↑n).1))
(Mathlib.Tactic.FieldSimp.zpow'_one ↑n)))))
(Mathlib.Tactic.FieldSimp.eq_mul_of_eq_eq_eq_mul rfl
(Eq.trans (Mathlib.Tactic.FieldSimp.NF.one_eq_eval Real)
(Eq.symm (one_mul (Mathlib.Tactic.FieldSimp.NF.eval []))))
rfl (Mathlib.Tactic.FieldSimp.eq_div_of_eq_one_of_subst (Eq.symm (div_one 1)) rfl))
(Mathlib.Tactic.FieldSimp.NF.atom_eq_eval (↑n + 1)) (one_mul ((1, ↑n + 1) ::ᵣ []).eval))
(Mathlib.Tactic.FieldSimp.NF.div_eq_eval₃ (1, ↑n + 1) (div_one ((1, ↑m) ::ᵣ []).eval)))
(Eq.symm
(Mathlib.Tactic.FieldSimp.NF.eval_cons_mul_eval (-1) (↑n + 1)
(Mathlib.Tactic.FieldSimp.NF.eval_mul_eval_cons 1 (↑m)
(one_mul (Mathlib.Tactic.FieldSimp.NF.eval []))))))
rfl
(Mathlib.Tactic.FieldSimp.eq_div_of_eq_one_of_subst
(Mathlib.Tactic.FieldSimp.NF.cons_eq_div_of_eq_div 1 (↑m) (Eq.symm (div_one 1)))
(Eq.mpr (id (congrArg (fun _a => _a = ↑m) (Mathlib.Tactic.FieldSimp.NF.eval_cons (1, ↑m) [])))
(Eq.trans (one_mul (Mathlib.Tactic.FieldSimp.zpow' (1, ↑m).2 (1, ↑m).1))
(Mathlib.Tactic.FieldSimp.zpow'_one ↑m)))))
(Mathlib.Tactic.FieldSimp.eq_mul_of_eq_eq_eq_mul
(Eq.trans (congr_arg₂ HMul.hMul rfl (Eq.trans (congr_arg Inv.inv rfl) rfl)) rfl)
(Eq.trans
(Mathlib.Tactic.FieldSimp.NF.mul_eq_eval
(Eq.trans (Eq.refl ↑m) (Mathlib.Tactic.FieldSimp.NF.atom_eq_eval ↑m))
(Mathlib.Tactic.FieldSimp.NF.inv_eq_eval
(Mathlib.Tactic.FieldSimp.subst_add
(Mathlib.Tactic.FieldSimp.eq_mul_of_eq_eq_eq_mul rfl
(Eq.trans (Eq.trans (Eq.refl ↑n) (Mathlib.Tactic.FieldSimp.NF.atom_eq_eval ↑n))
(Eq.symm
(Mathlib.Tactic.FieldSimp.NF.eval_mul_eval_cons 1 (↑n)
(one_mul (Mathlib.Tactic.FieldSimp.NF.eval [])))))
rfl
(Mathlib.Tactic.FieldSimp.eq_div_of_eq_one_of_subst
(Mathlib.Tactic.FieldSimp.NF.cons_eq_div_of_eq_div 1 (↑n) (Eq.symm (div_one 1)))
(Eq.mpr (id (congrArg (fun _a => _a = ↑n) (Mathlib.Tactic.FieldSimp.NF.eval_cons (1, ↑n) [])))
(Eq.trans (one_mul (Mathlib.Tactic.FieldSimp.zpow' (1, ↑n).2 (1, ↑n).1))
(Mathlib.Tactic.FieldSimp.zpow'_one ↑n)))))
(Mathlib.Tactic.FieldSimp.eq_mul_of_eq_eq_eq_mul rfl
(Eq.trans (Mathlib.Tactic.FieldSimp.NF.one_eq_eval Real)
(Eq.symm (one_mul (Mathlib.Tactic.FieldSimp.NF.eval []))))
rfl (Mathlib.Tactic.FieldSimp.eq_div_of_eq_one_of_subst (Eq.symm (div_one 1)) rfl))
(Mathlib.Tactic.FieldSimp.NF.atom_eq_eval (↑n + 1)) (one_mul ((1, ↑n + 1) ::ᵣ []).eval)))
(Mathlib.Tactic.FieldSimp.NF.mul_eq_eval₃ (-1, ↑n + 1) (mul_one ((1, ↑m) ::ᵣ []).eval)))
(Eq.symm
(Mathlib.Tactic.FieldSimp.NF.eval_cons_mul_eval (-1) (↑n + 1)
(Mathlib.Tactic.FieldSimp.NF.eval_mul_eval_cons 1 (↑m)
(one_mul (Mathlib.Tactic.FieldSimp.NF.eval []))))))
rfl
(Mathlib.Tactic.FieldSimp.eq_div_of_eq_one_of_subst
(Mathlib.Tactic.FieldSimp.NF.cons_eq_div_of_eq_div 1 (↑m) (Eq.symm (div_one 1)))
(Eq.mpr (id (congrArg (fun _a => _a = ↑m) (Mathlib.Tactic.FieldSimp.NF.eval_cons (1, ↑m) [])))
(Eq.trans (one_mul (Mathlib.Tactic.FieldSimp.zpow' (1, ↑m).2 (1, ↑m).1))
(Mathlib.Tactic.FieldSimp.zpow'_one ↑m)))))
(Mathlib.Tactic.FieldSimp.NF.cons_ne_zero (-1)
(ne_of_gt
(Right.add_pos_of_nonneg_of_pos (Nat.cast_nonneg' n)
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_one)
(Eq.refl (Nat.ble 1 1)))))
one_ne_zero))
(eq_self ↑m)))⊢ ↑(↑m / (↑n + 1)) ∈ upperBounds E All goals completed! 🐙, n:ℕE:Set RealhE:E.Nonemptyx₀:Real := hE.somehx₀:hE.some ∈ Eε:Real := ↑(1 / (↑n + 1))hpos:ε.IsPosM:Realhbound:M ∈ upperBounds EK:ℕh✝³:K > 0hK:↑K * ε > ML':ℕh✝²:L' > 0hL:↑L' * ε > -x₀L:ℤ := -↑L'claim1_1:↑L * ε < x₀ :=
Eq.mpr
(id
(congrFun'
(congrArg LT.lt
(Eq.trans
(congrFun' (congrArg HMul.hMul (Eq.trans (Int.cast_neg ↑L') (congrArg Neg.neg (Int.cast_natCast L')))) ε)
(neg_mul (↑L') ε)))
x₀))
(lt_of_not_ge fun a =>
Mathlib.Tactic.Linarith.lt_irrefl
(Eq.mp
(congrArg (fun _a => _a < 0)
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.sub_congr
(Mathlib.Tactic.Ring.neg_congr (Mathlib.Tactic.Ring.atom_pf x₀)
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul x₀ (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1))))))
Mathlib.Tactic.Ring.neg_zero))
(Mathlib.Tactic.Ring.mul_congr (Mathlib.Tactic.Ring.atom_pf ↑L') (Mathlib.Tactic.Ring.atom_pf ε)
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.mul_pf_right ε (Nat.rawCast 1)
(Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1))))
(Mathlib.Tactic.Ring.mul_zero (↑L' ^ Nat.rawCast 1 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * Nat.rawCast 1) + 0)))
(Mathlib.Tactic.Ring.zero_mul (ε ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * Nat.rawCast 1) + 0))))
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_mul ε (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1)))))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_lt (x₀ ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast)
(Mathlib.Tactic.Ring.add_pf_zero_add
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast) + 0)))))
(Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf x₀)
(Mathlib.Tactic.Ring.neg_congr
(Mathlib.Tactic.Ring.mul_congr (Mathlib.Tactic.Ring.atom_pf ↑L') (Mathlib.Tactic.Ring.atom_pf ε)
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.mul_pf_right ε (Nat.rawCast 1)
(Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1))))
(Mathlib.Tactic.Ring.mul_zero (↑L' ^ Nat.rawCast 1 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * Nat.rawCast 1) + 0)))
(Mathlib.Tactic.Ring.zero_mul (ε ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * Nat.rawCast 1) + 0))))
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_mul ε (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1)))))))
Mathlib.Tactic.Ring.neg_zero))
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_mul ε (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsNat.to_raw_eq
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1)) (Eq.refl (Int.ofNat 1))))))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_lt (x₀ ^ Nat.rawCast 1 * Nat.rawCast 1)
(Mathlib.Tactic.Ring.add_pf_zero_add
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * Nat.rawCast 1) + 0)))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Tactic.Ring.add_overlap_pf_zero x₀ (Nat.rawCast 1)
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0)))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Tactic.Ring.add_overlap_pf_zero (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.add_overlap_pf_zero ε (Nat.rawCast 1)
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0))))))
(Mathlib.Tactic.Ring.add_pf_zero_add 0))))
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))))
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le (Mathlib.Tactic.Linarith.sub_neg_of_lt hL)
(Mathlib.Tactic.Linarith.sub_nonpos_of_le a))))claim1_2:↑L * ε ∉ upperBounds E := LUB_claim1._proof_2 n hE hx₀ L' claim1_1claim1_3:↑K > ↑L :=
Mathlib.Tactic.Contrapose.contrapose₂
(Eq.mpr (id (implies_congr not_lt._simp_1 (Eq.refl (↑L * ε ∈ upperBounds E)))) fun claim1_2 =>
have claim1_2 := mul_le_mul_left claim1_2 hpos;
have claim1_2 :=
Decidable.byContradiction fun h =>
ne_of_lt (Eq.mp not_le._simp_1 h)
(le_antisymm (le_trans (le_of_lt (Eq.mp not_le._simp_1 h)) (le_refl M))
(le_trans (le_of_lt hK)
(le_trans (Eq.mp (congr (congrArg LE.le (mul_comm ε ↑K)) (mul_comm ε ↑L)) claim1_2) (le_refl (↑L * ε)))));
LUB_claim1._proof_3 n M hbound L' claim1_2)
claim1_2m:ℤh✝¹:L < mh✝:m ≤ ↑Khm:↑m * ε ∈ upperBounds Ehm':(↑m - 1) * ε ∉ upperBounds Ethis:↑(↑m / (↑n + 1)) = ↑m * ε :=
Eq.mpr
(id
(congr
(congrArg Eq
(Eq.trans (Rat.cast_div (↑m) (↑n + 1))
(congr (congrArg HDiv.hDiv (Rat.cast_intCast m))
(Eq.trans (Rat.cast_add (↑n) 1) (congr (congrArg HAdd.hAdd (Rat.cast_natCast n)) Rat.cast_one)))))
(congrArg (HMul.hMul ↑m)
(Eq.trans (Rat.cast_div 1 (↑n + 1))
(Eq.trans
(congr (congrArg HDiv.hDiv Rat.cast_one)
(Eq.trans (Rat.cast_add (↑n) 1) (congr (congrArg HAdd.hAdd (Rat.cast_natCast n)) Rat.cast_one)))
(one_div (↑n + 1)))))))
(of_eq_true
(Eq.trans
(Mathlib.Tactic.FieldSimp.eq_eq_cancel_eq
(Mathlib.Tactic.FieldSimp.eq_mul_of_eq_eq_eq_mul (Eq.trans (congr_arg₂ HDiv.hDiv rfl rfl) rfl)
(Eq.trans
(Mathlib.Tactic.FieldSimp.NF.div_eq_eval
(Eq.trans (Eq.refl ↑m) (Mathlib.Tactic.FieldSimp.NF.atom_eq_eval ↑m))
(Mathlib.Tactic.FieldSimp.subst_add
(Mathlib.Tactic.FieldSimp.eq_mul_of_eq_eq_eq_mul rfl
(Eq.trans (Eq.trans (Eq.refl ↑n) (Mathlib.Tactic.FieldSimp.NF.atom_eq_eval ↑n))
(Eq.symm
(Mathlib.Tactic.FieldSimp.NF.eval_mul_eval_cons 1 (↑n)
(one_mul (Mathlib.Tactic.FieldSimp.NF.eval [])))))
rfl
(Mathlib.Tactic.FieldSimp.eq_div_of_eq_one_of_subst
(Mathlib.Tactic.FieldSimp.NF.cons_eq_div_of_eq_div 1 (↑n) (Eq.symm (div_one 1)))
(Eq.mpr (id (congrArg (fun _a => _a = ↑n) (Mathlib.Tactic.FieldSimp.NF.eval_cons (1, ↑n) [])))
(Eq.trans (one_mul (Mathlib.Tactic.FieldSimp.zpow' (1, ↑n).2 (1, ↑n).1))
(Mathlib.Tactic.FieldSimp.zpow'_one ↑n)))))
(Mathlib.Tactic.FieldSimp.eq_mul_of_eq_eq_eq_mul rfl
(Eq.trans (Mathlib.Tactic.FieldSimp.NF.one_eq_eval Real)
(Eq.symm (one_mul (Mathlib.Tactic.FieldSimp.NF.eval []))))
rfl (Mathlib.Tactic.FieldSimp.eq_div_of_eq_one_of_subst (Eq.symm (div_one 1)) rfl))
(Mathlib.Tactic.FieldSimp.NF.atom_eq_eval (↑n + 1)) (one_mul ((1, ↑n + 1) ::ᵣ []).eval))
(Mathlib.Tactic.FieldSimp.NF.div_eq_eval₃ (1, ↑n + 1) (div_one ((1, ↑m) ::ᵣ []).eval)))
(Eq.symm
(Mathlib.Tactic.FieldSimp.NF.eval_cons_mul_eval (-1) (↑n + 1)
(Mathlib.Tactic.FieldSimp.NF.eval_mul_eval_cons 1 (↑m)
(one_mul (Mathlib.Tactic.FieldSimp.NF.eval []))))))
rfl
(Mathlib.Tactic.FieldSimp.eq_div_of_eq_one_of_subst
(Mathlib.Tactic.FieldSimp.NF.cons_eq_div_of_eq_div 1 (↑m) (Eq.symm (div_one 1)))
(Eq.mpr (id (congrArg (fun _a => _a = ↑m) (Mathlib.Tactic.FieldSimp.NF.eval_cons (1, ↑m) [])))
(Eq.trans (one_mul (Mathlib.Tactic.FieldSimp.zpow' (1, ↑m).2 (1, ↑m).1))
(Mathlib.Tactic.FieldSimp.zpow'_one ↑m)))))
(Mathlib.Tactic.FieldSimp.eq_mul_of_eq_eq_eq_mul
(Eq.trans (congr_arg₂ HMul.hMul rfl (Eq.trans (congr_arg Inv.inv rfl) rfl)) rfl)
(Eq.trans
(Mathlib.Tactic.FieldSimp.NF.mul_eq_eval
(Eq.trans (Eq.refl ↑m) (Mathlib.Tactic.FieldSimp.NF.atom_eq_eval ↑m))
(Mathlib.Tactic.FieldSimp.NF.inv_eq_eval
(Mathlib.Tactic.FieldSimp.subst_add
(Mathlib.Tactic.FieldSimp.eq_mul_of_eq_eq_eq_mul rfl
(Eq.trans (Eq.trans (Eq.refl ↑n) (Mathlib.Tactic.FieldSimp.NF.atom_eq_eval ↑n))
(Eq.symm
(Mathlib.Tactic.FieldSimp.NF.eval_mul_eval_cons 1 (↑n)
(one_mul (Mathlib.Tactic.FieldSimp.NF.eval [])))))
rfl
(Mathlib.Tactic.FieldSimp.eq_div_of_eq_one_of_subst
(Mathlib.Tactic.FieldSimp.NF.cons_eq_div_of_eq_div 1 (↑n) (Eq.symm (div_one 1)))
(Eq.mpr (id (congrArg (fun _a => _a = ↑n) (Mathlib.Tactic.FieldSimp.NF.eval_cons (1, ↑n) [])))
(Eq.trans (one_mul (Mathlib.Tactic.FieldSimp.zpow' (1, ↑n).2 (1, ↑n).1))
(Mathlib.Tactic.FieldSimp.zpow'_one ↑n)))))
(Mathlib.Tactic.FieldSimp.eq_mul_of_eq_eq_eq_mul rfl
(Eq.trans (Mathlib.Tactic.FieldSimp.NF.one_eq_eval Real)
(Eq.symm (one_mul (Mathlib.Tactic.FieldSimp.NF.eval []))))
rfl (Mathlib.Tactic.FieldSimp.eq_div_of_eq_one_of_subst (Eq.symm (div_one 1)) rfl))
(Mathlib.Tactic.FieldSimp.NF.atom_eq_eval (↑n + 1)) (one_mul ((1, ↑n + 1) ::ᵣ []).eval)))
(Mathlib.Tactic.FieldSimp.NF.mul_eq_eval₃ (-1, ↑n + 1) (mul_one ((1, ↑m) ::ᵣ []).eval)))
(Eq.symm
(Mathlib.Tactic.FieldSimp.NF.eval_cons_mul_eval (-1) (↑n + 1)
(Mathlib.Tactic.FieldSimp.NF.eval_mul_eval_cons 1 (↑m)
(one_mul (Mathlib.Tactic.FieldSimp.NF.eval []))))))
rfl
(Mathlib.Tactic.FieldSimp.eq_div_of_eq_one_of_subst
(Mathlib.Tactic.FieldSimp.NF.cons_eq_div_of_eq_div 1 (↑m) (Eq.symm (div_one 1)))
(Eq.mpr (id (congrArg (fun _a => _a = ↑m) (Mathlib.Tactic.FieldSimp.NF.eval_cons (1, ↑m) [])))
(Eq.trans (one_mul (Mathlib.Tactic.FieldSimp.zpow' (1, ↑m).2 (1, ↑m).1))
(Mathlib.Tactic.FieldSimp.zpow'_one ↑m)))))
(Mathlib.Tactic.FieldSimp.NF.cons_ne_zero (-1)
(ne_of_gt
(Right.add_pos_of_nonneg_of_pos (Nat.cast_nonneg' n)
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_one)
(Eq.refl (Nat.ble 1 1)))))
one_ne_zero))
(eq_self ↑m)))⊢ ↑(↑m / (↑n + 1) - 1 / (↑n + 1)) ∉ upperBounds E n:ℕE:Set RealhE:E.Nonemptyx₀:Real := hE.somehx₀:hE.some ∈ Eε:Real := ↑(1 / (↑n + 1))hpos:ε.IsPosM:Realhbound:M ∈ upperBounds EK:ℕh✝³:K > 0hK:↑K * ε > ML':ℕh✝²:L' > 0hL:↑L' * ε > -x₀L:ℤ := -↑L'claim1_1:↑L * ε < x₀ :=
Eq.mpr
(id
(congrFun'
(congrArg LT.lt
(Eq.trans
(congrFun' (congrArg HMul.hMul (Eq.trans (Int.cast_neg ↑L') (congrArg Neg.neg (Int.cast_natCast L')))) ε)
(neg_mul (↑L') ε)))
x₀))
(lt_of_not_ge fun a =>
Mathlib.Tactic.Linarith.lt_irrefl
(Eq.mp
(congrArg (fun _a => _a < 0)
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.sub_congr
(Mathlib.Tactic.Ring.neg_congr (Mathlib.Tactic.Ring.atom_pf x₀)
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul x₀ (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1))))))
Mathlib.Tactic.Ring.neg_zero))
(Mathlib.Tactic.Ring.mul_congr (Mathlib.Tactic.Ring.atom_pf ↑L') (Mathlib.Tactic.Ring.atom_pf ε)
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.mul_pf_right ε (Nat.rawCast 1)
(Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1))))
(Mathlib.Tactic.Ring.mul_zero (↑L' ^ Nat.rawCast 1 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * Nat.rawCast 1) + 0)))
(Mathlib.Tactic.Ring.zero_mul (ε ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * Nat.rawCast 1) + 0))))
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_mul ε (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1)))))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_lt (x₀ ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast)
(Mathlib.Tactic.Ring.add_pf_zero_add
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast) + 0)))))
(Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf x₀)
(Mathlib.Tactic.Ring.neg_congr
(Mathlib.Tactic.Ring.mul_congr (Mathlib.Tactic.Ring.atom_pf ↑L') (Mathlib.Tactic.Ring.atom_pf ε)
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.mul_pf_right ε (Nat.rawCast 1)
(Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1))))
(Mathlib.Tactic.Ring.mul_zero (↑L' ^ Nat.rawCast 1 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * Nat.rawCast 1) + 0)))
(Mathlib.Tactic.Ring.zero_mul (ε ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * Nat.rawCast 1) + 0))))
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_mul ε (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1)))))))
Mathlib.Tactic.Ring.neg_zero))
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_mul ε (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsNat.to_raw_eq
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1)) (Eq.refl (Int.ofNat 1))))))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_lt (x₀ ^ Nat.rawCast 1 * Nat.rawCast 1)
(Mathlib.Tactic.Ring.add_pf_zero_add
(↑L' ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * Nat.rawCast 1) + 0)))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Tactic.Ring.add_overlap_pf_zero x₀ (Nat.rawCast 1)
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0)))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Tactic.Ring.add_overlap_pf_zero (↑L') (Nat.rawCast 1)
(Mathlib.Tactic.Ring.add_overlap_pf_zero ε (Nat.rawCast 1)
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0))))))
(Mathlib.Tactic.Ring.add_pf_zero_add 0))))
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))))
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le (Mathlib.Tactic.Linarith.sub_neg_of_lt hL)
(Mathlib.Tactic.Linarith.sub_nonpos_of_le a))))claim1_2:↑L * ε ∉ upperBounds E := LUB_claim1._proof_2 n hE hx₀ L' claim1_1claim1_3:↑K > ↑L :=
Mathlib.Tactic.Contrapose.contrapose₂
(Eq.mpr (id (implies_congr not_lt._simp_1 (Eq.refl (↑L * ε ∈ upperBounds E)))) fun claim1_2 =>
have claim1_2 := mul_le_mul_left claim1_2 hpos;
have claim1_2 :=
Decidable.byContradiction fun h =>
ne_of_lt (Eq.mp not_le._simp_1 h)
(le_antisymm (le_trans (le_of_lt (Eq.mp not_le._simp_1 h)) (le_refl M))
(le_trans (le_of_lt hK)
(le_trans (Eq.mp (congr (congrArg LE.le (mul_comm ε ↑K)) (mul_comm ε ↑L)) claim1_2) (le_refl (↑L * ε)))));
LUB_claim1._proof_3 n M hbound L' claim1_2)
claim1_2m:ℤh✝¹:L < mh✝:m ≤ ↑Khm:↑m * ε ∈ upperBounds Ehm':(↑m - 1) * ε ∉ upperBounds Ethis:↑(↑m / (↑n + 1)) = ↑m * ε :=
Eq.mpr
(id
(congr
(congrArg Eq
(Eq.trans (Rat.cast_div (↑m) (↑n + 1))
(congr (congrArg HDiv.hDiv (Rat.cast_intCast m))
(Eq.trans (Rat.cast_add (↑n) 1) (congr (congrArg HAdd.hAdd (Rat.cast_natCast n)) Rat.cast_one)))))
(congrArg (HMul.hMul ↑m)
(Eq.trans (Rat.cast_div 1 (↑n + 1))
(Eq.trans
(congr (congrArg HDiv.hDiv Rat.cast_one)
(Eq.trans (Rat.cast_add (↑n) 1) (congr (congrArg HAdd.hAdd (Rat.cast_natCast n)) Rat.cast_one)))
(one_div (↑n + 1)))))))
(of_eq_true
(Eq.trans
(Mathlib.Tactic.FieldSimp.eq_eq_cancel_eq
(Mathlib.Tactic.FieldSimp.eq_mul_of_eq_eq_eq_mul (Eq.trans (congr_arg₂ HDiv.hDiv rfl rfl) rfl)
(Eq.trans
(Mathlib.Tactic.FieldSimp.NF.div_eq_eval
(Eq.trans (Eq.refl ↑m) (Mathlib.Tactic.FieldSimp.NF.atom_eq_eval ↑m))
(Mathlib.Tactic.FieldSimp.subst_add
(Mathlib.Tactic.FieldSimp.eq_mul_of_eq_eq_eq_mul rfl
(Eq.trans (Eq.trans (Eq.refl ↑n) (Mathlib.Tactic.FieldSimp.NF.atom_eq_eval ↑n))
(Eq.symm
(Mathlib.Tactic.FieldSimp.NF.eval_mul_eval_cons 1 (↑n)
(one_mul (Mathlib.Tactic.FieldSimp.NF.eval [])))))
rfl
(Mathlib.Tactic.FieldSimp.eq_div_of_eq_one_of_subst
(Mathlib.Tactic.FieldSimp.NF.cons_eq_div_of_eq_div 1 (↑n) (Eq.symm (div_one 1)))
(Eq.mpr (id (congrArg (fun _a => _a = ↑n) (Mathlib.Tactic.FieldSimp.NF.eval_cons (1, ↑n) [])))
(Eq.trans (one_mul (Mathlib.Tactic.FieldSimp.zpow' (1, ↑n).2 (1, ↑n).1))
(Mathlib.Tactic.FieldSimp.zpow'_one ↑n)))))
(Mathlib.Tactic.FieldSimp.eq_mul_of_eq_eq_eq_mul rfl
(Eq.trans (Mathlib.Tactic.FieldSimp.NF.one_eq_eval Real)
(Eq.symm (one_mul (Mathlib.Tactic.FieldSimp.NF.eval []))))
rfl (Mathlib.Tactic.FieldSimp.eq_div_of_eq_one_of_subst (Eq.symm (div_one 1)) rfl))
(Mathlib.Tactic.FieldSimp.NF.atom_eq_eval (↑n + 1)) (one_mul ((1, ↑n + 1) ::ᵣ []).eval))
(Mathlib.Tactic.FieldSimp.NF.div_eq_eval₃ (1, ↑n + 1) (div_one ((1, ↑m) ::ᵣ []).eval)))
(Eq.symm
(Mathlib.Tactic.FieldSimp.NF.eval_cons_mul_eval (-1) (↑n + 1)
(Mathlib.Tactic.FieldSimp.NF.eval_mul_eval_cons 1 (↑m)
(one_mul (Mathlib.Tactic.FieldSimp.NF.eval []))))))
rfl
(Mathlib.Tactic.FieldSimp.eq_div_of_eq_one_of_subst
(Mathlib.Tactic.FieldSimp.NF.cons_eq_div_of_eq_div 1 (↑m) (Eq.symm (div_one 1)))
(Eq.mpr (id (congrArg (fun _a => _a = ↑m) (Mathlib.Tactic.FieldSimp.NF.eval_cons (1, ↑m) [])))
(Eq.trans (one_mul (Mathlib.Tactic.FieldSimp.zpow' (1, ↑m).2 (1, ↑m).1))
(Mathlib.Tactic.FieldSimp.zpow'_one ↑m)))))
(Mathlib.Tactic.FieldSimp.eq_mul_of_eq_eq_eq_mul
(Eq.trans (congr_arg₂ HMul.hMul rfl (Eq.trans (congr_arg Inv.inv rfl) rfl)) rfl)
(Eq.trans
(Mathlib.Tactic.FieldSimp.NF.mul_eq_eval
(Eq.trans (Eq.refl ↑m) (Mathlib.Tactic.FieldSimp.NF.atom_eq_eval ↑m))
(Mathlib.Tactic.FieldSimp.NF.inv_eq_eval
(Mathlib.Tactic.FieldSimp.subst_add
(Mathlib.Tactic.FieldSimp.eq_mul_of_eq_eq_eq_mul rfl
(Eq.trans (Eq.trans (Eq.refl ↑n) (Mathlib.Tactic.FieldSimp.NF.atom_eq_eval ↑n))
(Eq.symm
(Mathlib.Tactic.FieldSimp.NF.eval_mul_eval_cons 1 (↑n)
(one_mul (Mathlib.Tactic.FieldSimp.NF.eval [])))))
rfl
(Mathlib.Tactic.FieldSimp.eq_div_of_eq_one_of_subst
(Mathlib.Tactic.FieldSimp.NF.cons_eq_div_of_eq_div 1 (↑n) (Eq.symm (div_one 1)))
(Eq.mpr (id (congrArg (fun _a => _a = ↑n) (Mathlib.Tactic.FieldSimp.NF.eval_cons (1, ↑n) [])))
(Eq.trans (one_mul (Mathlib.Tactic.FieldSimp.zpow' (1, ↑n).2 (1, ↑n).1))
(Mathlib.Tactic.FieldSimp.zpow'_one ↑n)))))
(Mathlib.Tactic.FieldSimp.eq_mul_of_eq_eq_eq_mul rfl
(Eq.trans (Mathlib.Tactic.FieldSimp.NF.one_eq_eval Real)
(Eq.symm (one_mul (Mathlib.Tactic.FieldSimp.NF.eval []))))
rfl (Mathlib.Tactic.FieldSimp.eq_div_of_eq_one_of_subst (Eq.symm (div_one 1)) rfl))
(Mathlib.Tactic.FieldSimp.NF.atom_eq_eval (↑n + 1)) (one_mul ((1, ↑n + 1) ::ᵣ []).eval)))
(Mathlib.Tactic.FieldSimp.NF.mul_eq_eval₃ (-1, ↑n + 1) (mul_one ((1, ↑m) ::ᵣ []).eval)))
(Eq.symm
(Mathlib.Tactic.FieldSimp.NF.eval_cons_mul_eval (-1) (↑n + 1)
(Mathlib.Tactic.FieldSimp.NF.eval_mul_eval_cons 1 (↑m)
(one_mul (Mathlib.Tactic.FieldSimp.NF.eval []))))))
rfl
(Mathlib.Tactic.FieldSimp.eq_div_of_eq_one_of_subst
(Mathlib.Tactic.FieldSimp.NF.cons_eq_div_of_eq_div 1 (↑m) (Eq.symm (div_one 1)))
(Eq.mpr (id (congrArg (fun _a => _a = ↑m) (Mathlib.Tactic.FieldSimp.NF.eval_cons (1, ↑m) [])))
(Eq.trans (one_mul (Mathlib.Tactic.FieldSimp.zpow' (1, ↑m).2 (1, ↑m).1))
(Mathlib.Tactic.FieldSimp.zpow'_one ↑m)))))
(Mathlib.Tactic.FieldSimp.NF.cons_ne_zero (-1)
(ne_of_gt
(Right.add_pos_of_nonneg_of_pos (Nat.cast_nonneg' n)
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_one)
(Eq.refl (Nat.ble 1 1)))))
one_ne_zero))
(eq_self ↑m)))⊢ ↑(↑m / (↑n + 1) - 1 / (↑n + 1)) = (↑m - 1) * ε; All goals completed! 🐙 ⟩
All goals completed! 🐙lemma Real.LUB_claim2 {E : Set Real} (N:ℕ) {a b: ℕ → ℚ}
(hb : ∀ n, b n = 1 / (↑n + 1))
(hm1 : ∀ (n : ℕ), ↑(a n) ∈ upperBounds E)
(hm2 : ∀ (n : ℕ), ↑((a - b) n) ∉ upperBounds E)
: ∀ n ≥ N, ∀ n' ≥ N, |a n - a n'| ≤ 1 / (N+1) := E:Set RealN:ℕa:ℕ → ℚb:ℕ → ℚhb:∀ (n : ℕ), b n = 1 / (↑n + 1)hm1:∀ (n : ℕ), ↑(a n) ∈ upperBounds Ehm2:∀ (n : ℕ), ↑((a - b) n) ∉ upperBounds E⊢ ∀ n ≥ N, ∀ n' ≥ N, |a n - a n'| ≤ 1 / (↑N + 1)
intro n E:Set RealN:ℕa:ℕ → ℚb:ℕ → ℚhb:∀ (n : ℕ), b n = 1 / (↑n + 1)hm1:∀ (n : ℕ), ↑(a n) ∈ upperBounds Ehm2:∀ (n : ℕ), ↑((a - b) n) ∉ upperBounds En:ℕhn:n ≥ N⊢ ∀ n' ≥ N, |a n - a n'| ≤ 1 / (↑N + 1) E:Set RealN:ℕa:ℕ → ℚb:ℕ → ℚhb:∀ (n : ℕ), b n = 1 / (↑n + 1)hm1:∀ (n : ℕ), ↑(a n) ∈ upperBounds Ehm2:∀ (n : ℕ), ↑((a - b) n) ∉ upperBounds En:ℕhn:n ≥ Nn':ℕ⊢ n' ≥ N → |a n - a n'| ≤ 1 / (↑N + 1) E:Set RealN:ℕa:ℕ → ℚb:ℕ → ℚhb:∀ (n : ℕ), b n = 1 / (↑n + 1)hm1:∀ (n : ℕ), ↑(a n) ∈ upperBounds Ehm2:∀ (n : ℕ), ↑((a - b) n) ∉ upperBounds En:ℕhn:n ≥ Nn':ℕhn':n' ≥ N⊢ |a n - a n'| ≤ 1 / (↑N + 1)
E:Set RealN:ℕa:ℕ → ℚb:ℕ → ℚhb:∀ (n : ℕ), b n = 1 / (↑n + 1)hm1:∀ (n : ℕ), ↑(a n) ∈ upperBounds Ehm2:∀ (n : ℕ), ↑((a - b) n) ∉ upperBounds En:ℕhn:n ≥ Nn':ℕhn':n' ≥ N⊢ -(1 / (↑N + 1)) ≤ a n - a n' ∧ a n - a n' ≤ 1 / (↑N + 1)
E:Set RealN:ℕa:ℕ → ℚb:ℕ → ℚhb:∀ (n : ℕ), b n = 1 / (↑n + 1)hm1:∀ (n : ℕ), ↑(a n) ∈ upperBounds Ehm2:∀ (n : ℕ), ↑((a - b) n) ∉ upperBounds En:ℕhn:n ≥ Nn':ℕhn':n' ≥ N⊢ -(1 / (↑N + 1)) ≤ a n - a n'E:Set RealN:ℕa:ℕ → ℚb:ℕ → ℚhb:∀ (n : ℕ), b n = 1 / (↑n + 1)hm1:∀ (n : ℕ), ↑(a n) ∈ upperBounds Ehm2:∀ (n : ℕ), ↑((a - b) n) ∉ upperBounds En:ℕhn:n ≥ Nn':ℕhn':n' ≥ N⊢ a n - a n' ≤ 1 / (↑N + 1)
E:Set RealN:ℕa:ℕ → ℚb:ℕ → ℚhb:∀ (n : ℕ), b n = 1 / (↑n + 1)hm1:∀ (n : ℕ), ↑(a n) ∈ upperBounds Ehm2:∀ (n : ℕ), ↑((a - b) n) ∉ upperBounds En:ℕhn:n ≥ Nn':ℕhn':n' ≥ N⊢ -(1 / (↑N + 1)) ≤ a n - a n' E:Set RealN:ℕa:ℕ → ℚb:ℕ → ℚhb:∀ (n : ℕ), b n = 1 / (↑n + 1)hm2:∀ (n : ℕ), ↑((a - b) n) ∉ upperBounds En:ℕhn:n ≥ Nn':ℕhn':n' ≥ Nhm1:↑(a n) ∈ upperBounds E⊢ -(1 / (↑N + 1)) ≤ a n - a n'; E:Set RealN:ℕa:ℕ → ℚb:ℕ → ℚhb:∀ (n : ℕ), b n = 1 / (↑n + 1)n:ℕhn:n ≥ Nn':ℕhn':n' ≥ Nhm1:↑(a n) ∈ upperBounds Ehm2:↑((a - b) n') ∉ upperBounds E⊢ -(1 / (↑N + 1)) ≤ a n - a n'
have bound1 : ((a-b) n') < a n := E:Set RealN:ℕa:ℕ → ℚb:ℕ → ℚhb:∀ (n : ℕ), b n = 1 / (↑n + 1)hm1:∀ (n : ℕ), ↑(a n) ∈ upperBounds Ehm2:∀ (n : ℕ), ↑((a - b) n) ∉ upperBounds E⊢ ∀ n ≥ N, ∀ n' ≥ N, |a n - a n'| ≤ 1 / (↑N + 1) E:Set RealN:ℕa:ℕ → ℚb:ℕ → ℚhb:∀ (n : ℕ), b n = 1 / (↑n + 1)n:ℕhn:n ≥ Nn':ℕhn':n' ≥ Nhm1:↑(a n) ∈ upperBounds Ehm2:↑((a - b) n') ∉ upperBounds E⊢ ↑((a - b) n') < ↑(a n); E:Set RealN:ℕa:ℕ → ℚb:ℕ → ℚhb:∀ (n : ℕ), b n = 1 / (↑n + 1)n:ℕhn:n ≥ Nn':ℕhn':n' ≥ Nhm1:↑(a n) ∈ upperBounds Ehm2:↑(a n) ≤ ↑((a - b) n')⊢ ↑((a - b) n') ∈ upperBounds E; All goals completed! 🐙
have bound3 : 1/((n':ℚ)+1) ≤ 1/(N+1) := E:Set RealN:ℕa:ℕ → ℚb:ℕ → ℚhb:∀ (n : ℕ), b n = 1 / (↑n + 1)hm1:∀ (n : ℕ), ↑(a n) ∈ upperBounds Ehm2:∀ (n : ℕ), ↑((a - b) n) ∉ upperBounds E⊢ ∀ n ≥ N, ∀ n' ≥ N, |a n - a n'| ≤ 1 / (↑N + 1) All goals completed! 🐙
E:Set RealN:ℕa:ℕ → ℚb:ℕ → ℚhb:∀ (n : ℕ), b n = 1 / (↑n + 1)n:ℕhn:n ≥ Nn':ℕhn':n' ≥ Nhm1:↑(a n) ∈ upperBounds Ehm2:↑((a - b) n') ∉ upperBounds Ebound1:(a - b) n' < a n :=
Eq.mpr (id (congrArg (fun _a => _a) (propext (lt_of_coe ((a - b) n') (a n)))))
(Mathlib.Tactic.Contrapose.contrapose₂
(Eq.mpr (id (implies_congr not_lt._simp_1 (Eq.refl (↑((a - b) n') ∈ upperBounds E)))) fun hm2 =>
LUB_claim2._proof_1 n n' hm1 hm2)
hm2)bound3:-(1 / (↑N + 1)) ≤ -(1 / (↑n' + 1))⊢ -(1 / (↑N + 1)) ≤ a n - a n'; E:Set RealN:ℕa:ℕ → ℚb:ℕ → ℚhb:∀ (n : ℕ), b n = 1 / (↑n + 1)n:ℕhn:n ≥ Nn':ℕhn':n' ≥ Nhm1:↑(a n) ∈ upperBounds Ehm2:↑((a - b) n') ∉ upperBounds Ebound1:a n' - b n' < a nbound3:-(1 / (↑N + 1)) ≤ -(1 / (↑n' + 1))⊢ -(1 / (↑N + 1)) ≤ a n - a n'; All goals completed! 🐙
E:Set RealN:ℕa:ℕ → ℚb:ℕ → ℚhb:∀ (n : ℕ), b n = 1 / (↑n + 1)hm2:∀ (n : ℕ), ↑((a - b) n) ∉ upperBounds En:ℕhn:n ≥ Nn':ℕhn':n' ≥ Nhm1:↑(a n') ∈ upperBounds E⊢ a n - a n' ≤ 1 / (↑N + 1); E:Set RealN:ℕa:ℕ → ℚb:ℕ → ℚhb:∀ (n : ℕ), b n = 1 / (↑n + 1)n:ℕhn:n ≥ Nn':ℕhn':n' ≥ Nhm1:↑(a n') ∈ upperBounds Ehm2:↑((a - b) n) ∉ upperBounds E⊢ a n - a n' ≤ 1 / (↑N + 1)
have bound1 : ((a-b) n) < a n' := E:Set RealN:ℕa:ℕ → ℚb:ℕ → ℚhb:∀ (n : ℕ), b n = 1 / (↑n + 1)hm1:∀ (n : ℕ), ↑(a n) ∈ upperBounds Ehm2:∀ (n : ℕ), ↑((a - b) n) ∉ upperBounds E⊢ ∀ n ≥ N, ∀ n' ≥ N, |a n - a n'| ≤ 1 / (↑N + 1) E:Set RealN:ℕa:ℕ → ℚb:ℕ → ℚhb:∀ (n : ℕ), b n = 1 / (↑n + 1)n:ℕhn:n ≥ Nn':ℕhn':n' ≥ Nhm1:↑(a n') ∈ upperBounds Ehm2:↑((a - b) n) ∉ upperBounds E⊢ ↑((a - b) n) < ↑(a n'); E:Set RealN:ℕa:ℕ → ℚb:ℕ → ℚhb:∀ (n : ℕ), b n = 1 / (↑n + 1)n:ℕhn:n ≥ Nn':ℕhn':n' ≥ Nhm1:↑(a n') ∈ upperBounds Ehm2:↑(a n') ≤ ↑((a - b) n)⊢ ↑((a - b) n) ∈ upperBounds E; All goals completed! 🐙
have bound2 : ((a-b) n) = a n - 1 / (n+1) := E:Set RealN:ℕa:ℕ → ℚb:ℕ → ℚhb:∀ (n : ℕ), b n = 1 / (↑n + 1)hm1:∀ (n : ℕ), ↑(a n) ∈ upperBounds Ehm2:∀ (n : ℕ), ↑((a - b) n) ∉ upperBounds E⊢ ∀ n ≥ N, ∀ n' ≥ N, |a n - a n'| ≤ 1 / (↑N + 1) All goals completed! 🐙
have bound3 : 1/((n+1):ℚ) ≤ 1/(N+1) := E:Set RealN:ℕa:ℕ → ℚb:ℕ → ℚhb:∀ (n : ℕ), b n = 1 / (↑n + 1)hm1:∀ (n : ℕ), ↑(a n) ∈ upperBounds Ehm2:∀ (n : ℕ), ↑((a - b) n) ∉ upperBounds E⊢ ∀ n ≥ N, ∀ n' ≥ N, |a n - a n'| ≤ 1 / (↑N + 1) All goals completed! 🐙
All goals completed! 🐙Theorem 5.5.9 (Existence of least upper bound)
theorem Real.LUB_exist {E: Set Real} (hE: Set.Nonempty E) (hbound: BddAbove E): ∃ S, IsLUB E S := E:Set RealhE:E.Nonemptyhbound:BddAbove E⊢ ∃ S, IsLUB E S
-- This proof is written to follow the structure of the original text.
E:Set RealhE:E.Nonemptyhbound:BddAbove Ex₀:Real := hE.some⊢ ∃ S, IsLUB E S
E:Set RealhE:E.Nonemptyhbound:BddAbove Ex₀:Real := hE.somehx₀:x₀ ∈ E := Set.Nonempty.some_mem hE⊢ ∃ S, IsLUB E S
E:Set RealhE:E.Nonemptyhbound:BddAbove Ex₀:Real := hE.somehx₀:x₀ ∈ E := Set.Nonempty.some_mem hEm:ℕ → ℤ := fun n => ⋯.choose⊢ ∃ S, IsLUB E S
E:Set RealhE:E.Nonemptyhbound:BddAbove Ex₀:Real := hE.somehx₀:x₀ ∈ E := Set.Nonempty.some_mem hEm:ℕ → ℤ := fun n => ⋯.choosea:ℕ → ℚ := fun n => ↑(m n) / (↑n + 1)⊢ ∃ S, IsLUB E S
E:Set RealhE:E.Nonemptyhbound:BddAbove Ex₀:Real := hE.somehx₀:x₀ ∈ E := Set.Nonempty.some_mem hEm:ℕ → ℤ := fun n => ⋯.choosea:ℕ → ℚ := fun n => ↑(m n) / (↑n + 1)b:ℕ → ℚ := fun n => 1 / (↑n + 1)⊢ ∃ S, IsLUB E S
E:Set RealhE:E.Nonemptyhbound:BddAbove Ex₀:Real := hE.somehx₀:x₀ ∈ E := Set.Nonempty.some_mem hEm:ℕ → ℤ := fun n => ⋯.choosea:ℕ → ℚ := fun n => ↑(m n) / (↑n + 1)b:ℕ → ℚ := fun n => 1 / (↑n + 1)claim1:∀ (n : ℕ), ∃! m, ↑(↑m / (↑n + 1)) ∈ upperBounds E ∧ ↑(↑m / (↑n + 1) - 1 / (↑n + 1)) ∉ upperBounds E := fun n => LUB_claim1 n hE hbound⊢ ∃ S, IsLUB E S
E:Set RealhE:E.Nonemptyhbound:BddAbove Ex₀:Real := hE.somehx₀:x₀ ∈ E := Set.Nonempty.some_mem hEm:ℕ → ℤ := fun n => ⋯.choosea:ℕ → ℚ := fun n => ↑(m n) / (↑n + 1)b:ℕ → ℚ := fun n => 1 / (↑n + 1)claim1:∀ (n : ℕ), ∃! m, ↑(↑m / (↑n + 1)) ∈ upperBounds E ∧ ↑(↑m / (↑n + 1) - 1 / (↑n + 1)) ∉ upperBounds E := fun n => LUB_claim1 n hE hboundhb:(↑b).IsCauchy := Sequence.IsCauchy.harmonic'⊢ ∃ S, IsLUB E S
E:Set RealhE:E.Nonemptyhbound:BddAbove Ex₀:Real := hE.somehx₀:x₀ ∈ E := Set.Nonempty.some_mem hEm:ℕ → ℤ := fun n => ⋯.choosea:ℕ → ℚ := fun n => ↑(m n) / (↑n + 1)b:ℕ → ℚ := fun n => 1 / (↑n + 1)claim1:∀ (n : ℕ), ∃! m, ↑(↑m / (↑n + 1)) ∈ upperBounds E ∧ ↑(↑m / (↑n + 1) - 1 / (↑n + 1)) ∉ upperBounds E := fun n => LUB_claim1 n hE hboundhb:(↑b).IsCauchy := Sequence.IsCauchy.harmonic'hm1:∀ (n : ℕ), ↑(↑⋯.choose / (↑n + 1)) ∈ upperBounds E := fun n => (Exists.choose_spec (ExistsUnique.exists (claim1 n))).left⊢ ∃ S, IsLUB E S
E:Set RealhE:E.Nonemptyhbound:BddAbove Ex₀:Real := hE.somehx₀:x₀ ∈ E := Set.Nonempty.some_mem hEm:ℕ → ℤ := fun n => ⋯.choosea:ℕ → ℚ := fun n => ↑(m n) / (↑n + 1)b:ℕ → ℚ := fun n => 1 / (↑n + 1)claim1:∀ (n : ℕ), ∃! m, ↑(↑m / (↑n + 1)) ∈ upperBounds E ∧ ↑(↑m / (↑n + 1) - 1 / (↑n + 1)) ∉ upperBounds E := fun n => LUB_claim1 n hE hboundhb:(↑b).IsCauchy := Sequence.IsCauchy.harmonic'hm1:∀ (n : ℕ), ↑(↑⋯.choose / (↑n + 1)) ∈ upperBounds E := fun n => (Exists.choose_spec (ExistsUnique.exists (claim1 n))).lefthm2:∀ (n : ℕ), ↑((a - b) n) ∉ upperBounds E := fun n => (Exists.choose_spec (ExistsUnique.exists (claim1 n))).right⊢ ∃ S, IsLUB E S
have claim2 (N:ℕ) := LUB_claim2 N (E:Set RealhE:E.Nonemptyhbound:BddAbove Ex₀:Real := hE.somehx₀:x₀ ∈ E := Set.Nonempty.some_mem hEm:ℕ → ℤ := fun n => ⋯.choosea:ℕ → ℚ := fun n => ↑(m n) / (↑n + 1)b:ℕ → ℚ := fun n => 1 / (↑n + 1)claim1:∀ (n : ℕ), ∃! m, ↑(↑m / (↑n + 1)) ∈ upperBounds E ∧ ↑(↑m / (↑n + 1) - 1 / (↑n + 1)) ∉ upperBounds E := fun n => LUB_claim1 n hE hboundhb:(↑b).IsCauchy := Sequence.IsCauchy.harmonic'hm1:∀ (n : ℕ), ↑(↑⋯.choose / (↑n + 1)) ∈ upperBounds E := fun n => (Exists.choose_spec (ExistsUnique.exists (claim1 n))).lefthm2:∀ (n : ℕ), ↑((a - b) n) ∉ upperBounds E := fun n => (Exists.choose_spec (ExistsUnique.exists (claim1 n))).rightN:ℕ⊢ ∀ (n : ℕ), b n = 1 / (↑n + 1) All goals completed! 🐙) hm1 hm2
E:Set RealhE:E.Nonemptyhbound:BddAbove Ex₀:Real := hE.somehx₀:x₀ ∈ E := Set.Nonempty.some_mem hEm:ℕ → ℤ := fun n => ⋯.choosea:ℕ → ℚ := fun n => ↑(m n) / (↑n + 1)b:ℕ → ℚ := fun n => 1 / (↑n + 1)claim1:∀ (n : ℕ), ∃! m, ↑(↑m / (↑n + 1)) ∈ upperBounds E ∧ ↑(↑m / (↑n + 1) - 1 / (↑n + 1)) ∉ upperBounds E := fun n => LUB_claim1 n hE hboundhb:(↑b).IsCauchy := Sequence.IsCauchy.harmonic'hm1:∀ (n : ℕ), ↑(↑⋯.choose / (↑n + 1)) ∈ upperBounds E := fun n => (Exists.choose_spec (ExistsUnique.exists (claim1 n))).lefthm2:∀ (n : ℕ), ↑((a - b) n) ∉ upperBounds E := fun n => (Exists.choose_spec (ExistsUnique.exists (claim1 n))).rightclaim2:∀ (N n : ℕ), n ≥ N → ∀ n' ≥ N, |↑⋯.choose / (↑n + 1) - ↑⋯.choose / (↑n' + 1)| ≤ 1 / (↑N + 1) :=
fun N =>
LUB_claim2 N
(fun n =>
of_eq_true
(Eq.trans (congr (congrArg Eq (congrFun' (funext fun n => one_div (↑n + 1)) n)) (one_div (↑n + 1)))
(eq_self (↑n + 1)⁻¹)))
hm1 hm2claim3:(↑a).IsCauchy := (LIM_of_Cauchy claim2).left⊢ ∃ S, IsLUB E S
E:Set RealhE:E.Nonemptyhbound:BddAbove Ex₀:Real := hE.somehx₀:x₀ ∈ E := Set.Nonempty.some_mem hEm:ℕ → ℤ := fun n => ⋯.choosea:ℕ → ℚ := fun n => ↑(m n) / (↑n + 1)b:ℕ → ℚ := fun n => 1 / (↑n + 1)claim1:∀ (n : ℕ), ∃! m, ↑(↑m / (↑n + 1)) ∈ upperBounds E ∧ ↑(↑m / (↑n + 1) - 1 / (↑n + 1)) ∉ upperBounds E := fun n => LUB_claim1 n hE hboundhb:(↑b).IsCauchy := Sequence.IsCauchy.harmonic'hm1:∀ (n : ℕ), ↑(↑⋯.choose / (↑n + 1)) ∈ upperBounds E := fun n => (Exists.choose_spec (ExistsUnique.exists (claim1 n))).lefthm2:∀ (n : ℕ), ↑((a - b) n) ∉ upperBounds E := fun n => (Exists.choose_spec (ExistsUnique.exists (claim1 n))).rightclaim2:∀ (N n : ℕ), n ≥ N → ∀ n' ≥ N, |↑⋯.choose / (↑n + 1) - ↑⋯.choose / (↑n' + 1)| ≤ 1 / (↑N + 1) :=
fun N =>
LUB_claim2 N
(fun n =>
of_eq_true
(Eq.trans (congr (congrArg Eq (congrFun' (funext fun n => one_div (↑n + 1)) n)) (one_div (↑n + 1)))
(eq_self (↑n + 1)⁻¹)))
hm1 hm2claim3:(↑a).IsCauchy := (LIM_of_Cauchy claim2).leftS:Real := LIM a⊢ ∃ S, IsLUB E S; E:Set RealhE:E.Nonemptyhbound:BddAbove Ex₀:Real := hE.somehx₀:x₀ ∈ E := Set.Nonempty.some_mem hEm:ℕ → ℤ := fun n => ⋯.choosea:ℕ → ℚ := fun n => ↑(m n) / (↑n + 1)b:ℕ → ℚ := fun n => 1 / (↑n + 1)claim1:∀ (n : ℕ), ∃! m, ↑(↑m / (↑n + 1)) ∈ upperBounds E ∧ ↑(↑m / (↑n + 1) - 1 / (↑n + 1)) ∉ upperBounds E := fun n => LUB_claim1 n hE hboundhb:(↑b).IsCauchy := Sequence.IsCauchy.harmonic'hm1:∀ (n : ℕ), ↑(↑⋯.choose / (↑n + 1)) ∈ upperBounds E := fun n => (Exists.choose_spec (ExistsUnique.exists (claim1 n))).lefthm2:∀ (n : ℕ), ↑((a - b) n) ∉ upperBounds E := fun n => (Exists.choose_spec (ExistsUnique.exists (claim1 n))).rightclaim2:∀ (N n : ℕ), n ≥ N → ∀ n' ≥ N, |↑⋯.choose / (↑n + 1) - ↑⋯.choose / (↑n' + 1)| ≤ 1 / (↑N + 1) :=
fun N =>
LUB_claim2 N
(fun n =>
of_eq_true
(Eq.trans (congr (congrArg Eq (congrFun' (funext fun n => one_div (↑n + 1)) n)) (one_div (↑n + 1)))
(eq_self (↑n + 1)⁻¹)))
hm1 hm2claim3:(↑a).IsCauchy := (LIM_of_Cauchy claim2).leftS:Real := LIM a⊢ IsLUB E S
have claim4 : S = LIM (a - b) := E:Set RealhE:E.Nonemptyhbound:BddAbove E⊢ ∃ S, IsLUB E S
E:Set RealhE:E.Nonemptyhbound:BddAbove Ex₀:Real := hE.somehx₀:x₀ ∈ E := Set.Nonempty.some_mem hEm:ℕ → ℤ := fun n => ⋯.choosea:ℕ → ℚ := fun n => ↑(m n) / (↑n + 1)b:ℕ → ℚ := fun n => 1 / (↑n + 1)claim1:∀ (n : ℕ), ∃! m, ↑(↑m / (↑n + 1)) ∈ upperBounds E ∧ ↑(↑m / (↑n + 1) - 1 / (↑n + 1)) ∉ upperBounds E := fun n => LUB_claim1 n hE hboundhb:(↑b).IsCauchy := Sequence.IsCauchy.harmonic'hm1:∀ (n : ℕ), ↑(↑⋯.choose / (↑n + 1)) ∈ upperBounds E := fun n => (Exists.choose_spec (ExistsUnique.exists (claim1 n))).lefthm2:∀ (n : ℕ), ↑((a - b) n) ∉ upperBounds E := fun n => (Exists.choose_spec (ExistsUnique.exists (claim1 n))).rightclaim2:∀ (N n : ℕ), n ≥ N → ∀ n' ≥ N, |↑⋯.choose / (↑n + 1) - ↑⋯.choose / (↑n' + 1)| ≤ 1 / (↑N + 1) :=
fun N =>
LUB_claim2 N
(fun n =>
of_eq_true
(Eq.trans (congr (congrArg Eq (congrFun' (funext fun n => one_div (↑n + 1)) n)) (one_div (↑n + 1)))
(eq_self (↑n + 1)⁻¹)))
hm1 hm2claim3:(↑a).IsCauchy := (LIM_of_Cauchy claim2).leftS:Real := LIM athis:LIM b = 0 := LIM.harmonic⊢ S = LIM (a - b)
All goals completed! 🐙
E:Set RealhE:E.Nonemptyhbound:BddAbove Ex₀:Real := hE.somehx₀:x₀ ∈ E := Set.Nonempty.some_mem hEm:ℕ → ℤ := fun n => ⋯.choosea:ℕ → ℚ := fun n => ↑(m n) / (↑n + 1)b:ℕ → ℚ := fun n => 1 / (↑n + 1)claim1:∀ (n : ℕ), ∃! m, ↑(↑m / (↑n + 1)) ∈ upperBounds E ∧ ↑(↑m / (↑n + 1) - 1 / (↑n + 1)) ∉ upperBounds E := fun n => LUB_claim1 n hE hboundhb:(↑b).IsCauchy := Sequence.IsCauchy.harmonic'hm1:∀ (n : ℕ), ↑(↑⋯.choose / (↑n + 1)) ∈ upperBounds E := fun n => (Exists.choose_spec (ExistsUnique.exists (claim1 n))).lefthm2:∀ (n : ℕ), ↑((a - b) n) ∉ upperBounds E := fun n => (Exists.choose_spec (ExistsUnique.exists (claim1 n))).rightclaim2:∀ (N n : ℕ), n ≥ N → ∀ n' ≥ N, |↑⋯.choose / (↑n + 1) - ↑⋯.choose / (↑n' + 1)| ≤ 1 / (↑N + 1) :=
fun N =>
LUB_claim2 N
(fun n =>
of_eq_true
(Eq.trans (congr (congrArg Eq (congrFun' (funext fun n => one_div (↑n + 1)) n)) (one_div (↑n + 1)))
(eq_self (↑n + 1)⁻¹)))
hm1 hm2claim3:(↑a).IsCauchy := (LIM_of_Cauchy claim2).leftS:Real := LIM aclaim4:S = LIM (a - b) :=
have this := LIM.harmonic;
of_eq_true
(Eq.trans
(congrArg (Eq (LIM a))
(Eq.trans (Eq.symm (LIM_sub claim3 hb)) (Eq.trans (congrArg (HSub.hSub (LIM a)) this) (sub_zero (LIM a)))))
(eq_self (LIM a)))⊢ (∀ x ∈ E, x ≤ S) ∧ ∀ M' ∈ upperBounds E, M' ≥ S
E:Set RealhE:E.Nonemptyhbound:BddAbove Ex₀:Real := hE.somehx₀:x₀ ∈ E := Set.Nonempty.some_mem hEm:ℕ → ℤ := fun n => ⋯.choosea:ℕ → ℚ := fun n => ↑(m n) / (↑n + 1)b:ℕ → ℚ := fun n => 1 / (↑n + 1)claim1:∀ (n : ℕ), ∃! m, ↑(↑m / (↑n + 1)) ∈ upperBounds E ∧ ↑(↑m / (↑n + 1) - 1 / (↑n + 1)) ∉ upperBounds E := fun n => LUB_claim1 n hE hboundhb:(↑b).IsCauchy := Sequence.IsCauchy.harmonic'hm1:∀ (n : ℕ), ↑(↑⋯.choose / (↑n + 1)) ∈ upperBounds E := fun n => (Exists.choose_spec (ExistsUnique.exists (claim1 n))).lefthm2:∀ (n : ℕ), ↑((a - b) n) ∉ upperBounds E := fun n => (Exists.choose_spec (ExistsUnique.exists (claim1 n))).rightclaim2:∀ (N n : ℕ), n ≥ N → ∀ n' ≥ N, |↑⋯.choose / (↑n + 1) - ↑⋯.choose / (↑n' + 1)| ≤ 1 / (↑N + 1) :=
fun N =>
LUB_claim2 N
(fun n =>
of_eq_true
(Eq.trans (congr (congrArg Eq (congrFun' (funext fun n => one_div (↑n + 1)) n)) (one_div (↑n + 1)))
(eq_self (↑n + 1)⁻¹)))
hm1 hm2claim3:(↑a).IsCauchy := (LIM_of_Cauchy claim2).leftS:Real := LIM aclaim4:S = LIM (a - b) :=
have this := LIM.harmonic;
of_eq_true
(Eq.trans
(congrArg (Eq (LIM a))
(Eq.trans (Eq.symm (LIM_sub claim3 hb)) (Eq.trans (congrArg (HSub.hSub (LIM a)) this) (sub_zero (LIM a)))))
(eq_self (LIM a)))⊢ ∀ x ∈ E, x ≤ SE:Set RealhE:E.Nonemptyhbound:BddAbove Ex₀:Real := hE.somehx₀:x₀ ∈ E := Set.Nonempty.some_mem hEm:ℕ → ℤ := fun n => ⋯.choosea:ℕ → ℚ := fun n => ↑(m n) / (↑n + 1)b:ℕ → ℚ := fun n => 1 / (↑n + 1)claim1:∀ (n : ℕ), ∃! m, ↑(↑m / (↑n + 1)) ∈ upperBounds E ∧ ↑(↑m / (↑n + 1) - 1 / (↑n + 1)) ∉ upperBounds E := fun n => LUB_claim1 n hE hboundhb:(↑b).IsCauchy := Sequence.IsCauchy.harmonic'hm1:∀ (n : ℕ), ↑(↑⋯.choose / (↑n + 1)) ∈ upperBounds E := fun n => (Exists.choose_spec (ExistsUnique.exists (claim1 n))).lefthm2:∀ (n : ℕ), ↑((a - b) n) ∉ upperBounds E := fun n => (Exists.choose_spec (ExistsUnique.exists (claim1 n))).rightclaim2:∀ (N n : ℕ), n ≥ N → ∀ n' ≥ N, |↑⋯.choose / (↑n + 1) - ↑⋯.choose / (↑n' + 1)| ≤ 1 / (↑N + 1) :=
fun N =>
LUB_claim2 N
(fun n =>
of_eq_true
(Eq.trans (congr (congrArg Eq (congrFun' (funext fun n => one_div (↑n + 1)) n)) (one_div (↑n + 1)))
(eq_self (↑n + 1)⁻¹)))
hm1 hm2claim3:(↑a).IsCauchy := (LIM_of_Cauchy claim2).leftS:Real := LIM aclaim4:S = LIM (a - b) :=
have this := LIM.harmonic;
of_eq_true
(Eq.trans
(congrArg (Eq (LIM a))
(Eq.trans (Eq.symm (LIM_sub claim3 hb)) (Eq.trans (congrArg (HSub.hSub (LIM a)) this) (sub_zero (LIM a)))))
(eq_self (LIM a)))⊢ ∀ M' ∈ upperBounds E, M' ≥ S
E:Set RealhE:E.Nonemptyhbound:BddAbove Ex₀:Real := hE.somehx₀:x₀ ∈ E := Set.Nonempty.some_mem hEm:ℕ → ℤ := fun n => ⋯.choosea:ℕ → ℚ := fun n => ↑(m n) / (↑n + 1)b:ℕ → ℚ := fun n => 1 / (↑n + 1)claim1:∀ (n : ℕ), ∃! m, ↑(↑m / (↑n + 1)) ∈ upperBounds E ∧ ↑(↑m / (↑n + 1) - 1 / (↑n + 1)) ∉ upperBounds E := fun n => LUB_claim1 n hE hboundhb:(↑b).IsCauchy := Sequence.IsCauchy.harmonic'hm1:∀ (n : ℕ), ↑(↑⋯.choose / (↑n + 1)) ∈ upperBounds E := fun n => (Exists.choose_spec (ExistsUnique.exists (claim1 n))).lefthm2:∀ (n : ℕ), ↑((a - b) n) ∉ upperBounds E := fun n => (Exists.choose_spec (ExistsUnique.exists (claim1 n))).rightclaim2:∀ (N n : ℕ), n ≥ N → ∀ n' ≥ N, |↑⋯.choose / (↑n + 1) - ↑⋯.choose / (↑n' + 1)| ≤ 1 / (↑N + 1) :=
fun N =>
LUB_claim2 N
(fun n =>
of_eq_true
(Eq.trans (congr (congrArg Eq (congrFun' (funext fun n => one_div (↑n + 1)) n)) (one_div (↑n + 1)))
(eq_self (↑n + 1)⁻¹)))
hm1 hm2claim3:(↑a).IsCauchy := (LIM_of_Cauchy claim2).leftS:Real := LIM aclaim4:S = LIM (a - b) :=
have this := LIM.harmonic;
of_eq_true
(Eq.trans
(congrArg (Eq (LIM a))
(Eq.trans (Eq.symm (LIM_sub claim3 hb)) (Eq.trans (congrArg (HSub.hSub (LIM a)) this) (sub_zero (LIM a)))))
(eq_self (LIM a)))⊢ ∀ x ∈ E, x ≤ S intro x E:Set RealhE:E.Nonemptyhbound:BddAbove Ex₀:Real := hE.somehx₀:x₀ ∈ E := Set.Nonempty.some_mem hEm:ℕ → ℤ := fun n => ⋯.choosea:ℕ → ℚ := fun n => ↑(m n) / (↑n + 1)b:ℕ → ℚ := fun n => 1 / (↑n + 1)claim1:∀ (n : ℕ), ∃! m, ↑(↑m / (↑n + 1)) ∈ upperBounds E ∧ ↑(↑m / (↑n + 1) - 1 / (↑n + 1)) ∉ upperBounds E := fun n => LUB_claim1 n hE hboundhb:(↑b).IsCauchy := Sequence.IsCauchy.harmonic'hm1:∀ (n : ℕ), ↑(↑⋯.choose / (↑n + 1)) ∈ upperBounds E := fun n => (Exists.choose_spec (ExistsUnique.exists (claim1 n))).lefthm2:∀ (n : ℕ), ↑((a - b) n) ∉ upperBounds E := fun n => (Exists.choose_spec (ExistsUnique.exists (claim1 n))).rightclaim2:∀ (N n : ℕ), n ≥ N → ∀ n' ≥ N, |↑⋯.choose / (↑n + 1) - ↑⋯.choose / (↑n' + 1)| ≤ 1 / (↑N + 1) :=
fun N =>
LUB_claim2 N
(fun n =>
of_eq_true
(Eq.trans (congr (congrArg Eq (congrFun' (funext fun n => one_div (↑n + 1)) n)) (one_div (↑n + 1)))
(eq_self (↑n + 1)⁻¹)))
hm1 hm2claim3:(↑a).IsCauchy := (LIM_of_Cauchy claim2).leftS:Real := LIM aclaim4:S = LIM (a - b) :=
have this := LIM.harmonic;
of_eq_true
(Eq.trans
(congrArg (Eq (LIM a))
(Eq.trans (Eq.symm (LIM_sub claim3 hb)) (Eq.trans (congrArg (HSub.hSub (LIM a)) this) (sub_zero (LIM a)))))
(eq_self (LIM a)))x:Realhx:x ∈ E⊢ x ≤ S; E:Set RealhE:E.Nonemptyhbound:BddAbove Ex₀:Real := hE.somehx₀:x₀ ∈ E := Set.Nonempty.some_mem hEm:ℕ → ℤ := fun n => ⋯.choosea:ℕ → ℚ := fun n => ↑(m n) / (↑n + 1)b:ℕ → ℚ := fun n => 1 / (↑n + 1)claim1:∀ (n : ℕ), ∃! m, ↑(↑m / (↑n + 1)) ∈ upperBounds E ∧ ↑(↑m / (↑n + 1) - 1 / (↑n + 1)) ∉ upperBounds E := fun n => LUB_claim1 n hE hboundhb:(↑b).IsCauchy := Sequence.IsCauchy.harmonic'hm1:∀ (n : ℕ), ↑(↑⋯.choose / (↑n + 1)) ∈ upperBounds E := fun n => (Exists.choose_spec (ExistsUnique.exists (claim1 n))).lefthm2:∀ (n : ℕ), ↑((a - b) n) ∉ upperBounds E := fun n => (Exists.choose_spec (ExistsUnique.exists (claim1 n))).rightclaim2:∀ (N n : ℕ), n ≥ N → ∀ n' ≥ N, |↑⋯.choose / (↑n + 1) - ↑⋯.choose / (↑n' + 1)| ≤ 1 / (↑N + 1) :=
fun N =>
LUB_claim2 N
(fun n =>
of_eq_true
(Eq.trans (congr (congrArg Eq (congrFun' (funext fun n => one_div (↑n + 1)) n)) (one_div (↑n + 1)))
(eq_self (↑n + 1)⁻¹)))
hm1 hm2claim3:(↑a).IsCauchy := (LIM_of_Cauchy claim2).leftS:Real := LIM aclaim4:S = LIM (a - b) :=
have this := LIM.harmonic;
of_eq_true
(Eq.trans
(congrArg (Eq (LIM a))
(Eq.trans (Eq.symm (LIM_sub claim3 hb)) (Eq.trans (congrArg (HSub.hSub (LIM a)) this) (sub_zero (LIM a)))))
(eq_self (LIM a)))x:Realhx:x ∈ E⊢ ∀ (n : ℕ), ↑(a n) ≥ x; E:Set RealhE:E.Nonemptyhbound:BddAbove Ex₀:Real := hE.somehx₀:x₀ ∈ E := Set.Nonempty.some_mem hEm:ℕ → ℤ := fun n => ⋯.choosea:ℕ → ℚ := fun n => ↑(m n) / (↑n + 1)b:ℕ → ℚ := fun n => 1 / (↑n + 1)claim1:∀ (n : ℕ), ∃! m, ↑(↑m / (↑n + 1)) ∈ upperBounds E ∧ ↑(↑m / (↑n + 1) - 1 / (↑n + 1)) ∉ upperBounds E := fun n => LUB_claim1 n hE hboundhb:(↑b).IsCauchy := Sequence.IsCauchy.harmonic'hm1:∀ (n : ℕ), ↑(↑⋯.choose / (↑n + 1)) ∈ upperBounds E := fun n => (Exists.choose_spec (ExistsUnique.exists (claim1 n))).lefthm2:∀ (n : ℕ), ↑((a - b) n) ∉ upperBounds E := fun n => (Exists.choose_spec (ExistsUnique.exists (claim1 n))).rightclaim2:∀ (N n : ℕ), n ≥ N → ∀ n' ≥ N, |↑⋯.choose / (↑n + 1) - ↑⋯.choose / (↑n' + 1)| ≤ 1 / (↑N + 1) :=
fun N =>
LUB_claim2 N
(fun n =>
of_eq_true
(Eq.trans (congr (congrArg Eq (congrFun' (funext fun n => one_div (↑n + 1)) n)) (one_div (↑n + 1)))
(eq_self (↑n + 1)⁻¹)))
hm1 hm2claim3:(↑a).IsCauchy := (LIM_of_Cauchy claim2).leftS:Real := LIM aclaim4:S = LIM (a - b) :=
have this := LIM.harmonic;
of_eq_true
(Eq.trans
(congrArg (Eq (LIM a))
(Eq.trans (Eq.symm (LIM_sub claim3 hb)) (Eq.trans (congrArg (HSub.hSub (LIM a)) this) (sub_zero (LIM a)))))
(eq_self (LIM a)))x:Realhx:x ∈ En:ℕ⊢ ↑(a n) ≥ x
All goals completed! 🐙
intro y E:Set RealhE:E.Nonemptyhbound:BddAbove Ex₀:Real := hE.somehx₀:x₀ ∈ E := Set.Nonempty.some_mem hEm:ℕ → ℤ := fun n => ⋯.choosea:ℕ → ℚ := fun n => ↑(m n) / (↑n + 1)b:ℕ → ℚ := fun n => 1 / (↑n + 1)claim1:∀ (n : ℕ), ∃! m, ↑(↑m / (↑n + 1)) ∈ upperBounds E ∧ ↑(↑m / (↑n + 1) - 1 / (↑n + 1)) ∉ upperBounds E := fun n => LUB_claim1 n hE hboundhb:(↑b).IsCauchy := Sequence.IsCauchy.harmonic'hm1:∀ (n : ℕ), ↑(↑⋯.choose / (↑n + 1)) ∈ upperBounds E := fun n => (Exists.choose_spec (ExistsUnique.exists (claim1 n))).lefthm2:∀ (n : ℕ), ↑((a - b) n) ∉ upperBounds E := fun n => (Exists.choose_spec (ExistsUnique.exists (claim1 n))).rightclaim2:∀ (N n : ℕ), n ≥ N → ∀ n' ≥ N, |↑⋯.choose / (↑n + 1) - ↑⋯.choose / (↑n' + 1)| ≤ 1 / (↑N + 1) :=
fun N =>
LUB_claim2 N
(fun n =>
of_eq_true
(Eq.trans (congr (congrArg Eq (congrFun' (funext fun n => one_div (↑n + 1)) n)) (one_div (↑n + 1)))
(eq_self (↑n + 1)⁻¹)))
hm1 hm2claim3:(↑a).IsCauchy := (LIM_of_Cauchy claim2).leftS:Real := LIM aclaim4:S = LIM (a - b) :=
have this := LIM.harmonic;
of_eq_true
(Eq.trans
(congrArg (Eq (LIM a))
(Eq.trans (Eq.symm (LIM_sub claim3 hb)) (Eq.trans (congrArg (HSub.hSub (LIM a)) this) (sub_zero (LIM a)))))
(eq_self (LIM a)))y:Realhy:y ∈ upperBounds E⊢ y ≥ S
have claim5 (n:ℕ) : y ≥ (a-b) n := E:Set RealhE:E.Nonemptyhbound:BddAbove E⊢ ∃ S, IsLUB E S E:Set RealhE:E.Nonemptyhbound:BddAbove Ex₀:Real := hE.somehx₀:x₀ ∈ E := Set.Nonempty.some_mem hEm:ℕ → ℤ := fun n => ⋯.choosea:ℕ → ℚ := fun n => ↑(m n) / (↑n + 1)b:ℕ → ℚ := fun n => 1 / (↑n + 1)claim1:∀ (n : ℕ), ∃! m, ↑(↑m / (↑n + 1)) ∈ upperBounds E ∧ ↑(↑m / (↑n + 1) - 1 / (↑n + 1)) ∉ upperBounds E := fun n => LUB_claim1 n hE hboundhb:(↑b).IsCauchy := Sequence.IsCauchy.harmonic'hm1:∀ (n : ℕ), ↑(↑⋯.choose / (↑n + 1)) ∈ upperBounds E := fun n => (Exists.choose_spec (ExistsUnique.exists (claim1 n))).leftclaim2:∀ (N n : ℕ), n ≥ N → ∀ n' ≥ N, |↑⋯.choose / (↑n + 1) - ↑⋯.choose / (↑n' + 1)| ≤ 1 / (↑N + 1) :=
fun N =>
LUB_claim2 N
(fun n =>
of_eq_true
(Eq.trans (congr (congrArg Eq (congrFun' (funext fun n => one_div (↑n + 1)) n)) (one_div (↑n + 1)))
(eq_self (↑n + 1)⁻¹)))
hm1 hm2claim3:(↑a).IsCauchy := (LIM_of_Cauchy claim2).leftS:Real := LIM aclaim4:S = LIM (a - b) :=
have this := LIM.harmonic;
of_eq_true
(Eq.trans
(congrArg (Eq (LIM a))
(Eq.trans (Eq.symm (LIM_sub claim3 hb)) (Eq.trans (congrArg (HSub.hSub (LIM a)) this) (sub_zero (LIM a)))))
(eq_self (LIM a)))y:Realhy:y ∈ upperBounds En:ℕhm2:y < ↑((a - b) n)⊢ ∃ n, ↑((a - b) n) ∈ upperBounds E; E:Set RealhE:E.Nonemptyhbound:BddAbove Ex₀:Real := hE.somehx₀:x₀ ∈ E := Set.Nonempty.some_mem hEm:ℕ → ℤ := fun n => ⋯.choosea:ℕ → ℚ := fun n => ↑(m n) / (↑n + 1)b:ℕ → ℚ := fun n => 1 / (↑n + 1)claim1:∀ (n : ℕ), ∃! m, ↑(↑m / (↑n + 1)) ∈ upperBounds E ∧ ↑(↑m / (↑n + 1) - 1 / (↑n + 1)) ∉ upperBounds E := fun n => LUB_claim1 n hE hboundhb:(↑b).IsCauchy := Sequence.IsCauchy.harmonic'hm1:∀ (n : ℕ), ↑(↑⋯.choose / (↑n + 1)) ∈ upperBounds E := fun n => (Exists.choose_spec (ExistsUnique.exists (claim1 n))).leftclaim2:∀ (N n : ℕ), n ≥ N → ∀ n' ≥ N, |↑⋯.choose / (↑n + 1) - ↑⋯.choose / (↑n' + 1)| ≤ 1 / (↑N + 1) :=
fun N =>
LUB_claim2 N
(fun n =>
of_eq_true
(Eq.trans (congr (congrArg Eq (congrFun' (funext fun n => one_div (↑n + 1)) n)) (one_div (↑n + 1)))
(eq_self (↑n + 1)⁻¹)))
hm1 hm2claim3:(↑a).IsCauchy := (LIM_of_Cauchy claim2).leftS:Real := LIM aclaim4:S = LIM (a - b) :=
have this := LIM.harmonic;
of_eq_true
(Eq.trans
(congrArg (Eq (LIM a))
(Eq.trans (Eq.symm (LIM_sub claim3 hb)) (Eq.trans (congrArg (HSub.hSub (LIM a)) this) (sub_zero (LIM a)))))
(eq_self (LIM a)))y:Realhy:y ∈ upperBounds En:ℕhm2:y < ↑((a - b) n)⊢ ↑((a - b) n) ∈ upperBounds E; E:Set RealhE:E.Nonemptyhbound:BddAbove Ex₀:Real := hE.somehx₀:x₀ ∈ E := Set.Nonempty.some_mem hEm:ℕ → ℤ := fun n => ⋯.choosea:ℕ → ℚ := fun n => ↑(m n) / (↑n + 1)b:ℕ → ℚ := fun n => 1 / (↑n + 1)claim1:∀ (n : ℕ), ∃! m, ↑(↑m / (↑n + 1)) ∈ upperBounds E ∧ ↑(↑m / (↑n + 1) - 1 / (↑n + 1)) ∉ upperBounds E := fun n => LUB_claim1 n hE hboundhb:(↑b).IsCauchy := Sequence.IsCauchy.harmonic'hm1:∀ (n : ℕ), ↑(↑⋯.choose / (↑n + 1)) ∈ upperBounds E := fun n => (Exists.choose_spec (ExistsUnique.exists (claim1 n))).leftclaim2:∀ (N n : ℕ), n ≥ N → ∀ n' ≥ N, |↑⋯.choose / (↑n + 1) - ↑⋯.choose / (↑n' + 1)| ≤ 1 / (↑N + 1) :=
fun N =>
LUB_claim2 N
(fun n =>
of_eq_true
(Eq.trans (congr (congrArg Eq (congrFun' (funext fun n => one_div (↑n + 1)) n)) (one_div (↑n + 1)))
(eq_self (↑n + 1)⁻¹)))
hm1 hm2claim3:(↑a).IsCauchy := (LIM_of_Cauchy claim2).leftS:Real := LIM aclaim4:S = LIM (a - b) :=
have this := LIM.harmonic;
of_eq_true
(Eq.trans
(congrArg (Eq (LIM a))
(Eq.trans (Eq.symm (LIM_sub claim3 hb)) (Eq.trans (congrArg (HSub.hSub (LIM a)) this) (sub_zero (LIM a)))))
(eq_self (LIM a)))y:Realhy:y ∈ upperBounds En:ℕhm2:y < ↑((a - b) n)⊢ y ≤ ↑((a - b) n); All goals completed! 🐙
E:Set RealhE:E.Nonemptyhbound:BddAbove Ex₀:Real := hE.somehx₀:x₀ ∈ E := Set.Nonempty.some_mem hEm:ℕ → ℤ := fun n => ⋯.choosea:ℕ → ℚ := fun n => ↑(m n) / (↑n + 1)b:ℕ → ℚ := fun n => 1 / (↑n + 1)claim1:∀ (n : ℕ), ∃! m, ↑(↑m / (↑n + 1)) ∈ upperBounds E ∧ ↑(↑m / (↑n + 1) - 1 / (↑n + 1)) ∉ upperBounds E := fun n => LUB_claim1 n hE hboundhb:(↑b).IsCauchy := Sequence.IsCauchy.harmonic'hm1:∀ (n : ℕ), ↑(↑⋯.choose / (↑n + 1)) ∈ upperBounds E := fun n => (Exists.choose_spec (ExistsUnique.exists (claim1 n))).lefthm2:∀ (n : ℕ), ↑((a - b) n) ∉ upperBounds E := fun n => (Exists.choose_spec (ExistsUnique.exists (claim1 n))).rightclaim2:∀ (N n : ℕ), n ≥ N → ∀ n' ≥ N, |↑⋯.choose / (↑n + 1) - ↑⋯.choose / (↑n' + 1)| ≤ 1 / (↑N + 1) :=
fun N =>
LUB_claim2 N
(fun n =>
of_eq_true
(Eq.trans (congr (congrArg Eq (congrFun' (funext fun n => one_div (↑n + 1)) n)) (one_div (↑n + 1)))
(eq_self (↑n + 1)⁻¹)))
hm1 hm2claim3:(↑a).IsCauchy := (LIM_of_Cauchy claim2).leftS:Real := LIM aclaim4:S = LIM (a - b) :=
have this := LIM.harmonic;
of_eq_true
(Eq.trans
(congrArg (Eq (LIM a))
(Eq.trans (Eq.symm (LIM_sub claim3 hb)) (Eq.trans (congrArg (HSub.hSub (LIM a)) this) (sub_zero (LIM a)))))
(eq_self (LIM a)))y:Realhy:y ∈ upperBounds Eclaim5:∀ (n : ℕ), y ≥ ↑((a - b) n) :=
fun n =>
Mathlib.Tactic.Contrapose.contrapose₁
(Eq.mpr
(id
(implies_congr not_le._simp_1
(Eq.trans (Mathlib.Tactic.Push.not_forall_eq fun n => ↑((a - b) n) ∉ upperBounds E)
(congrArg Exists (funext fun n => Classical.not_not._simp_2)))))
fun hm2 =>
Exists.intro n
(upperBound_upper
(Decidable.byContradiction fun h =>
ne_of_lt (Eq.mp not_le._simp_1 h)
(le_antisymm (le_trans (le_of_lt (Eq.mp not_le._simp_1 h)) (le_refl y))
(le_trans (le_of_lt hm2) (le_refl ↑((a - b) n)))))
hy))
hm2⊢ y ≥ LIM (a - b); E:Set RealhE:E.Nonemptyhbound:BddAbove Ex₀:Real := hE.somehx₀:x₀ ∈ E := Set.Nonempty.some_mem hEm:ℕ → ℤ := fun n => ⋯.choosea:ℕ → ℚ := fun n => ↑(m n) / (↑n + 1)b:ℕ → ℚ := fun n => 1 / (↑n + 1)claim1:∀ (n : ℕ), ∃! m, ↑(↑m / (↑n + 1)) ∈ upperBounds E ∧ ↑(↑m / (↑n + 1) - 1 / (↑n + 1)) ∉ upperBounds E := fun n => LUB_claim1 n hE hboundhb:(↑b).IsCauchy := Sequence.IsCauchy.harmonic'hm1:∀ (n : ℕ), ↑(↑⋯.choose / (↑n + 1)) ∈ upperBounds E := fun n => (Exists.choose_spec (ExistsUnique.exists (claim1 n))).lefthm2:∀ (n : ℕ), ↑((a - b) n) ∉ upperBounds E := fun n => (Exists.choose_spec (ExistsUnique.exists (claim1 n))).rightclaim2:∀ (N n : ℕ), n ≥ N → ∀ n' ≥ N, |↑⋯.choose / (↑n + 1) - ↑⋯.choose / (↑n' + 1)| ≤ 1 / (↑N + 1) :=
fun N =>
LUB_claim2 N
(fun n =>
of_eq_true
(Eq.trans (congr (congrArg Eq (congrFun' (funext fun n => one_div (↑n + 1)) n)) (one_div (↑n + 1)))
(eq_self (↑n + 1)⁻¹)))
hm1 hm2claim3:(↑a).IsCauchy := (LIM_of_Cauchy claim2).leftS:Real := LIM aclaim4:S = LIM (a - b) :=
have this := LIM.harmonic;
of_eq_true
(Eq.trans
(congrArg (Eq (LIM a))
(Eq.trans (Eq.symm (LIM_sub claim3 hb)) (Eq.trans (congrArg (HSub.hSub (LIM a)) this) (sub_zero (LIM a)))))
(eq_self (LIM a)))y:Realhy:y ∈ upperBounds Eclaim5:∀ (n : ℕ), y ≥ ↑((a - b) n) :=
fun n =>
Mathlib.Tactic.Contrapose.contrapose₁
(Eq.mpr
(id
(implies_congr not_le._simp_1
(Eq.trans (Mathlib.Tactic.Push.not_forall_eq fun n => ↑((a - b) n) ∉ upperBounds E)
(congrArg Exists (funext fun n => Classical.not_not._simp_2)))))
fun hm2 =>
Exists.intro n
(upperBound_upper
(Decidable.byContradiction fun h =>
ne_of_lt (Eq.mp not_le._simp_1 h)
(le_antisymm (le_trans (le_of_lt (Eq.mp not_le._simp_1 h)) (le_refl y))
(le_trans (le_of_lt hm2) (le_refl ↑((a - b) n)))))
hy))
hm2⊢ (↑(a - b)).IsCauchy; All goals completed! 🐙A bare-bones extended real class to define supremum.
inductive ExtendedReal where
| neg_infty : ExtendedReal
| real (x:Real) : ExtendedReal
| infty : ExtendedRealMathlib prefers ⊤ to denote the +∞ element.
instance ExtendedReal.inst_Top : Top ExtendedReal where
top := inftyMathlib prefers ⊥ to denote the -∞ element.
instance ExtendedReal.inst_Bot: Bot ExtendedReal where
bot := neg_inftyinstance ExtendedReal.coe_real : Coe Real ExtendedReal where
coe x := ExtendedReal.real xinstance ExtendedReal.real_coe : Coe ExtendedReal Real where
coe X := match X with
| neg_infty => 0
| real x => x
| infty => 0abbrev ExtendedReal.IsFinite (X : ExtendedReal) : Prop := match X with
| neg_infty => False
| real _ => True
| infty => Falsetheorem ExtendedReal.finite_eq_coe {X: ExtendedReal} (hX: X.IsFinite) :
X = ((X:Real):ExtendedReal) := X:ExtendedRealhX:X.IsFinite⊢ X =
real
(match X with
| neg_infty => 0
| real x => x
| infty => 0)
hX:neg_infty.IsFinite⊢ neg_infty =
real
(match neg_infty with
| neg_infty => 0
| real x => x
| infty => 0)x✝:RealhX:(real x✝).IsFinite⊢ real x✝ =
real
(match real x✝ with
| neg_infty => 0
| real x => x
| infty => 0)hX:infty.IsFinite⊢ infty =
real
(match infty with
| neg_infty => 0
| real x => x
| infty => 0) hX:neg_infty.IsFinite⊢ neg_infty =
real
(match neg_infty with
| neg_infty => 0
| real x => x
| infty => 0)x✝:RealhX:(real x✝).IsFinite⊢ real x✝ =
real
(match real x✝ with
| neg_infty => 0
| real x => x
| infty => 0)hX:infty.IsFinite⊢ infty =
real
(match infty with
| neg_infty => 0
| real x => x
| infty => 0) try All goals completed! 🐙
All goals completed! 🐙open Classical in
/-- Definition 5.5.10 (Supremum)-/
noncomputable abbrev ExtendedReal.sup (E: Set Real) : ExtendedReal :=
if h1:E.Nonempty then (if h2:BddAbove E then ((Real.LUB_exist h1 h2).choose:Real) else ⊤) else ⊥Definition 5.5.10 (Supremum)
theorem ExtendedReal.sup_of_empty : sup ∅ = ⊥ := ⊢ sup ∅ = ⊥ All goals completed! 🐙Definition 5.5.10 (Supremum)
theorem ExtendedReal.sup_of_unbounded {E: Set Real} (hb: ¬ BddAbove E) : sup E = ⊤ := E:Set Realhb:¬BddAbove E⊢ sup E = ⊤
have hE : E.Nonempty := E:Set Realhb:¬BddAbove E⊢ sup E = ⊤ E:Set Realhb:E = ∅⊢ BddAbove E; All goals completed! 🐙
All goals completed! 🐙Definition 5.5.10 (Supremum)
theorem ExtendedReal.sup_of_bounded {E: Set Real} (hnon: E.Nonempty) (hb: BddAbove E) :
IsLUB E (sup E) := E:Set Realhnon:E.Nonemptyhb:BddAbove E⊢ IsLUB E
(match sup E with
| neg_infty => 0
| real x => x
| infty => 0)
E:Set Realhnon:E.Nonemptyhb:BddAbove E⊢ IsLUB E ⋯.choose; All goals completed! 🐙theorem ExtendedReal.sup_of_bounded_finite {E: Set Real} (hnon: E.Nonempty) (hb: BddAbove E) :
(sup E).IsFinite := E:Set Realhnon:E.Nonemptyhb:BddAbove E⊢ (sup E).IsFinite All goals completed! 🐙Proposition 5.5.12
theorem Real.exist_sqrt_two : ∃ x:Real, x^2 = 2 := ⊢ ∃ x, x ^ 2 = 2
-- This proof is written to follow the structure of the original text.
E:Set Real := {y | y ≥ 0 ∧ y ^ 2 < 2}⊢ ∃ x, x ^ 2 = 2
have claim1: 2 ∈ upperBounds E := ⊢ ∃ x, x ^ 2 = 2
E:Set Real := {y | y ≥ 0 ∧ y ^ 2 < 2}⊢ ∀ x ∈ E, x ≤ 2
intro y E:Set Real := {y | y ≥ 0 ∧ y ^ 2 < 2}y:Realhy:y ∈ E⊢ y ≤ 2; E:Set Real := {y | y ≥ 0 ∧ y ^ 2 < 2}y:Realhy:0 ≤ y ∧ y ^ 2 < 2⊢ y ≤ 2; E:Set Real := {y | y ≥ 0 ∧ y ^ 2 < 2}y:Realhy:2 < y⊢ 0 ≤ y → 2 ≤ y ^ 2
E:Set Real := {y | y ≥ 0 ∧ y ^ 2 < 2}y:Realhy:2 < yhpos:0 ≤ y⊢ 2 ≤ y ^ 2
calc
_ ≤ 2 * 2 := E:Set Real := {y | y ≥ 0 ∧ y ^ 2 < 2}y:Realhy:2 < yhpos:0 ≤ y⊢ 2 ≤ 2 * 2 All goals completed! 🐙
_ ≤ y * y := E:Set Real := {y | y ≥ 0 ∧ y ^ 2 < 2}y:Realhy:2 < yhpos:0 ≤ y⊢ 2 * 2 ≤ y * y All goals completed! 🐙
_ = y^2 := E:Set Real := {y | y ≥ 0 ∧ y ^ 2 < 2}y:Realhy:2 < yhpos:0 ≤ y⊢ y * y = y ^ 2 All goals completed! 🐙
have claim1' : BddAbove E := ⊢ ∃ x, x ^ 2 = 2 E:Set Real := {y | y ≥ 0 ∧ y ^ 2 < 2}claim1:2 ∈ upperBounds E :=
Eq.mpr (id (congrArg (fun _a => _a) (propext (upperBound_def E 2)))) fun y hy =>
Mathlib.Tactic.Contrapose.contrapose₁
(Eq.mpr
(id
(implies_congr not_le._simp_1
(Eq.trans (Mathlib.Tactic.Push.not_and_eq (0 ≤ y) (y ^ 2 < 2))
(implies_congr (Eq.refl (0 ≤ y)) not_lt._simp_1))))
fun hy hpos =>
Trans.trans
(Trans.trans
(Mathlib.Meta.NormNum.isNat_le_true (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Mathlib.Meta.NormNum.isNat_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2)) (Eq.refl 4))
(Eq.refl true))
(mul_le_mul (le_of_lt hy) (le_of_lt hy)
(le_of_lt
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Eq.refl (Nat.ble 1 2))))
(le_of_lt
(_root_.lt_trans
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Eq.refl (Nat.ble 1 2)))
hy))))
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.mul_congr (Mathlib.Tactic.Ring.atom_pf y) (Mathlib.Tactic.Ring.atom_pf y)
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pp_pf_overlap y
(Mathlib.Meta.NormNum.IsNat.to_raw_eq
(Mathlib.Meta.NormNum.isNat_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.of_raw ℕ 1)
(Mathlib.Meta.NormNum.IsNat.of_raw ℕ 1) (Eq.refl 2)))
(Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (y ^ Nat.rawCast 1 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0))))
(Mathlib.Tactic.Ring.pow_congr (Mathlib.Tactic.Ring.atom_pf y)
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat ℕ (Eq.refl 2)))
(Mathlib.Tactic.Ring.pow_add
(Mathlib.Tactic.Ring.single_pow
(Mathlib.Tactic.Ring.mul_pow (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 2))
(Mathlib.Tactic.Ring.one_pow (Nat.rawCast 2))))
(Mathlib.Tactic.Ring.pow_zero (y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left y (Nat.rawCast 2) (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))))
(Eq.mp
(congrFun'
(congrArg Membership.mem
(congrArg setOf (funext fun y => congrFun' (congrArg And ge_iff_le._simp_1) (y ^ 2 < 2))))
y)
hy)⊢ ∃ M, M ∈ upperBounds E; All goals completed! 🐙
have claim2: 1 ∈ E := ⊢ ∃ x, x ^ 2 = 2 All goals completed! 🐙
E:Set Real := {y | y ≥ 0 ∧ y ^ 2 < 2}claim1:2 ∈ upperBounds E :=
Eq.mpr (id (congrArg (fun _a => _a) (propext (upperBound_def E 2)))) fun y hy =>
Mathlib.Tactic.Contrapose.contrapose₁
(Eq.mpr
(id
(implies_congr not_le._simp_1
(Eq.trans (Mathlib.Tactic.Push.not_and_eq (0 ≤ y) (y ^ 2 < 2))
(implies_congr (Eq.refl (0 ≤ y)) not_lt._simp_1))))
fun hy hpos =>
Trans.trans
(Trans.trans
(Mathlib.Meta.NormNum.isNat_le_true (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Mathlib.Meta.NormNum.isNat_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2)) (Eq.refl 4))
(Eq.refl true))
(mul_le_mul (le_of_lt hy) (le_of_lt hy)
(le_of_lt
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Eq.refl (Nat.ble 1 2))))
(le_of_lt
(_root_.lt_trans
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Eq.refl (Nat.ble 1 2)))
hy))))
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.mul_congr (Mathlib.Tactic.Ring.atom_pf y) (Mathlib.Tactic.Ring.atom_pf y)
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pp_pf_overlap y
(Mathlib.Meta.NormNum.IsNat.to_raw_eq
(Mathlib.Meta.NormNum.isNat_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.of_raw ℕ 1)
(Mathlib.Meta.NormNum.IsNat.of_raw ℕ 1) (Eq.refl 2)))
(Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (y ^ Nat.rawCast 1 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0))))
(Mathlib.Tactic.Ring.pow_congr (Mathlib.Tactic.Ring.atom_pf y)
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat ℕ (Eq.refl 2)))
(Mathlib.Tactic.Ring.pow_add
(Mathlib.Tactic.Ring.single_pow
(Mathlib.Tactic.Ring.mul_pow (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 2))
(Mathlib.Tactic.Ring.one_pow (Nat.rawCast 2))))
(Mathlib.Tactic.Ring.pow_zero (y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left y (Nat.rawCast 2) (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))))
(Eq.mp
(congrFun'
(congrArg Membership.mem
(congrArg setOf (funext fun y => congrFun' (congrArg And ge_iff_le._simp_1) (y ^ 2 < 2))))
y)
hy)claim1':BddAbove E := Eq.mpr (id (congrArg (fun _a => _a) (propext (bddAbove_def E)))) (Exists.intro 2 claim1)claim2:1 ∈ E :=
of_eq_true
(Eq.trans
(congrFun'
(congrArg Membership.mem
(congrArg setOf (funext fun y => congrFun' (congrArg And ge_iff_le._simp_1) (y ^ 2 < 2))))
1)
(Eq.trans
(congr (congrArg And zero_le_one._simp_1)
(Eq.trans (congrFun' (congrArg LT.lt (one_pow 2)) 2) Nat.one_lt_ofNat._simp_1))
(and_self True)))claim2':E.Nonempty⊢ ∃ x, x ^ 2 = 2
E:Set Real := {y | y ≥ 0 ∧ y ^ 2 < 2}claim1:2 ∈ upperBounds E :=
Eq.mpr (id (congrArg (fun _a => _a) (propext (upperBound_def E 2)))) fun y hy =>
Mathlib.Tactic.Contrapose.contrapose₁
(Eq.mpr
(id
(implies_congr not_le._simp_1
(Eq.trans (Mathlib.Tactic.Push.not_and_eq (0 ≤ y) (y ^ 2 < 2))
(implies_congr (Eq.refl (0 ≤ y)) not_lt._simp_1))))
fun hy hpos =>
Trans.trans
(Trans.trans
(Mathlib.Meta.NormNum.isNat_le_true (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Mathlib.Meta.NormNum.isNat_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2)) (Eq.refl 4))
(Eq.refl true))
(mul_le_mul (le_of_lt hy) (le_of_lt hy)
(le_of_lt
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Eq.refl (Nat.ble 1 2))))
(le_of_lt
(_root_.lt_trans
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Eq.refl (Nat.ble 1 2)))
hy))))
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.mul_congr (Mathlib.Tactic.Ring.atom_pf y) (Mathlib.Tactic.Ring.atom_pf y)
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pp_pf_overlap y
(Mathlib.Meta.NormNum.IsNat.to_raw_eq
(Mathlib.Meta.NormNum.isNat_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.of_raw ℕ 1)
(Mathlib.Meta.NormNum.IsNat.of_raw ℕ 1) (Eq.refl 2)))
(Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (y ^ Nat.rawCast 1 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0))))
(Mathlib.Tactic.Ring.pow_congr (Mathlib.Tactic.Ring.atom_pf y)
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat ℕ (Eq.refl 2)))
(Mathlib.Tactic.Ring.pow_add
(Mathlib.Tactic.Ring.single_pow
(Mathlib.Tactic.Ring.mul_pow (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 2))
(Mathlib.Tactic.Ring.one_pow (Nat.rawCast 2))))
(Mathlib.Tactic.Ring.pow_zero (y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left y (Nat.rawCast 2) (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))))
(Eq.mp
(congrFun'
(congrArg Membership.mem
(congrArg setOf (funext fun y => congrFun' (congrArg And ge_iff_le._simp_1) (y ^ 2 < 2))))
y)
hy)claim1':BddAbove E := Eq.mpr (id (congrArg (fun _a => _a) (propext (bddAbove_def E)))) (Exists.intro 2 claim1)claim2:1 ∈ E :=
of_eq_true
(Eq.trans
(congrFun'
(congrArg Membership.mem
(congrArg setOf (funext fun y => congrFun' (congrArg And ge_iff_le._simp_1) (y ^ 2 < 2))))
1)
(Eq.trans
(congr (congrArg And zero_le_one._simp_1)
(Eq.trans (congrFun' (congrArg LT.lt (one_pow 2)) 2) Nat.one_lt_ofNat._simp_1))
(and_self True)))claim2':E.Nonemptyx:Real :=
match ExtendedReal.sup E with
| ExtendedReal.neg_infty => 0
| ExtendedReal.real x => x
| ExtendedReal.infty => 0⊢ ∃ x, x ^ 2 = 2
have claim3 : IsLUB E x := ⊢ ∃ x, x ^ 2 = 2 All goals completed! 🐙
have claim4 : x ≥ 1 := ⊢ ∃ x, x ^ 2 = 2 All goals completed! 🐙
have claim5 : x ≤ 2 := ⊢ ∃ x, x ^ 2 = 2 All goals completed! 🐙
have claim6 : x.IsPos := ⊢ ∃ x, x ^ 2 = 2 E:Set Real := {y | y ≥ 0 ∧ y ^ 2 < 2}claim1:2 ∈ upperBounds E :=
Eq.mpr (id (congrArg (fun _a => _a) (propext (upperBound_def E 2)))) fun y hy =>
Mathlib.Tactic.Contrapose.contrapose₁
(Eq.mpr
(id
(implies_congr not_le._simp_1
(Eq.trans (Mathlib.Tactic.Push.not_and_eq (0 ≤ y) (y ^ 2 < 2))
(implies_congr (Eq.refl (0 ≤ y)) not_lt._simp_1))))
fun hy hpos =>
Trans.trans
(Trans.trans
(Mathlib.Meta.NormNum.isNat_le_true (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Mathlib.Meta.NormNum.isNat_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2)) (Eq.refl 4))
(Eq.refl true))
(mul_le_mul (le_of_lt hy) (le_of_lt hy)
(le_of_lt
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Eq.refl (Nat.ble 1 2))))
(le_of_lt
(_root_.lt_trans
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Eq.refl (Nat.ble 1 2)))
hy))))
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.mul_congr (Mathlib.Tactic.Ring.atom_pf y) (Mathlib.Tactic.Ring.atom_pf y)
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pp_pf_overlap y
(Mathlib.Meta.NormNum.IsNat.to_raw_eq
(Mathlib.Meta.NormNum.isNat_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.of_raw ℕ 1)
(Mathlib.Meta.NormNum.IsNat.of_raw ℕ 1) (Eq.refl 2)))
(Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (y ^ Nat.rawCast 1 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0))))
(Mathlib.Tactic.Ring.pow_congr (Mathlib.Tactic.Ring.atom_pf y)
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat ℕ (Eq.refl 2)))
(Mathlib.Tactic.Ring.pow_add
(Mathlib.Tactic.Ring.single_pow
(Mathlib.Tactic.Ring.mul_pow (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 2))
(Mathlib.Tactic.Ring.one_pow (Nat.rawCast 2))))
(Mathlib.Tactic.Ring.pow_zero (y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left y (Nat.rawCast 2) (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))))
(Eq.mp
(congrFun'
(congrArg Membership.mem
(congrArg setOf (funext fun y => congrFun' (congrArg And ge_iff_le._simp_1) (y ^ 2 < 2))))
y)
hy)claim1':BddAbove E := Eq.mpr (id (congrArg (fun _a => _a) (propext (bddAbove_def E)))) (Exists.intro 2 claim1)claim2:1 ∈ E :=
of_eq_true
(Eq.trans
(congrFun'
(congrArg Membership.mem
(congrArg setOf (funext fun y => congrFun' (congrArg And ge_iff_le._simp_1) (y ^ 2 < 2))))
1)
(Eq.trans
(congr (congrArg And zero_le_one._simp_1)
(Eq.trans (congrFun' (congrArg LT.lt (one_pow 2)) 2) Nat.one_lt_ofNat._simp_1))
(and_self True)))claim2':E.Nonemptyx:Real :=
match ExtendedReal.sup E with
| ExtendedReal.neg_infty => 0
| ExtendedReal.real x => x
| ExtendedReal.infty => 0claim3:IsLUB E x := exist_sqrt_two._proof_4 claim1' claim2'claim4:x ≥ 1 := exist_sqrt_two._proof_5 claim2 claim3claim5:x ≤ 2 := exist_sqrt_two._proof_6 claim1 claim3⊢ x > 0; All goals completed! 🐙
E:Set Real := {y | y ≥ 0 ∧ y ^ 2 < 2}claim1:2 ∈ upperBounds E :=
Eq.mpr (id (congrArg (fun _a => _a) (propext (upperBound_def E 2)))) fun y hy =>
Mathlib.Tactic.Contrapose.contrapose₁
(Eq.mpr
(id
(implies_congr not_le._simp_1
(Eq.trans (Mathlib.Tactic.Push.not_and_eq (0 ≤ y) (y ^ 2 < 2))
(implies_congr (Eq.refl (0 ≤ y)) not_lt._simp_1))))
fun hy hpos =>
Trans.trans
(Trans.trans
(Mathlib.Meta.NormNum.isNat_le_true (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Mathlib.Meta.NormNum.isNat_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2)) (Eq.refl 4))
(Eq.refl true))
(mul_le_mul (le_of_lt hy) (le_of_lt hy)
(le_of_lt
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Eq.refl (Nat.ble 1 2))))
(le_of_lt
(_root_.lt_trans
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Eq.refl (Nat.ble 1 2)))
hy))))
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.mul_congr (Mathlib.Tactic.Ring.atom_pf y) (Mathlib.Tactic.Ring.atom_pf y)
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pp_pf_overlap y
(Mathlib.Meta.NormNum.IsNat.to_raw_eq
(Mathlib.Meta.NormNum.isNat_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.of_raw ℕ 1)
(Mathlib.Meta.NormNum.IsNat.of_raw ℕ 1) (Eq.refl 2)))
(Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (y ^ Nat.rawCast 1 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0))))
(Mathlib.Tactic.Ring.pow_congr (Mathlib.Tactic.Ring.atom_pf y)
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat ℕ (Eq.refl 2)))
(Mathlib.Tactic.Ring.pow_add
(Mathlib.Tactic.Ring.single_pow
(Mathlib.Tactic.Ring.mul_pow (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 2))
(Mathlib.Tactic.Ring.one_pow (Nat.rawCast 2))))
(Mathlib.Tactic.Ring.pow_zero (y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left y (Nat.rawCast 2) (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))))
(Eq.mp
(congrFun'
(congrArg Membership.mem
(congrArg setOf (funext fun y => congrFun' (congrArg And ge_iff_le._simp_1) (y ^ 2 < 2))))
y)
hy)claim1':BddAbove E := Eq.mpr (id (congrArg (fun _a => _a) (propext (bddAbove_def E)))) (Exists.intro 2 claim1)claim2:1 ∈ E :=
of_eq_true
(Eq.trans
(congrFun'
(congrArg Membership.mem
(congrArg setOf (funext fun y => congrFun' (congrArg And ge_iff_le._simp_1) (y ^ 2 < 2))))
1)
(Eq.trans
(congr (congrArg And zero_le_one._simp_1)
(Eq.trans (congrFun' (congrArg LT.lt (one_pow 2)) 2) Nat.one_lt_ofNat._simp_1))
(and_self True)))claim2':E.Nonemptyx:Real :=
match ExtendedReal.sup E with
| ExtendedReal.neg_infty => 0
| ExtendedReal.real x => x
| ExtendedReal.infty => 0claim3:IsLUB E x := exist_sqrt_two._proof_4 claim1' claim2'claim4:x ≥ 1 := exist_sqrt_two._proof_5 claim2 claim3claim5:x ≤ 2 := exist_sqrt_two._proof_6 claim1 claim3claim6:x.IsPos :=
Eq.mpr (id (congrArg (fun _a => _a) (propext (isPos_iff x))))
(lt_of_not_ge fun a =>
Mathlib.Tactic.Linarith.lt_irrefl
(Eq.mp
(congrArg (fun _a => _a < 0)
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.neg_congr
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_one))
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1)))))
Mathlib.Tactic.Ring.neg_zero))
(Mathlib.Tactic.Ring.sub_congr
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_one))
(Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul x (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1))))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_lt (Nat.rawCast 1)
(Mathlib.Tactic.Ring.add_pf_zero_add (x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0)))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0))))
(Mathlib.Tactic.Ring.add_pf_zero_add (x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))
(Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))
(Mathlib.Tactic.Ring.sub_pf Mathlib.Tactic.Ring.neg_zero
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Tactic.Ring.add_overlap_pf_zero x (Nat.rawCast 1)
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0)))))
(Mathlib.Tactic.Ring.add_pf_zero_add 0)))
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))))
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le (neg_neg_of_pos Mathlib.Tactic.Linarith.zero_lt_one)
(Mathlib.Tactic.Linarith.sub_nonpos_of_le claim4))
(Mathlib.Tactic.Linarith.sub_nonpos_of_le a))))⊢ x ^ 2 = 2; E:Set Real := {y | y ≥ 0 ∧ y ^ 2 < 2}claim1:2 ∈ upperBounds E :=
Eq.mpr (id (congrArg (fun _a => _a) (propext (upperBound_def E 2)))) fun y hy =>
Mathlib.Tactic.Contrapose.contrapose₁
(Eq.mpr
(id
(implies_congr not_le._simp_1
(Eq.trans (Mathlib.Tactic.Push.not_and_eq (0 ≤ y) (y ^ 2 < 2))
(implies_congr (Eq.refl (0 ≤ y)) not_lt._simp_1))))
fun hy hpos =>
Trans.trans
(Trans.trans
(Mathlib.Meta.NormNum.isNat_le_true (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Mathlib.Meta.NormNum.isNat_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2)) (Eq.refl 4))
(Eq.refl true))
(mul_le_mul (le_of_lt hy) (le_of_lt hy)
(le_of_lt
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Eq.refl (Nat.ble 1 2))))
(le_of_lt
(_root_.lt_trans
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Eq.refl (Nat.ble 1 2)))
hy))))
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.mul_congr (Mathlib.Tactic.Ring.atom_pf y) (Mathlib.Tactic.Ring.atom_pf y)
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pp_pf_overlap y
(Mathlib.Meta.NormNum.IsNat.to_raw_eq
(Mathlib.Meta.NormNum.isNat_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.of_raw ℕ 1)
(Mathlib.Meta.NormNum.IsNat.of_raw ℕ 1) (Eq.refl 2)))
(Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (y ^ Nat.rawCast 1 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0))))
(Mathlib.Tactic.Ring.pow_congr (Mathlib.Tactic.Ring.atom_pf y)
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat ℕ (Eq.refl 2)))
(Mathlib.Tactic.Ring.pow_add
(Mathlib.Tactic.Ring.single_pow
(Mathlib.Tactic.Ring.mul_pow (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 2))
(Mathlib.Tactic.Ring.one_pow (Nat.rawCast 2))))
(Mathlib.Tactic.Ring.pow_zero (y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left y (Nat.rawCast 2) (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))))
(Eq.mp
(congrFun'
(congrArg Membership.mem
(congrArg setOf (funext fun y => congrFun' (congrArg And ge_iff_le._simp_1) (y ^ 2 < 2))))
y)
hy)claim1':BddAbove E := Eq.mpr (id (congrArg (fun _a => _a) (propext (bddAbove_def E)))) (Exists.intro 2 claim1)claim2:1 ∈ E :=
of_eq_true
(Eq.trans
(congrFun'
(congrArg Membership.mem
(congrArg setOf (funext fun y => congrFun' (congrArg And ge_iff_le._simp_1) (y ^ 2 < 2))))
1)
(Eq.trans
(congr (congrArg And zero_le_one._simp_1)
(Eq.trans (congrFun' (congrArg LT.lt (one_pow 2)) 2) Nat.one_lt_ofNat._simp_1))
(and_self True)))claim2':E.Nonemptyx:Real :=
match ExtendedReal.sup E with
| ExtendedReal.neg_infty => 0
| ExtendedReal.real x => x
| ExtendedReal.infty => 0claim3:IsLUB E x := exist_sqrt_two._proof_4 claim1' claim2'claim4:x ≥ 1 := exist_sqrt_two._proof_5 claim2 claim3claim5:x ≤ 2 := exist_sqrt_two._proof_6 claim1 claim3claim6:x.IsPos :=
Eq.mpr (id (congrArg (fun _a => _a) (propext (isPos_iff x))))
(lt_of_not_ge fun a =>
Mathlib.Tactic.Linarith.lt_irrefl
(Eq.mp
(congrArg (fun _a => _a < 0)
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.neg_congr
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_one))
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1)))))
Mathlib.Tactic.Ring.neg_zero))
(Mathlib.Tactic.Ring.sub_congr
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_one))
(Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul x (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1))))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_lt (Nat.rawCast 1)
(Mathlib.Tactic.Ring.add_pf_zero_add (x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0)))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0))))
(Mathlib.Tactic.Ring.add_pf_zero_add (x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))
(Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))
(Mathlib.Tactic.Ring.sub_pf Mathlib.Tactic.Ring.neg_zero
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Tactic.Ring.add_overlap_pf_zero x (Nat.rawCast 1)
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0)))))
(Mathlib.Tactic.Ring.add_pf_zero_add 0)))
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))))
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le (neg_neg_of_pos Mathlib.Tactic.Linarith.zero_lt_one)
(Mathlib.Tactic.Linarith.sub_nonpos_of_le claim4))
(Mathlib.Tactic.Linarith.sub_nonpos_of_le a))))h:x ^ 2 > 2⊢ x ^ 2 = 2E:Set Real := {y | y ≥ 0 ∧ y ^ 2 < 2}claim1:2 ∈ upperBounds E :=
Eq.mpr (id (congrArg (fun _a => _a) (propext (upperBound_def E 2)))) fun y hy =>
Mathlib.Tactic.Contrapose.contrapose₁
(Eq.mpr
(id
(implies_congr not_le._simp_1
(Eq.trans (Mathlib.Tactic.Push.not_and_eq (0 ≤ y) (y ^ 2 < 2))
(implies_congr (Eq.refl (0 ≤ y)) not_lt._simp_1))))
fun hy hpos =>
Trans.trans
(Trans.trans
(Mathlib.Meta.NormNum.isNat_le_true (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Mathlib.Meta.NormNum.isNat_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2)) (Eq.refl 4))
(Eq.refl true))
(mul_le_mul (le_of_lt hy) (le_of_lt hy)
(le_of_lt
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Eq.refl (Nat.ble 1 2))))
(le_of_lt
(_root_.lt_trans
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Eq.refl (Nat.ble 1 2)))
hy))))
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.mul_congr (Mathlib.Tactic.Ring.atom_pf y) (Mathlib.Tactic.Ring.atom_pf y)
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pp_pf_overlap y
(Mathlib.Meta.NormNum.IsNat.to_raw_eq
(Mathlib.Meta.NormNum.isNat_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.of_raw ℕ 1)
(Mathlib.Meta.NormNum.IsNat.of_raw ℕ 1) (Eq.refl 2)))
(Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (y ^ Nat.rawCast 1 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0))))
(Mathlib.Tactic.Ring.pow_congr (Mathlib.Tactic.Ring.atom_pf y)
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat ℕ (Eq.refl 2)))
(Mathlib.Tactic.Ring.pow_add
(Mathlib.Tactic.Ring.single_pow
(Mathlib.Tactic.Ring.mul_pow (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 2))
(Mathlib.Tactic.Ring.one_pow (Nat.rawCast 2))))
(Mathlib.Tactic.Ring.pow_zero (y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left y (Nat.rawCast 2) (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))))
(Eq.mp
(congrFun'
(congrArg Membership.mem
(congrArg setOf (funext fun y => congrFun' (congrArg And ge_iff_le._simp_1) (y ^ 2 < 2))))
y)
hy)claim1':BddAbove E := Eq.mpr (id (congrArg (fun _a => _a) (propext (bddAbove_def E)))) (Exists.intro 2 claim1)claim2:1 ∈ E :=
of_eq_true
(Eq.trans
(congrFun'
(congrArg Membership.mem
(congrArg setOf (funext fun y => congrFun' (congrArg And ge_iff_le._simp_1) (y ^ 2 < 2))))
1)
(Eq.trans
(congr (congrArg And zero_le_one._simp_1)
(Eq.trans (congrFun' (congrArg LT.lt (one_pow 2)) 2) Nat.one_lt_ofNat._simp_1))
(and_self True)))claim2':E.Nonemptyx:Real :=
match ExtendedReal.sup E with
| ExtendedReal.neg_infty => 0
| ExtendedReal.real x => x
| ExtendedReal.infty => 0claim3:IsLUB E x := exist_sqrt_two._proof_4 claim1' claim2'claim4:x ≥ 1 := exist_sqrt_two._proof_5 claim2 claim3claim5:x ≤ 2 := exist_sqrt_two._proof_6 claim1 claim3claim6:x.IsPos :=
Eq.mpr (id (congrArg (fun _a => _a) (propext (isPos_iff x))))
(lt_of_not_ge fun a =>
Mathlib.Tactic.Linarith.lt_irrefl
(Eq.mp
(congrArg (fun _a => _a < 0)
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.neg_congr
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_one))
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1)))))
Mathlib.Tactic.Ring.neg_zero))
(Mathlib.Tactic.Ring.sub_congr
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_one))
(Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul x (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1))))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_lt (Nat.rawCast 1)
(Mathlib.Tactic.Ring.add_pf_zero_add (x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0)))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0))))
(Mathlib.Tactic.Ring.add_pf_zero_add (x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))
(Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))
(Mathlib.Tactic.Ring.sub_pf Mathlib.Tactic.Ring.neg_zero
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Tactic.Ring.add_overlap_pf_zero x (Nat.rawCast 1)
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0)))))
(Mathlib.Tactic.Ring.add_pf_zero_add 0)))
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))))
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le (neg_neg_of_pos Mathlib.Tactic.Linarith.zero_lt_one)
(Mathlib.Tactic.Linarith.sub_nonpos_of_le claim4))
(Mathlib.Tactic.Linarith.sub_nonpos_of_le a))))h:x ^ 2 < 2⊢ x ^ 2 = 2E:Set Real := {y | y ≥ 0 ∧ y ^ 2 < 2}claim1:2 ∈ upperBounds E :=
Eq.mpr (id (congrArg (fun _a => _a) (propext (upperBound_def E 2)))) fun y hy =>
Mathlib.Tactic.Contrapose.contrapose₁
(Eq.mpr
(id
(implies_congr not_le._simp_1
(Eq.trans (Mathlib.Tactic.Push.not_and_eq (0 ≤ y) (y ^ 2 < 2))
(implies_congr (Eq.refl (0 ≤ y)) not_lt._simp_1))))
fun hy hpos =>
Trans.trans
(Trans.trans
(Mathlib.Meta.NormNum.isNat_le_true (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Mathlib.Meta.NormNum.isNat_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2)) (Eq.refl 4))
(Eq.refl true))
(mul_le_mul (le_of_lt hy) (le_of_lt hy)
(le_of_lt
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Eq.refl (Nat.ble 1 2))))
(le_of_lt
(_root_.lt_trans
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Eq.refl (Nat.ble 1 2)))
hy))))
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.mul_congr (Mathlib.Tactic.Ring.atom_pf y) (Mathlib.Tactic.Ring.atom_pf y)
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pp_pf_overlap y
(Mathlib.Meta.NormNum.IsNat.to_raw_eq
(Mathlib.Meta.NormNum.isNat_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.of_raw ℕ 1)
(Mathlib.Meta.NormNum.IsNat.of_raw ℕ 1) (Eq.refl 2)))
(Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (y ^ Nat.rawCast 1 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0))))
(Mathlib.Tactic.Ring.pow_congr (Mathlib.Tactic.Ring.atom_pf y)
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat ℕ (Eq.refl 2)))
(Mathlib.Tactic.Ring.pow_add
(Mathlib.Tactic.Ring.single_pow
(Mathlib.Tactic.Ring.mul_pow (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 2))
(Mathlib.Tactic.Ring.one_pow (Nat.rawCast 2))))
(Mathlib.Tactic.Ring.pow_zero (y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left y (Nat.rawCast 2) (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))))
(Eq.mp
(congrFun'
(congrArg Membership.mem
(congrArg setOf (funext fun y => congrFun' (congrArg And ge_iff_le._simp_1) (y ^ 2 < 2))))
y)
hy)claim1':BddAbove E := Eq.mpr (id (congrArg (fun _a => _a) (propext (bddAbove_def E)))) (Exists.intro 2 claim1)claim2:1 ∈ E :=
of_eq_true
(Eq.trans
(congrFun'
(congrArg Membership.mem
(congrArg setOf (funext fun y => congrFun' (congrArg And ge_iff_le._simp_1) (y ^ 2 < 2))))
1)
(Eq.trans
(congr (congrArg And zero_le_one._simp_1)
(Eq.trans (congrFun' (congrArg LT.lt (one_pow 2)) 2) Nat.one_lt_ofNat._simp_1))
(and_self True)))claim2':E.Nonemptyx:Real :=
match ExtendedReal.sup E with
| ExtendedReal.neg_infty => 0
| ExtendedReal.real x => x
| ExtendedReal.infty => 0claim3:IsLUB E x := exist_sqrt_two._proof_4 claim1' claim2'claim4:x ≥ 1 := exist_sqrt_two._proof_5 claim2 claim3claim5:x ≤ 2 := exist_sqrt_two._proof_6 claim1 claim3claim6:x.IsPos :=
Eq.mpr (id (congrArg (fun _a => _a) (propext (isPos_iff x))))
(lt_of_not_ge fun a =>
Mathlib.Tactic.Linarith.lt_irrefl
(Eq.mp
(congrArg (fun _a => _a < 0)
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.neg_congr
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_one))
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1)))))
Mathlib.Tactic.Ring.neg_zero))
(Mathlib.Tactic.Ring.sub_congr
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_one))
(Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul x (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1))))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_lt (Nat.rawCast 1)
(Mathlib.Tactic.Ring.add_pf_zero_add (x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0)))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0))))
(Mathlib.Tactic.Ring.add_pf_zero_add (x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))
(Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))
(Mathlib.Tactic.Ring.sub_pf Mathlib.Tactic.Ring.neg_zero
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Tactic.Ring.add_overlap_pf_zero x (Nat.rawCast 1)
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0)))))
(Mathlib.Tactic.Ring.add_pf_zero_add 0)))
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))))
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le (neg_neg_of_pos Mathlib.Tactic.Linarith.zero_lt_one)
(Mathlib.Tactic.Linarith.sub_nonpos_of_le claim4))
(Mathlib.Tactic.Linarith.sub_nonpos_of_le a))))h:x ^ 2 = 2⊢ x ^ 2 = 2
E:Set Real := {y | y ≥ 0 ∧ y ^ 2 < 2}claim1:2 ∈ upperBounds E :=
Eq.mpr (id (congrArg (fun _a => _a) (propext (upperBound_def E 2)))) fun y hy =>
Mathlib.Tactic.Contrapose.contrapose₁
(Eq.mpr
(id
(implies_congr not_le._simp_1
(Eq.trans (Mathlib.Tactic.Push.not_and_eq (0 ≤ y) (y ^ 2 < 2))
(implies_congr (Eq.refl (0 ≤ y)) not_lt._simp_1))))
fun hy hpos =>
Trans.trans
(Trans.trans
(Mathlib.Meta.NormNum.isNat_le_true (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Mathlib.Meta.NormNum.isNat_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2)) (Eq.refl 4))
(Eq.refl true))
(mul_le_mul (le_of_lt hy) (le_of_lt hy)
(le_of_lt
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Eq.refl (Nat.ble 1 2))))
(le_of_lt
(_root_.lt_trans
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Eq.refl (Nat.ble 1 2)))
hy))))
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.mul_congr (Mathlib.Tactic.Ring.atom_pf y) (Mathlib.Tactic.Ring.atom_pf y)
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pp_pf_overlap y
(Mathlib.Meta.NormNum.IsNat.to_raw_eq
(Mathlib.Meta.NormNum.isNat_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.of_raw ℕ 1)
(Mathlib.Meta.NormNum.IsNat.of_raw ℕ 1) (Eq.refl 2)))
(Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (y ^ Nat.rawCast 1 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0))))
(Mathlib.Tactic.Ring.pow_congr (Mathlib.Tactic.Ring.atom_pf y)
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat ℕ (Eq.refl 2)))
(Mathlib.Tactic.Ring.pow_add
(Mathlib.Tactic.Ring.single_pow
(Mathlib.Tactic.Ring.mul_pow (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 2))
(Mathlib.Tactic.Ring.one_pow (Nat.rawCast 2))))
(Mathlib.Tactic.Ring.pow_zero (y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left y (Nat.rawCast 2) (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))))
(Eq.mp
(congrFun'
(congrArg Membership.mem
(congrArg setOf (funext fun y => congrFun' (congrArg And ge_iff_le._simp_1) (y ^ 2 < 2))))
y)
hy)claim1':BddAbove E := Eq.mpr (id (congrArg (fun _a => _a) (propext (bddAbove_def E)))) (Exists.intro 2 claim1)claim2:1 ∈ E :=
of_eq_true
(Eq.trans
(congrFun'
(congrArg Membership.mem
(congrArg setOf (funext fun y => congrFun' (congrArg And ge_iff_le._simp_1) (y ^ 2 < 2))))
1)
(Eq.trans
(congr (congrArg And zero_le_one._simp_1)
(Eq.trans (congrFun' (congrArg LT.lt (one_pow 2)) 2) Nat.one_lt_ofNat._simp_1))
(and_self True)))claim2':E.Nonemptyx:Real :=
match ExtendedReal.sup E with
| ExtendedReal.neg_infty => 0
| ExtendedReal.real x => x
| ExtendedReal.infty => 0claim3:IsLUB E x := exist_sqrt_two._proof_4 claim1' claim2'claim4:x ≥ 1 := exist_sqrt_two._proof_5 claim2 claim3claim5:x ≤ 2 := exist_sqrt_two._proof_6 claim1 claim3claim6:x.IsPos :=
Eq.mpr (id (congrArg (fun _a => _a) (propext (isPos_iff x))))
(lt_of_not_ge fun a =>
Mathlib.Tactic.Linarith.lt_irrefl
(Eq.mp
(congrArg (fun _a => _a < 0)
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.neg_congr
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_one))
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1)))))
Mathlib.Tactic.Ring.neg_zero))
(Mathlib.Tactic.Ring.sub_congr
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_one))
(Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul x (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1))))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_lt (Nat.rawCast 1)
(Mathlib.Tactic.Ring.add_pf_zero_add (x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0)))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0))))
(Mathlib.Tactic.Ring.add_pf_zero_add (x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))
(Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))
(Mathlib.Tactic.Ring.sub_pf Mathlib.Tactic.Ring.neg_zero
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Tactic.Ring.add_overlap_pf_zero x (Nat.rawCast 1)
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0)))))
(Mathlib.Tactic.Ring.add_pf_zero_add 0)))
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))))
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le (neg_neg_of_pos Mathlib.Tactic.Linarith.zero_lt_one)
(Mathlib.Tactic.Linarith.sub_nonpos_of_le claim4))
(Mathlib.Tactic.Linarith.sub_nonpos_of_le a))))h:x ^ 2 > 2⊢ x ^ 2 = 2 have claim11: ∃ ε, 0 < ε ∧ ε < 1 ∧ x^2 - 4*ε > 2 := ⊢ ∃ x, x ^ 2 = 2
E:Set Real := {y | y ≥ 0 ∧ y ^ 2 < 2}claim1:2 ∈ upperBounds E :=
Eq.mpr (id (congrArg (fun _a => _a) (propext (upperBound_def E 2)))) fun y hy =>
Mathlib.Tactic.Contrapose.contrapose₁
(Eq.mpr
(id
(implies_congr not_le._simp_1
(Eq.trans (Mathlib.Tactic.Push.not_and_eq (0 ≤ y) (y ^ 2 < 2))
(implies_congr (Eq.refl (0 ≤ y)) not_lt._simp_1))))
fun hy hpos =>
Trans.trans
(Trans.trans
(Mathlib.Meta.NormNum.isNat_le_true (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Mathlib.Meta.NormNum.isNat_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2)) (Eq.refl 4))
(Eq.refl true))
(mul_le_mul (le_of_lt hy) (le_of_lt hy)
(le_of_lt
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Eq.refl (Nat.ble 1 2))))
(le_of_lt
(_root_.lt_trans
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Eq.refl (Nat.ble 1 2)))
hy))))
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.mul_congr (Mathlib.Tactic.Ring.atom_pf y) (Mathlib.Tactic.Ring.atom_pf y)
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pp_pf_overlap y
(Mathlib.Meta.NormNum.IsNat.to_raw_eq
(Mathlib.Meta.NormNum.isNat_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.of_raw ℕ 1)
(Mathlib.Meta.NormNum.IsNat.of_raw ℕ 1) (Eq.refl 2)))
(Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (y ^ Nat.rawCast 1 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0))))
(Mathlib.Tactic.Ring.pow_congr (Mathlib.Tactic.Ring.atom_pf y)
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat ℕ (Eq.refl 2)))
(Mathlib.Tactic.Ring.pow_add
(Mathlib.Tactic.Ring.single_pow
(Mathlib.Tactic.Ring.mul_pow (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 2))
(Mathlib.Tactic.Ring.one_pow (Nat.rawCast 2))))
(Mathlib.Tactic.Ring.pow_zero (y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left y (Nat.rawCast 2) (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))))
(Eq.mp
(congrFun'
(congrArg Membership.mem
(congrArg setOf (funext fun y => congrFun' (congrArg And ge_iff_le._simp_1) (y ^ 2 < 2))))
y)
hy)claim1':BddAbove E := Eq.mpr (id (congrArg (fun _a => _a) (propext (bddAbove_def E)))) (Exists.intro 2 claim1)claim2:1 ∈ E :=
of_eq_true
(Eq.trans
(congrFun'
(congrArg Membership.mem
(congrArg setOf (funext fun y => congrFun' (congrArg And ge_iff_le._simp_1) (y ^ 2 < 2))))
1)
(Eq.trans
(congr (congrArg And zero_le_one._simp_1)
(Eq.trans (congrFun' (congrArg LT.lt (one_pow 2)) 2) Nat.one_lt_ofNat._simp_1))
(and_self True)))claim2':E.Nonemptyx:Real :=
match ExtendedReal.sup E with
| ExtendedReal.neg_infty => 0
| ExtendedReal.real x => x
| ExtendedReal.infty => 0claim3:IsLUB E x := exist_sqrt_two._proof_4 claim1' claim2'claim4:x ≥ 1 := exist_sqrt_two._proof_5 claim2 claim3claim5:x ≤ 2 := exist_sqrt_two._proof_6 claim1 claim3claim6:x.IsPos :=
Eq.mpr (id (congrArg (fun _a => _a) (propext (isPos_iff x))))
(lt_of_not_ge fun a =>
Mathlib.Tactic.Linarith.lt_irrefl
(Eq.mp
(congrArg (fun _a => _a < 0)
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.neg_congr
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_one))
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1)))))
Mathlib.Tactic.Ring.neg_zero))
(Mathlib.Tactic.Ring.sub_congr
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_one))
(Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul x (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1))))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_lt (Nat.rawCast 1)
(Mathlib.Tactic.Ring.add_pf_zero_add (x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0)))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0))))
(Mathlib.Tactic.Ring.add_pf_zero_add (x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))
(Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))
(Mathlib.Tactic.Ring.sub_pf Mathlib.Tactic.Ring.neg_zero
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Tactic.Ring.add_overlap_pf_zero x (Nat.rawCast 1)
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0)))))
(Mathlib.Tactic.Ring.add_pf_zero_add 0)))
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))))
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le (neg_neg_of_pos Mathlib.Tactic.Linarith.zero_lt_one)
(Mathlib.Tactic.Linarith.sub_nonpos_of_le claim4))
(Mathlib.Tactic.Linarith.sub_nonpos_of_le a))))h:x ^ 2 > 2ε:Real := min (1 / 2) ((x ^ 2 - 2) / 8)⊢ ∃ ε, 0 < ε ∧ ε < 1 ∧ x ^ 2 - 4 * ε > 2
have hx : x^2 - 2 > 0 := ⊢ ∃ x, x ^ 2 = 2 All goals completed! 🐙
have hε : 0 < ε := ⊢ ∃ x, x ^ 2 = 2 All goals completed! 🐙
E:Set Real := {y | y ≥ 0 ∧ y ^ 2 < 2}claim1:2 ∈ upperBounds E :=
Eq.mpr (id (congrArg (fun _a => _a) (propext (upperBound_def E 2)))) fun y hy =>
Mathlib.Tactic.Contrapose.contrapose₁
(Eq.mpr
(id
(implies_congr not_le._simp_1
(Eq.trans (Mathlib.Tactic.Push.not_and_eq (0 ≤ y) (y ^ 2 < 2))
(implies_congr (Eq.refl (0 ≤ y)) not_lt._simp_1))))
fun hy hpos =>
Trans.trans
(Trans.trans
(Mathlib.Meta.NormNum.isNat_le_true (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Mathlib.Meta.NormNum.isNat_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2)) (Eq.refl 4))
(Eq.refl true))
(mul_le_mul (le_of_lt hy) (le_of_lt hy)
(le_of_lt
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Eq.refl (Nat.ble 1 2))))
(le_of_lt
(_root_.lt_trans
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Eq.refl (Nat.ble 1 2)))
hy))))
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.mul_congr (Mathlib.Tactic.Ring.atom_pf y) (Mathlib.Tactic.Ring.atom_pf y)
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pp_pf_overlap y
(Mathlib.Meta.NormNum.IsNat.to_raw_eq
(Mathlib.Meta.NormNum.isNat_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.of_raw ℕ 1)
(Mathlib.Meta.NormNum.IsNat.of_raw ℕ 1) (Eq.refl 2)))
(Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (y ^ Nat.rawCast 1 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0))))
(Mathlib.Tactic.Ring.pow_congr (Mathlib.Tactic.Ring.atom_pf y)
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat ℕ (Eq.refl 2)))
(Mathlib.Tactic.Ring.pow_add
(Mathlib.Tactic.Ring.single_pow
(Mathlib.Tactic.Ring.mul_pow (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 2))
(Mathlib.Tactic.Ring.one_pow (Nat.rawCast 2))))
(Mathlib.Tactic.Ring.pow_zero (y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left y (Nat.rawCast 2) (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))))
(Eq.mp
(congrFun'
(congrArg Membership.mem
(congrArg setOf (funext fun y => congrFun' (congrArg And ge_iff_le._simp_1) (y ^ 2 < 2))))
y)
hy)claim1':BddAbove E := Eq.mpr (id (congrArg (fun _a => _a) (propext (bddAbove_def E)))) (Exists.intro 2 claim1)claim2:1 ∈ E :=
of_eq_true
(Eq.trans
(congrFun'
(congrArg Membership.mem
(congrArg setOf (funext fun y => congrFun' (congrArg And ge_iff_le._simp_1) (y ^ 2 < 2))))
1)
(Eq.trans
(congr (congrArg And zero_le_one._simp_1)
(Eq.trans (congrFun' (congrArg LT.lt (one_pow 2)) 2) Nat.one_lt_ofNat._simp_1))
(and_self True)))claim2':E.Nonemptyx:Real :=
match ExtendedReal.sup E with
| ExtendedReal.neg_infty => 0
| ExtendedReal.real x => x
| ExtendedReal.infty => 0claim3:IsLUB E x := exist_sqrt_two._proof_4 claim1' claim2'claim4:x ≥ 1 := exist_sqrt_two._proof_5 claim2 claim3claim5:x ≤ 2 := exist_sqrt_two._proof_6 claim1 claim3claim6:x.IsPos :=
Eq.mpr (id (congrArg (fun _a => _a) (propext (isPos_iff x))))
(lt_of_not_ge fun a =>
Mathlib.Tactic.Linarith.lt_irrefl
(Eq.mp
(congrArg (fun _a => _a < 0)
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.neg_congr
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_one))
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1)))))
Mathlib.Tactic.Ring.neg_zero))
(Mathlib.Tactic.Ring.sub_congr
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_one))
(Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul x (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1))))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_lt (Nat.rawCast 1)
(Mathlib.Tactic.Ring.add_pf_zero_add (x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0)))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0))))
(Mathlib.Tactic.Ring.add_pf_zero_add (x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))
(Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))
(Mathlib.Tactic.Ring.sub_pf Mathlib.Tactic.Ring.neg_zero
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Tactic.Ring.add_overlap_pf_zero x (Nat.rawCast 1)
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0)))))
(Mathlib.Tactic.Ring.add_pf_zero_add 0)))
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))))
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le (neg_neg_of_pos Mathlib.Tactic.Linarith.zero_lt_one)
(Mathlib.Tactic.Linarith.sub_nonpos_of_le claim4))
(Mathlib.Tactic.Linarith.sub_nonpos_of_le a))))h:x ^ 2 > 2ε:Real := min (1 / 2) ((x ^ 2 - 2) / 8)hx:x ^ 2 - 2 > 0 :=
lt_of_not_ge fun a =>
Mathlib.Tactic.Linarith.lt_irrefl
(Eq.mp
(congrArg (fun _a => _a < 0)
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.sub_congr
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2)))
(Mathlib.Tactic.Ring.pow_congr (Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat ℕ (Eq.refl 2)))
(Mathlib.Tactic.Ring.pow_add
(Mathlib.Tactic.Ring.single_pow
(Mathlib.Tactic.Ring.mul_pow (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 2))
(Mathlib.Tactic.Ring.one_pow (Nat.rawCast 2))))
(Mathlib.Tactic.Ring.pow_zero (x ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left x (Nat.rawCast 2) (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul x (Nat.rawCast 2)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1))))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_lt (Nat.rawCast 2)
(Mathlib.Tactic.Ring.add_pf_zero_add (x ^ Nat.rawCast 2 * (Int.negOfNat 1).rawCast + 0)))))
(Mathlib.Tactic.Ring.sub_congr
(Mathlib.Tactic.Ring.sub_congr
(Mathlib.Tactic.Ring.pow_congr (Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat ℕ (Eq.refl 2)))
(Mathlib.Tactic.Ring.pow_add
(Mathlib.Tactic.Ring.single_pow
(Mathlib.Tactic.Ring.mul_pow (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 2))
(Mathlib.Tactic.Ring.one_pow (Nat.rawCast 2))))
(Mathlib.Tactic.Ring.pow_zero (x ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left x (Nat.rawCast 2)
(Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2)))
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 2))
(Eq.refl (Int.negOfNat 2)))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_gt (Int.negOfNat 2).rawCast
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))
(Mathlib.Tactic.Ring.sub_pf Mathlib.Tactic.Ring.neg_zero
(Mathlib.Tactic.Ring.add_pf_add_zero
((Int.negOfNat 2).rawCast + (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 2))
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 2)) (Eq.refl (Int.ofNat 0))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Tactic.Ring.add_overlap_pf_zero x (Nat.rawCast 2)
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0)))))
(Mathlib.Tactic.Ring.add_pf_zero_add 0))))
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))))
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le (Mathlib.Tactic.Linarith.sub_neg_of_lt h)
(Mathlib.Tactic.Linarith.sub_nonpos_of_le a)))hε:0 < ε :=
lt_min
(div_pos
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_one) (Eq.refl (Nat.ble 1 1)))
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2)) (Eq.refl (Nat.ble 1 2))))
(div_pos hx
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 8)) (Eq.refl (Nat.ble 1 8))))hε1:min (1 / 2) ((x ^ 2 - 2) / 8) ≤ 1 / 2⊢ ∃ ε, 0 < ε ∧ ε < 1 ∧ x ^ 2 - 4 * ε > 2
E:Set Real := {y | y ≥ 0 ∧ y ^ 2 < 2}claim1:2 ∈ upperBounds E :=
Eq.mpr (id (congrArg (fun _a => _a) (propext (upperBound_def E 2)))) fun y hy =>
Mathlib.Tactic.Contrapose.contrapose₁
(Eq.mpr
(id
(implies_congr not_le._simp_1
(Eq.trans (Mathlib.Tactic.Push.not_and_eq (0 ≤ y) (y ^ 2 < 2))
(implies_congr (Eq.refl (0 ≤ y)) not_lt._simp_1))))
fun hy hpos =>
Trans.trans
(Trans.trans
(Mathlib.Meta.NormNum.isNat_le_true (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Mathlib.Meta.NormNum.isNat_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2)) (Eq.refl 4))
(Eq.refl true))
(mul_le_mul (le_of_lt hy) (le_of_lt hy)
(le_of_lt
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Eq.refl (Nat.ble 1 2))))
(le_of_lt
(_root_.lt_trans
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Eq.refl (Nat.ble 1 2)))
hy))))
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.mul_congr (Mathlib.Tactic.Ring.atom_pf y) (Mathlib.Tactic.Ring.atom_pf y)
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pp_pf_overlap y
(Mathlib.Meta.NormNum.IsNat.to_raw_eq
(Mathlib.Meta.NormNum.isNat_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.of_raw ℕ 1)
(Mathlib.Meta.NormNum.IsNat.of_raw ℕ 1) (Eq.refl 2)))
(Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (y ^ Nat.rawCast 1 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0))))
(Mathlib.Tactic.Ring.pow_congr (Mathlib.Tactic.Ring.atom_pf y)
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat ℕ (Eq.refl 2)))
(Mathlib.Tactic.Ring.pow_add
(Mathlib.Tactic.Ring.single_pow
(Mathlib.Tactic.Ring.mul_pow (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 2))
(Mathlib.Tactic.Ring.one_pow (Nat.rawCast 2))))
(Mathlib.Tactic.Ring.pow_zero (y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left y (Nat.rawCast 2) (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))))
(Eq.mp
(congrFun'
(congrArg Membership.mem
(congrArg setOf (funext fun y => congrFun' (congrArg And ge_iff_le._simp_1) (y ^ 2 < 2))))
y)
hy)claim1':BddAbove E := Eq.mpr (id (congrArg (fun _a => _a) (propext (bddAbove_def E)))) (Exists.intro 2 claim1)claim2:1 ∈ E :=
of_eq_true
(Eq.trans
(congrFun'
(congrArg Membership.mem
(congrArg setOf (funext fun y => congrFun' (congrArg And ge_iff_le._simp_1) (y ^ 2 < 2))))
1)
(Eq.trans
(congr (congrArg And zero_le_one._simp_1)
(Eq.trans (congrFun' (congrArg LT.lt (one_pow 2)) 2) Nat.one_lt_ofNat._simp_1))
(and_self True)))claim2':E.Nonemptyx:Real :=
match ExtendedReal.sup E with
| ExtendedReal.neg_infty => 0
| ExtendedReal.real x => x
| ExtendedReal.infty => 0claim3:IsLUB E x := exist_sqrt_two._proof_4 claim1' claim2'claim4:x ≥ 1 := exist_sqrt_two._proof_5 claim2 claim3claim5:x ≤ 2 := exist_sqrt_two._proof_6 claim1 claim3claim6:x.IsPos :=
Eq.mpr (id (congrArg (fun _a => _a) (propext (isPos_iff x))))
(lt_of_not_ge fun a =>
Mathlib.Tactic.Linarith.lt_irrefl
(Eq.mp
(congrArg (fun _a => _a < 0)
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.neg_congr
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_one))
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1)))))
Mathlib.Tactic.Ring.neg_zero))
(Mathlib.Tactic.Ring.sub_congr
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_one))
(Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul x (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1))))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_lt (Nat.rawCast 1)
(Mathlib.Tactic.Ring.add_pf_zero_add (x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0)))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0))))
(Mathlib.Tactic.Ring.add_pf_zero_add (x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))
(Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))
(Mathlib.Tactic.Ring.sub_pf Mathlib.Tactic.Ring.neg_zero
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Tactic.Ring.add_overlap_pf_zero x (Nat.rawCast 1)
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0)))))
(Mathlib.Tactic.Ring.add_pf_zero_add 0)))
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))))
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le (neg_neg_of_pos Mathlib.Tactic.Linarith.zero_lt_one)
(Mathlib.Tactic.Linarith.sub_nonpos_of_le claim4))
(Mathlib.Tactic.Linarith.sub_nonpos_of_le a))))h:x ^ 2 > 2ε:Real := min (1 / 2) ((x ^ 2 - 2) / 8)hx:x ^ 2 - 2 > 0 :=
lt_of_not_ge fun a =>
Mathlib.Tactic.Linarith.lt_irrefl
(Eq.mp
(congrArg (fun _a => _a < 0)
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.sub_congr
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2)))
(Mathlib.Tactic.Ring.pow_congr (Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat ℕ (Eq.refl 2)))
(Mathlib.Tactic.Ring.pow_add
(Mathlib.Tactic.Ring.single_pow
(Mathlib.Tactic.Ring.mul_pow (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 2))
(Mathlib.Tactic.Ring.one_pow (Nat.rawCast 2))))
(Mathlib.Tactic.Ring.pow_zero (x ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left x (Nat.rawCast 2) (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul x (Nat.rawCast 2)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1))))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_lt (Nat.rawCast 2)
(Mathlib.Tactic.Ring.add_pf_zero_add (x ^ Nat.rawCast 2 * (Int.negOfNat 1).rawCast + 0)))))
(Mathlib.Tactic.Ring.sub_congr
(Mathlib.Tactic.Ring.sub_congr
(Mathlib.Tactic.Ring.pow_congr (Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat ℕ (Eq.refl 2)))
(Mathlib.Tactic.Ring.pow_add
(Mathlib.Tactic.Ring.single_pow
(Mathlib.Tactic.Ring.mul_pow (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 2))
(Mathlib.Tactic.Ring.one_pow (Nat.rawCast 2))))
(Mathlib.Tactic.Ring.pow_zero (x ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left x (Nat.rawCast 2)
(Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2)))
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 2))
(Eq.refl (Int.negOfNat 2)))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_gt (Int.negOfNat 2).rawCast
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))
(Mathlib.Tactic.Ring.sub_pf Mathlib.Tactic.Ring.neg_zero
(Mathlib.Tactic.Ring.add_pf_add_zero
((Int.negOfNat 2).rawCast + (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 2))
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 2)) (Eq.refl (Int.ofNat 0))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Tactic.Ring.add_overlap_pf_zero x (Nat.rawCast 2)
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0)))))
(Mathlib.Tactic.Ring.add_pf_zero_add 0))))
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))))
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le (Mathlib.Tactic.Linarith.sub_neg_of_lt h)
(Mathlib.Tactic.Linarith.sub_nonpos_of_le a)))hε:0 < ε :=
lt_min
(div_pos
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_one) (Eq.refl (Nat.ble 1 1)))
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2)) (Eq.refl (Nat.ble 1 2))))
(div_pos hx
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 8)) (Eq.refl (Nat.ble 1 8))))hε1:min (1 / 2) ((x ^ 2 - 2) / 8) ≤ 1 / 2hε2:min (1 / 2) ((x ^ 2 - 2) / 8) ≤ (x ^ 2 - 2) / 8⊢ ∃ ε, 0 < ε ∧ ε < 1 ∧ x ^ 2 - 4 * ε > 2
E:Set Real := {y | y ≥ 0 ∧ y ^ 2 < 2}claim1:2 ∈ upperBounds E :=
Eq.mpr (id (congrArg (fun _a => _a) (propext (upperBound_def E 2)))) fun y hy =>
Mathlib.Tactic.Contrapose.contrapose₁
(Eq.mpr
(id
(implies_congr not_le._simp_1
(Eq.trans (Mathlib.Tactic.Push.not_and_eq (0 ≤ y) (y ^ 2 < 2))
(implies_congr (Eq.refl (0 ≤ y)) not_lt._simp_1))))
fun hy hpos =>
Trans.trans
(Trans.trans
(Mathlib.Meta.NormNum.isNat_le_true (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Mathlib.Meta.NormNum.isNat_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2)) (Eq.refl 4))
(Eq.refl true))
(mul_le_mul (le_of_lt hy) (le_of_lt hy)
(le_of_lt
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Eq.refl (Nat.ble 1 2))))
(le_of_lt
(_root_.lt_trans
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Eq.refl (Nat.ble 1 2)))
hy))))
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.mul_congr (Mathlib.Tactic.Ring.atom_pf y) (Mathlib.Tactic.Ring.atom_pf y)
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pp_pf_overlap y
(Mathlib.Meta.NormNum.IsNat.to_raw_eq
(Mathlib.Meta.NormNum.isNat_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.of_raw ℕ 1)
(Mathlib.Meta.NormNum.IsNat.of_raw ℕ 1) (Eq.refl 2)))
(Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (y ^ Nat.rawCast 1 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0))))
(Mathlib.Tactic.Ring.pow_congr (Mathlib.Tactic.Ring.atom_pf y)
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat ℕ (Eq.refl 2)))
(Mathlib.Tactic.Ring.pow_add
(Mathlib.Tactic.Ring.single_pow
(Mathlib.Tactic.Ring.mul_pow (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 2))
(Mathlib.Tactic.Ring.one_pow (Nat.rawCast 2))))
(Mathlib.Tactic.Ring.pow_zero (y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left y (Nat.rawCast 2) (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))))
(Eq.mp
(congrFun'
(congrArg Membership.mem
(congrArg setOf (funext fun y => congrFun' (congrArg And ge_iff_le._simp_1) (y ^ 2 < 2))))
y)
hy)claim1':BddAbove E := Eq.mpr (id (congrArg (fun _a => _a) (propext (bddAbove_def E)))) (Exists.intro 2 claim1)claim2:1 ∈ E :=
of_eq_true
(Eq.trans
(congrFun'
(congrArg Membership.mem
(congrArg setOf (funext fun y => congrFun' (congrArg And ge_iff_le._simp_1) (y ^ 2 < 2))))
1)
(Eq.trans
(congr (congrArg And zero_le_one._simp_1)
(Eq.trans (congrFun' (congrArg LT.lt (one_pow 2)) 2) Nat.one_lt_ofNat._simp_1))
(and_self True)))claim2':E.Nonemptyx:Real :=
match ExtendedReal.sup E with
| ExtendedReal.neg_infty => 0
| ExtendedReal.real x => x
| ExtendedReal.infty => 0claim3:IsLUB E x := exist_sqrt_two._proof_4 claim1' claim2'claim4:x ≥ 1 := exist_sqrt_two._proof_5 claim2 claim3claim5:x ≤ 2 := exist_sqrt_two._proof_6 claim1 claim3claim6:x.IsPos :=
Eq.mpr (id (congrArg (fun _a => _a) (propext (isPos_iff x))))
(lt_of_not_ge fun a =>
Mathlib.Tactic.Linarith.lt_irrefl
(Eq.mp
(congrArg (fun _a => _a < 0)
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.neg_congr
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_one))
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1)))))
Mathlib.Tactic.Ring.neg_zero))
(Mathlib.Tactic.Ring.sub_congr
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_one))
(Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul x (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1))))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_lt (Nat.rawCast 1)
(Mathlib.Tactic.Ring.add_pf_zero_add (x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0)))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0))))
(Mathlib.Tactic.Ring.add_pf_zero_add (x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))
(Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))
(Mathlib.Tactic.Ring.sub_pf Mathlib.Tactic.Ring.neg_zero
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Tactic.Ring.add_overlap_pf_zero x (Nat.rawCast 1)
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0)))))
(Mathlib.Tactic.Ring.add_pf_zero_add 0)))
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))))
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le (neg_neg_of_pos Mathlib.Tactic.Linarith.zero_lt_one)
(Mathlib.Tactic.Linarith.sub_nonpos_of_le claim4))
(Mathlib.Tactic.Linarith.sub_nonpos_of_le a))))h:x ^ 2 > 2ε:Real := min (1 / 2) ((x ^ 2 - 2) / 8)hx:x ^ 2 - 2 > 0 :=
lt_of_not_ge fun a =>
Mathlib.Tactic.Linarith.lt_irrefl
(Eq.mp
(congrArg (fun _a => _a < 0)
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.sub_congr
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2)))
(Mathlib.Tactic.Ring.pow_congr (Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat ℕ (Eq.refl 2)))
(Mathlib.Tactic.Ring.pow_add
(Mathlib.Tactic.Ring.single_pow
(Mathlib.Tactic.Ring.mul_pow (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 2))
(Mathlib.Tactic.Ring.one_pow (Nat.rawCast 2))))
(Mathlib.Tactic.Ring.pow_zero (x ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left x (Nat.rawCast 2) (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul x (Nat.rawCast 2)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1))))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_lt (Nat.rawCast 2)
(Mathlib.Tactic.Ring.add_pf_zero_add (x ^ Nat.rawCast 2 * (Int.negOfNat 1).rawCast + 0)))))
(Mathlib.Tactic.Ring.sub_congr
(Mathlib.Tactic.Ring.sub_congr
(Mathlib.Tactic.Ring.pow_congr (Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat ℕ (Eq.refl 2)))
(Mathlib.Tactic.Ring.pow_add
(Mathlib.Tactic.Ring.single_pow
(Mathlib.Tactic.Ring.mul_pow (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 2))
(Mathlib.Tactic.Ring.one_pow (Nat.rawCast 2))))
(Mathlib.Tactic.Ring.pow_zero (x ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left x (Nat.rawCast 2)
(Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2)))
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 2))
(Eq.refl (Int.negOfNat 2)))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_gt (Int.negOfNat 2).rawCast
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))
(Mathlib.Tactic.Ring.sub_pf Mathlib.Tactic.Ring.neg_zero
(Mathlib.Tactic.Ring.add_pf_add_zero
((Int.negOfNat 2).rawCast + (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 2))
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 2)) (Eq.refl (Int.ofNat 0))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Tactic.Ring.add_overlap_pf_zero x (Nat.rawCast 2)
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0)))))
(Mathlib.Tactic.Ring.add_pf_zero_add 0))))
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))))
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le (Mathlib.Tactic.Linarith.sub_neg_of_lt h)
(Mathlib.Tactic.Linarith.sub_nonpos_of_le a)))hε:0 < ε :=
lt_min
(div_pos
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_one) (Eq.refl (Nat.ble 1 1)))
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2)) (Eq.refl (Nat.ble 1 2))))
(div_pos hx
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 8)) (Eq.refl (Nat.ble 1 8))))hε1:min (1 / 2) ((x ^ 2 - 2) / 8) ≤ 1 / 2hε2:min (1 / 2) ((x ^ 2 - 2) / 8) ≤ (x ^ 2 - 2) / 8⊢ ε < 1E:Set Real := {y | y ≥ 0 ∧ y ^ 2 < 2}claim1:2 ∈ upperBounds E :=
Eq.mpr (id (congrArg (fun _a => _a) (propext (upperBound_def E 2)))) fun y hy =>
Mathlib.Tactic.Contrapose.contrapose₁
(Eq.mpr
(id
(implies_congr not_le._simp_1
(Eq.trans (Mathlib.Tactic.Push.not_and_eq (0 ≤ y) (y ^ 2 < 2))
(implies_congr (Eq.refl (0 ≤ y)) not_lt._simp_1))))
fun hy hpos =>
Trans.trans
(Trans.trans
(Mathlib.Meta.NormNum.isNat_le_true (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Mathlib.Meta.NormNum.isNat_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2)) (Eq.refl 4))
(Eq.refl true))
(mul_le_mul (le_of_lt hy) (le_of_lt hy)
(le_of_lt
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Eq.refl (Nat.ble 1 2))))
(le_of_lt
(_root_.lt_trans
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Eq.refl (Nat.ble 1 2)))
hy))))
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.mul_congr (Mathlib.Tactic.Ring.atom_pf y) (Mathlib.Tactic.Ring.atom_pf y)
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pp_pf_overlap y
(Mathlib.Meta.NormNum.IsNat.to_raw_eq
(Mathlib.Meta.NormNum.isNat_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.of_raw ℕ 1)
(Mathlib.Meta.NormNum.IsNat.of_raw ℕ 1) (Eq.refl 2)))
(Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (y ^ Nat.rawCast 1 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0))))
(Mathlib.Tactic.Ring.pow_congr (Mathlib.Tactic.Ring.atom_pf y)
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat ℕ (Eq.refl 2)))
(Mathlib.Tactic.Ring.pow_add
(Mathlib.Tactic.Ring.single_pow
(Mathlib.Tactic.Ring.mul_pow (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 2))
(Mathlib.Tactic.Ring.one_pow (Nat.rawCast 2))))
(Mathlib.Tactic.Ring.pow_zero (y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left y (Nat.rawCast 2) (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))))
(Eq.mp
(congrFun'
(congrArg Membership.mem
(congrArg setOf (funext fun y => congrFun' (congrArg And ge_iff_le._simp_1) (y ^ 2 < 2))))
y)
hy)claim1':BddAbove E := Eq.mpr (id (congrArg (fun _a => _a) (propext (bddAbove_def E)))) (Exists.intro 2 claim1)claim2:1 ∈ E :=
of_eq_true
(Eq.trans
(congrFun'
(congrArg Membership.mem
(congrArg setOf (funext fun y => congrFun' (congrArg And ge_iff_le._simp_1) (y ^ 2 < 2))))
1)
(Eq.trans
(congr (congrArg And zero_le_one._simp_1)
(Eq.trans (congrFun' (congrArg LT.lt (one_pow 2)) 2) Nat.one_lt_ofNat._simp_1))
(and_self True)))claim2':E.Nonemptyx:Real :=
match ExtendedReal.sup E with
| ExtendedReal.neg_infty => 0
| ExtendedReal.real x => x
| ExtendedReal.infty => 0claim3:IsLUB E x := exist_sqrt_two._proof_4 claim1' claim2'claim4:x ≥ 1 := exist_sqrt_two._proof_5 claim2 claim3claim5:x ≤ 2 := exist_sqrt_two._proof_6 claim1 claim3claim6:x.IsPos :=
Eq.mpr (id (congrArg (fun _a => _a) (propext (isPos_iff x))))
(lt_of_not_ge fun a =>
Mathlib.Tactic.Linarith.lt_irrefl
(Eq.mp
(congrArg (fun _a => _a < 0)
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.neg_congr
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_one))
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1)))))
Mathlib.Tactic.Ring.neg_zero))
(Mathlib.Tactic.Ring.sub_congr
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_one))
(Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul x (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1))))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_lt (Nat.rawCast 1)
(Mathlib.Tactic.Ring.add_pf_zero_add (x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0)))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0))))
(Mathlib.Tactic.Ring.add_pf_zero_add (x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))
(Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))
(Mathlib.Tactic.Ring.sub_pf Mathlib.Tactic.Ring.neg_zero
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Tactic.Ring.add_overlap_pf_zero x (Nat.rawCast 1)
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0)))))
(Mathlib.Tactic.Ring.add_pf_zero_add 0)))
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))))
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le (neg_neg_of_pos Mathlib.Tactic.Linarith.zero_lt_one)
(Mathlib.Tactic.Linarith.sub_nonpos_of_le claim4))
(Mathlib.Tactic.Linarith.sub_nonpos_of_le a))))h:x ^ 2 > 2ε:Real := min (1 / 2) ((x ^ 2 - 2) / 8)hx:x ^ 2 - 2 > 0 :=
lt_of_not_ge fun a =>
Mathlib.Tactic.Linarith.lt_irrefl
(Eq.mp
(congrArg (fun _a => _a < 0)
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.sub_congr
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2)))
(Mathlib.Tactic.Ring.pow_congr (Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat ℕ (Eq.refl 2)))
(Mathlib.Tactic.Ring.pow_add
(Mathlib.Tactic.Ring.single_pow
(Mathlib.Tactic.Ring.mul_pow (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 2))
(Mathlib.Tactic.Ring.one_pow (Nat.rawCast 2))))
(Mathlib.Tactic.Ring.pow_zero (x ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left x (Nat.rawCast 2) (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul x (Nat.rawCast 2)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1))))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_lt (Nat.rawCast 2)
(Mathlib.Tactic.Ring.add_pf_zero_add (x ^ Nat.rawCast 2 * (Int.negOfNat 1).rawCast + 0)))))
(Mathlib.Tactic.Ring.sub_congr
(Mathlib.Tactic.Ring.sub_congr
(Mathlib.Tactic.Ring.pow_congr (Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat ℕ (Eq.refl 2)))
(Mathlib.Tactic.Ring.pow_add
(Mathlib.Tactic.Ring.single_pow
(Mathlib.Tactic.Ring.mul_pow (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 2))
(Mathlib.Tactic.Ring.one_pow (Nat.rawCast 2))))
(Mathlib.Tactic.Ring.pow_zero (x ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left x (Nat.rawCast 2)
(Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2)))
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 2))
(Eq.refl (Int.negOfNat 2)))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_gt (Int.negOfNat 2).rawCast
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))
(Mathlib.Tactic.Ring.sub_pf Mathlib.Tactic.Ring.neg_zero
(Mathlib.Tactic.Ring.add_pf_add_zero
((Int.negOfNat 2).rawCast + (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 2))
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 2)) (Eq.refl (Int.ofNat 0))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Tactic.Ring.add_overlap_pf_zero x (Nat.rawCast 2)
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0)))))
(Mathlib.Tactic.Ring.add_pf_zero_add 0))))
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))))
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le (Mathlib.Tactic.Linarith.sub_neg_of_lt h)
(Mathlib.Tactic.Linarith.sub_nonpos_of_le a)))hε:0 < ε :=
lt_min
(div_pos
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_one) (Eq.refl (Nat.ble 1 1)))
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2)) (Eq.refl (Nat.ble 1 2))))
(div_pos hx
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 8)) (Eq.refl (Nat.ble 1 8))))hε1:min (1 / 2) ((x ^ 2 - 2) / 8) ≤ 1 / 2hε2:min (1 / 2) ((x ^ 2 - 2) / 8) ≤ (x ^ 2 - 2) / 8⊢ x ^ 2 - 4 * ε > 2 E:Set Real := {y | y ≥ 0 ∧ y ^ 2 < 2}claim1:2 ∈ upperBounds E :=
Eq.mpr (id (congrArg (fun _a => _a) (propext (upperBound_def E 2)))) fun y hy =>
Mathlib.Tactic.Contrapose.contrapose₁
(Eq.mpr
(id
(implies_congr not_le._simp_1
(Eq.trans (Mathlib.Tactic.Push.not_and_eq (0 ≤ y) (y ^ 2 < 2))
(implies_congr (Eq.refl (0 ≤ y)) not_lt._simp_1))))
fun hy hpos =>
Trans.trans
(Trans.trans
(Mathlib.Meta.NormNum.isNat_le_true (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Mathlib.Meta.NormNum.isNat_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2)) (Eq.refl 4))
(Eq.refl true))
(mul_le_mul (le_of_lt hy) (le_of_lt hy)
(le_of_lt
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Eq.refl (Nat.ble 1 2))))
(le_of_lt
(_root_.lt_trans
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Eq.refl (Nat.ble 1 2)))
hy))))
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.mul_congr (Mathlib.Tactic.Ring.atom_pf y) (Mathlib.Tactic.Ring.atom_pf y)
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pp_pf_overlap y
(Mathlib.Meta.NormNum.IsNat.to_raw_eq
(Mathlib.Meta.NormNum.isNat_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.of_raw ℕ 1)
(Mathlib.Meta.NormNum.IsNat.of_raw ℕ 1) (Eq.refl 2)))
(Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (y ^ Nat.rawCast 1 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0))))
(Mathlib.Tactic.Ring.pow_congr (Mathlib.Tactic.Ring.atom_pf y)
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat ℕ (Eq.refl 2)))
(Mathlib.Tactic.Ring.pow_add
(Mathlib.Tactic.Ring.single_pow
(Mathlib.Tactic.Ring.mul_pow (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 2))
(Mathlib.Tactic.Ring.one_pow (Nat.rawCast 2))))
(Mathlib.Tactic.Ring.pow_zero (y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left y (Nat.rawCast 2) (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))))
(Eq.mp
(congrFun'
(congrArg Membership.mem
(congrArg setOf (funext fun y => congrFun' (congrArg And ge_iff_le._simp_1) (y ^ 2 < 2))))
y)
hy)claim1':BddAbove E := Eq.mpr (id (congrArg (fun _a => _a) (propext (bddAbove_def E)))) (Exists.intro 2 claim1)claim2:1 ∈ E :=
of_eq_true
(Eq.trans
(congrFun'
(congrArg Membership.mem
(congrArg setOf (funext fun y => congrFun' (congrArg And ge_iff_le._simp_1) (y ^ 2 < 2))))
1)
(Eq.trans
(congr (congrArg And zero_le_one._simp_1)
(Eq.trans (congrFun' (congrArg LT.lt (one_pow 2)) 2) Nat.one_lt_ofNat._simp_1))
(and_self True)))claim2':E.Nonemptyx:Real :=
match ExtendedReal.sup E with
| ExtendedReal.neg_infty => 0
| ExtendedReal.real x => x
| ExtendedReal.infty => 0claim3:IsLUB E x := exist_sqrt_two._proof_4 claim1' claim2'claim4:x ≥ 1 := exist_sqrt_two._proof_5 claim2 claim3claim5:x ≤ 2 := exist_sqrt_two._proof_6 claim1 claim3claim6:x.IsPos :=
Eq.mpr (id (congrArg (fun _a => _a) (propext (isPos_iff x))))
(lt_of_not_ge fun a =>
Mathlib.Tactic.Linarith.lt_irrefl
(Eq.mp
(congrArg (fun _a => _a < 0)
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.neg_congr
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_one))
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1)))))
Mathlib.Tactic.Ring.neg_zero))
(Mathlib.Tactic.Ring.sub_congr
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_one))
(Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul x (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1))))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_lt (Nat.rawCast 1)
(Mathlib.Tactic.Ring.add_pf_zero_add (x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0)))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0))))
(Mathlib.Tactic.Ring.add_pf_zero_add (x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))
(Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))
(Mathlib.Tactic.Ring.sub_pf Mathlib.Tactic.Ring.neg_zero
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Tactic.Ring.add_overlap_pf_zero x (Nat.rawCast 1)
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0)))))
(Mathlib.Tactic.Ring.add_pf_zero_add 0)))
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))))
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le (neg_neg_of_pos Mathlib.Tactic.Linarith.zero_lt_one)
(Mathlib.Tactic.Linarith.sub_nonpos_of_le claim4))
(Mathlib.Tactic.Linarith.sub_nonpos_of_le a))))h:x ^ 2 > 2ε:Real := min (1 / 2) ((x ^ 2 - 2) / 8)hx:x ^ 2 - 2 > 0 :=
lt_of_not_ge fun a =>
Mathlib.Tactic.Linarith.lt_irrefl
(Eq.mp
(congrArg (fun _a => _a < 0)
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.sub_congr
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2)))
(Mathlib.Tactic.Ring.pow_congr (Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat ℕ (Eq.refl 2)))
(Mathlib.Tactic.Ring.pow_add
(Mathlib.Tactic.Ring.single_pow
(Mathlib.Tactic.Ring.mul_pow (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 2))
(Mathlib.Tactic.Ring.one_pow (Nat.rawCast 2))))
(Mathlib.Tactic.Ring.pow_zero (x ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left x (Nat.rawCast 2) (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul x (Nat.rawCast 2)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1))))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_lt (Nat.rawCast 2)
(Mathlib.Tactic.Ring.add_pf_zero_add (x ^ Nat.rawCast 2 * (Int.negOfNat 1).rawCast + 0)))))
(Mathlib.Tactic.Ring.sub_congr
(Mathlib.Tactic.Ring.sub_congr
(Mathlib.Tactic.Ring.pow_congr (Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat ℕ (Eq.refl 2)))
(Mathlib.Tactic.Ring.pow_add
(Mathlib.Tactic.Ring.single_pow
(Mathlib.Tactic.Ring.mul_pow (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 2))
(Mathlib.Tactic.Ring.one_pow (Nat.rawCast 2))))
(Mathlib.Tactic.Ring.pow_zero (x ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left x (Nat.rawCast 2)
(Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2)))
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 2))
(Eq.refl (Int.negOfNat 2)))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_gt (Int.negOfNat 2).rawCast
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))
(Mathlib.Tactic.Ring.sub_pf Mathlib.Tactic.Ring.neg_zero
(Mathlib.Tactic.Ring.add_pf_add_zero
((Int.negOfNat 2).rawCast + (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 2))
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 2)) (Eq.refl (Int.ofNat 0))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Tactic.Ring.add_overlap_pf_zero x (Nat.rawCast 2)
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0)))))
(Mathlib.Tactic.Ring.add_pf_zero_add 0))))
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))))
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le (Mathlib.Tactic.Linarith.sub_neg_of_lt h)
(Mathlib.Tactic.Linarith.sub_nonpos_of_le a)))hε:0 < ε :=
lt_min
(div_pos
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_one) (Eq.refl (Nat.ble 1 1)))
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2)) (Eq.refl (Nat.ble 1 2))))
(div_pos hx
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 8)) (Eq.refl (Nat.ble 1 8))))hε1:min (1 / 2) ((x ^ 2 - 2) / 8) ≤ 1 / 2hε2:min (1 / 2) ((x ^ 2 - 2) / 8) ≤ (x ^ 2 - 2) / 8⊢ ε < 1E:Set Real := {y | y ≥ 0 ∧ y ^ 2 < 2}claim1:2 ∈ upperBounds E :=
Eq.mpr (id (congrArg (fun _a => _a) (propext (upperBound_def E 2)))) fun y hy =>
Mathlib.Tactic.Contrapose.contrapose₁
(Eq.mpr
(id
(implies_congr not_le._simp_1
(Eq.trans (Mathlib.Tactic.Push.not_and_eq (0 ≤ y) (y ^ 2 < 2))
(implies_congr (Eq.refl (0 ≤ y)) not_lt._simp_1))))
fun hy hpos =>
Trans.trans
(Trans.trans
(Mathlib.Meta.NormNum.isNat_le_true (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Mathlib.Meta.NormNum.isNat_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2)) (Eq.refl 4))
(Eq.refl true))
(mul_le_mul (le_of_lt hy) (le_of_lt hy)
(le_of_lt
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Eq.refl (Nat.ble 1 2))))
(le_of_lt
(_root_.lt_trans
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Eq.refl (Nat.ble 1 2)))
hy))))
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.mul_congr (Mathlib.Tactic.Ring.atom_pf y) (Mathlib.Tactic.Ring.atom_pf y)
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pp_pf_overlap y
(Mathlib.Meta.NormNum.IsNat.to_raw_eq
(Mathlib.Meta.NormNum.isNat_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.of_raw ℕ 1)
(Mathlib.Meta.NormNum.IsNat.of_raw ℕ 1) (Eq.refl 2)))
(Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (y ^ Nat.rawCast 1 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0))))
(Mathlib.Tactic.Ring.pow_congr (Mathlib.Tactic.Ring.atom_pf y)
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat ℕ (Eq.refl 2)))
(Mathlib.Tactic.Ring.pow_add
(Mathlib.Tactic.Ring.single_pow
(Mathlib.Tactic.Ring.mul_pow (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 2))
(Mathlib.Tactic.Ring.one_pow (Nat.rawCast 2))))
(Mathlib.Tactic.Ring.pow_zero (y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left y (Nat.rawCast 2) (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))))
(Eq.mp
(congrFun'
(congrArg Membership.mem
(congrArg setOf (funext fun y => congrFun' (congrArg And ge_iff_le._simp_1) (y ^ 2 < 2))))
y)
hy)claim1':BddAbove E := Eq.mpr (id (congrArg (fun _a => _a) (propext (bddAbove_def E)))) (Exists.intro 2 claim1)claim2:1 ∈ E :=
of_eq_true
(Eq.trans
(congrFun'
(congrArg Membership.mem
(congrArg setOf (funext fun y => congrFun' (congrArg And ge_iff_le._simp_1) (y ^ 2 < 2))))
1)
(Eq.trans
(congr (congrArg And zero_le_one._simp_1)
(Eq.trans (congrFun' (congrArg LT.lt (one_pow 2)) 2) Nat.one_lt_ofNat._simp_1))
(and_self True)))claim2':E.Nonemptyx:Real :=
match ExtendedReal.sup E with
| ExtendedReal.neg_infty => 0
| ExtendedReal.real x => x
| ExtendedReal.infty => 0claim3:IsLUB E x := exist_sqrt_two._proof_4 claim1' claim2'claim4:x ≥ 1 := exist_sqrt_two._proof_5 claim2 claim3claim5:x ≤ 2 := exist_sqrt_two._proof_6 claim1 claim3claim6:x.IsPos :=
Eq.mpr (id (congrArg (fun _a => _a) (propext (isPos_iff x))))
(lt_of_not_ge fun a =>
Mathlib.Tactic.Linarith.lt_irrefl
(Eq.mp
(congrArg (fun _a => _a < 0)
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.neg_congr
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_one))
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1)))))
Mathlib.Tactic.Ring.neg_zero))
(Mathlib.Tactic.Ring.sub_congr
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_one))
(Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul x (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1))))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_lt (Nat.rawCast 1)
(Mathlib.Tactic.Ring.add_pf_zero_add (x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0)))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0))))
(Mathlib.Tactic.Ring.add_pf_zero_add (x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))
(Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))
(Mathlib.Tactic.Ring.sub_pf Mathlib.Tactic.Ring.neg_zero
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Tactic.Ring.add_overlap_pf_zero x (Nat.rawCast 1)
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0)))))
(Mathlib.Tactic.Ring.add_pf_zero_add 0)))
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))))
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le (neg_neg_of_pos Mathlib.Tactic.Linarith.zero_lt_one)
(Mathlib.Tactic.Linarith.sub_nonpos_of_le claim4))
(Mathlib.Tactic.Linarith.sub_nonpos_of_le a))))h:x ^ 2 > 2ε:Real := min (1 / 2) ((x ^ 2 - 2) / 8)hx:x ^ 2 - 2 > 0 :=
lt_of_not_ge fun a =>
Mathlib.Tactic.Linarith.lt_irrefl
(Eq.mp
(congrArg (fun _a => _a < 0)
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.sub_congr
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2)))
(Mathlib.Tactic.Ring.pow_congr (Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat ℕ (Eq.refl 2)))
(Mathlib.Tactic.Ring.pow_add
(Mathlib.Tactic.Ring.single_pow
(Mathlib.Tactic.Ring.mul_pow (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 2))
(Mathlib.Tactic.Ring.one_pow (Nat.rawCast 2))))
(Mathlib.Tactic.Ring.pow_zero (x ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left x (Nat.rawCast 2) (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul x (Nat.rawCast 2)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1))))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_lt (Nat.rawCast 2)
(Mathlib.Tactic.Ring.add_pf_zero_add (x ^ Nat.rawCast 2 * (Int.negOfNat 1).rawCast + 0)))))
(Mathlib.Tactic.Ring.sub_congr
(Mathlib.Tactic.Ring.sub_congr
(Mathlib.Tactic.Ring.pow_congr (Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat ℕ (Eq.refl 2)))
(Mathlib.Tactic.Ring.pow_add
(Mathlib.Tactic.Ring.single_pow
(Mathlib.Tactic.Ring.mul_pow (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 2))
(Mathlib.Tactic.Ring.one_pow (Nat.rawCast 2))))
(Mathlib.Tactic.Ring.pow_zero (x ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left x (Nat.rawCast 2)
(Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2)))
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 2))
(Eq.refl (Int.negOfNat 2)))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_gt (Int.negOfNat 2).rawCast
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))
(Mathlib.Tactic.Ring.sub_pf Mathlib.Tactic.Ring.neg_zero
(Mathlib.Tactic.Ring.add_pf_add_zero
((Int.negOfNat 2).rawCast + (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 2))
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 2)) (Eq.refl (Int.ofNat 0))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Tactic.Ring.add_overlap_pf_zero x (Nat.rawCast 2)
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0)))))
(Mathlib.Tactic.Ring.add_pf_zero_add 0))))
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))))
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le (Mathlib.Tactic.Linarith.sub_neg_of_lt h)
(Mathlib.Tactic.Linarith.sub_nonpos_of_le a)))hε:0 < ε :=
lt_min
(div_pos
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_one) (Eq.refl (Nat.ble 1 1)))
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2)) (Eq.refl (Nat.ble 1 2))))
(div_pos hx
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 8)) (Eq.refl (Nat.ble 1 8))))hε1:min (1 / 2) ((x ^ 2 - 2) / 8) ≤ 1 / 2hε2:min (1 / 2) ((x ^ 2 - 2) / 8) ≤ (x ^ 2 - 2) / 8⊢ x ^ 2 - 4 * ε > 2 All goals completed! 🐙
E:Set Real := {y | y ≥ 0 ∧ y ^ 2 < 2}claim1:2 ∈ upperBounds E :=
Eq.mpr (id (congrArg (fun _a => _a) (propext (upperBound_def E 2)))) fun y hy =>
Mathlib.Tactic.Contrapose.contrapose₁
(Eq.mpr
(id
(implies_congr not_le._simp_1
(Eq.trans (Mathlib.Tactic.Push.not_and_eq (0 ≤ y) (y ^ 2 < 2))
(implies_congr (Eq.refl (0 ≤ y)) not_lt._simp_1))))
fun hy hpos =>
Trans.trans
(Trans.trans
(Mathlib.Meta.NormNum.isNat_le_true (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Mathlib.Meta.NormNum.isNat_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2)) (Eq.refl 4))
(Eq.refl true))
(mul_le_mul (le_of_lt hy) (le_of_lt hy)
(le_of_lt
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Eq.refl (Nat.ble 1 2))))
(le_of_lt
(_root_.lt_trans
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Eq.refl (Nat.ble 1 2)))
hy))))
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.mul_congr (Mathlib.Tactic.Ring.atom_pf y) (Mathlib.Tactic.Ring.atom_pf y)
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pp_pf_overlap y
(Mathlib.Meta.NormNum.IsNat.to_raw_eq
(Mathlib.Meta.NormNum.isNat_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.of_raw ℕ 1)
(Mathlib.Meta.NormNum.IsNat.of_raw ℕ 1) (Eq.refl 2)))
(Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (y ^ Nat.rawCast 1 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0))))
(Mathlib.Tactic.Ring.pow_congr (Mathlib.Tactic.Ring.atom_pf y)
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat ℕ (Eq.refl 2)))
(Mathlib.Tactic.Ring.pow_add
(Mathlib.Tactic.Ring.single_pow
(Mathlib.Tactic.Ring.mul_pow (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 2))
(Mathlib.Tactic.Ring.one_pow (Nat.rawCast 2))))
(Mathlib.Tactic.Ring.pow_zero (y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left y (Nat.rawCast 2) (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))))
(Eq.mp
(congrFun'
(congrArg Membership.mem
(congrArg setOf (funext fun y => congrFun' (congrArg And ge_iff_le._simp_1) (y ^ 2 < 2))))
y)
hy)claim1':BddAbove E := Eq.mpr (id (congrArg (fun _a => _a) (propext (bddAbove_def E)))) (Exists.intro 2 claim1)claim2:1 ∈ E :=
of_eq_true
(Eq.trans
(congrFun'
(congrArg Membership.mem
(congrArg setOf (funext fun y => congrFun' (congrArg And ge_iff_le._simp_1) (y ^ 2 < 2))))
1)
(Eq.trans
(congr (congrArg And zero_le_one._simp_1)
(Eq.trans (congrFun' (congrArg LT.lt (one_pow 2)) 2) Nat.one_lt_ofNat._simp_1))
(and_self True)))claim2':E.Nonemptyx:Real :=
match ExtendedReal.sup E with
| ExtendedReal.neg_infty => 0
| ExtendedReal.real x => x
| ExtendedReal.infty => 0claim3:IsLUB E x := exist_sqrt_two._proof_4 claim1' claim2'claim4:x ≥ 1 := exist_sqrt_two._proof_5 claim2 claim3claim5:x ≤ 2 := exist_sqrt_two._proof_6 claim1 claim3claim6:x.IsPos :=
Eq.mpr (id (congrArg (fun _a => _a) (propext (isPos_iff x))))
(lt_of_not_ge fun a =>
Mathlib.Tactic.Linarith.lt_irrefl
(Eq.mp
(congrArg (fun _a => _a < 0)
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.neg_congr
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_one))
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1)))))
Mathlib.Tactic.Ring.neg_zero))
(Mathlib.Tactic.Ring.sub_congr
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_one))
(Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul x (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1))))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_lt (Nat.rawCast 1)
(Mathlib.Tactic.Ring.add_pf_zero_add (x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0)))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0))))
(Mathlib.Tactic.Ring.add_pf_zero_add (x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))
(Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))
(Mathlib.Tactic.Ring.sub_pf Mathlib.Tactic.Ring.neg_zero
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Tactic.Ring.add_overlap_pf_zero x (Nat.rawCast 1)
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0)))))
(Mathlib.Tactic.Ring.add_pf_zero_add 0)))
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))))
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le (neg_neg_of_pos Mathlib.Tactic.Linarith.zero_lt_one)
(Mathlib.Tactic.Linarith.sub_nonpos_of_le claim4))
(Mathlib.Tactic.Linarith.sub_nonpos_of_le a))))h:x ^ 2 > 2ε:Realhε1:0 < εhε2:ε < 1hε3:x ^ 2 - 4 * ε > 2⊢ x ^ 2 = 2
have claim12: (x-ε)^2 > 2 := calc
_ = x^2 - 2 * ε * x + ε * ε := E:Set Real := {y | y ≥ 0 ∧ y ^ 2 < 2}claim1:2 ∈ upperBounds E :=
Eq.mpr (id (congrArg (fun _a => _a) (propext (upperBound_def E 2)))) fun y hy =>
Mathlib.Tactic.Contrapose.contrapose₁
(Eq.mpr
(id
(implies_congr not_le._simp_1
(Eq.trans (Mathlib.Tactic.Push.not_and_eq (0 ≤ y) (y ^ 2 < 2))
(implies_congr (Eq.refl (0 ≤ y)) not_lt._simp_1))))
fun hy hpos =>
Trans.trans
(Trans.trans
(Mathlib.Meta.NormNum.isNat_le_true (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Mathlib.Meta.NormNum.isNat_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2)) (Eq.refl 4))
(Eq.refl true))
(mul_le_mul (le_of_lt hy) (le_of_lt hy)
(le_of_lt
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Eq.refl (Nat.ble 1 2))))
(le_of_lt
(_root_.lt_trans
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Eq.refl (Nat.ble 1 2)))
hy))))
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.mul_congr (Mathlib.Tactic.Ring.atom_pf y) (Mathlib.Tactic.Ring.atom_pf y)
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pp_pf_overlap y
(Mathlib.Meta.NormNum.IsNat.to_raw_eq
(Mathlib.Meta.NormNum.isNat_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.of_raw ℕ 1)
(Mathlib.Meta.NormNum.IsNat.of_raw ℕ 1) (Eq.refl 2)))
(Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (y ^ Nat.rawCast 1 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0))))
(Mathlib.Tactic.Ring.pow_congr (Mathlib.Tactic.Ring.atom_pf y)
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat ℕ (Eq.refl 2)))
(Mathlib.Tactic.Ring.pow_add
(Mathlib.Tactic.Ring.single_pow
(Mathlib.Tactic.Ring.mul_pow (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 2))
(Mathlib.Tactic.Ring.one_pow (Nat.rawCast 2))))
(Mathlib.Tactic.Ring.pow_zero (y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left y (Nat.rawCast 2) (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))))
(Eq.mp
(congrFun'
(congrArg Membership.mem
(congrArg setOf (funext fun y => congrFun' (congrArg And ge_iff_le._simp_1) (y ^ 2 < 2))))
y)
hy)claim1':BddAbove E := Eq.mpr (id (congrArg (fun _a => _a) (propext (bddAbove_def E)))) (Exists.intro 2 claim1)claim2:1 ∈ E :=
of_eq_true
(Eq.trans
(congrFun'
(congrArg Membership.mem
(congrArg setOf (funext fun y => congrFun' (congrArg And ge_iff_le._simp_1) (y ^ 2 < 2))))
1)
(Eq.trans
(congr (congrArg And zero_le_one._simp_1)
(Eq.trans (congrFun' (congrArg LT.lt (one_pow 2)) 2) Nat.one_lt_ofNat._simp_1))
(and_self True)))claim2':E.Nonemptyx:Real :=
match ExtendedReal.sup E with
| ExtendedReal.neg_infty => 0
| ExtendedReal.real x => x
| ExtendedReal.infty => 0claim3:IsLUB E x := exist_sqrt_two._proof_4 claim1' claim2'claim4:x ≥ 1 := exist_sqrt_two._proof_5 claim2 claim3claim5:x ≤ 2 := exist_sqrt_two._proof_6 claim1 claim3claim6:x.IsPos :=
Eq.mpr (id (congrArg (fun _a => _a) (propext (isPos_iff x))))
(lt_of_not_ge fun a =>
Mathlib.Tactic.Linarith.lt_irrefl
(Eq.mp
(congrArg (fun _a => _a < 0)
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.neg_congr
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_one))
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1)))))
Mathlib.Tactic.Ring.neg_zero))
(Mathlib.Tactic.Ring.sub_congr
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_one))
(Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul x (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1))))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_lt (Nat.rawCast 1)
(Mathlib.Tactic.Ring.add_pf_zero_add (x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0)))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0))))
(Mathlib.Tactic.Ring.add_pf_zero_add (x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))
(Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))
(Mathlib.Tactic.Ring.sub_pf Mathlib.Tactic.Ring.neg_zero
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Tactic.Ring.add_overlap_pf_zero x (Nat.rawCast 1)
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0)))))
(Mathlib.Tactic.Ring.add_pf_zero_add 0)))
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))))
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le (neg_neg_of_pos Mathlib.Tactic.Linarith.zero_lt_one)
(Mathlib.Tactic.Linarith.sub_nonpos_of_le claim4))
(Mathlib.Tactic.Linarith.sub_nonpos_of_le a))))h:x ^ 2 > 2ε:Realhε1:0 < εhε2:ε < 1hε3:x ^ 2 - 4 * ε > 2⊢ (x - ε) ^ 2 = x ^ 2 - 2 * ε * x + ε * ε All goals completed! 🐙
_ ≥ x^2 - 2 * ε * 2 + 0 * 0 := E:Set Real := {y | y ≥ 0 ∧ y ^ 2 < 2}claim1:2 ∈ upperBounds E :=
Eq.mpr (id (congrArg (fun _a => _a) (propext (upperBound_def E 2)))) fun y hy =>
Mathlib.Tactic.Contrapose.contrapose₁
(Eq.mpr
(id
(implies_congr not_le._simp_1
(Eq.trans (Mathlib.Tactic.Push.not_and_eq (0 ≤ y) (y ^ 2 < 2))
(implies_congr (Eq.refl (0 ≤ y)) not_lt._simp_1))))
fun hy hpos =>
Trans.trans
(Trans.trans
(Mathlib.Meta.NormNum.isNat_le_true (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Mathlib.Meta.NormNum.isNat_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2)) (Eq.refl 4))
(Eq.refl true))
(mul_le_mul (le_of_lt hy) (le_of_lt hy)
(le_of_lt
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Eq.refl (Nat.ble 1 2))))
(le_of_lt
(_root_.lt_trans
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Eq.refl (Nat.ble 1 2)))
hy))))
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.mul_congr (Mathlib.Tactic.Ring.atom_pf y) (Mathlib.Tactic.Ring.atom_pf y)
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pp_pf_overlap y
(Mathlib.Meta.NormNum.IsNat.to_raw_eq
(Mathlib.Meta.NormNum.isNat_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.of_raw ℕ 1)
(Mathlib.Meta.NormNum.IsNat.of_raw ℕ 1) (Eq.refl 2)))
(Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (y ^ Nat.rawCast 1 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0))))
(Mathlib.Tactic.Ring.pow_congr (Mathlib.Tactic.Ring.atom_pf y)
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat ℕ (Eq.refl 2)))
(Mathlib.Tactic.Ring.pow_add
(Mathlib.Tactic.Ring.single_pow
(Mathlib.Tactic.Ring.mul_pow (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 2))
(Mathlib.Tactic.Ring.one_pow (Nat.rawCast 2))))
(Mathlib.Tactic.Ring.pow_zero (y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left y (Nat.rawCast 2) (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))))
(Eq.mp
(congrFun'
(congrArg Membership.mem
(congrArg setOf (funext fun y => congrFun' (congrArg And ge_iff_le._simp_1) (y ^ 2 < 2))))
y)
hy)claim1':BddAbove E := Eq.mpr (id (congrArg (fun _a => _a) (propext (bddAbove_def E)))) (Exists.intro 2 claim1)claim2:1 ∈ E :=
of_eq_true
(Eq.trans
(congrFun'
(congrArg Membership.mem
(congrArg setOf (funext fun y => congrFun' (congrArg And ge_iff_le._simp_1) (y ^ 2 < 2))))
1)
(Eq.trans
(congr (congrArg And zero_le_one._simp_1)
(Eq.trans (congrFun' (congrArg LT.lt (one_pow 2)) 2) Nat.one_lt_ofNat._simp_1))
(and_self True)))claim2':E.Nonemptyx:Real :=
match ExtendedReal.sup E with
| ExtendedReal.neg_infty => 0
| ExtendedReal.real x => x
| ExtendedReal.infty => 0claim3:IsLUB E x := exist_sqrt_two._proof_4 claim1' claim2'claim4:x ≥ 1 := exist_sqrt_two._proof_5 claim2 claim3claim5:x ≤ 2 := exist_sqrt_two._proof_6 claim1 claim3claim6:x.IsPos :=
Eq.mpr (id (congrArg (fun _a => _a) (propext (isPos_iff x))))
(lt_of_not_ge fun a =>
Mathlib.Tactic.Linarith.lt_irrefl
(Eq.mp
(congrArg (fun _a => _a < 0)
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.neg_congr
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_one))
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1)))))
Mathlib.Tactic.Ring.neg_zero))
(Mathlib.Tactic.Ring.sub_congr
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_one))
(Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul x (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1))))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_lt (Nat.rawCast 1)
(Mathlib.Tactic.Ring.add_pf_zero_add (x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0)))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0))))
(Mathlib.Tactic.Ring.add_pf_zero_add (x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))
(Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))
(Mathlib.Tactic.Ring.sub_pf Mathlib.Tactic.Ring.neg_zero
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Tactic.Ring.add_overlap_pf_zero x (Nat.rawCast 1)
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0)))))
(Mathlib.Tactic.Ring.add_pf_zero_add 0)))
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))))
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le (neg_neg_of_pos Mathlib.Tactic.Linarith.zero_lt_one)
(Mathlib.Tactic.Linarith.sub_nonpos_of_le claim4))
(Mathlib.Tactic.Linarith.sub_nonpos_of_le a))))h:x ^ 2 > 2ε:Realhε1:0 < εhε2:ε < 1hε3:x ^ 2 - 4 * ε > 2⊢ x ^ 2 - 2 * ε * x + ε * ε ≥ x ^ 2 - 2 * ε * 2 + 0 * 0 All goals completed! 🐙
_ = x^2 - 4 * ε := E:Set Real := {y | y ≥ 0 ∧ y ^ 2 < 2}claim1:2 ∈ upperBounds E :=
Eq.mpr (id (congrArg (fun _a => _a) (propext (upperBound_def E 2)))) fun y hy =>
Mathlib.Tactic.Contrapose.contrapose₁
(Eq.mpr
(id
(implies_congr not_le._simp_1
(Eq.trans (Mathlib.Tactic.Push.not_and_eq (0 ≤ y) (y ^ 2 < 2))
(implies_congr (Eq.refl (0 ≤ y)) not_lt._simp_1))))
fun hy hpos =>
Trans.trans
(Trans.trans
(Mathlib.Meta.NormNum.isNat_le_true (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Mathlib.Meta.NormNum.isNat_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2)) (Eq.refl 4))
(Eq.refl true))
(mul_le_mul (le_of_lt hy) (le_of_lt hy)
(le_of_lt
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Eq.refl (Nat.ble 1 2))))
(le_of_lt
(_root_.lt_trans
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Eq.refl (Nat.ble 1 2)))
hy))))
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.mul_congr (Mathlib.Tactic.Ring.atom_pf y) (Mathlib.Tactic.Ring.atom_pf y)
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pp_pf_overlap y
(Mathlib.Meta.NormNum.IsNat.to_raw_eq
(Mathlib.Meta.NormNum.isNat_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.of_raw ℕ 1)
(Mathlib.Meta.NormNum.IsNat.of_raw ℕ 1) (Eq.refl 2)))
(Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (y ^ Nat.rawCast 1 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0))))
(Mathlib.Tactic.Ring.pow_congr (Mathlib.Tactic.Ring.atom_pf y)
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat ℕ (Eq.refl 2)))
(Mathlib.Tactic.Ring.pow_add
(Mathlib.Tactic.Ring.single_pow
(Mathlib.Tactic.Ring.mul_pow (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 2))
(Mathlib.Tactic.Ring.one_pow (Nat.rawCast 2))))
(Mathlib.Tactic.Ring.pow_zero (y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left y (Nat.rawCast 2) (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))))
(Eq.mp
(congrFun'
(congrArg Membership.mem
(congrArg setOf (funext fun y => congrFun' (congrArg And ge_iff_le._simp_1) (y ^ 2 < 2))))
y)
hy)claim1':BddAbove E := Eq.mpr (id (congrArg (fun _a => _a) (propext (bddAbove_def E)))) (Exists.intro 2 claim1)claim2:1 ∈ E :=
of_eq_true
(Eq.trans
(congrFun'
(congrArg Membership.mem
(congrArg setOf (funext fun y => congrFun' (congrArg And ge_iff_le._simp_1) (y ^ 2 < 2))))
1)
(Eq.trans
(congr (congrArg And zero_le_one._simp_1)
(Eq.trans (congrFun' (congrArg LT.lt (one_pow 2)) 2) Nat.one_lt_ofNat._simp_1))
(and_self True)))claim2':E.Nonemptyx:Real :=
match ExtendedReal.sup E with
| ExtendedReal.neg_infty => 0
| ExtendedReal.real x => x
| ExtendedReal.infty => 0claim3:IsLUB E x := exist_sqrt_two._proof_4 claim1' claim2'claim4:x ≥ 1 := exist_sqrt_two._proof_5 claim2 claim3claim5:x ≤ 2 := exist_sqrt_two._proof_6 claim1 claim3claim6:x.IsPos :=
Eq.mpr (id (congrArg (fun _a => _a) (propext (isPos_iff x))))
(lt_of_not_ge fun a =>
Mathlib.Tactic.Linarith.lt_irrefl
(Eq.mp
(congrArg (fun _a => _a < 0)
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.neg_congr
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_one))
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1)))))
Mathlib.Tactic.Ring.neg_zero))
(Mathlib.Tactic.Ring.sub_congr
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_one))
(Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul x (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1))))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_lt (Nat.rawCast 1)
(Mathlib.Tactic.Ring.add_pf_zero_add (x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0)))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0))))
(Mathlib.Tactic.Ring.add_pf_zero_add (x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))
(Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))
(Mathlib.Tactic.Ring.sub_pf Mathlib.Tactic.Ring.neg_zero
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Tactic.Ring.add_overlap_pf_zero x (Nat.rawCast 1)
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0)))))
(Mathlib.Tactic.Ring.add_pf_zero_add 0)))
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))))
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le (neg_neg_of_pos Mathlib.Tactic.Linarith.zero_lt_one)
(Mathlib.Tactic.Linarith.sub_nonpos_of_le claim4))
(Mathlib.Tactic.Linarith.sub_nonpos_of_le a))))h:x ^ 2 > 2ε:Realhε1:0 < εhε2:ε < 1hε3:x ^ 2 - 4 * ε > 2⊢ x ^ 2 - 2 * ε * 2 + 0 * 0 = x ^ 2 - 4 * ε All goals completed! 🐙
_ > 2 := hε3
have why (y:Real) (hy: y ∈ E) : x - ε ≥ y := ⊢ ∃ x, x ^ 2 = 2 All goals completed! 🐙
have claim13: x-ε ∈ upperBounds E := ⊢ ∃ x, x ^ 2 = 2 rwa [upperBound_defE:Set Real := {y | y ≥ 0 ∧ y ^ 2 < 2}claim1:2 ∈ upperBounds E :=
Eq.mpr (id (congrArg (fun _a => _a) (propext (upperBound_def E 2)))) fun y hy =>
Mathlib.Tactic.Contrapose.contrapose₁
(Eq.mpr
(id
(implies_congr not_le._simp_1
(Eq.trans (Mathlib.Tactic.Push.not_and_eq (0 ≤ y) (y ^ 2 < 2))
(implies_congr (Eq.refl (0 ≤ y)) not_lt._simp_1))))
fun hy hpos =>
Trans.trans
(Trans.trans
(Mathlib.Meta.NormNum.isNat_le_true (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Mathlib.Meta.NormNum.isNat_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2)) (Eq.refl 4))
(Eq.refl true))
(mul_le_mul (le_of_lt hy) (le_of_lt hy)
(le_of_lt
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Eq.refl (Nat.ble 1 2))))
(le_of_lt
(_root_.lt_trans
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Eq.refl (Nat.ble 1 2)))
hy))))
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.mul_congr (Mathlib.Tactic.Ring.atom_pf y) (Mathlib.Tactic.Ring.atom_pf y)
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pp_pf_overlap y
(Mathlib.Meta.NormNum.IsNat.to_raw_eq
(Mathlib.Meta.NormNum.isNat_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.of_raw ℕ 1)
(Mathlib.Meta.NormNum.IsNat.of_raw ℕ 1) (Eq.refl 2)))
(Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (y ^ Nat.rawCast 1 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0))))
(Mathlib.Tactic.Ring.pow_congr (Mathlib.Tactic.Ring.atom_pf y)
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat ℕ (Eq.refl 2)))
(Mathlib.Tactic.Ring.pow_add
(Mathlib.Tactic.Ring.single_pow
(Mathlib.Tactic.Ring.mul_pow (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 2))
(Mathlib.Tactic.Ring.one_pow (Nat.rawCast 2))))
(Mathlib.Tactic.Ring.pow_zero (y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left y (Nat.rawCast 2) (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))))
(Eq.mp
(congrFun'
(congrArg Membership.mem
(congrArg setOf (funext fun y => congrFun' (congrArg And ge_iff_le._simp_1) (y ^ 2 < 2))))
y)
hy)claim1':BddAbove E := Eq.mpr (id (congrArg (fun _a => _a) (propext (bddAbove_def E)))) (Exists.intro 2 claim1)claim2:1 ∈ E :=
of_eq_true
(Eq.trans
(congrFun'
(congrArg Membership.mem
(congrArg setOf (funext fun y => congrFun' (congrArg And ge_iff_le._simp_1) (y ^ 2 < 2))))
1)
(Eq.trans
(congr (congrArg And zero_le_one._simp_1)
(Eq.trans (congrFun' (congrArg LT.lt (one_pow 2)) 2) Nat.one_lt_ofNat._simp_1))
(and_self True)))claim2':E.Nonemptyx:Real :=
match ExtendedReal.sup E with
| ExtendedReal.neg_infty => 0
| ExtendedReal.real x => x
| ExtendedReal.infty => 0claim3:IsLUB E x := exist_sqrt_two._proof_4 claim1' claim2'claim4:x ≥ 1 := exist_sqrt_two._proof_5 claim2 claim3claim5:x ≤ 2 := exist_sqrt_two._proof_6 claim1 claim3claim6:x.IsPos :=
Eq.mpr (id (congrArg (fun _a => _a) (propext (isPos_iff x))))
(lt_of_not_ge fun a =>
Mathlib.Tactic.Linarith.lt_irrefl
(Eq.mp
(congrArg (fun _a => _a < 0)
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.neg_congr
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_one))
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1)))))
Mathlib.Tactic.Ring.neg_zero))
(Mathlib.Tactic.Ring.sub_congr
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_one))
(Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul x (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1))))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_lt (Nat.rawCast 1)
(Mathlib.Tactic.Ring.add_pf_zero_add (x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0)))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0))))
(Mathlib.Tactic.Ring.add_pf_zero_add (x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))
(Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))
(Mathlib.Tactic.Ring.sub_pf Mathlib.Tactic.Ring.neg_zero
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Tactic.Ring.add_overlap_pf_zero x (Nat.rawCast 1)
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0)))))
(Mathlib.Tactic.Ring.add_pf_zero_add 0)))
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))))
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le (neg_neg_of_pos Mathlib.Tactic.Linarith.zero_lt_one)
(Mathlib.Tactic.Linarith.sub_nonpos_of_le claim4))
(Mathlib.Tactic.Linarith.sub_nonpos_of_le a))))h:x ^ 2 > 2ε:Realhε1:0 < εhε2:ε < 1hε3:x ^ 2 - 4 * ε > 2claim12:(x - ε) ^ 2 > 2 :=
Trans.trans
(Trans.trans
(Trans.trans
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.pow_congr
(Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf x) (Mathlib.Tactic.Ring.atom_pf ε)
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul ε (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1))))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_lt (x ^ Nat.rawCast 1 * Nat.rawCast 1)
(Mathlib.Tactic.Ring.add_pf_zero_add (ε ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0)))))
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat ℕ (Eq.refl 2)))
(Mathlib.Tactic.Ring.pow_add
(Mathlib.Tactic.Ring.pow_nat (Mathlib.Tactic.Ring.coeff_one 2)
(Mathlib.Tactic.Ring.pow_one_cast
(x ^ Nat.rawCast 1 * Nat.rawCast 1 + (ε ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0)))
(Mathlib.Tactic.Ring.pow_bit0
(Mathlib.Tactic.Ring.pow_one
(x ^ Nat.rawCast 1 * Nat.rawCast 1 + (ε ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0)))
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pp_pf_overlap x
(Mathlib.Meta.NormNum.IsNat.to_raw_eq
(Mathlib.Meta.NormNum.isNat_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.of_raw ℕ 1)
(Mathlib.Meta.NormNum.IsNat.of_raw ℕ 1) (Eq.refl 2)))
(Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left x (Nat.rawCast 1)
(Mathlib.Tactic.Ring.mul_pf_right ε (Nat.rawCast 1)
(Mathlib.Tactic.Ring.one_mul (Int.negOfNat 1).rawCast)))
(Mathlib.Tactic.Ring.mul_zero (x ^ Nat.rawCast 1 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero
(x ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast) + 0)))
(Mathlib.Tactic.Ring.add_pf_add_gt
(x ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast))
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0))))
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_right x (Nat.rawCast 1)
(Mathlib.Tactic.Ring.mul_pf_left ε (Nat.rawCast 1)
(Mathlib.Tactic.Ring.mul_one (Int.negOfNat 1).rawCast)))
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pp_pf_overlap ε
(Mathlib.Meta.NormNum.IsNat.to_raw_eq
(Mathlib.Meta.NormNum.isNat_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.of_raw ℕ 1)
(Mathlib.Meta.NormNum.IsNat.of_raw ℕ 1) (Eq.refl 2)))
(Mathlib.Meta.NormNum.IsNat.to_raw_eq
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1)) (Eq.refl (Int.ofNat 1))))))
(Mathlib.Tactic.Ring.mul_zero (ε ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast))
(Mathlib.Tactic.Ring.add_pf_add_zero (ε ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.add_pf_add_lt
(x ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast))
(Mathlib.Tactic.Ring.add_pf_zero_add (ε ^ Nat.rawCast 2 * Nat.rawCast 1 + 0))))
(Mathlib.Tactic.Ring.zero_mul
(x ^ Nat.rawCast 1 * Nat.rawCast 1 + (ε ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0)))
(Mathlib.Tactic.Ring.add_pf_add_zero
(x ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast) +
(ε ^ Nat.rawCast 2 * Nat.rawCast 1 + 0))))
(Mathlib.Tactic.Ring.add_pf_add_overlap
(Mathlib.Tactic.Ring.add_overlap_pf x (Nat.rawCast 1)
(Mathlib.Tactic.Ring.add_overlap_pf ε (Nat.rawCast 1)
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1)) (Eq.refl (Int.negOfNat 2))))))
(Mathlib.Tactic.Ring.add_pf_add_lt (x ^ Nat.rawCast 2 * Nat.rawCast 1)
(Mathlib.Tactic.Ring.add_pf_zero_add (ε ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))))
(Mathlib.Tactic.Ring.pow_zero
(x ^ Nat.rawCast 1 * Nat.rawCast 1 + (ε ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0)))
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left x (Nat.rawCast 1)
(Mathlib.Tactic.Ring.mul_pf_left ε (Nat.rawCast 1)
(Mathlib.Tactic.Ring.mul_one (Int.negOfNat 2).rawCast)))
(Mathlib.Tactic.Ring.mul_zero (x ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * (Int.negOfNat 2).rawCast)))
(Mathlib.Tactic.Ring.add_pf_add_zero
(x ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * (Int.negOfNat 2).rawCast) + 0)))
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left x (Nat.rawCast 2) (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left ε (Nat.rawCast 2) (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (ε ^ Nat.rawCast 2 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (ε ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (ε ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.add_pf_add_lt (x ^ Nat.rawCast 2 * Nat.rawCast 1)
(Mathlib.Tactic.Ring.add_pf_zero_add (ε ^ Nat.rawCast 2 * Nat.rawCast 1 + 0))))
(Mathlib.Tactic.Ring.add_pf_add_lt (x ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * (Int.negOfNat 2).rawCast))
(Mathlib.Tactic.Ring.add_pf_zero_add
(x ^ Nat.rawCast 2 * Nat.rawCast 1 + (ε ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))))
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.sub_congr
(Mathlib.Tactic.Ring.pow_congr (Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat ℕ (Eq.refl 2)))
(Mathlib.Tactic.Ring.pow_add
(Mathlib.Tactic.Ring.single_pow
(Mathlib.Tactic.Ring.mul_pow (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 2))
(Mathlib.Tactic.Ring.one_pow (Nat.rawCast 2))))
(Mathlib.Tactic.Ring.pow_zero (x ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left x (Nat.rawCast 2) (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))
(Mathlib.Tactic.Ring.mul_congr
(Mathlib.Tactic.Ring.mul_congr
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2)))
(Mathlib.Tactic.Ring.atom_pf ε)
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_right ε (Nat.rawCast 1) (Mathlib.Tactic.Ring.mul_one (Nat.rawCast 2)))
(Mathlib.Tactic.Ring.mul_zero (Nat.rawCast 2))
(Mathlib.Tactic.Ring.add_pf_add_zero (ε ^ Nat.rawCast 1 * Nat.rawCast 2 + 0)))
(Mathlib.Tactic.Ring.zero_mul (ε ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (ε ^ Nat.rawCast 1 * Nat.rawCast 2 + 0))))
(Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_right x (Nat.rawCast 1)
(Mathlib.Tactic.Ring.mul_pf_left ε (Nat.rawCast 1) (Mathlib.Tactic.Ring.mul_one (Nat.rawCast 2))))
(Mathlib.Tactic.Ring.mul_zero (ε ^ Nat.rawCast 1 * Nat.rawCast 2))
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * Nat.rawCast 2) + 0)))
(Mathlib.Tactic.Ring.zero_mul (x ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * Nat.rawCast 2) + 0))))
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul x (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_mul ε (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 2))
(Eq.refl (Int.negOfNat 2)))))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_gt (x ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * (Int.negOfNat 2).rawCast))
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))
(Mathlib.Tactic.Ring.mul_congr (Mathlib.Tactic.Ring.atom_pf ε) (Mathlib.Tactic.Ring.atom_pf ε)
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pp_pf_overlap ε
(Mathlib.Meta.NormNum.IsNat.to_raw_eq
(Mathlib.Meta.NormNum.isNat_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.of_raw ℕ 1)
(Mathlib.Meta.NormNum.IsNat.of_raw ℕ 1) (Eq.refl 2)))
(Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (ε ^ Nat.rawCast 1 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (ε ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (ε ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (ε ^ Nat.rawCast 2 * Nat.rawCast 1 + 0))))
(Mathlib.Tactic.Ring.add_pf_add_lt (x ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * (Int.negOfNat 2).rawCast))
(Mathlib.Tactic.Ring.add_pf_add_lt (x ^ Nat.rawCast 2 * Nat.rawCast 1)
(Mathlib.Tactic.Ring.add_pf_zero_add (ε ^ Nat.rawCast 2 * Nat.rawCast 1 + 0))))))
(add_le_add
(sub_le_sub_left
(mul_le_mul_of_nonneg_left claim5
(le_of_lt
(mul_pos
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Eq.refl (Nat.ble 1 2)))
hε1)))
(x ^ 2))
(mul_le_mul (le_of_lt hε1) (le_of_lt hε1)
(Mathlib.Meta.Positivity.nonneg_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))
(le_of_lt hε1))))
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.sub_congr
(Mathlib.Tactic.Ring.pow_congr (Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat ℕ (Eq.refl 2)))
(Mathlib.Tactic.Ring.pow_add
(Mathlib.Tactic.Ring.single_pow
(Mathlib.Tactic.Ring.mul_pow (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 2))
(Mathlib.Tactic.Ring.one_pow (Nat.rawCast 2))))
(Mathlib.Tactic.Ring.pow_zero (x ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left x (Nat.rawCast 2) (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))
(Mathlib.Tactic.Ring.mul_congr
(Mathlib.Tactic.Ring.mul_congr
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2)))
(Mathlib.Tactic.Ring.atom_pf ε)
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_right ε (Nat.rawCast 1) (Mathlib.Tactic.Ring.mul_one (Nat.rawCast 2)))
(Mathlib.Tactic.Ring.mul_zero (Nat.rawCast 2))
(Mathlib.Tactic.Ring.add_pf_add_zero (ε ^ Nat.rawCast 1 * Nat.rawCast 2 + 0)))
(Mathlib.Tactic.Ring.zero_mul (ε ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (ε ^ Nat.rawCast 1 * Nat.rawCast 2 + 0))))
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2)))
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left ε (Nat.rawCast 1)
(Mathlib.Meta.NormNum.IsNat.to_raw_eq
(Mathlib.Meta.NormNum.isNat_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsNat.of_raw Real 2)
(Mathlib.Meta.NormNum.IsNat.of_raw Real 2) (Eq.refl 4))))
(Mathlib.Tactic.Ring.mul_zero (ε ^ Nat.rawCast 1 * Nat.rawCast 2))
(Mathlib.Tactic.Ring.add_pf_add_zero (ε ^ Nat.rawCast 1 * Nat.rawCast 4 + 0)))
(Mathlib.Tactic.Ring.zero_mul (Nat.rawCast 2 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (ε ^ Nat.rawCast 1 * Nat.rawCast 4 + 0))))
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul ε (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 4))
(Eq.refl (Int.negOfNat 4))))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_lt (x ^ Nat.rawCast 2 * Nat.rawCast 1)
(Mathlib.Tactic.Ring.add_pf_zero_add (ε ^ Nat.rawCast 1 * (Int.negOfNat 4).rawCast + 0)))))
(Mathlib.Tactic.Ring.mul_congr
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))
(Mathlib.Tactic.Ring.zero_mul 0))
(Mathlib.Tactic.Ring.add_pf_add_zero
(x ^ Nat.rawCast 2 * Nat.rawCast 1 + (ε ^ Nat.rawCast 1 * (Int.negOfNat 4).rawCast + 0))))
(Mathlib.Tactic.Ring.sub_congr
(Mathlib.Tactic.Ring.pow_congr (Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat ℕ (Eq.refl 2)))
(Mathlib.Tactic.Ring.pow_add
(Mathlib.Tactic.Ring.single_pow
(Mathlib.Tactic.Ring.mul_pow (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 2))
(Mathlib.Tactic.Ring.one_pow (Nat.rawCast 2))))
(Mathlib.Tactic.Ring.pow_zero (x ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left x (Nat.rawCast 2) (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))
(Mathlib.Tactic.Ring.mul_congr
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 4)))
(Mathlib.Tactic.Ring.atom_pf ε)
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_right ε (Nat.rawCast 1) (Mathlib.Tactic.Ring.mul_one (Nat.rawCast 4)))
(Mathlib.Tactic.Ring.mul_zero (Nat.rawCast 4))
(Mathlib.Tactic.Ring.add_pf_add_zero (ε ^ Nat.rawCast 1 * Nat.rawCast 4 + 0)))
(Mathlib.Tactic.Ring.zero_mul (ε ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (ε ^ Nat.rawCast 1 * Nat.rawCast 4 + 0))))
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul ε (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 4))
(Eq.refl (Int.negOfNat 4))))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_lt (x ^ Nat.rawCast 2 * Nat.rawCast 1)
(Mathlib.Tactic.Ring.add_pf_zero_add (ε ^ Nat.rawCast 1 * (Int.negOfNat 4).rawCast + 0)))))))
hε3why:∀ y ∈ E, x - ε ≥ y := fun y hy => sorry⊢ ∀ x_1 ∈ E, x_1 ≤ x - ε
have claim14: x ≤ x-ε := ⊢ ∃ x, x ^ 2 = 2 All goals completed! 🐙
All goals completed! 🐙
E:Set Real := {y | y ≥ 0 ∧ y ^ 2 < 2}claim1:2 ∈ upperBounds E :=
Eq.mpr (id (congrArg (fun _a => _a) (propext (upperBound_def E 2)))) fun y hy =>
Mathlib.Tactic.Contrapose.contrapose₁
(Eq.mpr
(id
(implies_congr not_le._simp_1
(Eq.trans (Mathlib.Tactic.Push.not_and_eq (0 ≤ y) (y ^ 2 < 2))
(implies_congr (Eq.refl (0 ≤ y)) not_lt._simp_1))))
fun hy hpos =>
Trans.trans
(Trans.trans
(Mathlib.Meta.NormNum.isNat_le_true (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Mathlib.Meta.NormNum.isNat_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2)) (Eq.refl 4))
(Eq.refl true))
(mul_le_mul (le_of_lt hy) (le_of_lt hy)
(le_of_lt
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Eq.refl (Nat.ble 1 2))))
(le_of_lt
(_root_.lt_trans
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Eq.refl (Nat.ble 1 2)))
hy))))
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.mul_congr (Mathlib.Tactic.Ring.atom_pf y) (Mathlib.Tactic.Ring.atom_pf y)
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pp_pf_overlap y
(Mathlib.Meta.NormNum.IsNat.to_raw_eq
(Mathlib.Meta.NormNum.isNat_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.of_raw ℕ 1)
(Mathlib.Meta.NormNum.IsNat.of_raw ℕ 1) (Eq.refl 2)))
(Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (y ^ Nat.rawCast 1 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0))))
(Mathlib.Tactic.Ring.pow_congr (Mathlib.Tactic.Ring.atom_pf y)
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat ℕ (Eq.refl 2)))
(Mathlib.Tactic.Ring.pow_add
(Mathlib.Tactic.Ring.single_pow
(Mathlib.Tactic.Ring.mul_pow (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 2))
(Mathlib.Tactic.Ring.one_pow (Nat.rawCast 2))))
(Mathlib.Tactic.Ring.pow_zero (y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left y (Nat.rawCast 2) (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))))
(Eq.mp
(congrFun'
(congrArg Membership.mem
(congrArg setOf (funext fun y => congrFun' (congrArg And ge_iff_le._simp_1) (y ^ 2 < 2))))
y)
hy)claim1':BddAbove E := Eq.mpr (id (congrArg (fun _a => _a) (propext (bddAbove_def E)))) (Exists.intro 2 claim1)claim2:1 ∈ E :=
of_eq_true
(Eq.trans
(congrFun'
(congrArg Membership.mem
(congrArg setOf (funext fun y => congrFun' (congrArg And ge_iff_le._simp_1) (y ^ 2 < 2))))
1)
(Eq.trans
(congr (congrArg And zero_le_one._simp_1)
(Eq.trans (congrFun' (congrArg LT.lt (one_pow 2)) 2) Nat.one_lt_ofNat._simp_1))
(and_self True)))claim2':E.Nonemptyx:Real :=
match ExtendedReal.sup E with
| ExtendedReal.neg_infty => 0
| ExtendedReal.real x => x
| ExtendedReal.infty => 0claim3:IsLUB E x := exist_sqrt_two._proof_4 claim1' claim2'claim4:x ≥ 1 := exist_sqrt_two._proof_5 claim2 claim3claim5:x ≤ 2 := exist_sqrt_two._proof_6 claim1 claim3claim6:x.IsPos :=
Eq.mpr (id (congrArg (fun _a => _a) (propext (isPos_iff x))))
(lt_of_not_ge fun a =>
Mathlib.Tactic.Linarith.lt_irrefl
(Eq.mp
(congrArg (fun _a => _a < 0)
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.neg_congr
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_one))
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1)))))
Mathlib.Tactic.Ring.neg_zero))
(Mathlib.Tactic.Ring.sub_congr
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_one))
(Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul x (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1))))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_lt (Nat.rawCast 1)
(Mathlib.Tactic.Ring.add_pf_zero_add (x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0)))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0))))
(Mathlib.Tactic.Ring.add_pf_zero_add (x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))
(Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))
(Mathlib.Tactic.Ring.sub_pf Mathlib.Tactic.Ring.neg_zero
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Tactic.Ring.add_overlap_pf_zero x (Nat.rawCast 1)
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0)))))
(Mathlib.Tactic.Ring.add_pf_zero_add 0)))
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))))
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le (neg_neg_of_pos Mathlib.Tactic.Linarith.zero_lt_one)
(Mathlib.Tactic.Linarith.sub_nonpos_of_le claim4))
(Mathlib.Tactic.Linarith.sub_nonpos_of_le a))))h:x ^ 2 < 2⊢ x ^ 2 = 2 have claim7 : ∃ ε, 0 < ε ∧ ε < 1 ∧ x^2 + 5*ε < 2 := ⊢ ∃ x, x ^ 2 = 2
E:Set Real := {y | y ≥ 0 ∧ y ^ 2 < 2}claim1:2 ∈ upperBounds E :=
Eq.mpr (id (congrArg (fun _a => _a) (propext (upperBound_def E 2)))) fun y hy =>
Mathlib.Tactic.Contrapose.contrapose₁
(Eq.mpr
(id
(implies_congr not_le._simp_1
(Eq.trans (Mathlib.Tactic.Push.not_and_eq (0 ≤ y) (y ^ 2 < 2))
(implies_congr (Eq.refl (0 ≤ y)) not_lt._simp_1))))
fun hy hpos =>
Trans.trans
(Trans.trans
(Mathlib.Meta.NormNum.isNat_le_true (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Mathlib.Meta.NormNum.isNat_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2)) (Eq.refl 4))
(Eq.refl true))
(mul_le_mul (le_of_lt hy) (le_of_lt hy)
(le_of_lt
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Eq.refl (Nat.ble 1 2))))
(le_of_lt
(_root_.lt_trans
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Eq.refl (Nat.ble 1 2)))
hy))))
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.mul_congr (Mathlib.Tactic.Ring.atom_pf y) (Mathlib.Tactic.Ring.atom_pf y)
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pp_pf_overlap y
(Mathlib.Meta.NormNum.IsNat.to_raw_eq
(Mathlib.Meta.NormNum.isNat_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.of_raw ℕ 1)
(Mathlib.Meta.NormNum.IsNat.of_raw ℕ 1) (Eq.refl 2)))
(Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (y ^ Nat.rawCast 1 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0))))
(Mathlib.Tactic.Ring.pow_congr (Mathlib.Tactic.Ring.atom_pf y)
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat ℕ (Eq.refl 2)))
(Mathlib.Tactic.Ring.pow_add
(Mathlib.Tactic.Ring.single_pow
(Mathlib.Tactic.Ring.mul_pow (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 2))
(Mathlib.Tactic.Ring.one_pow (Nat.rawCast 2))))
(Mathlib.Tactic.Ring.pow_zero (y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left y (Nat.rawCast 2) (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))))
(Eq.mp
(congrFun'
(congrArg Membership.mem
(congrArg setOf (funext fun y => congrFun' (congrArg And ge_iff_le._simp_1) (y ^ 2 < 2))))
y)
hy)claim1':BddAbove E := Eq.mpr (id (congrArg (fun _a => _a) (propext (bddAbove_def E)))) (Exists.intro 2 claim1)claim2:1 ∈ E :=
of_eq_true
(Eq.trans
(congrFun'
(congrArg Membership.mem
(congrArg setOf (funext fun y => congrFun' (congrArg And ge_iff_le._simp_1) (y ^ 2 < 2))))
1)
(Eq.trans
(congr (congrArg And zero_le_one._simp_1)
(Eq.trans (congrFun' (congrArg LT.lt (one_pow 2)) 2) Nat.one_lt_ofNat._simp_1))
(and_self True)))claim2':E.Nonemptyx:Real :=
match ExtendedReal.sup E with
| ExtendedReal.neg_infty => 0
| ExtendedReal.real x => x
| ExtendedReal.infty => 0claim3:IsLUB E x := exist_sqrt_two._proof_4 claim1' claim2'claim4:x ≥ 1 := exist_sqrt_two._proof_5 claim2 claim3claim5:x ≤ 2 := exist_sqrt_two._proof_6 claim1 claim3claim6:x.IsPos :=
Eq.mpr (id (congrArg (fun _a => _a) (propext (isPos_iff x))))
(lt_of_not_ge fun a =>
Mathlib.Tactic.Linarith.lt_irrefl
(Eq.mp
(congrArg (fun _a => _a < 0)
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.neg_congr
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_one))
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1)))))
Mathlib.Tactic.Ring.neg_zero))
(Mathlib.Tactic.Ring.sub_congr
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_one))
(Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul x (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1))))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_lt (Nat.rawCast 1)
(Mathlib.Tactic.Ring.add_pf_zero_add (x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0)))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0))))
(Mathlib.Tactic.Ring.add_pf_zero_add (x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))
(Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))
(Mathlib.Tactic.Ring.sub_pf Mathlib.Tactic.Ring.neg_zero
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Tactic.Ring.add_overlap_pf_zero x (Nat.rawCast 1)
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0)))))
(Mathlib.Tactic.Ring.add_pf_zero_add 0)))
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))))
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le (neg_neg_of_pos Mathlib.Tactic.Linarith.zero_lt_one)
(Mathlib.Tactic.Linarith.sub_nonpos_of_le claim4))
(Mathlib.Tactic.Linarith.sub_nonpos_of_le a))))h:x ^ 2 < 2ε:Real := min (1 / 2) ((2 - x ^ 2) / 10)⊢ ∃ ε, 0 < ε ∧ ε < 1 ∧ x ^ 2 + 5 * ε < 2
have hx : 2 - x^2 > 0 := ⊢ ∃ x, x ^ 2 = 2 All goals completed! 🐙
have hε: 0 < ε := ⊢ ∃ x, x ^ 2 = 2 All goals completed! 🐙
E:Set Real := {y | y ≥ 0 ∧ y ^ 2 < 2}claim1:2 ∈ upperBounds E :=
Eq.mpr (id (congrArg (fun _a => _a) (propext (upperBound_def E 2)))) fun y hy =>
Mathlib.Tactic.Contrapose.contrapose₁
(Eq.mpr
(id
(implies_congr not_le._simp_1
(Eq.trans (Mathlib.Tactic.Push.not_and_eq (0 ≤ y) (y ^ 2 < 2))
(implies_congr (Eq.refl (0 ≤ y)) not_lt._simp_1))))
fun hy hpos =>
Trans.trans
(Trans.trans
(Mathlib.Meta.NormNum.isNat_le_true (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Mathlib.Meta.NormNum.isNat_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2)) (Eq.refl 4))
(Eq.refl true))
(mul_le_mul (le_of_lt hy) (le_of_lt hy)
(le_of_lt
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Eq.refl (Nat.ble 1 2))))
(le_of_lt
(_root_.lt_trans
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Eq.refl (Nat.ble 1 2)))
hy))))
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.mul_congr (Mathlib.Tactic.Ring.atom_pf y) (Mathlib.Tactic.Ring.atom_pf y)
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pp_pf_overlap y
(Mathlib.Meta.NormNum.IsNat.to_raw_eq
(Mathlib.Meta.NormNum.isNat_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.of_raw ℕ 1)
(Mathlib.Meta.NormNum.IsNat.of_raw ℕ 1) (Eq.refl 2)))
(Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (y ^ Nat.rawCast 1 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0))))
(Mathlib.Tactic.Ring.pow_congr (Mathlib.Tactic.Ring.atom_pf y)
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat ℕ (Eq.refl 2)))
(Mathlib.Tactic.Ring.pow_add
(Mathlib.Tactic.Ring.single_pow
(Mathlib.Tactic.Ring.mul_pow (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 2))
(Mathlib.Tactic.Ring.one_pow (Nat.rawCast 2))))
(Mathlib.Tactic.Ring.pow_zero (y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left y (Nat.rawCast 2) (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))))
(Eq.mp
(congrFun'
(congrArg Membership.mem
(congrArg setOf (funext fun y => congrFun' (congrArg And ge_iff_le._simp_1) (y ^ 2 < 2))))
y)
hy)claim1':BddAbove E := Eq.mpr (id (congrArg (fun _a => _a) (propext (bddAbove_def E)))) (Exists.intro 2 claim1)claim2:1 ∈ E :=
of_eq_true
(Eq.trans
(congrFun'
(congrArg Membership.mem
(congrArg setOf (funext fun y => congrFun' (congrArg And ge_iff_le._simp_1) (y ^ 2 < 2))))
1)
(Eq.trans
(congr (congrArg And zero_le_one._simp_1)
(Eq.trans (congrFun' (congrArg LT.lt (one_pow 2)) 2) Nat.one_lt_ofNat._simp_1))
(and_self True)))claim2':E.Nonemptyx:Real :=
match ExtendedReal.sup E with
| ExtendedReal.neg_infty => 0
| ExtendedReal.real x => x
| ExtendedReal.infty => 0claim3:IsLUB E x := exist_sqrt_two._proof_4 claim1' claim2'claim4:x ≥ 1 := exist_sqrt_two._proof_5 claim2 claim3claim5:x ≤ 2 := exist_sqrt_two._proof_6 claim1 claim3claim6:x.IsPos :=
Eq.mpr (id (congrArg (fun _a => _a) (propext (isPos_iff x))))
(lt_of_not_ge fun a =>
Mathlib.Tactic.Linarith.lt_irrefl
(Eq.mp
(congrArg (fun _a => _a < 0)
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.neg_congr
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_one))
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1)))))
Mathlib.Tactic.Ring.neg_zero))
(Mathlib.Tactic.Ring.sub_congr
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_one))
(Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul x (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1))))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_lt (Nat.rawCast 1)
(Mathlib.Tactic.Ring.add_pf_zero_add (x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0)))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0))))
(Mathlib.Tactic.Ring.add_pf_zero_add (x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))
(Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))
(Mathlib.Tactic.Ring.sub_pf Mathlib.Tactic.Ring.neg_zero
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Tactic.Ring.add_overlap_pf_zero x (Nat.rawCast 1)
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0)))))
(Mathlib.Tactic.Ring.add_pf_zero_add 0)))
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))))
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le (neg_neg_of_pos Mathlib.Tactic.Linarith.zero_lt_one)
(Mathlib.Tactic.Linarith.sub_nonpos_of_le claim4))
(Mathlib.Tactic.Linarith.sub_nonpos_of_le a))))h:x ^ 2 < 2ε:Real := min (1 / 2) ((2 - x ^ 2) / 10)hx:2 - x ^ 2 > 0 :=
lt_of_not_ge fun a =>
Mathlib.Tactic.Linarith.lt_irrefl
(Eq.mp
(congrArg (fun _a => _a < 0)
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.sub_congr
(Mathlib.Tactic.Ring.pow_congr (Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat ℕ (Eq.refl 2)))
(Mathlib.Tactic.Ring.pow_add
(Mathlib.Tactic.Ring.single_pow
(Mathlib.Tactic.Ring.mul_pow (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 2))
(Mathlib.Tactic.Ring.one_pow (Nat.rawCast 2))))
(Mathlib.Tactic.Ring.pow_zero (x ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left x (Nat.rawCast 2) (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2)))
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 2))
(Eq.refl (Int.negOfNat 2)))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_gt (Int.negOfNat 2).rawCast
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))
(Mathlib.Tactic.Ring.sub_congr
(Mathlib.Tactic.Ring.sub_congr
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2)))
(Mathlib.Tactic.Ring.pow_congr (Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat ℕ (Eq.refl 2)))
(Mathlib.Tactic.Ring.pow_add
(Mathlib.Tactic.Ring.single_pow
(Mathlib.Tactic.Ring.mul_pow (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 2))
(Mathlib.Tactic.Ring.one_pow (Nat.rawCast 2))))
(Mathlib.Tactic.Ring.pow_zero (x ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left x (Nat.rawCast 2)
(Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul x (Nat.rawCast 2)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1))))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_lt (Nat.rawCast 2)
(Mathlib.Tactic.Ring.add_pf_zero_add (x ^ Nat.rawCast 2 * (Int.negOfNat 1).rawCast + 0)))))
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))
(Mathlib.Tactic.Ring.sub_pf Mathlib.Tactic.Ring.neg_zero
(Mathlib.Tactic.Ring.add_pf_add_zero
(Nat.rawCast 2 + (x ^ Nat.rawCast 2 * (Int.negOfNat 1).rawCast + 0)))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 2))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 2))
(Eq.refl (Int.ofNat 0))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Tactic.Ring.add_overlap_pf_zero x (Nat.rawCast 2)
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1)) (Eq.refl (Int.ofNat 0)))))
(Mathlib.Tactic.Ring.add_pf_zero_add 0))))
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))))
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le (Mathlib.Tactic.Linarith.sub_neg_of_lt h)
(Mathlib.Tactic.Linarith.sub_nonpos_of_le a)))hε:0 < ε :=
lt_min
(div_pos
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_one) (Eq.refl (Nat.ble 1 1)))
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2)) (Eq.refl (Nat.ble 1 2))))
(div_pos hx
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 10))
(Eq.refl (Nat.ble 1 10))))hε1:ε ≤ 1 / 2 := min_le_left (1 / 2) ((2 - x ^ 2) / 10)⊢ ∃ ε, 0 < ε ∧ ε < 1 ∧ x ^ 2 + 5 * ε < 2
E:Set Real := {y | y ≥ 0 ∧ y ^ 2 < 2}claim1:2 ∈ upperBounds E :=
Eq.mpr (id (congrArg (fun _a => _a) (propext (upperBound_def E 2)))) fun y hy =>
Mathlib.Tactic.Contrapose.contrapose₁
(Eq.mpr
(id
(implies_congr not_le._simp_1
(Eq.trans (Mathlib.Tactic.Push.not_and_eq (0 ≤ y) (y ^ 2 < 2))
(implies_congr (Eq.refl (0 ≤ y)) not_lt._simp_1))))
fun hy hpos =>
Trans.trans
(Trans.trans
(Mathlib.Meta.NormNum.isNat_le_true (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Mathlib.Meta.NormNum.isNat_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2)) (Eq.refl 4))
(Eq.refl true))
(mul_le_mul (le_of_lt hy) (le_of_lt hy)
(le_of_lt
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Eq.refl (Nat.ble 1 2))))
(le_of_lt
(_root_.lt_trans
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Eq.refl (Nat.ble 1 2)))
hy))))
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.mul_congr (Mathlib.Tactic.Ring.atom_pf y) (Mathlib.Tactic.Ring.atom_pf y)
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pp_pf_overlap y
(Mathlib.Meta.NormNum.IsNat.to_raw_eq
(Mathlib.Meta.NormNum.isNat_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.of_raw ℕ 1)
(Mathlib.Meta.NormNum.IsNat.of_raw ℕ 1) (Eq.refl 2)))
(Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (y ^ Nat.rawCast 1 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0))))
(Mathlib.Tactic.Ring.pow_congr (Mathlib.Tactic.Ring.atom_pf y)
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat ℕ (Eq.refl 2)))
(Mathlib.Tactic.Ring.pow_add
(Mathlib.Tactic.Ring.single_pow
(Mathlib.Tactic.Ring.mul_pow (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 2))
(Mathlib.Tactic.Ring.one_pow (Nat.rawCast 2))))
(Mathlib.Tactic.Ring.pow_zero (y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left y (Nat.rawCast 2) (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))))
(Eq.mp
(congrFun'
(congrArg Membership.mem
(congrArg setOf (funext fun y => congrFun' (congrArg And ge_iff_le._simp_1) (y ^ 2 < 2))))
y)
hy)claim1':BddAbove E := Eq.mpr (id (congrArg (fun _a => _a) (propext (bddAbove_def E)))) (Exists.intro 2 claim1)claim2:1 ∈ E :=
of_eq_true
(Eq.trans
(congrFun'
(congrArg Membership.mem
(congrArg setOf (funext fun y => congrFun' (congrArg And ge_iff_le._simp_1) (y ^ 2 < 2))))
1)
(Eq.trans
(congr (congrArg And zero_le_one._simp_1)
(Eq.trans (congrFun' (congrArg LT.lt (one_pow 2)) 2) Nat.one_lt_ofNat._simp_1))
(and_self True)))claim2':E.Nonemptyx:Real :=
match ExtendedReal.sup E with
| ExtendedReal.neg_infty => 0
| ExtendedReal.real x => x
| ExtendedReal.infty => 0claim3:IsLUB E x := exist_sqrt_two._proof_4 claim1' claim2'claim4:x ≥ 1 := exist_sqrt_two._proof_5 claim2 claim3claim5:x ≤ 2 := exist_sqrt_two._proof_6 claim1 claim3claim6:x.IsPos :=
Eq.mpr (id (congrArg (fun _a => _a) (propext (isPos_iff x))))
(lt_of_not_ge fun a =>
Mathlib.Tactic.Linarith.lt_irrefl
(Eq.mp
(congrArg (fun _a => _a < 0)
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.neg_congr
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_one))
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1)))))
Mathlib.Tactic.Ring.neg_zero))
(Mathlib.Tactic.Ring.sub_congr
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_one))
(Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul x (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1))))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_lt (Nat.rawCast 1)
(Mathlib.Tactic.Ring.add_pf_zero_add (x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0)))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0))))
(Mathlib.Tactic.Ring.add_pf_zero_add (x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))
(Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))
(Mathlib.Tactic.Ring.sub_pf Mathlib.Tactic.Ring.neg_zero
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Tactic.Ring.add_overlap_pf_zero x (Nat.rawCast 1)
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0)))))
(Mathlib.Tactic.Ring.add_pf_zero_add 0)))
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))))
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le (neg_neg_of_pos Mathlib.Tactic.Linarith.zero_lt_one)
(Mathlib.Tactic.Linarith.sub_nonpos_of_le claim4))
(Mathlib.Tactic.Linarith.sub_nonpos_of_le a))))h:x ^ 2 < 2ε:Real := min (1 / 2) ((2 - x ^ 2) / 10)hx:2 - x ^ 2 > 0 :=
lt_of_not_ge fun a =>
Mathlib.Tactic.Linarith.lt_irrefl
(Eq.mp
(congrArg (fun _a => _a < 0)
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.sub_congr
(Mathlib.Tactic.Ring.pow_congr (Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat ℕ (Eq.refl 2)))
(Mathlib.Tactic.Ring.pow_add
(Mathlib.Tactic.Ring.single_pow
(Mathlib.Tactic.Ring.mul_pow (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 2))
(Mathlib.Tactic.Ring.one_pow (Nat.rawCast 2))))
(Mathlib.Tactic.Ring.pow_zero (x ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left x (Nat.rawCast 2) (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2)))
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 2))
(Eq.refl (Int.negOfNat 2)))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_gt (Int.negOfNat 2).rawCast
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))
(Mathlib.Tactic.Ring.sub_congr
(Mathlib.Tactic.Ring.sub_congr
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2)))
(Mathlib.Tactic.Ring.pow_congr (Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat ℕ (Eq.refl 2)))
(Mathlib.Tactic.Ring.pow_add
(Mathlib.Tactic.Ring.single_pow
(Mathlib.Tactic.Ring.mul_pow (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 2))
(Mathlib.Tactic.Ring.one_pow (Nat.rawCast 2))))
(Mathlib.Tactic.Ring.pow_zero (x ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left x (Nat.rawCast 2)
(Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul x (Nat.rawCast 2)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1))))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_lt (Nat.rawCast 2)
(Mathlib.Tactic.Ring.add_pf_zero_add (x ^ Nat.rawCast 2 * (Int.negOfNat 1).rawCast + 0)))))
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))
(Mathlib.Tactic.Ring.sub_pf Mathlib.Tactic.Ring.neg_zero
(Mathlib.Tactic.Ring.add_pf_add_zero
(Nat.rawCast 2 + (x ^ Nat.rawCast 2 * (Int.negOfNat 1).rawCast + 0)))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 2))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 2))
(Eq.refl (Int.ofNat 0))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Tactic.Ring.add_overlap_pf_zero x (Nat.rawCast 2)
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1)) (Eq.refl (Int.ofNat 0)))))
(Mathlib.Tactic.Ring.add_pf_zero_add 0))))
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))))
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le (Mathlib.Tactic.Linarith.sub_neg_of_lt h)
(Mathlib.Tactic.Linarith.sub_nonpos_of_le a)))hε:0 < ε :=
lt_min
(div_pos
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_one) (Eq.refl (Nat.ble 1 1)))
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2)) (Eq.refl (Nat.ble 1 2))))
(div_pos hx
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 10))
(Eq.refl (Nat.ble 1 10))))hε1:ε ≤ 1 / 2 := min_le_left (1 / 2) ((2 - x ^ 2) / 10)hε2:ε ≤ (2 - x ^ 2) / 10 := min_le_right (1 / 2) ((2 - x ^ 2) / 10)⊢ ∃ ε, 0 < ε ∧ ε < 1 ∧ x ^ 2 + 5 * ε < 2
E:Set Real := {y | y ≥ 0 ∧ y ^ 2 < 2}claim1:2 ∈ upperBounds E :=
Eq.mpr (id (congrArg (fun _a => _a) (propext (upperBound_def E 2)))) fun y hy =>
Mathlib.Tactic.Contrapose.contrapose₁
(Eq.mpr
(id
(implies_congr not_le._simp_1
(Eq.trans (Mathlib.Tactic.Push.not_and_eq (0 ≤ y) (y ^ 2 < 2))
(implies_congr (Eq.refl (0 ≤ y)) not_lt._simp_1))))
fun hy hpos =>
Trans.trans
(Trans.trans
(Mathlib.Meta.NormNum.isNat_le_true (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Mathlib.Meta.NormNum.isNat_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2)) (Eq.refl 4))
(Eq.refl true))
(mul_le_mul (le_of_lt hy) (le_of_lt hy)
(le_of_lt
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Eq.refl (Nat.ble 1 2))))
(le_of_lt
(_root_.lt_trans
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Eq.refl (Nat.ble 1 2)))
hy))))
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.mul_congr (Mathlib.Tactic.Ring.atom_pf y) (Mathlib.Tactic.Ring.atom_pf y)
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pp_pf_overlap y
(Mathlib.Meta.NormNum.IsNat.to_raw_eq
(Mathlib.Meta.NormNum.isNat_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.of_raw ℕ 1)
(Mathlib.Meta.NormNum.IsNat.of_raw ℕ 1) (Eq.refl 2)))
(Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (y ^ Nat.rawCast 1 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0))))
(Mathlib.Tactic.Ring.pow_congr (Mathlib.Tactic.Ring.atom_pf y)
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat ℕ (Eq.refl 2)))
(Mathlib.Tactic.Ring.pow_add
(Mathlib.Tactic.Ring.single_pow
(Mathlib.Tactic.Ring.mul_pow (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 2))
(Mathlib.Tactic.Ring.one_pow (Nat.rawCast 2))))
(Mathlib.Tactic.Ring.pow_zero (y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left y (Nat.rawCast 2) (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))))
(Eq.mp
(congrFun'
(congrArg Membership.mem
(congrArg setOf (funext fun y => congrFun' (congrArg And ge_iff_le._simp_1) (y ^ 2 < 2))))
y)
hy)claim1':BddAbove E := Eq.mpr (id (congrArg (fun _a => _a) (propext (bddAbove_def E)))) (Exists.intro 2 claim1)claim2:1 ∈ E :=
of_eq_true
(Eq.trans
(congrFun'
(congrArg Membership.mem
(congrArg setOf (funext fun y => congrFun' (congrArg And ge_iff_le._simp_1) (y ^ 2 < 2))))
1)
(Eq.trans
(congr (congrArg And zero_le_one._simp_1)
(Eq.trans (congrFun' (congrArg LT.lt (one_pow 2)) 2) Nat.one_lt_ofNat._simp_1))
(and_self True)))claim2':E.Nonemptyx:Real :=
match ExtendedReal.sup E with
| ExtendedReal.neg_infty => 0
| ExtendedReal.real x => x
| ExtendedReal.infty => 0claim3:IsLUB E x := exist_sqrt_two._proof_4 claim1' claim2'claim4:x ≥ 1 := exist_sqrt_two._proof_5 claim2 claim3claim5:x ≤ 2 := exist_sqrt_two._proof_6 claim1 claim3claim6:x.IsPos :=
Eq.mpr (id (congrArg (fun _a => _a) (propext (isPos_iff x))))
(lt_of_not_ge fun a =>
Mathlib.Tactic.Linarith.lt_irrefl
(Eq.mp
(congrArg (fun _a => _a < 0)
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.neg_congr
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_one))
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1)))))
Mathlib.Tactic.Ring.neg_zero))
(Mathlib.Tactic.Ring.sub_congr
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_one))
(Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul x (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1))))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_lt (Nat.rawCast 1)
(Mathlib.Tactic.Ring.add_pf_zero_add (x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0)))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0))))
(Mathlib.Tactic.Ring.add_pf_zero_add (x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))
(Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))
(Mathlib.Tactic.Ring.sub_pf Mathlib.Tactic.Ring.neg_zero
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Tactic.Ring.add_overlap_pf_zero x (Nat.rawCast 1)
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0)))))
(Mathlib.Tactic.Ring.add_pf_zero_add 0)))
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))))
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le (neg_neg_of_pos Mathlib.Tactic.Linarith.zero_lt_one)
(Mathlib.Tactic.Linarith.sub_nonpos_of_le claim4))
(Mathlib.Tactic.Linarith.sub_nonpos_of_le a))))h:x ^ 2 < 2ε:Real := min (1 / 2) ((2 - x ^ 2) / 10)hx:2 - x ^ 2 > 0 :=
lt_of_not_ge fun a =>
Mathlib.Tactic.Linarith.lt_irrefl
(Eq.mp
(congrArg (fun _a => _a < 0)
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.sub_congr
(Mathlib.Tactic.Ring.pow_congr (Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat ℕ (Eq.refl 2)))
(Mathlib.Tactic.Ring.pow_add
(Mathlib.Tactic.Ring.single_pow
(Mathlib.Tactic.Ring.mul_pow (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 2))
(Mathlib.Tactic.Ring.one_pow (Nat.rawCast 2))))
(Mathlib.Tactic.Ring.pow_zero (x ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left x (Nat.rawCast 2) (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2)))
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 2))
(Eq.refl (Int.negOfNat 2)))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_gt (Int.negOfNat 2).rawCast
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))
(Mathlib.Tactic.Ring.sub_congr
(Mathlib.Tactic.Ring.sub_congr
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2)))
(Mathlib.Tactic.Ring.pow_congr (Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat ℕ (Eq.refl 2)))
(Mathlib.Tactic.Ring.pow_add
(Mathlib.Tactic.Ring.single_pow
(Mathlib.Tactic.Ring.mul_pow (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 2))
(Mathlib.Tactic.Ring.one_pow (Nat.rawCast 2))))
(Mathlib.Tactic.Ring.pow_zero (x ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left x (Nat.rawCast 2)
(Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul x (Nat.rawCast 2)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1))))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_lt (Nat.rawCast 2)
(Mathlib.Tactic.Ring.add_pf_zero_add (x ^ Nat.rawCast 2 * (Int.negOfNat 1).rawCast + 0)))))
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))
(Mathlib.Tactic.Ring.sub_pf Mathlib.Tactic.Ring.neg_zero
(Mathlib.Tactic.Ring.add_pf_add_zero
(Nat.rawCast 2 + (x ^ Nat.rawCast 2 * (Int.negOfNat 1).rawCast + 0)))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 2))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 2))
(Eq.refl (Int.ofNat 0))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Tactic.Ring.add_overlap_pf_zero x (Nat.rawCast 2)
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1)) (Eq.refl (Int.ofNat 0)))))
(Mathlib.Tactic.Ring.add_pf_zero_add 0))))
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))))
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le (Mathlib.Tactic.Linarith.sub_neg_of_lt h)
(Mathlib.Tactic.Linarith.sub_nonpos_of_le a)))hε:0 < ε :=
lt_min
(div_pos
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_one) (Eq.refl (Nat.ble 1 1)))
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2)) (Eq.refl (Nat.ble 1 2))))
(div_pos hx
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 10))
(Eq.refl (Nat.ble 1 10))))hε1:ε ≤ 1 / 2 := min_le_left (1 / 2) ((2 - x ^ 2) / 10)hε2:ε ≤ (2 - x ^ 2) / 10 := min_le_right (1 / 2) ((2 - x ^ 2) / 10)⊢ ε < 1E:Set Real := {y | y ≥ 0 ∧ y ^ 2 < 2}claim1:2 ∈ upperBounds E :=
Eq.mpr (id (congrArg (fun _a => _a) (propext (upperBound_def E 2)))) fun y hy =>
Mathlib.Tactic.Contrapose.contrapose₁
(Eq.mpr
(id
(implies_congr not_le._simp_1
(Eq.trans (Mathlib.Tactic.Push.not_and_eq (0 ≤ y) (y ^ 2 < 2))
(implies_congr (Eq.refl (0 ≤ y)) not_lt._simp_1))))
fun hy hpos =>
Trans.trans
(Trans.trans
(Mathlib.Meta.NormNum.isNat_le_true (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Mathlib.Meta.NormNum.isNat_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2)) (Eq.refl 4))
(Eq.refl true))
(mul_le_mul (le_of_lt hy) (le_of_lt hy)
(le_of_lt
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Eq.refl (Nat.ble 1 2))))
(le_of_lt
(_root_.lt_trans
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Eq.refl (Nat.ble 1 2)))
hy))))
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.mul_congr (Mathlib.Tactic.Ring.atom_pf y) (Mathlib.Tactic.Ring.atom_pf y)
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pp_pf_overlap y
(Mathlib.Meta.NormNum.IsNat.to_raw_eq
(Mathlib.Meta.NormNum.isNat_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.of_raw ℕ 1)
(Mathlib.Meta.NormNum.IsNat.of_raw ℕ 1) (Eq.refl 2)))
(Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (y ^ Nat.rawCast 1 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0))))
(Mathlib.Tactic.Ring.pow_congr (Mathlib.Tactic.Ring.atom_pf y)
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat ℕ (Eq.refl 2)))
(Mathlib.Tactic.Ring.pow_add
(Mathlib.Tactic.Ring.single_pow
(Mathlib.Tactic.Ring.mul_pow (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 2))
(Mathlib.Tactic.Ring.one_pow (Nat.rawCast 2))))
(Mathlib.Tactic.Ring.pow_zero (y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left y (Nat.rawCast 2) (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))))
(Eq.mp
(congrFun'
(congrArg Membership.mem
(congrArg setOf (funext fun y => congrFun' (congrArg And ge_iff_le._simp_1) (y ^ 2 < 2))))
y)
hy)claim1':BddAbove E := Eq.mpr (id (congrArg (fun _a => _a) (propext (bddAbove_def E)))) (Exists.intro 2 claim1)claim2:1 ∈ E :=
of_eq_true
(Eq.trans
(congrFun'
(congrArg Membership.mem
(congrArg setOf (funext fun y => congrFun' (congrArg And ge_iff_le._simp_1) (y ^ 2 < 2))))
1)
(Eq.trans
(congr (congrArg And zero_le_one._simp_1)
(Eq.trans (congrFun' (congrArg LT.lt (one_pow 2)) 2) Nat.one_lt_ofNat._simp_1))
(and_self True)))claim2':E.Nonemptyx:Real :=
match ExtendedReal.sup E with
| ExtendedReal.neg_infty => 0
| ExtendedReal.real x => x
| ExtendedReal.infty => 0claim3:IsLUB E x := exist_sqrt_two._proof_4 claim1' claim2'claim4:x ≥ 1 := exist_sqrt_two._proof_5 claim2 claim3claim5:x ≤ 2 := exist_sqrt_two._proof_6 claim1 claim3claim6:x.IsPos :=
Eq.mpr (id (congrArg (fun _a => _a) (propext (isPos_iff x))))
(lt_of_not_ge fun a =>
Mathlib.Tactic.Linarith.lt_irrefl
(Eq.mp
(congrArg (fun _a => _a < 0)
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.neg_congr
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_one))
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1)))))
Mathlib.Tactic.Ring.neg_zero))
(Mathlib.Tactic.Ring.sub_congr
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_one))
(Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul x (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1))))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_lt (Nat.rawCast 1)
(Mathlib.Tactic.Ring.add_pf_zero_add (x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0)))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0))))
(Mathlib.Tactic.Ring.add_pf_zero_add (x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))
(Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))
(Mathlib.Tactic.Ring.sub_pf Mathlib.Tactic.Ring.neg_zero
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Tactic.Ring.add_overlap_pf_zero x (Nat.rawCast 1)
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0)))))
(Mathlib.Tactic.Ring.add_pf_zero_add 0)))
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))))
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le (neg_neg_of_pos Mathlib.Tactic.Linarith.zero_lt_one)
(Mathlib.Tactic.Linarith.sub_nonpos_of_le claim4))
(Mathlib.Tactic.Linarith.sub_nonpos_of_le a))))h:x ^ 2 < 2ε:Real := min (1 / 2) ((2 - x ^ 2) / 10)hx:2 - x ^ 2 > 0 :=
lt_of_not_ge fun a =>
Mathlib.Tactic.Linarith.lt_irrefl
(Eq.mp
(congrArg (fun _a => _a < 0)
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.sub_congr
(Mathlib.Tactic.Ring.pow_congr (Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat ℕ (Eq.refl 2)))
(Mathlib.Tactic.Ring.pow_add
(Mathlib.Tactic.Ring.single_pow
(Mathlib.Tactic.Ring.mul_pow (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 2))
(Mathlib.Tactic.Ring.one_pow (Nat.rawCast 2))))
(Mathlib.Tactic.Ring.pow_zero (x ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left x (Nat.rawCast 2) (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2)))
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 2))
(Eq.refl (Int.negOfNat 2)))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_gt (Int.negOfNat 2).rawCast
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))
(Mathlib.Tactic.Ring.sub_congr
(Mathlib.Tactic.Ring.sub_congr
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2)))
(Mathlib.Tactic.Ring.pow_congr (Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat ℕ (Eq.refl 2)))
(Mathlib.Tactic.Ring.pow_add
(Mathlib.Tactic.Ring.single_pow
(Mathlib.Tactic.Ring.mul_pow (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 2))
(Mathlib.Tactic.Ring.one_pow (Nat.rawCast 2))))
(Mathlib.Tactic.Ring.pow_zero (x ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left x (Nat.rawCast 2)
(Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul x (Nat.rawCast 2)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1))))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_lt (Nat.rawCast 2)
(Mathlib.Tactic.Ring.add_pf_zero_add (x ^ Nat.rawCast 2 * (Int.negOfNat 1).rawCast + 0)))))
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))
(Mathlib.Tactic.Ring.sub_pf Mathlib.Tactic.Ring.neg_zero
(Mathlib.Tactic.Ring.add_pf_add_zero
(Nat.rawCast 2 + (x ^ Nat.rawCast 2 * (Int.negOfNat 1).rawCast + 0)))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 2))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 2))
(Eq.refl (Int.ofNat 0))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Tactic.Ring.add_overlap_pf_zero x (Nat.rawCast 2)
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1)) (Eq.refl (Int.ofNat 0)))))
(Mathlib.Tactic.Ring.add_pf_zero_add 0))))
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))))
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le (Mathlib.Tactic.Linarith.sub_neg_of_lt h)
(Mathlib.Tactic.Linarith.sub_nonpos_of_le a)))hε:0 < ε :=
lt_min
(div_pos
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_one) (Eq.refl (Nat.ble 1 1)))
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2)) (Eq.refl (Nat.ble 1 2))))
(div_pos hx
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 10))
(Eq.refl (Nat.ble 1 10))))hε1:ε ≤ 1 / 2 := min_le_left (1 / 2) ((2 - x ^ 2) / 10)hε2:ε ≤ (2 - x ^ 2) / 10 := min_le_right (1 / 2) ((2 - x ^ 2) / 10)⊢ x ^ 2 + 5 * ε < 2 E:Set Real := {y | y ≥ 0 ∧ y ^ 2 < 2}claim1:2 ∈ upperBounds E :=
Eq.mpr (id (congrArg (fun _a => _a) (propext (upperBound_def E 2)))) fun y hy =>
Mathlib.Tactic.Contrapose.contrapose₁
(Eq.mpr
(id
(implies_congr not_le._simp_1
(Eq.trans (Mathlib.Tactic.Push.not_and_eq (0 ≤ y) (y ^ 2 < 2))
(implies_congr (Eq.refl (0 ≤ y)) not_lt._simp_1))))
fun hy hpos =>
Trans.trans
(Trans.trans
(Mathlib.Meta.NormNum.isNat_le_true (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Mathlib.Meta.NormNum.isNat_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2)) (Eq.refl 4))
(Eq.refl true))
(mul_le_mul (le_of_lt hy) (le_of_lt hy)
(le_of_lt
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Eq.refl (Nat.ble 1 2))))
(le_of_lt
(_root_.lt_trans
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Eq.refl (Nat.ble 1 2)))
hy))))
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.mul_congr (Mathlib.Tactic.Ring.atom_pf y) (Mathlib.Tactic.Ring.atom_pf y)
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pp_pf_overlap y
(Mathlib.Meta.NormNum.IsNat.to_raw_eq
(Mathlib.Meta.NormNum.isNat_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.of_raw ℕ 1)
(Mathlib.Meta.NormNum.IsNat.of_raw ℕ 1) (Eq.refl 2)))
(Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (y ^ Nat.rawCast 1 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0))))
(Mathlib.Tactic.Ring.pow_congr (Mathlib.Tactic.Ring.atom_pf y)
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat ℕ (Eq.refl 2)))
(Mathlib.Tactic.Ring.pow_add
(Mathlib.Tactic.Ring.single_pow
(Mathlib.Tactic.Ring.mul_pow (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 2))
(Mathlib.Tactic.Ring.one_pow (Nat.rawCast 2))))
(Mathlib.Tactic.Ring.pow_zero (y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left y (Nat.rawCast 2) (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))))
(Eq.mp
(congrFun'
(congrArg Membership.mem
(congrArg setOf (funext fun y => congrFun' (congrArg And ge_iff_le._simp_1) (y ^ 2 < 2))))
y)
hy)claim1':BddAbove E := Eq.mpr (id (congrArg (fun _a => _a) (propext (bddAbove_def E)))) (Exists.intro 2 claim1)claim2:1 ∈ E :=
of_eq_true
(Eq.trans
(congrFun'
(congrArg Membership.mem
(congrArg setOf (funext fun y => congrFun' (congrArg And ge_iff_le._simp_1) (y ^ 2 < 2))))
1)
(Eq.trans
(congr (congrArg And zero_le_one._simp_1)
(Eq.trans (congrFun' (congrArg LT.lt (one_pow 2)) 2) Nat.one_lt_ofNat._simp_1))
(and_self True)))claim2':E.Nonemptyx:Real :=
match ExtendedReal.sup E with
| ExtendedReal.neg_infty => 0
| ExtendedReal.real x => x
| ExtendedReal.infty => 0claim3:IsLUB E x := exist_sqrt_two._proof_4 claim1' claim2'claim4:x ≥ 1 := exist_sqrt_two._proof_5 claim2 claim3claim5:x ≤ 2 := exist_sqrt_two._proof_6 claim1 claim3claim6:x.IsPos :=
Eq.mpr (id (congrArg (fun _a => _a) (propext (isPos_iff x))))
(lt_of_not_ge fun a =>
Mathlib.Tactic.Linarith.lt_irrefl
(Eq.mp
(congrArg (fun _a => _a < 0)
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.neg_congr
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_one))
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1)))))
Mathlib.Tactic.Ring.neg_zero))
(Mathlib.Tactic.Ring.sub_congr
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_one))
(Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul x (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1))))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_lt (Nat.rawCast 1)
(Mathlib.Tactic.Ring.add_pf_zero_add (x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0)))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0))))
(Mathlib.Tactic.Ring.add_pf_zero_add (x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))
(Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))
(Mathlib.Tactic.Ring.sub_pf Mathlib.Tactic.Ring.neg_zero
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Tactic.Ring.add_overlap_pf_zero x (Nat.rawCast 1)
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0)))))
(Mathlib.Tactic.Ring.add_pf_zero_add 0)))
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))))
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le (neg_neg_of_pos Mathlib.Tactic.Linarith.zero_lt_one)
(Mathlib.Tactic.Linarith.sub_nonpos_of_le claim4))
(Mathlib.Tactic.Linarith.sub_nonpos_of_le a))))h:x ^ 2 < 2ε:Real := min (1 / 2) ((2 - x ^ 2) / 10)hx:2 - x ^ 2 > 0 :=
lt_of_not_ge fun a =>
Mathlib.Tactic.Linarith.lt_irrefl
(Eq.mp
(congrArg (fun _a => _a < 0)
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.sub_congr
(Mathlib.Tactic.Ring.pow_congr (Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat ℕ (Eq.refl 2)))
(Mathlib.Tactic.Ring.pow_add
(Mathlib.Tactic.Ring.single_pow
(Mathlib.Tactic.Ring.mul_pow (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 2))
(Mathlib.Tactic.Ring.one_pow (Nat.rawCast 2))))
(Mathlib.Tactic.Ring.pow_zero (x ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left x (Nat.rawCast 2) (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2)))
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 2))
(Eq.refl (Int.negOfNat 2)))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_gt (Int.negOfNat 2).rawCast
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))
(Mathlib.Tactic.Ring.sub_congr
(Mathlib.Tactic.Ring.sub_congr
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2)))
(Mathlib.Tactic.Ring.pow_congr (Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat ℕ (Eq.refl 2)))
(Mathlib.Tactic.Ring.pow_add
(Mathlib.Tactic.Ring.single_pow
(Mathlib.Tactic.Ring.mul_pow (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 2))
(Mathlib.Tactic.Ring.one_pow (Nat.rawCast 2))))
(Mathlib.Tactic.Ring.pow_zero (x ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left x (Nat.rawCast 2)
(Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul x (Nat.rawCast 2)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1))))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_lt (Nat.rawCast 2)
(Mathlib.Tactic.Ring.add_pf_zero_add (x ^ Nat.rawCast 2 * (Int.negOfNat 1).rawCast + 0)))))
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))
(Mathlib.Tactic.Ring.sub_pf Mathlib.Tactic.Ring.neg_zero
(Mathlib.Tactic.Ring.add_pf_add_zero
(Nat.rawCast 2 + (x ^ Nat.rawCast 2 * (Int.negOfNat 1).rawCast + 0)))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 2))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 2))
(Eq.refl (Int.ofNat 0))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Tactic.Ring.add_overlap_pf_zero x (Nat.rawCast 2)
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1)) (Eq.refl (Int.ofNat 0)))))
(Mathlib.Tactic.Ring.add_pf_zero_add 0))))
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))))
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le (Mathlib.Tactic.Linarith.sub_neg_of_lt h)
(Mathlib.Tactic.Linarith.sub_nonpos_of_le a)))hε:0 < ε :=
lt_min
(div_pos
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_one) (Eq.refl (Nat.ble 1 1)))
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2)) (Eq.refl (Nat.ble 1 2))))
(div_pos hx
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 10))
(Eq.refl (Nat.ble 1 10))))hε1:ε ≤ 1 / 2 := min_le_left (1 / 2) ((2 - x ^ 2) / 10)hε2:ε ≤ (2 - x ^ 2) / 10 := min_le_right (1 / 2) ((2 - x ^ 2) / 10)⊢ ε < 1E:Set Real := {y | y ≥ 0 ∧ y ^ 2 < 2}claim1:2 ∈ upperBounds E :=
Eq.mpr (id (congrArg (fun _a => _a) (propext (upperBound_def E 2)))) fun y hy =>
Mathlib.Tactic.Contrapose.contrapose₁
(Eq.mpr
(id
(implies_congr not_le._simp_1
(Eq.trans (Mathlib.Tactic.Push.not_and_eq (0 ≤ y) (y ^ 2 < 2))
(implies_congr (Eq.refl (0 ≤ y)) not_lt._simp_1))))
fun hy hpos =>
Trans.trans
(Trans.trans
(Mathlib.Meta.NormNum.isNat_le_true (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Mathlib.Meta.NormNum.isNat_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2)) (Eq.refl 4))
(Eq.refl true))
(mul_le_mul (le_of_lt hy) (le_of_lt hy)
(le_of_lt
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Eq.refl (Nat.ble 1 2))))
(le_of_lt
(_root_.lt_trans
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Eq.refl (Nat.ble 1 2)))
hy))))
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.mul_congr (Mathlib.Tactic.Ring.atom_pf y) (Mathlib.Tactic.Ring.atom_pf y)
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pp_pf_overlap y
(Mathlib.Meta.NormNum.IsNat.to_raw_eq
(Mathlib.Meta.NormNum.isNat_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.of_raw ℕ 1)
(Mathlib.Meta.NormNum.IsNat.of_raw ℕ 1) (Eq.refl 2)))
(Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (y ^ Nat.rawCast 1 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0))))
(Mathlib.Tactic.Ring.pow_congr (Mathlib.Tactic.Ring.atom_pf y)
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat ℕ (Eq.refl 2)))
(Mathlib.Tactic.Ring.pow_add
(Mathlib.Tactic.Ring.single_pow
(Mathlib.Tactic.Ring.mul_pow (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 2))
(Mathlib.Tactic.Ring.one_pow (Nat.rawCast 2))))
(Mathlib.Tactic.Ring.pow_zero (y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left y (Nat.rawCast 2) (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))))
(Eq.mp
(congrFun'
(congrArg Membership.mem
(congrArg setOf (funext fun y => congrFun' (congrArg And ge_iff_le._simp_1) (y ^ 2 < 2))))
y)
hy)claim1':BddAbove E := Eq.mpr (id (congrArg (fun _a => _a) (propext (bddAbove_def E)))) (Exists.intro 2 claim1)claim2:1 ∈ E :=
of_eq_true
(Eq.trans
(congrFun'
(congrArg Membership.mem
(congrArg setOf (funext fun y => congrFun' (congrArg And ge_iff_le._simp_1) (y ^ 2 < 2))))
1)
(Eq.trans
(congr (congrArg And zero_le_one._simp_1)
(Eq.trans (congrFun' (congrArg LT.lt (one_pow 2)) 2) Nat.one_lt_ofNat._simp_1))
(and_self True)))claim2':E.Nonemptyx:Real :=
match ExtendedReal.sup E with
| ExtendedReal.neg_infty => 0
| ExtendedReal.real x => x
| ExtendedReal.infty => 0claim3:IsLUB E x := exist_sqrt_two._proof_4 claim1' claim2'claim4:x ≥ 1 := exist_sqrt_two._proof_5 claim2 claim3claim5:x ≤ 2 := exist_sqrt_two._proof_6 claim1 claim3claim6:x.IsPos :=
Eq.mpr (id (congrArg (fun _a => _a) (propext (isPos_iff x))))
(lt_of_not_ge fun a =>
Mathlib.Tactic.Linarith.lt_irrefl
(Eq.mp
(congrArg (fun _a => _a < 0)
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.neg_congr
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_one))
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1)))))
Mathlib.Tactic.Ring.neg_zero))
(Mathlib.Tactic.Ring.sub_congr
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_one))
(Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul x (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1))))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_lt (Nat.rawCast 1)
(Mathlib.Tactic.Ring.add_pf_zero_add (x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0)))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0))))
(Mathlib.Tactic.Ring.add_pf_zero_add (x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))
(Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))
(Mathlib.Tactic.Ring.sub_pf Mathlib.Tactic.Ring.neg_zero
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Tactic.Ring.add_overlap_pf_zero x (Nat.rawCast 1)
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0)))))
(Mathlib.Tactic.Ring.add_pf_zero_add 0)))
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))))
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le (neg_neg_of_pos Mathlib.Tactic.Linarith.zero_lt_one)
(Mathlib.Tactic.Linarith.sub_nonpos_of_le claim4))
(Mathlib.Tactic.Linarith.sub_nonpos_of_le a))))h:x ^ 2 < 2ε:Real := min (1 / 2) ((2 - x ^ 2) / 10)hx:2 - x ^ 2 > 0 :=
lt_of_not_ge fun a =>
Mathlib.Tactic.Linarith.lt_irrefl
(Eq.mp
(congrArg (fun _a => _a < 0)
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.sub_congr
(Mathlib.Tactic.Ring.pow_congr (Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat ℕ (Eq.refl 2)))
(Mathlib.Tactic.Ring.pow_add
(Mathlib.Tactic.Ring.single_pow
(Mathlib.Tactic.Ring.mul_pow (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 2))
(Mathlib.Tactic.Ring.one_pow (Nat.rawCast 2))))
(Mathlib.Tactic.Ring.pow_zero (x ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left x (Nat.rawCast 2) (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2)))
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 2))
(Eq.refl (Int.negOfNat 2)))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_gt (Int.negOfNat 2).rawCast
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))
(Mathlib.Tactic.Ring.sub_congr
(Mathlib.Tactic.Ring.sub_congr
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2)))
(Mathlib.Tactic.Ring.pow_congr (Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat ℕ (Eq.refl 2)))
(Mathlib.Tactic.Ring.pow_add
(Mathlib.Tactic.Ring.single_pow
(Mathlib.Tactic.Ring.mul_pow (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 2))
(Mathlib.Tactic.Ring.one_pow (Nat.rawCast 2))))
(Mathlib.Tactic.Ring.pow_zero (x ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left x (Nat.rawCast 2)
(Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul x (Nat.rawCast 2)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1))))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_lt (Nat.rawCast 2)
(Mathlib.Tactic.Ring.add_pf_zero_add (x ^ Nat.rawCast 2 * (Int.negOfNat 1).rawCast + 0)))))
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))
(Mathlib.Tactic.Ring.sub_pf Mathlib.Tactic.Ring.neg_zero
(Mathlib.Tactic.Ring.add_pf_add_zero
(Nat.rawCast 2 + (x ^ Nat.rawCast 2 * (Int.negOfNat 1).rawCast + 0)))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 2))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 2))
(Eq.refl (Int.ofNat 0))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Tactic.Ring.add_overlap_pf_zero x (Nat.rawCast 2)
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1)) (Eq.refl (Int.ofNat 0)))))
(Mathlib.Tactic.Ring.add_pf_zero_add 0))))
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))))
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le (Mathlib.Tactic.Linarith.sub_neg_of_lt h)
(Mathlib.Tactic.Linarith.sub_nonpos_of_le a)))hε:0 < ε :=
lt_min
(div_pos
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_one) (Eq.refl (Nat.ble 1 1)))
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2)) (Eq.refl (Nat.ble 1 2))))
(div_pos hx
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 10))
(Eq.refl (Nat.ble 1 10))))hε1:ε ≤ 1 / 2 := min_le_left (1 / 2) ((2 - x ^ 2) / 10)hε2:ε ≤ (2 - x ^ 2) / 10 := min_le_right (1 / 2) ((2 - x ^ 2) / 10)⊢ x ^ 2 + 5 * ε < 2 All goals completed! 🐙
E:Set Real := {y | y ≥ 0 ∧ y ^ 2 < 2}claim1:2 ∈ upperBounds E :=
Eq.mpr (id (congrArg (fun _a => _a) (propext (upperBound_def E 2)))) fun y hy =>
Mathlib.Tactic.Contrapose.contrapose₁
(Eq.mpr
(id
(implies_congr not_le._simp_1
(Eq.trans (Mathlib.Tactic.Push.not_and_eq (0 ≤ y) (y ^ 2 < 2))
(implies_congr (Eq.refl (0 ≤ y)) not_lt._simp_1))))
fun hy hpos =>
Trans.trans
(Trans.trans
(Mathlib.Meta.NormNum.isNat_le_true (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Mathlib.Meta.NormNum.isNat_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2)) (Eq.refl 4))
(Eq.refl true))
(mul_le_mul (le_of_lt hy) (le_of_lt hy)
(le_of_lt
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Eq.refl (Nat.ble 1 2))))
(le_of_lt
(_root_.lt_trans
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Eq.refl (Nat.ble 1 2)))
hy))))
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.mul_congr (Mathlib.Tactic.Ring.atom_pf y) (Mathlib.Tactic.Ring.atom_pf y)
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pp_pf_overlap y
(Mathlib.Meta.NormNum.IsNat.to_raw_eq
(Mathlib.Meta.NormNum.isNat_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.of_raw ℕ 1)
(Mathlib.Meta.NormNum.IsNat.of_raw ℕ 1) (Eq.refl 2)))
(Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (y ^ Nat.rawCast 1 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0))))
(Mathlib.Tactic.Ring.pow_congr (Mathlib.Tactic.Ring.atom_pf y)
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat ℕ (Eq.refl 2)))
(Mathlib.Tactic.Ring.pow_add
(Mathlib.Tactic.Ring.single_pow
(Mathlib.Tactic.Ring.mul_pow (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 2))
(Mathlib.Tactic.Ring.one_pow (Nat.rawCast 2))))
(Mathlib.Tactic.Ring.pow_zero (y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left y (Nat.rawCast 2) (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))))
(Eq.mp
(congrFun'
(congrArg Membership.mem
(congrArg setOf (funext fun y => congrFun' (congrArg And ge_iff_le._simp_1) (y ^ 2 < 2))))
y)
hy)claim1':BddAbove E := Eq.mpr (id (congrArg (fun _a => _a) (propext (bddAbove_def E)))) (Exists.intro 2 claim1)claim2:1 ∈ E :=
of_eq_true
(Eq.trans
(congrFun'
(congrArg Membership.mem
(congrArg setOf (funext fun y => congrFun' (congrArg And ge_iff_le._simp_1) (y ^ 2 < 2))))
1)
(Eq.trans
(congr (congrArg And zero_le_one._simp_1)
(Eq.trans (congrFun' (congrArg LT.lt (one_pow 2)) 2) Nat.one_lt_ofNat._simp_1))
(and_self True)))claim2':E.Nonemptyx:Real :=
match ExtendedReal.sup E with
| ExtendedReal.neg_infty => 0
| ExtendedReal.real x => x
| ExtendedReal.infty => 0claim3:IsLUB E x := exist_sqrt_two._proof_4 claim1' claim2'claim4:x ≥ 1 := exist_sqrt_two._proof_5 claim2 claim3claim5:x ≤ 2 := exist_sqrt_two._proof_6 claim1 claim3claim6:x.IsPos :=
Eq.mpr (id (congrArg (fun _a => _a) (propext (isPos_iff x))))
(lt_of_not_ge fun a =>
Mathlib.Tactic.Linarith.lt_irrefl
(Eq.mp
(congrArg (fun _a => _a < 0)
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.neg_congr
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_one))
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1)))))
Mathlib.Tactic.Ring.neg_zero))
(Mathlib.Tactic.Ring.sub_congr
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_one))
(Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul x (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1))))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_lt (Nat.rawCast 1)
(Mathlib.Tactic.Ring.add_pf_zero_add (x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0)))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0))))
(Mathlib.Tactic.Ring.add_pf_zero_add (x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))
(Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))
(Mathlib.Tactic.Ring.sub_pf Mathlib.Tactic.Ring.neg_zero
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Tactic.Ring.add_overlap_pf_zero x (Nat.rawCast 1)
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0)))))
(Mathlib.Tactic.Ring.add_pf_zero_add 0)))
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))))
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le (neg_neg_of_pos Mathlib.Tactic.Linarith.zero_lt_one)
(Mathlib.Tactic.Linarith.sub_nonpos_of_le claim4))
(Mathlib.Tactic.Linarith.sub_nonpos_of_le a))))h:x ^ 2 < 2ε:Realhε1:0 < εhε2:ε < 1hε3:x ^ 2 + 5 * ε < 2⊢ x ^ 2 = 2
have claim8 : (x+ε)^2 < 2 := calc
_ = x^2 + (2*x)*ε + ε*ε := E:Set Real := {y | y ≥ 0 ∧ y ^ 2 < 2}claim1:2 ∈ upperBounds E :=
Eq.mpr (id (congrArg (fun _a => _a) (propext (upperBound_def E 2)))) fun y hy =>
Mathlib.Tactic.Contrapose.contrapose₁
(Eq.mpr
(id
(implies_congr not_le._simp_1
(Eq.trans (Mathlib.Tactic.Push.not_and_eq (0 ≤ y) (y ^ 2 < 2))
(implies_congr (Eq.refl (0 ≤ y)) not_lt._simp_1))))
fun hy hpos =>
Trans.trans
(Trans.trans
(Mathlib.Meta.NormNum.isNat_le_true (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Mathlib.Meta.NormNum.isNat_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2)) (Eq.refl 4))
(Eq.refl true))
(mul_le_mul (le_of_lt hy) (le_of_lt hy)
(le_of_lt
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Eq.refl (Nat.ble 1 2))))
(le_of_lt
(_root_.lt_trans
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Eq.refl (Nat.ble 1 2)))
hy))))
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.mul_congr (Mathlib.Tactic.Ring.atom_pf y) (Mathlib.Tactic.Ring.atom_pf y)
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pp_pf_overlap y
(Mathlib.Meta.NormNum.IsNat.to_raw_eq
(Mathlib.Meta.NormNum.isNat_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.of_raw ℕ 1)
(Mathlib.Meta.NormNum.IsNat.of_raw ℕ 1) (Eq.refl 2)))
(Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (y ^ Nat.rawCast 1 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0))))
(Mathlib.Tactic.Ring.pow_congr (Mathlib.Tactic.Ring.atom_pf y)
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat ℕ (Eq.refl 2)))
(Mathlib.Tactic.Ring.pow_add
(Mathlib.Tactic.Ring.single_pow
(Mathlib.Tactic.Ring.mul_pow (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 2))
(Mathlib.Tactic.Ring.one_pow (Nat.rawCast 2))))
(Mathlib.Tactic.Ring.pow_zero (y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left y (Nat.rawCast 2) (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))))
(Eq.mp
(congrFun'
(congrArg Membership.mem
(congrArg setOf (funext fun y => congrFun' (congrArg And ge_iff_le._simp_1) (y ^ 2 < 2))))
y)
hy)claim1':BddAbove E := Eq.mpr (id (congrArg (fun _a => _a) (propext (bddAbove_def E)))) (Exists.intro 2 claim1)claim2:1 ∈ E :=
of_eq_true
(Eq.trans
(congrFun'
(congrArg Membership.mem
(congrArg setOf (funext fun y => congrFun' (congrArg And ge_iff_le._simp_1) (y ^ 2 < 2))))
1)
(Eq.trans
(congr (congrArg And zero_le_one._simp_1)
(Eq.trans (congrFun' (congrArg LT.lt (one_pow 2)) 2) Nat.one_lt_ofNat._simp_1))
(and_self True)))claim2':E.Nonemptyx:Real :=
match ExtendedReal.sup E with
| ExtendedReal.neg_infty => 0
| ExtendedReal.real x => x
| ExtendedReal.infty => 0claim3:IsLUB E x := exist_sqrt_two._proof_4 claim1' claim2'claim4:x ≥ 1 := exist_sqrt_two._proof_5 claim2 claim3claim5:x ≤ 2 := exist_sqrt_two._proof_6 claim1 claim3claim6:x.IsPos :=
Eq.mpr (id (congrArg (fun _a => _a) (propext (isPos_iff x))))
(lt_of_not_ge fun a =>
Mathlib.Tactic.Linarith.lt_irrefl
(Eq.mp
(congrArg (fun _a => _a < 0)
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.neg_congr
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_one))
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1)))))
Mathlib.Tactic.Ring.neg_zero))
(Mathlib.Tactic.Ring.sub_congr
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_one))
(Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul x (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1))))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_lt (Nat.rawCast 1)
(Mathlib.Tactic.Ring.add_pf_zero_add (x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0)))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0))))
(Mathlib.Tactic.Ring.add_pf_zero_add (x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))
(Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))
(Mathlib.Tactic.Ring.sub_pf Mathlib.Tactic.Ring.neg_zero
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Tactic.Ring.add_overlap_pf_zero x (Nat.rawCast 1)
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0)))))
(Mathlib.Tactic.Ring.add_pf_zero_add 0)))
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))))
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le (neg_neg_of_pos Mathlib.Tactic.Linarith.zero_lt_one)
(Mathlib.Tactic.Linarith.sub_nonpos_of_le claim4))
(Mathlib.Tactic.Linarith.sub_nonpos_of_le a))))h:x ^ 2 < 2ε:Realhε1:0 < εhε2:ε < 1hε3:x ^ 2 + 5 * ε < 2⊢ (x + ε) ^ 2 = x ^ 2 + 2 * x * ε + ε * ε All goals completed! 🐙
_ ≤ x^2 + (2*2)*ε + 1*ε := E:Set Real := {y | y ≥ 0 ∧ y ^ 2 < 2}claim1:2 ∈ upperBounds E :=
Eq.mpr (id (congrArg (fun _a => _a) (propext (upperBound_def E 2)))) fun y hy =>
Mathlib.Tactic.Contrapose.contrapose₁
(Eq.mpr
(id
(implies_congr not_le._simp_1
(Eq.trans (Mathlib.Tactic.Push.not_and_eq (0 ≤ y) (y ^ 2 < 2))
(implies_congr (Eq.refl (0 ≤ y)) not_lt._simp_1))))
fun hy hpos =>
Trans.trans
(Trans.trans
(Mathlib.Meta.NormNum.isNat_le_true (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Mathlib.Meta.NormNum.isNat_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2)) (Eq.refl 4))
(Eq.refl true))
(mul_le_mul (le_of_lt hy) (le_of_lt hy)
(le_of_lt
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Eq.refl (Nat.ble 1 2))))
(le_of_lt
(_root_.lt_trans
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Eq.refl (Nat.ble 1 2)))
hy))))
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.mul_congr (Mathlib.Tactic.Ring.atom_pf y) (Mathlib.Tactic.Ring.atom_pf y)
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pp_pf_overlap y
(Mathlib.Meta.NormNum.IsNat.to_raw_eq
(Mathlib.Meta.NormNum.isNat_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.of_raw ℕ 1)
(Mathlib.Meta.NormNum.IsNat.of_raw ℕ 1) (Eq.refl 2)))
(Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (y ^ Nat.rawCast 1 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0))))
(Mathlib.Tactic.Ring.pow_congr (Mathlib.Tactic.Ring.atom_pf y)
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat ℕ (Eq.refl 2)))
(Mathlib.Tactic.Ring.pow_add
(Mathlib.Tactic.Ring.single_pow
(Mathlib.Tactic.Ring.mul_pow (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 2))
(Mathlib.Tactic.Ring.one_pow (Nat.rawCast 2))))
(Mathlib.Tactic.Ring.pow_zero (y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left y (Nat.rawCast 2) (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))))
(Eq.mp
(congrFun'
(congrArg Membership.mem
(congrArg setOf (funext fun y => congrFun' (congrArg And ge_iff_le._simp_1) (y ^ 2 < 2))))
y)
hy)claim1':BddAbove E := Eq.mpr (id (congrArg (fun _a => _a) (propext (bddAbove_def E)))) (Exists.intro 2 claim1)claim2:1 ∈ E :=
of_eq_true
(Eq.trans
(congrFun'
(congrArg Membership.mem
(congrArg setOf (funext fun y => congrFun' (congrArg And ge_iff_le._simp_1) (y ^ 2 < 2))))
1)
(Eq.trans
(congr (congrArg And zero_le_one._simp_1)
(Eq.trans (congrFun' (congrArg LT.lt (one_pow 2)) 2) Nat.one_lt_ofNat._simp_1))
(and_self True)))claim2':E.Nonemptyx:Real :=
match ExtendedReal.sup E with
| ExtendedReal.neg_infty => 0
| ExtendedReal.real x => x
| ExtendedReal.infty => 0claim3:IsLUB E x := exist_sqrt_two._proof_4 claim1' claim2'claim4:x ≥ 1 := exist_sqrt_two._proof_5 claim2 claim3claim5:x ≤ 2 := exist_sqrt_two._proof_6 claim1 claim3claim6:x.IsPos :=
Eq.mpr (id (congrArg (fun _a => _a) (propext (isPos_iff x))))
(lt_of_not_ge fun a =>
Mathlib.Tactic.Linarith.lt_irrefl
(Eq.mp
(congrArg (fun _a => _a < 0)
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.neg_congr
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_one))
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1)))))
Mathlib.Tactic.Ring.neg_zero))
(Mathlib.Tactic.Ring.sub_congr
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_one))
(Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul x (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1))))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_lt (Nat.rawCast 1)
(Mathlib.Tactic.Ring.add_pf_zero_add (x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0)))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0))))
(Mathlib.Tactic.Ring.add_pf_zero_add (x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))
(Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))
(Mathlib.Tactic.Ring.sub_pf Mathlib.Tactic.Ring.neg_zero
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Tactic.Ring.add_overlap_pf_zero x (Nat.rawCast 1)
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0)))))
(Mathlib.Tactic.Ring.add_pf_zero_add 0)))
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))))
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le (neg_neg_of_pos Mathlib.Tactic.Linarith.zero_lt_one)
(Mathlib.Tactic.Linarith.sub_nonpos_of_le claim4))
(Mathlib.Tactic.Linarith.sub_nonpos_of_le a))))h:x ^ 2 < 2ε:Realhε1:0 < εhε2:ε < 1hε3:x ^ 2 + 5 * ε < 2⊢ x ^ 2 + 2 * x * ε + ε * ε ≤ x ^ 2 + 2 * 2 * ε + 1 * ε All goals completed! 🐙
_ = x^2 + 5*ε := E:Set Real := {y | y ≥ 0 ∧ y ^ 2 < 2}claim1:2 ∈ upperBounds E :=
Eq.mpr (id (congrArg (fun _a => _a) (propext (upperBound_def E 2)))) fun y hy =>
Mathlib.Tactic.Contrapose.contrapose₁
(Eq.mpr
(id
(implies_congr not_le._simp_1
(Eq.trans (Mathlib.Tactic.Push.not_and_eq (0 ≤ y) (y ^ 2 < 2))
(implies_congr (Eq.refl (0 ≤ y)) not_lt._simp_1))))
fun hy hpos =>
Trans.trans
(Trans.trans
(Mathlib.Meta.NormNum.isNat_le_true (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Mathlib.Meta.NormNum.isNat_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2)) (Eq.refl 4))
(Eq.refl true))
(mul_le_mul (le_of_lt hy) (le_of_lt hy)
(le_of_lt
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Eq.refl (Nat.ble 1 2))))
(le_of_lt
(_root_.lt_trans
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Eq.refl (Nat.ble 1 2)))
hy))))
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.mul_congr (Mathlib.Tactic.Ring.atom_pf y) (Mathlib.Tactic.Ring.atom_pf y)
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pp_pf_overlap y
(Mathlib.Meta.NormNum.IsNat.to_raw_eq
(Mathlib.Meta.NormNum.isNat_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.of_raw ℕ 1)
(Mathlib.Meta.NormNum.IsNat.of_raw ℕ 1) (Eq.refl 2)))
(Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (y ^ Nat.rawCast 1 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0))))
(Mathlib.Tactic.Ring.pow_congr (Mathlib.Tactic.Ring.atom_pf y)
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat ℕ (Eq.refl 2)))
(Mathlib.Tactic.Ring.pow_add
(Mathlib.Tactic.Ring.single_pow
(Mathlib.Tactic.Ring.mul_pow (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 2))
(Mathlib.Tactic.Ring.one_pow (Nat.rawCast 2))))
(Mathlib.Tactic.Ring.pow_zero (y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left y (Nat.rawCast 2) (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))))
(Eq.mp
(congrFun'
(congrArg Membership.mem
(congrArg setOf (funext fun y => congrFun' (congrArg And ge_iff_le._simp_1) (y ^ 2 < 2))))
y)
hy)claim1':BddAbove E := Eq.mpr (id (congrArg (fun _a => _a) (propext (bddAbove_def E)))) (Exists.intro 2 claim1)claim2:1 ∈ E :=
of_eq_true
(Eq.trans
(congrFun'
(congrArg Membership.mem
(congrArg setOf (funext fun y => congrFun' (congrArg And ge_iff_le._simp_1) (y ^ 2 < 2))))
1)
(Eq.trans
(congr (congrArg And zero_le_one._simp_1)
(Eq.trans (congrFun' (congrArg LT.lt (one_pow 2)) 2) Nat.one_lt_ofNat._simp_1))
(and_self True)))claim2':E.Nonemptyx:Real :=
match ExtendedReal.sup E with
| ExtendedReal.neg_infty => 0
| ExtendedReal.real x => x
| ExtendedReal.infty => 0claim3:IsLUB E x := exist_sqrt_two._proof_4 claim1' claim2'claim4:x ≥ 1 := exist_sqrt_two._proof_5 claim2 claim3claim5:x ≤ 2 := exist_sqrt_two._proof_6 claim1 claim3claim6:x.IsPos :=
Eq.mpr (id (congrArg (fun _a => _a) (propext (isPos_iff x))))
(lt_of_not_ge fun a =>
Mathlib.Tactic.Linarith.lt_irrefl
(Eq.mp
(congrArg (fun _a => _a < 0)
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.neg_congr
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_one))
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1)))))
Mathlib.Tactic.Ring.neg_zero))
(Mathlib.Tactic.Ring.sub_congr
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_one))
(Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul x (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1))))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_lt (Nat.rawCast 1)
(Mathlib.Tactic.Ring.add_pf_zero_add (x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0)))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0))))
(Mathlib.Tactic.Ring.add_pf_zero_add (x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))
(Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))
(Mathlib.Tactic.Ring.sub_pf Mathlib.Tactic.Ring.neg_zero
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Tactic.Ring.add_overlap_pf_zero x (Nat.rawCast 1)
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0)))))
(Mathlib.Tactic.Ring.add_pf_zero_add 0)))
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))))
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le (neg_neg_of_pos Mathlib.Tactic.Linarith.zero_lt_one)
(Mathlib.Tactic.Linarith.sub_nonpos_of_le claim4))
(Mathlib.Tactic.Linarith.sub_nonpos_of_le a))))h:x ^ 2 < 2ε:Realhε1:0 < εhε2:ε < 1hε3:x ^ 2 + 5 * ε < 2⊢ x ^ 2 + 2 * 2 * ε + 1 * ε = x ^ 2 + 5 * ε All goals completed! 🐙
_ < 2 := hε3
have claim9 : x + ε ∈ E := ⊢ ∃ x, x ^ 2 = 2 E:Set Real := {y | y ≥ 0 ∧ y ^ 2 < 2}claim1:2 ∈ upperBounds E :=
Eq.mpr (id (congrArg (fun _a => _a) (propext (upperBound_def E 2)))) fun y hy =>
Mathlib.Tactic.Contrapose.contrapose₁
(Eq.mpr
(id
(implies_congr not_le._simp_1
(Eq.trans (Mathlib.Tactic.Push.not_and_eq (0 ≤ y) (y ^ 2 < 2))
(implies_congr (Eq.refl (0 ≤ y)) not_lt._simp_1))))
fun hy hpos =>
Trans.trans
(Trans.trans
(Mathlib.Meta.NormNum.isNat_le_true (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Mathlib.Meta.NormNum.isNat_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2)) (Eq.refl 4))
(Eq.refl true))
(mul_le_mul (le_of_lt hy) (le_of_lt hy)
(le_of_lt
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Eq.refl (Nat.ble 1 2))))
(le_of_lt
(_root_.lt_trans
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Eq.refl (Nat.ble 1 2)))
hy))))
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.mul_congr (Mathlib.Tactic.Ring.atom_pf y) (Mathlib.Tactic.Ring.atom_pf y)
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pp_pf_overlap y
(Mathlib.Meta.NormNum.IsNat.to_raw_eq
(Mathlib.Meta.NormNum.isNat_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.of_raw ℕ 1)
(Mathlib.Meta.NormNum.IsNat.of_raw ℕ 1) (Eq.refl 2)))
(Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (y ^ Nat.rawCast 1 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0))))
(Mathlib.Tactic.Ring.pow_congr (Mathlib.Tactic.Ring.atom_pf y)
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat ℕ (Eq.refl 2)))
(Mathlib.Tactic.Ring.pow_add
(Mathlib.Tactic.Ring.single_pow
(Mathlib.Tactic.Ring.mul_pow (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 2))
(Mathlib.Tactic.Ring.one_pow (Nat.rawCast 2))))
(Mathlib.Tactic.Ring.pow_zero (y ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left y (Nat.rawCast 2) (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (y ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))))
(Eq.mp
(congrFun'
(congrArg Membership.mem
(congrArg setOf (funext fun y => congrFun' (congrArg And ge_iff_le._simp_1) (y ^ 2 < 2))))
y)
hy)claim1':BddAbove E := Eq.mpr (id (congrArg (fun _a => _a) (propext (bddAbove_def E)))) (Exists.intro 2 claim1)claim2:1 ∈ E :=
of_eq_true
(Eq.trans
(congrFun'
(congrArg Membership.mem
(congrArg setOf (funext fun y => congrFun' (congrArg And ge_iff_le._simp_1) (y ^ 2 < 2))))
1)
(Eq.trans
(congr (congrArg And zero_le_one._simp_1)
(Eq.trans (congrFun' (congrArg LT.lt (one_pow 2)) 2) Nat.one_lt_ofNat._simp_1))
(and_self True)))claim2':E.Nonemptyx:Real :=
match ExtendedReal.sup E with
| ExtendedReal.neg_infty => 0
| ExtendedReal.real x => x
| ExtendedReal.infty => 0claim3:IsLUB E x := exist_sqrt_two._proof_4 claim1' claim2'claim4:x ≥ 1 := exist_sqrt_two._proof_5 claim2 claim3claim5:x ≤ 2 := exist_sqrt_two._proof_6 claim1 claim3claim6:x.IsPos :=
Eq.mpr (id (congrArg (fun _a => _a) (propext (isPos_iff x))))
(lt_of_not_ge fun a =>
Mathlib.Tactic.Linarith.lt_irrefl
(Eq.mp
(congrArg (fun _a => _a < 0)
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.neg_congr
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_one))
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1)))))
Mathlib.Tactic.Ring.neg_zero))
(Mathlib.Tactic.Ring.sub_congr
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_one))
(Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.sub_pf
(Mathlib.Tactic.Ring.neg_add
(Mathlib.Tactic.Ring.neg_mul x (Nat.rawCast 1)
(Mathlib.Tactic.Ring.neg_one_mul
(Mathlib.Meta.NormNum.IsInt.to_raw_eq
(Mathlib.Meta.NormNum.isInt_mul (Eq.refl HMul.hMul)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.negOfNat 1))))))
Mathlib.Tactic.Ring.neg_zero)
(Mathlib.Tactic.Ring.add_pf_add_lt (Nat.rawCast 1)
(Mathlib.Tactic.Ring.add_pf_zero_add (x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0)))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0))))
(Mathlib.Tactic.Ring.add_pf_zero_add (x ^ Nat.rawCast 1 * (Int.negOfNat 1).rawCast + 0))))
(Mathlib.Tactic.Ring.sub_congr (Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))
(Mathlib.Tactic.Ring.sub_pf Mathlib.Tactic.Ring.neg_zero
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))))
(Mathlib.Tactic.Ring.add_pf_add_overlap_zero
(Mathlib.Tactic.Ring.add_overlap_pf_zero x (Nat.rawCast 1)
(Mathlib.Meta.NormNum.IsInt.to_isNat
(Mathlib.Meta.NormNum.isInt_add (Eq.refl HAdd.hAdd)
(Mathlib.Meta.NormNum.IsInt.of_raw Real (Int.negOfNat 1))
(Mathlib.Meta.NormNum.IsNat.to_isInt (Mathlib.Meta.NormNum.IsNat.of_raw Real 1))
(Eq.refl (Int.ofNat 0)))))
(Mathlib.Tactic.Ring.add_pf_zero_add 0)))
(Mathlib.Tactic.Ring.cast_zero (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_zero))))
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le
(Mathlib.Tactic.Linarith.add_lt_of_neg_of_le (neg_neg_of_pos Mathlib.Tactic.Linarith.zero_lt_one)
(Mathlib.Tactic.Linarith.sub_nonpos_of_le claim4))
(Mathlib.Tactic.Linarith.sub_nonpos_of_le a))))h:x ^ 2 < 2ε:Realhε1:0 < εhε2:ε < 1hε3:x ^ 2 + 5 * ε < 2claim8:(x + ε) ^ 2 < 2 :=
Trans.trans
(Trans.trans
(Trans.trans
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.pow_congr
(Mathlib.Tactic.Ring.add_congr (Mathlib.Tactic.Ring.atom_pf x) (Mathlib.Tactic.Ring.atom_pf ε)
(Mathlib.Tactic.Ring.add_pf_add_lt (x ^ Nat.rawCast 1 * Nat.rawCast 1)
(Mathlib.Tactic.Ring.add_pf_zero_add (ε ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))))
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat ℕ (Eq.refl 2)))
(Mathlib.Tactic.Ring.pow_add
(Mathlib.Tactic.Ring.pow_nat (Mathlib.Tactic.Ring.coeff_one 2)
(Mathlib.Tactic.Ring.pow_one_cast
(x ^ Nat.rawCast 1 * Nat.rawCast 1 + (ε ^ Nat.rawCast 1 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.pow_bit0
(Mathlib.Tactic.Ring.pow_one
(x ^ Nat.rawCast 1 * Nat.rawCast 1 + (ε ^ Nat.rawCast 1 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pp_pf_overlap x
(Mathlib.Meta.NormNum.IsNat.to_raw_eq
(Mathlib.Meta.NormNum.isNat_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.of_raw ℕ 1)
(Mathlib.Meta.NormNum.IsNat.of_raw ℕ 1) (Eq.refl 2)))
(Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left x (Nat.rawCast 1)
(Mathlib.Tactic.Ring.mul_pf_right ε (Nat.rawCast 1)
(Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1))))
(Mathlib.Tactic.Ring.mul_zero (x ^ Nat.rawCast 1 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero
(x ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * Nat.rawCast 1) + 0)))
(Mathlib.Tactic.Ring.add_pf_add_gt (x ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0))))
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_right x (Nat.rawCast 1)
(Mathlib.Tactic.Ring.mul_pf_left ε (Nat.rawCast 1)
(Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1))))
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pp_pf_overlap ε
(Mathlib.Meta.NormNum.IsNat.to_raw_eq
(Mathlib.Meta.NormNum.isNat_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.of_raw ℕ 1)
(Mathlib.Meta.NormNum.IsNat.of_raw ℕ 1) (Eq.refl 2)))
(Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (ε ^ Nat.rawCast 1 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (ε ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.add_pf_add_lt (x ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_zero_add (ε ^ Nat.rawCast 2 * Nat.rawCast 1 + 0))))
(Mathlib.Tactic.Ring.zero_mul
(x ^ Nat.rawCast 1 * Nat.rawCast 1 + (ε ^ Nat.rawCast 1 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.add_pf_add_zero
(x ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * Nat.rawCast 1) +
(ε ^ Nat.rawCast 2 * Nat.rawCast 1 + 0))))
(Mathlib.Tactic.Ring.add_pf_add_overlap
(Mathlib.Tactic.Ring.add_overlap_pf x (Nat.rawCast 1)
(Mathlib.Tactic.Ring.add_overlap_pf ε (Nat.rawCast 1)
(Mathlib.Meta.NormNum.IsNat.to_raw_eq
(Mathlib.Meta.NormNum.isNat_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.of_raw Real 1)
(Mathlib.Meta.NormNum.IsNat.of_raw Real 1) (Eq.refl 2)))))
(Mathlib.Tactic.Ring.add_pf_add_lt (x ^ Nat.rawCast 2 * Nat.rawCast 1)
(Mathlib.Tactic.Ring.add_pf_zero_add (ε ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))))
(Mathlib.Tactic.Ring.pow_zero (x ^ Nat.rawCast 1 * Nat.rawCast 1 + (ε ^ Nat.rawCast 1 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left x (Nat.rawCast 1)
(Mathlib.Tactic.Ring.mul_pf_left ε (Nat.rawCast 1) (Mathlib.Tactic.Ring.mul_one (Nat.rawCast 2))))
(Mathlib.Tactic.Ring.mul_zero (x ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * Nat.rawCast 2)))
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * Nat.rawCast 2) + 0)))
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left x (Nat.rawCast 2) (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left ε (Nat.rawCast 2) (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (ε ^ Nat.rawCast 2 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (ε ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (ε ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.add_pf_add_lt (x ^ Nat.rawCast 2 * Nat.rawCast 1)
(Mathlib.Tactic.Ring.add_pf_zero_add (ε ^ Nat.rawCast 2 * Nat.rawCast 1 + 0))))
(Mathlib.Tactic.Ring.add_pf_add_lt (x ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * Nat.rawCast 2))
(Mathlib.Tactic.Ring.add_pf_zero_add
(x ^ Nat.rawCast 2 * Nat.rawCast 1 + (ε ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))))
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.pow_congr (Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat ℕ (Eq.refl 2)))
(Mathlib.Tactic.Ring.pow_add
(Mathlib.Tactic.Ring.single_pow
(Mathlib.Tactic.Ring.mul_pow (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 2))
(Mathlib.Tactic.Ring.one_pow (Nat.rawCast 2))))
(Mathlib.Tactic.Ring.pow_zero (x ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left x (Nat.rawCast 2) (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))
(Mathlib.Tactic.Ring.mul_congr
(Mathlib.Tactic.Ring.mul_congr
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2)))
(Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_right x (Nat.rawCast 1) (Mathlib.Tactic.Ring.mul_one (Nat.rawCast 2)))
(Mathlib.Tactic.Ring.mul_zero (Nat.rawCast 2))
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 1 * Nat.rawCast 2 + 0)))
(Mathlib.Tactic.Ring.zero_mul (x ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 1 * Nat.rawCast 2 + 0))))
(Mathlib.Tactic.Ring.atom_pf ε)
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left x (Nat.rawCast 1)
(Mathlib.Tactic.Ring.mul_pf_right ε (Nat.rawCast 1) (Mathlib.Tactic.Ring.mul_one (Nat.rawCast 2))))
(Mathlib.Tactic.Ring.mul_zero (x ^ Nat.rawCast 1 * Nat.rawCast 2))
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * Nat.rawCast 2) + 0)))
(Mathlib.Tactic.Ring.zero_mul (ε ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * Nat.rawCast 2) + 0))))
(Mathlib.Tactic.Ring.add_pf_add_gt (x ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * Nat.rawCast 2))
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0))))
(Mathlib.Tactic.Ring.mul_congr (Mathlib.Tactic.Ring.atom_pf ε) (Mathlib.Tactic.Ring.atom_pf ε)
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pp_pf_overlap ε
(Mathlib.Meta.NormNum.IsNat.to_raw_eq
(Mathlib.Meta.NormNum.isNat_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.of_raw ℕ 1)
(Mathlib.Meta.NormNum.IsNat.of_raw ℕ 1) (Eq.refl 2)))
(Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (ε ^ Nat.rawCast 1 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (ε ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (ε ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (ε ^ Nat.rawCast 2 * Nat.rawCast 1 + 0))))
(Mathlib.Tactic.Ring.add_pf_add_lt (x ^ Nat.rawCast 1 * (ε ^ Nat.rawCast 1 * Nat.rawCast 2))
(Mathlib.Tactic.Ring.add_pf_add_lt (x ^ Nat.rawCast 2 * Nat.rawCast 1)
(Mathlib.Tactic.Ring.add_pf_zero_add (ε ^ Nat.rawCast 2 * Nat.rawCast 1 + 0))))))
(add_le_add
(add_le_add_right
(mul_le_mul_of_nonneg_right
(mul_le_mul_of_nonneg_left claim5
(le_of_lt
(Mathlib.Meta.Positivity.pos_of_isNat (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2))
(Eq.refl (Nat.ble 1 2)))))
(le_of_lt hε1))
(x ^ 2))
(mul_le_mul_of_nonneg_right (le_of_lt hε2) (le_of_lt hε1))))
(Mathlib.Tactic.Ring.of_eq
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.pow_congr (Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat ℕ (Eq.refl 2)))
(Mathlib.Tactic.Ring.pow_add
(Mathlib.Tactic.Ring.single_pow
(Mathlib.Tactic.Ring.mul_pow (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 2))
(Mathlib.Tactic.Ring.one_pow (Nat.rawCast 2))))
(Mathlib.Tactic.Ring.pow_zero (x ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left x (Nat.rawCast 2) (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))
(Mathlib.Tactic.Ring.mul_congr
(Mathlib.Tactic.Ring.mul_congr
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2)))
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 2)))
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Meta.NormNum.IsNat.to_raw_eq
(Mathlib.Meta.NormNum.isNat_mul (Eq.refl HMul.hMul) (Mathlib.Meta.NormNum.IsNat.of_raw Real 2)
(Mathlib.Meta.NormNum.IsNat.of_raw Real 2) (Eq.refl 4)))
(Mathlib.Tactic.Ring.mul_zero (Nat.rawCast 2))
(Mathlib.Tactic.Ring.add_pf_add_zero (Nat.rawCast 4 + 0)))
(Mathlib.Tactic.Ring.zero_mul (Nat.rawCast 2 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (Nat.rawCast 4 + 0))))
(Mathlib.Tactic.Ring.atom_pf ε)
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_right ε (Nat.rawCast 1) (Mathlib.Tactic.Ring.mul_one (Nat.rawCast 4)))
(Mathlib.Tactic.Ring.mul_zero (Nat.rawCast 4))
(Mathlib.Tactic.Ring.add_pf_add_zero (ε ^ Nat.rawCast 1 * Nat.rawCast 4 + 0)))
(Mathlib.Tactic.Ring.zero_mul (ε ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (ε ^ Nat.rawCast 1 * Nat.rawCast 4 + 0))))
(Mathlib.Tactic.Ring.add_pf_add_lt (x ^ Nat.rawCast 2 * Nat.rawCast 1)
(Mathlib.Tactic.Ring.add_pf_zero_add (ε ^ Nat.rawCast 1 * Nat.rawCast 4 + 0))))
(Mathlib.Tactic.Ring.mul_congr
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real Nat.cast_one))
(Mathlib.Tactic.Ring.atom_pf ε)
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_right ε (Nat.rawCast 1) (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (ε ^ Nat.rawCast 1 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (ε ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (ε ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))))
(Mathlib.Tactic.Ring.add_pf_add_lt (x ^ Nat.rawCast 2 * Nat.rawCast 1)
(Mathlib.Tactic.Ring.add_pf_add_overlap
(Mathlib.Tactic.Ring.add_overlap_pf ε (Nat.rawCast 1)
(Mathlib.Meta.NormNum.IsNat.to_raw_eq
(Mathlib.Meta.NormNum.isNat_add (Eq.refl HAdd.hAdd) (Mathlib.Meta.NormNum.IsNat.of_raw Real 4)
(Mathlib.Meta.NormNum.IsNat.of_raw Real 1) (Eq.refl 5))))
(Mathlib.Tactic.Ring.add_pf_zero_add 0))))
(Mathlib.Tactic.Ring.add_congr
(Mathlib.Tactic.Ring.pow_congr (Mathlib.Tactic.Ring.atom_pf x)
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat ℕ (Eq.refl 2)))
(Mathlib.Tactic.Ring.pow_add
(Mathlib.Tactic.Ring.single_pow
(Mathlib.Tactic.Ring.mul_pow (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 2))
(Mathlib.Tactic.Ring.one_pow (Nat.rawCast 2))))
(Mathlib.Tactic.Ring.pow_zero (x ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_left x (Nat.rawCast 2) (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))
(Mathlib.Tactic.Ring.mul_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1))
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))
(Mathlib.Tactic.Ring.zero_mul (Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (x ^ Nat.rawCast 2 * Nat.rawCast 1 + 0)))))
(Mathlib.Tactic.Ring.mul_congr
(Mathlib.Tactic.Ring.cast_pos (Mathlib.Meta.NormNum.isNat_ofNat Real (Eq.refl 5)))
(Mathlib.Tactic.Ring.atom_pf ε)
(Mathlib.Tactic.Ring.add_mul
(Mathlib.Tactic.Ring.mul_add
(Mathlib.Tactic.Ring.mul_pf_right ε (Nat.rawCast 1) (Mathlib.Tactic.Ring.mul_one (Nat.rawCast 5)))
(Mathlib.Tactic.Ring.mul_zero (Nat.rawCast 5))
(Mathlib.Tactic.Ring.add_pf_add_zero (ε ^ Nat.rawCast 1 * Nat.rawCast 5 + 0)))
(Mathlib.Tactic.Ring.zero_mul (ε ^ Nat.rawCast 1 * Nat.rawCast 1 + 0))
(Mathlib.Tactic.Ring.add_pf_add_zero (ε ^ Nat.rawCast 1 * Nat.rawCast 5 + 0))))
(Mathlib.Tactic.Ring.add_pf_add_lt (x ^ Nat.rawCast 2 * Nat.rawCast 1)
(Mathlib.Tactic.Ring.add_pf_zero_add (ε ^ Nat.rawCast 1 * Nat.rawCast 5 + 0))))))
hε3⊢ 0 ≤ x + ε; All goals completed! 🐙
have claim10 : x + ε ≤ x := ⊢ ∃ x, x ^ 2 = 2 All goals completed! 🐙
All goals completed! 🐙
All goals completed! 🐙Remark 5.5.13
theorem Real.exist_irrational : ∃ x:Real, ¬ ∃ q:ℚ, x = (q:Real) := ⊢ ∃ x, ¬∃ q, x = ↑q All goals completed! 🐙Helper lemma for Exercise 5.5.1.
theorem Real.mem_neg (E: Set Real) (x:Real) : x ∈ -E ↔ -x ∈ E := Set.mem_negExercise 5.5.1
theorem Real.inf_neg {E: Set Real} {M:Real} (h: IsLUB E M) : IsGLB (-E) (-M) := E:Set RealM:Realh:IsLUB E M⊢ IsGLB (-E) (-M) All goals completed! 🐙theorem Real.GLB_exist {E: Set Real} (hE: Set.Nonempty E) (hbound: BddBelow E): ∃ S, IsGLB E S := E:Set RealhE:E.Nonemptyhbound:BddBelow E⊢ ∃ S, IsGLB E S
All goals completed! 🐙open Classical in
noncomputable abbrev ExtendedReal.inf (E: Set Real) : ExtendedReal :=
if h1:E.Nonempty then (if h2:BddBelow E then ((Real.GLB_exist h1 h2).choose:Real) else ⊥) else ⊤theorem ExtendedReal.inf_of_empty : inf ∅ = ⊤ := ⊢ inf ∅ = ⊤ All goals completed! 🐙theorem ExtendedReal.inf_of_unbounded {E: Set Real} (hb: ¬ BddBelow E) : inf E = ⊥ := E:Set Realhb:¬BddBelow E⊢ inf E = ⊥
have hE : E.Nonempty := E:Set Realhb:¬BddBelow E⊢ inf E = ⊥ E:Set Realhb:E = ∅⊢ BddBelow E; All goals completed! 🐙
All goals completed! 🐙theorem ExtendedReal.inf_of_bounded {E: Set Real} (hnon: E.Nonempty) (hb: BddBelow E) :
IsGLB E (inf E) := E:Set Realhnon:E.Nonemptyhb:BddBelow E⊢ IsGLB E
(match inf E with
| neg_infty => 0
| real x => x
| infty => 0) E:Set Realhnon:E.Nonemptyhb:BddBelow E⊢ IsGLB E ⋯.choose; All goals completed! 🐙theorem ExtendedReal.inf_of_bounded_finite {E: Set Real} (hnon: E.Nonempty) (hb: BddBelow E) :
(inf E).IsFinite := E:Set Realhnon:E.Nonemptyhb:BddBelow E⊢ (inf E).IsFinite All goals completed! 🐙Exercise 5.5.5
theorem Real.irrat_between {x y:Real} (hxy: x < y) :
∃ z, x < z ∧ z < y ∧ ¬ ∃ q:ℚ, z = (q:Real) := x:Realy:Realhxy:x < y⊢ ∃ z, x < z ∧ z < y ∧ ¬∃ q, z = ↑q All goals completed! 🐙/- Use the notion of supremum in this section to define a Mathlib `sSup` operation -/
noncomputable instance Real.inst_SupSet : SupSet Real where
sSup E := ((ExtendedReal.sup E):Real)
Use the sSup operation to build a conditionally complete lattice structure on Real
noncomputable instance Real.inst_conditionallyCompleteLattice :
ConditionallyCompleteLattice Real :=
conditionallyCompleteLatticeOfLatticeOfsSup Real
(⊢ ∀ (s : Set Real), BddAbove s → s.Nonempty → IsLUB s (sSup s) s✝:Set Reala✝¹:BddAbove s✝a✝:s✝.Nonempty⊢ IsLUB s✝ (sSup s✝); All goals completed! 🐙)theorem ExtendedReal.sSup_of_bounded {E: Set Real} (hnon: E.Nonempty) (hb: BddAbove E) :
IsLUB E (sSup E) := sup_of_bounded hnon hbend Chapter5