Analysis I, Section 11.2: Piecewise constant functions

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 Chapter11open BoundedInterval

Definition 11.2.1

abbrev Constant {X Y:Type} (f: X Y) : Prop := c, x, f x = c
open Classical in noncomputable abbrev constant_value {X Y:Type} [hY: Nonempty Y] (f:X Y) : Y := if h: Constant f then h.choose else hY.sometheorem Constant.eq {X Y:Type} {f: X Y} [Nonempty Y] (h: Constant f) (x:X) : f x = constant_value f := X:TypeY:Typef:X Yinst✝:Nonempty Yh:Constant fx:Xf x = constant_value f X:TypeY:Typef:X Yinst✝:Nonempty Yh:Constant fx:Xf x = Exists.choose ; All goals completed! 🐙theorem Constant.of_const {X Y:Type} {f:X Y} {c:Y} (h: x, f x = c) : Constant f := X:TypeY:Typef:X Yc:Yh: (x : X), f x = cConstant f All goals completed! 🐙theorem Constant.const_eq {X Y:Type} {f:X Y} [hX: Nonempty X] [Nonempty Y] {c:Y} (h: x, f x = c) : constant_value f = c := X:TypeY:Typef:X YhX:Nonempty Xinst✝:Nonempty Yc:Yh: (x : X), f x = cconstant_value f = c All goals completed! 🐙theorem Constant.of_subsingleton {X Y:Type} [hs: Subsingleton X] [hY: Nonempty Y] {f:X Y} : Constant f := X:TypeY:Typehs:Subsingleton XhY:Nonempty Yf:X YConstant f X:TypeY:Typehs:Subsingleton XhY:Nonempty Yf:X Yh:Nonempty XConstant fX:TypeY:Typehs:Subsingleton XhY:Nonempty Yf:X Yh:¬Nonempty XConstant f X:TypeY:Typehs:Subsingleton XhY:Nonempty Yf:X Yh:Nonempty XConstant f X:TypeY:Typehs:Subsingleton XhY:Nonempty Yf:X Yh:Nonempty X (x : X), f x = f h.some; X:TypeY:Typehs:Subsingleton XhY:Nonempty Yf:X Yh:Nonempty Xx✝:Xf x✝ = f h.some; X:TypeY:Typehs:Subsingleton XhY:Nonempty Yf:X Yh:Nonempty Xx✝:Xx✝ = h.some; All goals completed! 🐙 X:TypeY:Typehs:Subsingleton XhY:Nonempty Yf:X Yh:IsEmpty XConstant f; All goals completed! 🐙abbrev ConstantOn (f: ) (X: Set ) : Prop := Constant (fun x : X f x)noncomputable abbrev constant_value_on (f: ) (X: Set ) : := constant_value (fun x : X f x)theorem ConstantOn.eq {f: } {X: Set } (h: ConstantOn f X) {x:} (hx: x X) : f x = constant_value_on f X := f: X:Set h:ConstantOn f Xx:hx:x Xf x = constant_value_on f X All goals completed! 🐙theorem ConstantOn.of_const {f: } {X: Set } {c:} (h: x X, f x = c) : ConstantOn f X := c, f: X:Set c:h: x X, f x = c (x : X), (fun x => f x) x = c All goals completed! 🐙 theorem ConstantOn.of_const' (c:) (X:Set ): ConstantOn (fun _ c) X := of_const (c := c) (c:X:Set x X, c = c All goals completed! 🐙)theorem ConstantOn.const_eq {f: } {X: Set } (hX: X.Nonempty) {c:} (h: x X, f x = c) : constant_value_on f X = c := f: X:Set hX:X.Nonemptyc:h: x X, f x = cconstant_value_on f X = c All goals completed! 🐙theorem ConstantOn.congr {f g: } {X: Set } (h: x X, f x = g x) : ConstantOn f X ConstantOn g X := f: g: X:Set h: x X, f x = g xConstantOn f X ConstantOn g X f: g: X:Set h: x X, f x = g x(Constant fun x => f x) = Constant fun x => g x; f: g: X:Set h: x X, f x = g x(fun x => f x) = fun x => g x; All goals completed! 🐙theorem ConstantOn.congr' {f g: } {X: Set } (hf: ConstantOn f X) (h: x X, f x = g x) : ConstantOn g X := (congr h).mp hftheorem ConstantOn.of_subsingleton {f: } {X: Set } [Subsingleton X] : ConstantOn f X := Constant.of_subsingletontheorem constant_value_on_congr {f g: } {X: Set } (h: x X, f x = g x) : constant_value_on f X = constant_value_on g X := f: g: X:Set h: x X, f x = g xconstant_value_on f X = constant_value_on g X f: g: X:Set h: x X, f x = g x(constant_value fun x => f x) = constant_value fun x => g x; f: g: X:Set h: x X, f x = g x(fun x => f x) = fun x => g x; All goals completed! 🐙

Definition 11.2.3 (Piecewise constant functions I)

abbrev PiecewiseConstantWith (f: ) {I: BoundedInterval} (P: Partition I) : Prop := J P, ConstantOn f (J:Set )
theorem PiecewiseConstantWith.def (f: ) {I: BoundedInterval} {P: Partition I} : PiecewiseConstantWith f P J P, c, x J, f x = c := f: I:BoundedIntervalP:Partition IPiecewiseConstantWith f P J P, c, x J, f x = c All goals completed! 🐙theorem PiecewiseConstantWith.congr {f g: } {I: BoundedInterval} {P: Partition I} (h: x (I:Set ), f x = g x) : PiecewiseConstantWith f P PiecewiseConstantWith g P := f: g: I:BoundedIntervalP:Partition Ih: x I, f x = g xPiecewiseConstantWith f P PiecewiseConstantWith g P f: g: I:BoundedIntervalP:Partition Ih: x I, f x = g x(∀ J P, ConstantOn f J) J P, ConstantOn g J; f: g: I:BoundedIntervalP:Partition Ih: x I, f x = g xJ:BoundedIntervalhJ:J PConstantOn f J ConstantOn g J f: g: I:BoundedIntervalP:Partition Ih: x I, f x = g xJ:BoundedIntervalhJ:J P x J, f x = g x; f: g: I:BoundedIntervalP:Partition Ih: x I, f x = g xJ:BoundedIntervalhJ:J Pthis:?_mvar.35023 := failed to pretty print expression (use 'set_option pp.rawOnError true' for raw representation) x J, f x = g x; All goals completed! 🐙

Definition 11.2.5 (Piecewise constant functions I)

abbrev PiecewiseConstantOn (f: ) (I: BoundedInterval) : Prop := P : Partition I, PiecewiseConstantWith f P
theorem PiecewiseConstantOn.def (f: ) (I: BoundedInterval): PiecewiseConstantOn f I P : Partition I, J P, ConstantOn f (J:Set ) := f: I:BoundedIntervalPiecewiseConstantOn f I P, J P, ConstantOn f J All goals completed! 🐙theorem PiecewiseConstantOn.congr {f g: } {I: BoundedInterval} (h: x (I:Set ), f x = g x) : PiecewiseConstantOn f I PiecewiseConstantOn g I := f: g: I:BoundedIntervalh: x I, f x = g xPiecewiseConstantOn f I PiecewiseConstantOn g I All goals completed! 🐙theorem PiecewiseConstantOn.congr' {f g: } {I: BoundedInterval} (hf: PiecewiseConstantOn f I) (h: x (I:Set ), f x = g x) : PiecewiseConstantOn g I := (congr h).mp hf

Example 11.2.4 / Example 11.2.6

noncomputable abbrev f_11_2_4 : := fun x if x < 1 then 0 else -- junk value if x < 3 then 7 else if x = 3 then 4 else if x < 6 then 5 else if x = 6 then 2 else 0 -- junk value
declaration uses 'sorry'example : PiecewiseConstantOn f_11_2_4 (Icc 1 6) := PiecewiseConstantOn f_11_2_4 (Icc 1 6) PiecewiseConstantWith f_11_2_4 { intervals := {Ico 1 3, Icc 3 3, Ioo 3 6, Icc 6 6}, exists_unique := ?w.refine_1, contains := ?w.refine_2 } x Icc 1 6, ∃! J, J {Ico 1 3, Icc 3 3, Ioo 3 6, Icc 6 6} x J J {Ico 1 3, Icc 3 3, Ioo 3 6, Icc 6 6}, J Icc 1 6 PiecewiseConstantWith f_11_2_4 { intervals := {Ico 1 3, Icc 3 3, Ioo 3 6, Icc 6 6}, exists_unique := ?w.refine_1, contains := ?w.refine_2 } All goals completed! 🐙 x Icc 1 6, ∃! J, J {Ico 1 3, Icc 3 3, Ioo 3 6, Icc 6 6} x J All goals completed! 🐙 All goals completed! 🐙declaration uses 'sorry'example : PiecewiseConstantOn f_11_2_4 (Icc 1 6) := PiecewiseConstantOn f_11_2_4 (Icc 1 6) PiecewiseConstantWith f_11_2_4 { intervals := {Ico 1 2, Icc 2 2, Ioo 2 3, Icc 3 3, Ioo 3 5, Ico 5 6, Icc 6 6}, exists_unique := ?w.refine_1, contains := ?w.refine_2 } x Icc 1 6, ∃! J, J {Ico 1 2, Icc 2 2, Ioo 2 3, Icc 3 3, Ioo 3 5, Ico 5 6, Icc 6 6} x J J {Ico 1 2, Icc 2 2, Ioo 2 3, Icc 3 3, Ioo 3 5, Ico 5 6, Icc 6 6}, J Icc 1 6 PiecewiseConstantWith f_11_2_4 { intervals := {Ico 1 2, Icc 2 2, Ioo 2 3, Icc 3 3, Ioo 3 5, Ico 5 6, Icc 6 6}, exists_unique := ?w.refine_1, contains := ?w.refine_2 } All goals completed! 🐙 x Icc 1 6, ∃! J, J {Ico 1 2, Icc 2 2, Ioo 2 3, Icc 3 3, Ioo 3 5, Ico 5 6, Icc 6 6} x J All goals completed! 🐙 All goals completed! 🐙

Example 11.2.6

theorem declaration uses 'sorry'ConstantOn.piecewiseConstantOn {f: } {I: BoundedInterval} (h: ConstantOn f (I:Set )) : PiecewiseConstantOn f I := f: I:BoundedIntervalh:ConstantOn f IPiecewiseConstantOn f I All goals completed! 🐙

Lemma 11.2.7 / Exercise 11.2.1

theorem declaration uses 'sorry'PiecewiseConstantWith.mono {f: } {I: BoundedInterval} {P P': Partition I} (hPP': P P') (hP: PiecewiseConstantWith f P) : PiecewiseConstantWith f P' := f: I:BoundedIntervalP:Partition IP':Partition IhPP':P P'hP:PiecewiseConstantWith f PPiecewiseConstantWith f P' All goals completed! 🐙

Lemma 11.2.8 / Exercise 11.2.2

theorem declaration uses 'sorry'PiecewiseConstantOn.add {f g: } {I: BoundedInterval} (hf: PiecewiseConstantOn f I) (hg: PiecewiseConstantOn g I) : PiecewiseConstantOn (f + g) I := f: g: I:BoundedIntervalhf:PiecewiseConstantOn f Ihg:PiecewiseConstantOn g IPiecewiseConstantOn (f + g) I All goals completed! 🐙

Lemma 11.2.8 / Exercise 11.2.2

theorem declaration uses 'sorry'PiecewiseConstantOn.sub {f g: } {I: BoundedInterval} (hf: PiecewiseConstantOn f I) (hg: PiecewiseConstantOn g I) : PiecewiseConstantOn (f - g) I := f: g: I:BoundedIntervalhf:PiecewiseConstantOn f Ihg:PiecewiseConstantOn g IPiecewiseConstantOn (f - g) I All goals completed! 🐙

Lemma 11.2.8 / Exercise 11.2.2

theorem declaration uses 'sorry'PiecewiseConstantOn.max {f g: } {I: BoundedInterval} (hf: PiecewiseConstantOn f I) (hg: PiecewiseConstantOn g I) : PiecewiseConstantOn (max f g) I := f: g: I:BoundedIntervalhf:PiecewiseConstantOn f Ihg:PiecewiseConstantOn g IPiecewiseConstantOn (f g) I All goals completed! 🐙

Lemma 11.2.8 / Exercise 11.2.2

theorem declaration uses 'sorry'PiecewiseConstantOn.min {f g: } {I: BoundedInterval} (hf: PiecewiseConstantOn f I) (hg: PiecewiseConstantOn g I) : PiecewiseConstantOn (min f g) I := f: g: I:BoundedIntervalhf:PiecewiseConstantOn f Ihg:PiecewiseConstantOn g IPiecewiseConstantOn (f g) I All goals completed! 🐙

Lemma 11.2.8 / Exercise 11.2.2

theorem declaration uses 'sorry'PiecewiseConstantOn.mul {f g: } {I: BoundedInterval} (hf: PiecewiseConstantOn f I) (hg: PiecewiseConstantOn g I) : PiecewiseConstantOn (f * g) I := f: g: I:BoundedIntervalhf:PiecewiseConstantOn f Ihg:PiecewiseConstantOn g IPiecewiseConstantOn (f * g) I All goals completed! 🐙

Lemma 11.2.8 / Exercise 11.2.2

theorem declaration uses 'sorry'PiecewiseConstantOn.smul {f: } {I: BoundedInterval} (c:) (hf: PiecewiseConstantOn f I) : PiecewiseConstantOn (c f) I := f: I:BoundedIntervalc:hf:PiecewiseConstantOn f IPiecewiseConstantOn (c f) I All goals completed! 🐙

Lemma 11.2.8 / Exercise 11.2.2. I believe the hypothesis that Unknown identifier `g`g does not vanish is not needed.

theorem declaration uses 'sorry'PiecewiseConstantOn.div {f g: } {I: BoundedInterval} (hf: PiecewiseConstantOn f I) (hg: PiecewiseConstantOn f I) : PiecewiseConstantOn (f / g) I := f: g: I:BoundedIntervalhf:PiecewiseConstantOn f Ihg:PiecewiseConstantOn f IPiecewiseConstantOn (f / g) I All goals completed! 🐙

Definition 11.2.9 (Piecewise constant integral I)

noncomputable abbrev PiecewiseConstantWith.integ (f: ) {I: BoundedInterval} (P: Partition I) : := J P.intervals, constant_value_on f (J:Set ) * |J|ₗ
theorem PiecewiseConstantWith.integ_congr {f g: } {I: BoundedInterval} {P: Partition I} (h: x (I:Set ), f x = g x) : integ f P = integ g P := f: g: I:BoundedIntervalP:Partition Ih: x I, f x = g xinteg f P = integ g P f: g: I:BoundedIntervalP:Partition Ih: x I, f x = g x x P.intervals, constant_value_on f x * x.length = constant_value_on g x * x.length; f: g: I:BoundedIntervalP:Partition Ih: x I, f x = g xJ:BoundedIntervalhJ:J P.intervalsconstant_value_on f J * J.length = constant_value_on g J * J.length; f: g: I:BoundedIntervalP:Partition Ih: x I, f x = g xJ:BoundedIntervalhJ:J P.intervalsconstant_value_on f J = constant_value_on g J; f: g: I:BoundedIntervalP:Partition Ih: x I, f x = g xJ:BoundedIntervalhJ:J P.intervals x J, f x = g x f: g: I:BoundedIntervalP:Partition Ih: x I, f x = g xJ:BoundedIntervalhJ:J P.intervalsthis:?_mvar.39776 := failed to pretty print expression (use 'set_option pp.rawOnError true' for raw representation) x J, f x = g x; All goals completed! 🐙

Example 11.2.12

noncomputable abbrev f_11_2_12 : := fun x if x < 3 then 2 else if x = 3 then 4 else 6
noncomputable abbrev P_11_2_12 : Partition (Icc 1 4) := ((: Partition (Ico 1 3)).join ( : Partition (Icc 3 3)) (join_Ico_Icc (1 3 All goals completed! 🐙) (3 3 All goals completed! 🐙) )).join (: Partition (Ioc 3 4)) (join_Icc_Ioc (1 3 All goals completed! 🐙) (3 4 All goals completed! 🐙))declaration uses 'sorry'example : PiecewiseConstantWith f_11_2_12 P_11_2_12 := PiecewiseConstantWith f_11_2_12 P_11_2_12 All goals completed! 🐙declaration uses 'sorry'example : PiecewiseConstantWith.integ f_11_2_12 P_11_2_12 = 10 := PiecewiseConstantWith.integ f_11_2_12 P_11_2_12 = 10 All goals completed! 🐙noncomputable abbrev P_11_2_12' : Partition (Icc 1 4) := ((((: Partition (Ico 1 2)).join ( : Partition (Ico 2 3)) (join_Ico_Ico (1 2 All goals completed! 🐙) (2 3 All goals completed! 🐙) )).join (: Partition (Icc 3 3)) (join_Ico_Icc (1 3 All goals completed! 🐙) (3 3 All goals completed! 🐙))).join (: Partition (Ioc 3 4)) (join_Icc_Ioc (1 3 All goals completed! 🐙) (3 4 All goals completed! 🐙))).add_emptydeclaration uses 'sorry'example : PiecewiseConstantWith f_11_2_12 P_11_2_12' := PiecewiseConstantWith f_11_2_12 P_11_2_12' All goals completed! 🐙declaration uses 'sorry'example : PiecewiseConstantWith.integ f_11_2_12 P_11_2_12' = 10 := PiecewiseConstantWith.integ f_11_2_12 P_11_2_12' = 10 All goals completed! 🐙

Proposition 11.2.13 (Piecewise constant integral is independent of partition) / Exercise 11.2.3

theorem declaration uses 'sorry'PiecewiseConstantWith.integ_eq {f: } {I: BoundedInterval} {P P': Partition I} (hP: PiecewiseConstantWith f P) (hP': PiecewiseConstantWith f P') : integ f P = integ f P' := f: I:BoundedIntervalP:Partition IP':Partition IhP:PiecewiseConstantWith f PhP':PiecewiseConstantWith f P'integ f P = integ f P' All goals completed! 🐙
open Classical in /-- Definition 11.2.14 (Piecewise constant integral II) -/ noncomputable abbrev PiecewiseConstantOn.integ (f: ) (I: BoundedInterval) : := if h: PiecewiseConstantOn f I then PiecewiseConstantWith.integ f h.choose else 0noncomputable abbrev PiecewiseConstantOn.integ' {f: } {I: BoundedInterval} (_:PiecewiseConstantOn f I) := integ f Itheorem PiecewiseConstantOn.integ_def {f: } {I: BoundedInterval} {P: Partition I} (h: PiecewiseConstantWith f P) : integ f I = PiecewiseConstantWith.integ f P := f: I:BoundedIntervalP:Partition Ih:PiecewiseConstantWith f Pinteg f I = PiecewiseConstantWith.integ f P have h' : PiecewiseConstantOn f I := f: I:BoundedIntervalP:Partition Ih:PiecewiseConstantWith f Pinteg f I = PiecewiseConstantWith.integ f P All goals completed! 🐙 f: I:BoundedIntervalP:Partition Ih:PiecewiseConstantWith f Ph':Chapter11.PiecewiseConstantOn _fvar.43611 _fvar.43612 := ?_mvar.43620PiecewiseConstantWith.integ f (Exists.choose ) = PiecewiseConstantWith.integ f P; All goals completed! 🐙theorem PiecewiseConstantOn.integ_congr {f g: } {I: BoundedInterval} (h: x (I:Set ), f x = g x) : integ f I = integ g I := f: g: I:BoundedIntervalh: x I, f x = g xinteg f I = integ g I f: g: I:BoundedIntervalh: x I, f x = g xhf:PiecewiseConstantOn f Iinteg f I = integ g If: g: I:BoundedIntervalh: x I, f x = g xhf:¬PiecewiseConstantOn f Iinteg f I = integ g I f: g: I:BoundedIntervalh: x I, f x = g xhf:PiecewiseConstantOn f Iinteg f I = integ g If: g: I:BoundedIntervalh: x I, f x = g xhf:¬PiecewiseConstantOn f Iinteg f I = integ g I (f: g: I:BoundedIntervalh: x I, f x = g xhf:¬PiecewiseConstantOn f Ihg:?_mvar.48511 := _fvar.46959integ f I = integ g I; f: g: I:BoundedIntervalh: x I, f x = g xhf:¬PiecewiseConstantOn f Ihg:¬PiecewiseConstantOn g Iinteg f I = integ g I; All goals completed! 🐙) f: g: I:BoundedIntervalh: x I, f x = g xhf:PiecewiseConstantOn f Ihg:PiecewiseConstantOn g IPiecewiseConstantWith g (Exists.choose ) f: g: I:BoundedIntervalh: x I, f x = g xhf:PiecewiseConstantOn f Ihg:PiecewiseConstantOn g IPiecewiseConstantWith f (Exists.choose ); All goals completed! 🐙

Example 11.2.15

declaration uses 'sorry'example : PiecewiseConstantOn.integ f_11_2_4 (Icc 1 6) = 10 := PiecewiseConstantOn.integ f_11_2_4 (Icc 1 6) = 10 All goals completed! 🐙

Theorem 11.2.16 (a) (Laws of integration) / Exercise 11.2.4

theorem declaration uses 'sorry'PiecewiseConstantOn.integ_add {f g: } {I: BoundedInterval} (hf: PiecewiseConstantOn f I) (hg: PiecewiseConstantOn g I) : integ (f + g) I = integ f I + integ g I := f: g: I:BoundedIntervalhf:PiecewiseConstantOn f Ihg:PiecewiseConstantOn g Iinteg (f + g) I = integ f I + integ g I All goals completed! 🐙

Theorem 11.2.16 (b) (Laws of integration) / Exercise 11.2.4

theorem declaration uses 'sorry'PiecewiseConstantOn.integ_smul {f: } {I: BoundedInterval} (c:) (hf: PiecewiseConstantOn f I) : integ (c f) I = c * integ f I := f: I:BoundedIntervalc:hf:PiecewiseConstantOn f Iinteg (c f) I = c * integ f I All goals completed! 🐙

Theorem 11.2.16 (c) (Laws of integration) / Exercise 11.2.4

theorem declaration uses 'sorry'PiecewiseConstantOn.integ_sub {f g: } {I: BoundedInterval} (hf: PiecewiseConstantOn f I) (hg: PiecewiseConstantOn g I) : integ (f - g) I = integ f I - integ g I := f: g: I:BoundedIntervalhf:PiecewiseConstantOn f Ihg:PiecewiseConstantOn g Iinteg (f - g) I = integ f I - integ g I All goals completed! 🐙

Theorem 11.2.16 (d) (Laws of integration) / Exercise 11.2.4

theorem declaration uses 'sorry'PiecewiseConstantOn.integ_of_nonneg {f: } {I: BoundedInterval} (h: x I, 0 f x) (hf: PiecewiseConstantOn f I) : 0 integ f I := f: I:BoundedIntervalh: x I, 0 f xhf:PiecewiseConstantOn f I0 integ f I All goals completed! 🐙

Theorem 11.2.16 (e) (Laws of integration) / Exercise 11.2.4

theorem declaration uses 'sorry'PiecewiseConstantOn.integ_mono {f g: } {I: BoundedInterval} (h: x I, f x g x) (hf: PiecewiseConstantOn f I) (hg: PiecewiseConstantOn g I) : integ f I integ g I := f: g: I:BoundedIntervalh: x I, f x g xhf:PiecewiseConstantOn f Ihg:PiecewiseConstantOn g Iinteg f I integ g I All goals completed! 🐙

Theorem 11.2.16 (f) (Laws of integration) / Exercise 11.2.4

theorem declaration uses 'sorry'PiecewiseConstantOn.integ_const (c: ) (I: BoundedInterval) : integ (fun _ c) I = c * |I|ₗ := c:I:BoundedIntervalinteg (fun x => c) I = c * I.length All goals completed! 🐙

Theorem 11.2.16 (f) (Laws of integration) / Exercise 11.2.4

theorem declaration uses 'sorry'PiecewiseConstantOn.integ_const' {f: } {I: BoundedInterval} (h: ConstantOn f I) : integ f I = (constant_value_on f I) * |I|ₗ := f: I:BoundedIntervalh:ConstantOn f Iinteg f I = constant_value_on f I * I.length All goals completed! 🐙
open Classical in /-- Theorem 11.2.16 (g) (Laws of integration) / Exercise 11.2.4 -/ theorem declaration uses 'sorry'PiecewiseConstantOn.of_extend {I J: BoundedInterval} (hIJ: I J) {f: } (h: PiecewiseConstantOn f I) : PiecewiseConstantOn (fun x if x I then f x else 0) J := I:BoundedIntervalJ:BoundedIntervalhIJ:I Jf: h:PiecewiseConstantOn f IPiecewiseConstantOn (fun x => if x I then f x else 0) J All goals completed! 🐙open Classical in /-- Theorem 11.2.16 (g) (Laws of integration) / Exercise 11.2.4 -/ theorem declaration uses 'sorry'PiecewiseConstantOn.integ_of_extend {I J: BoundedInterval} (hIJ: I J) {f: } (h: PiecewiseConstantOn f I) : integ (fun x if x I then f x else 0) J = integ f I := I:BoundedIntervalJ:BoundedIntervalhIJ:I Jf: h:PiecewiseConstantOn f Iinteg (fun x => if x I then f x else 0) J = integ f I All goals completed! 🐙

Theorem 11.2.16 (h) (Laws of integration) / Exercise 11.2.4

theorem declaration uses 'sorry'PiecewiseConstantOn.of_join {I J K: BoundedInterval} (hIJK: K.joins I J) (f: ) : PiecewiseConstantOn f K PiecewiseConstantOn f I PiecewiseConstantOn f J := I:BoundedIntervalJ:BoundedIntervalK:BoundedIntervalhIJK:K.joins I Jf: PiecewiseConstantOn f K PiecewiseConstantOn f I PiecewiseConstantOn f J All goals completed! 🐙

Theorem 11.2.16 (h) (Laws of integration) / Exercise 11.2.4

theorem declaration uses 'sorry'PiecewiseConstantOn.integ_of_join {I J K: BoundedInterval} (hIJK: K.joins I J) {f: } (h: PiecewiseConstantOn f K) : integ f K = integ f I + integ f J := I:BoundedIntervalJ:BoundedIntervalK:BoundedIntervalhIJK:K.joins I Jf: h:PiecewiseConstantOn f Kinteg f K = integ f I + integ f J All goals completed! 🐙
end Chapter11