Аналіз I, Глава 6.3

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:

namespace Chapter6

Визначення 6.3.1

noncomputable abbrev Sequence.sup (a:Sequence) : EReal := sSup { x | n a.m, x = a n }

Визначення 6.3.1

noncomputable abbrev Sequence.inf (a:Sequence) : EReal := sInf { x | n a.m, x = a n }

Приклад 6.3.3

declaration uses 'sorry'example : ((fun (n:) (-1:)^(n+1)):Sequence).sup = 1 := { m := 0, seq := fun n => if n 0 then (fun n => (-1) ^ (n + 1)) n.toNat else 0, vanish := }.sup = 1 All goals completed! 🐙

Приклад 6.3.3

declaration uses 'sorry'example : ((fun (n:) (-1:)^(n+1)):Sequence).inf = -1 := { m := 0, seq := fun n => if n 0 then (fun n => (-1) ^ (n + 1)) n.toNat else 0, vanish := }.inf = -1 All goals completed! 🐙

Приклад 6.3.4 / Вправа 6.3.1

declaration uses 'sorry'example : ((fun (n:) 1/((n:)+1)):Sequence).sup = 1 := { m := 0, seq := fun n => if n 0 then (fun n => 1 / (n + 1)) n.toNat else 0, vanish := }.sup = 1 All goals completed! 🐙

Приклад 6.3.4 / Вправа 6.3.1

declaration uses 'sorry'example : ((fun (n:) 1/((n:)+1)):Sequence).inf = 0 := { m := 0, seq := fun n => if n 0 then (fun n => 1 / (n + 1)) n.toNat else 0, vanish := }.inf = 0 All goals completed! 🐙

Приклад 6.3.5

declaration uses 'sorry'example : ((fun (n:) (n+1:)):Sequence).sup = := { m := 0, seq := fun n => if n 0 then (fun n => n + 1) n.toNat else 0, vanish := }.sup = All goals completed! 🐙

Приклад 6.3.5

declaration uses 'sorry'example : ((fun (n:) (n+1:)):Sequence).inf = 1 := { m := 0, seq := fun n => if n 0 then (fun n => n + 1) n.toNat else 0, vanish := }.inf = 1 All goals completed! 🐙
abbrev Sequence.bddAboveBy (a:Sequence) (M:) : Prop := n a.m, a n Mabbrev Sequence.bddAbove (a:Sequence) : Prop := M, a.bddAboveBy Mabbrev Sequence.bddBelowBy (a:Sequence) (M:) : Prop := n a.m, a n Mabbrev Sequence.bddBelow (a:Sequence) : Prop := M, a.bddBelowBy Mtheorem declaration uses 'sorry'Sequence.bounded_iff (a:Sequence) : a.isBounded a.bddAbove a.bddBelow := a:Sequencea.isBounded a.bddAbove a.bddBelow All goals completed! 🐙theorem declaration uses 'sorry'Sequence.sup_of_bounded {a:Sequence} (h: a.isBounded) : a.sup.isFinite := a:Sequenceh:a.isBoundeda.sup.isFinite All goals completed! 🐙theorem declaration uses 'sorry'Sequence.inf_of_bounded {a:Sequence} (h: a.isBounded) : a.inf.isFinite := a:Sequenceh:a.isBoundeda.inf.isFinite All goals completed! 🐙

Твердження 6.3.6 (Least upper bound property) / Вправа 6.3.2

theorem declaration uses 'sorry'Sequence.le_sup {a:Sequence} {n:} (hn: n a.m) : a n a.sup := a:Sequencen:hn:n a.m(a.seq n) a.sup All goals completed! 🐙

Твердження 6.3.6 (Least upper bound property) / Вправа 6.3.2

theorem declaration uses 'sorry'Sequence.sup_le_upper {a:Sequence} {M:EReal} (h: n a.m, a n M) : a.sup M := a:SequenceM:ERealh: n a.m, (a.seq n) Ma.sup M All goals completed! 🐙

Твердження 6.3.6 (Least upper bound property) / Вправа 6.3.2

theorem declaration uses 'sorry'Sequence.exists_between_lt_sup {a:Sequence} {y:EReal} (h: y < a.sup ) : n a.m, y < a n a n a.sup := a:Sequencey:ERealh:y < a.sup n a.m, y < (a.seq n) (a.seq n) a.sup All goals completed! 🐙

Ремарка 6.3.7

theorem declaration uses 'sorry'Sequence.ge_inf {a:Sequence} {n:} (hn: n a.m) : a n a.inf := a:Sequencen:hn:n a.m(a.seq n) a.inf All goals completed! 🐙

Ремарка 6.3.7

theorem declaration uses 'sorry'Sequence.inf_ge_lower {a:Sequence} {M:EReal} (h: n a.m, a n M) : a.inf M := a:SequenceM:ERealh: n a.m, (a.seq n) Ma.inf M All goals completed! 🐙

Ремарка 6.3.7

theorem declaration uses 'sorry'Sequence.exists_between_gt_inf {a:Sequence} {y:EReal} (h: y > a.inf ) : n a.m, y > a n a n a.inf := a:Sequencey:ERealh:y > a.inf n a.m, y > (a.seq n) (a.seq n) a.inf All goals completed! 🐙
abbrev Sequence.isMonotone (a:Sequence) : Prop := n a.m, a (n+1) a nabbrev Sequence.isAntitone (a:Sequence) : Prop := n a.m, a (n+1) a n

Твердження 6.3.8 / Вправа 6.3.3

theorem declaration uses 'sorry'Sequence.convergent_of_monotone {a:Sequence} (hbound: a.bddAbove) (hmono: a.isMonotone) : a.convergent := a:Sequencehbound:a.bddAbovehmono:a.isMonotonea.convergent All goals completed! 🐙

Твердження 6.3.8 / Вправа 6.3.3

theorem declaration uses 'sorry'Sequence.lim_of_monotone {a:Sequence} (hbound: a.bddAbove) (hmono: a.isMonotone) : lim a = a.sup := a:Sequencehbound:a.bddAbovehmono:a.isMonotone(lim a) = a.sup All goals completed! 🐙
theorem declaration uses 'sorry'Sequence.convergent_of_antitone {a:Sequence} (hbound: a.bddBelow) (hmono: a.isAntitone) : a.convergent := a:Sequencehbound:a.bddBelowhmono:a.isAntitonea.convergent All goals completed! 🐙theorem declaration uses 'sorry'Sequence.lim_of_antitone {a:Sequence} (hbound: a.bddBelow) (hmono: a.isAntitone) : lim a = a.inf := a:Sequencehbound:a.bddBelowhmono:a.isAntitone(lim a) = a.inf All goals completed! 🐙theorem declaration uses 'sorry'Sequence.convergent_iff_bounded_of_monotone {a:Sequence} (ha: a.isMonotone) : a.convergent a.isBounded := a:Sequenceha:a.isMonotonea.convergent a.isBounded All goals completed! 🐙theorem declaration uses 'sorry'Sequence.bounded_iff_convergent_of_antitone {a:Sequence} (ha: a.isAntitone) : a.convergent a.isBounded := a:Sequenceha:a.isAntitonea.convergent a.isBounded All goals completed! 🐙

Приклад 6.3.9

noncomputable abbrev Example_6_3_9 (n:) := Real.pi * 10^n / (10:)^n

Приклад 6.3.9

declaration uses 'sorry'example : (Example_6_3_9:Sequence).isMonotone := { m := 0, seq := fun n => if n 0 then Example_6_3_9 n.toNat else 0, vanish := }.isMonotone All goals completed! 🐙

Приклад 6.3.9

declaration uses 'sorry'example : (Example_6_3_9:Sequence).bddAboveBy 4 := { m := 0, seq := fun n => if n 0 then Example_6_3_9 n.toNat else 0, vanish := }.bddAboveBy 4 All goals completed! 🐙

Приклад 6.3.9

declaration uses 'sorry'example : (Example_6_3_9:Sequence).convergent := { m := 0, seq := fun n => if n 0 then Example_6_3_9 n.toNat else 0, vanish := }.convergent All goals completed! 🐙

Приклад 6.3.9

declaration uses 'sorry'example : lim (Example_6_3_9:Sequence) 4 := lim { m := 0, seq := fun n => if n 0 then Example_6_3_9 n.toNat else 0, vanish := } 4 All goals completed! 🐙

Твердження 6.3.1

theorem declaration uses 'sorry'lim_of_exp {x:} (hpos: 0 < x) (hbound: x < 1) : ((fun (n:) x^n):Sequence).convergent lim ((fun (n:) x^n):Sequence) = 0 := x:hpos:0 < xhbound:x < 1{ m := 0, seq := fun n => if n 0 then (fun n => x ^ n) n.toNat else 0, vanish := }.convergent lim { m := 0, seq := fun n => if n 0 then (fun n => x ^ n) n.toNat else 0, vanish := } = 0 -- цей доказ написан так, щоб співпадати із структурою орігінального тексту. x:hpos:0 < xhbound:x < 1a:Sequence := { m := 0, seq := fun n => if n 0 then (fun n => x ^ n) n.toNat else 0, vanish := }a.convergent lim a = 0 x:hpos:0 < xhbound:x < 1a:Sequence := { m := 0, seq := fun n => if n 0 then (fun n => x ^ n) n.toNat else 0, vanish := }why:a.isAntitonea.convergent lim a = 0 have hbound : a.bddBelowBy 0 := x:hpos:0 < xhbound:x < 1{ m := 0, seq := fun n => if n 0 then (fun n => x ^ n) n.toNat else 0, vanish := }.convergent lim { m := 0, seq := fun n => if n 0 then (fun n => x ^ n) n.toNat else 0, vanish := } = 0 x:hpos:0 < xhbound:x < 1a:Sequence := { m := 0, seq := fun n => if n 0 then (fun n => x ^ n) n.toNat else 0, vanish := }why:a.isAntitonen:hn:n a.ma.seq n 0; All goals completed! 🐙 have hbound' : a.bddBelow := x:hpos:0 < xhbound:x < 1{ m := 0, seq := fun n => if n 0 then (fun n => x ^ n) n.toNat else 0, vanish := }.convergent lim { m := 0, seq := fun n => if n 0 then (fun n => x ^ n) n.toNat else 0, vanish := } = 0 All goals completed! 🐙 x:hpos:0 < xhbound✝:x < 1a:Sequence := { m := 0, seq := fun n => if n 0 then (fun n => x ^ n) n.toNat else 0, vanish := }why:a.isAntitonehbound:a.bddBelowBy 0hbound':a.bddBelowhconv:a.convergenta.convergent lim a = 0 x:hpos:0 < xhbound✝:x < 1a:Sequence := { m := 0, seq := fun n => if n 0 then (fun n => x ^ n) n.toNat else 0, vanish := }why:a.isAntitonehbound:a.bddBelowBy 0hbound':a.bddBelowhconv:a.convergentL: := lim aa.convergent L = 0 have : lim ((fun (n:) x^(n+1)):Sequence) = x * L := calc _ = lim (x ((fun (n:) x^n):Sequence)) := x:hpos:0 < xhbound✝:x < 1a:Sequence := { m := 0, seq := fun n => if n 0 then (fun n => x ^ n) n.toNat else 0, vanish := }why:a.isAntitonehbound:a.bddBelowBy 0hbound':a.bddBelowhconv:a.convergentL: := lim alim { m := 0, seq := fun n => if n 0 then (fun n => x ^ (n + 1)) n.toNat else 0, vanish := } = lim (x { m := 0, seq := fun n => if n 0 then (fun n => x ^ n) n.toNat else 0, vanish := }) x:hpos:0 < xhbound✝:x < 1a:Sequence := { m := 0, seq := fun n => if n 0 then (fun n => x ^ n) n.toNat else 0, vanish := }why:a.isAntitonehbound:a.bddBelowBy 0hbound':a.bddBelowhconv:a.convergentL: := lim a(fun n => if n 0 then (fun n => x ^ (n + 1)) n.toNat else 0) = fun n => x * { m := 0, seq := fun n => if n 0 then (fun n => x ^ n) n.toNat else 0, vanish := }.seq n; x:hpos:0 < xhbound✝:x < 1a:Sequence := { m := 0, seq := fun n => if n 0 then (fun n => x ^ n) n.toNat else 0, vanish := }why:a.isAntitonehbound:a.bddBelowBy 0hbound':a.bddBelowhconv:a.convergentL: := lim an:(if n 0 then (fun n => x ^ (n + 1)) n.toNat else 0) = x * { m := 0, seq := fun n => if n 0 then (fun n => x ^ n) n.toNat else 0, vanish := }.seq n x:hpos:0 < xhbound✝:x < 1a:Sequence := { m := 0, seq := fun n => if n 0 then (fun n => x ^ n) n.toNat else 0, vanish := }why:a.isAntitonehbound:a.bddBelowBy 0hbound':a.bddBelowhconv:a.convergentL: := lim an:h:n 0(if n 0 then (fun n => x ^ (n + 1)) n.toNat else 0) = x * { m := 0, seq := fun n => if n 0 then (fun n => x ^ n) n.toNat else 0, vanish := }.seq nx:hpos:0 < xhbound✝:x < 1a:Sequence := { m := 0, seq := fun n => if n 0 then (fun n => x ^ n) n.toNat else 0, vanish := }why:a.isAntitonehbound:a.bddBelowBy 0hbound':a.bddBelowhconv:a.convergentL: := lim an:h:¬n 0(if n 0 then (fun n => x ^ (n + 1)) n.toNat else 0) = x * { m := 0, seq := fun n => if n 0 then (fun n => x ^ n) n.toNat else 0, vanish := }.seq n all_goals All goals completed! 🐙 _ = x * lim ((fun (n:) x^n):Sequence) := x:hpos:0 < xhbound✝:x < 1a:Sequence := { m := 0, seq := fun n => if n 0 then (fun n => x ^ n) n.toNat else 0, vanish := }why:a.isAntitonehbound:a.bddBelowBy 0hbound':a.bddBelowhconv:a.convergentL: := lim alim (x { m := 0, seq := fun n => if n 0 then (fun n => x ^ n) n.toNat else 0, vanish := }) = x * lim { m := 0, seq := fun n => if n 0 then (fun n => x ^ n) n.toNat else 0, vanish := } All goals completed! 🐙 _ = _ := rfl have why2 :lim ((fun (n:) x^(n+1)):Sequence) = lim ((fun (n:) x^n):Sequence) := x:hpos:0 < xhbound:x < 1{ m := 0, seq := fun n => if n 0 then (fun n => x ^ n) n.toNat else 0, vanish := }.convergent lim { m := 0, seq := fun n => if n 0 then (fun n => x ^ n) n.toNat else 0, vanish := } = 0 All goals completed! 🐙 x:hpos:0 < xhbound✝:x < 1a:Sequence := { m := 0, seq := fun n => if n 0 then (fun n => x ^ n) n.toNat else 0, vanish := }why:a.isAntitonehbound:a.bddBelowBy 0hbound':a.bddBelowhconv:a.convergentL: := lim athis:lim { m := 0, seq := fun n => if n 0 then (fun n => x ^ (n + 1)) n.toNat else 0, vanish := } = x * Lwhy2:x * L = lim { m := 0, seq := fun n => if n 0 then (fun n => x ^ n) n.toNat else 0, vanish := }a.convergent L = 0 x:hpos:0 < xhbound✝:x < 1a:Sequence := { m := 0, seq := fun n => if n 0 then (fun n => x ^ n) n.toNat else 0, vanish := }why:a.isAntitonehbound:a.bddBelowBy 0hbound':a.bddBelowhconv:a.convergentL: := lim athis:lim { m := 0, seq := fun n => if n 0 then (fun n => x ^ (n + 1)) n.toNat else 0, vanish := } = x * Lwhy2:x * L = La.convergent L = 0 replace why2 : x * L = 1 * L := x:hpos:0 < xhbound:x < 1{ m := 0, seq := fun n => if n 0 then (fun n => x ^ n) n.toNat else 0, vanish := }.convergent lim { m := 0, seq := fun n => if n 0 then (fun n => x ^ n) n.toNat else 0, vanish := } = 0 All goals completed! 🐙 have hx : x 1 := x:hpos:0 < xhbound:x < 1{ m := 0, seq := fun n => if n 0 then (fun n => x ^ n) n.toNat else 0, vanish := }.convergent lim { m := 0, seq := fun n => if n 0 then (fun n => x ^ n) n.toNat else 0, vanish := } = 0 All goals completed! 🐙 x:hpos:0 < xhbound✝:x < 1a:Sequence := { m := 0, seq := fun n => if n 0 then (fun n => x ^ n) n.toNat else 0, vanish := }why:a.isAntitonehbound:a.bddBelowBy 0hbound':a.bddBelowhconv:a.convergentL: := lim athis:lim { m := 0, seq := fun n => if n 0 then (fun n => x ^ (n + 1)) n.toNat else 0, vanish := } = x * Lhx:x 1why2:L = 0a.convergent L = 0 All goals completed! 🐙

Вправа 6.3.4

theorem declaration uses 'sorry'lim_of_exp' {x:} (hbound: x > 1) : ¬((fun (n:) x^n):Sequence).convergent := x:hbound:x > 1¬{ m := 0, seq := fun n => if n 0 then (fun n => x ^ n) n.toNat else 0, vanish := }.convergent All goals completed! 🐙
end Chapter6