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

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 Chapter9open Classical in noncomputable abbrev function_example : := fun x if x ((fun y: (y:)) '' Set.univ) then 1 else 0

Визначення 9.2.1 (Arithmetic operations on functions)

theorem add_func_eval (f g: ) (x: ) : (f + g) x = f x + g x := f: g: x:(f + g) x = f x + g x All goals completed! 🐙
theorem sub_func_eval (f g: ) (x: ) : (f - g) x = f x - g x := f: g: x:(f - g) x = f x - g x All goals completed! 🐙theorem max_func_eval (f g: ) (x: ) : max f g x = max (f x) (g x) := f: g: x:max f g x = max (f x) (g x) All goals completed! 🐙theorem min_func_eval (f g: ) (x: ) : min f g x = min (f x) (g x) := f: g: x:min f g x = min (f x) (g x) All goals completed! 🐙theorem mul_func_eval (f g: ) (x: ) : (f * g) x = f x * g x := f: g: x:(f * g) x = f x * g x All goals completed! 🐙theorem div_func_eval (f g: ) (x: ) : (f / g) x = f x / g x := f: g: x:(f / g) x = f x / g x All goals completed! 🐙theorem smul_func_eval (c: ) (f: ) (x: ) : (c f) x = c * f x := c:f: x:(c f) x = c * f x All goals completed! 🐙abbrev f_9_2_2 : := fun x x^2abbrev g_9_2_2 : := fun x 2*xexample : f_9_2_2 + g_9_2_2 = fun x x^2 + 2*x := f_9_2_2 + g_9_2_2 = fun x => x ^ 2 + 2 * x All goals completed! 🐙example : f_9_2_2 * g_9_2_2 = fun x 2 * x^3 := f_9_2_2 * g_9_2_2 = fun x => 2 * x ^ 3 x:(f_9_2_2 * g_9_2_2) x = 2 * x ^ 3; x:f_9_2_2 x * g_9_2_2 x = 2 * x ^ 3; All goals completed! 🐙example : f_9_2_2 - g_9_2_2 = fun x x^2 - 2*x := f_9_2_2 - g_9_2_2 = fun x => x ^ 2 - 2 * x All goals completed! 🐙example : 6 f_9_2_2 = fun x 6 * (x^2) := 6 f_9_2_2 = fun x => 6 * x ^ 2 x:(6 f_9_2_2) x = 6 * x ^ 2; All goals completed! 🐙example : f_9_2_2 g_9_2_2 = fun x 4*x^2 := f_9_2_2 g_9_2_2 = fun x => 4 * x ^ 2 x:(f_9_2_2 g_9_2_2) x = 4 * x ^ 2; x:f_9_2_2 (g_9_2_2 x) = 4 * x ^ 2; All goals completed! 🐙example : g_9_2_2 f_9_2_2 = fun x 2*x^2 := g_9_2_2 f_9_2_2 = fun x => 2 * x ^ 2 x:(g_9_2_2 f_9_2_2) x = 2 * x ^ 2; All goals completed! 🐙/- Exercise 9.2.1. -/ def declaration uses 'sorry'Exercise_9_2_1a : Decidable ( (f g h : ), (f+g) h = f h + g h) := Decidable (∀ (f g h : ), (f + g) h = f h + g h) -- The first line of this construction should be `apply isTrue` or `apply isFalse`. All goals completed! 🐙def declaration uses 'sorry'Exercise_9_2_1b : Decidable ( (f g h : ), f (g + h) = f g + f h) := Decidable (∀ (f g h : ), f (g + h) = f g + f h) -- The first line of this construction should be `apply isTrue` or `apply isFalse`. All goals completed! 🐙def declaration uses 'sorry'Exercise_9_2_1c : Decidable ( (f g h : ), (f+g) * h = f * h + g * h) := Decidable (∀ (f g h : ), (f + g) * h = f * h + g * h) -- The first line of this construction should be `apply isTrue` or `apply isFalse`. All goals completed! 🐙def declaration uses 'sorry'Exercise_9_2_1d : Decidable ( (f g h : ), f * (g+h) = f * g + f * h) := Decidable (∀ (f g h : ), f * (g + h) = f * g + f * h) -- The first line of this construction should be `apply isTrue` or `apply isFalse`. All goals completed! 🐙end Chapter9