File: Mathlib/LinearAlgebra/AffineSpace/Slope.lean

full_name: slope
code: /-- `slope f a b = (b - a)⁻¹ • (f b -ᵥ f a)` is the slope of a function `f` on the interval
`[a, b]`. Note that `slope f a a = 0`, not the derivative of `f` at `a`. -/
def slope (f : k → PE) (a b : k) : E 
goal: E

full_name: slope_fun_def
code: theorem slope_fun_def (f : k → PE) : slope f = fun a b => (b - a)⁻¹ • (f b -ᵥ f a) 
goal: slope f = fun a b => (b - a)⁻¹ • (f b -ᵥ f a)

full_name: slope_def_field
code: theorem slope_def_field (f : k → k) (a b : k) : slope f a b = (f b - f a) / (b - a) 
goal: slope f a b = (f b - f a) / (b - a)

full_name: slope_fun_def_field
code: theorem slope_fun_def_field (f : k → k) (a : k) : slope f a = fun b => (f b - f a) / (b - a) 
goal: slope f a = fun b => (f b - f a) / (b - a)

full_name: slope_same
code: @[simp]
theorem slope_same (f : k → PE) (a : k) : (slope f a a : E) = 0 
goal: slope f a a = 0

full_name: slope_def_module
code: theorem slope_def_module (f : k → E) (a b : k) : slope f a b = (b - a)⁻¹ • (f b - f a) 
goal: slope f a b = (b - a)⁻¹ • (f b - f a)

full_name: sub_smul_slope
code: @[simp]
theorem sub_smul_slope (f : k → PE) (a b : k) : (b - a) • slope f a b = f b -ᵥ f a 
goal: (b - a) • slope f a b = f b -ᵥ f a

full_name: sub_smul_slope_vadd
code: theorem sub_smul_slope_vadd (f : k → PE) (a b : k) : (b - a) • slope f a b +ᵥ f a = f b 
goal: (b - a) • slope f a b +ᵥ f a = f b

full_name: slope_vadd_const
code: @[simp]
theorem slope_vadd_const (f : k → E) (c : PE) : (slope fun x => f x +ᵥ c) = slope f 
goal: (slope fun x => f x +ᵥ c) = slope f

full_name: slope_sub_smul
code: @[simp]
theorem slope_sub_smul (f : k → E) {a b : k} (h : a ≠ b) :
    slope (fun x => (x - a) • f x) a b = f b 
goal: slope (fun x => (x - a) • f x) a b = f b

full_name: eq_of_slope_eq_zero
code: theorem eq_of_slope_eq_zero {f : k → PE} {a b : k} (h : slope f a b = (0 : E)) : f a = f b 
goal: f a = f b

full_name: AffineMap.slope_comp
code: theorem AffineMap.slope_comp {F PF : Type*} [AddCommGroup F] [Module k F] [AddTorsor F PF]
    (f : PE →ᵃ[k] PF) (g : k → PE) (a b : k) : slope (f ∘ g) a b = f.linear (slope g a b) 
goal: slope (⇑f ∘ g) a b = f.linear (slope g a b)

full_name: LinearMap.slope_comp
code: theorem LinearMap.slope_comp {F : Type*} [AddCommGroup F] [Module k F] (f : E →ₗ[k] F) (g : k → E)
    (a b : k) : slope (f ∘ g) a b = f (slope g a b) 
goal: slope (⇑f ∘ g) a b = f (slope g a b)

full_name: slope_comm
code: theorem slope_comm (f : k → PE) (a b : k) : slope f a b = slope f b a 
goal: slope f a b = slope f b a

full_name: slope_neg
code: @[simp] lemma slope_neg (f : k → E) (x y : k) : slope (fun t ↦ -f t) x y = -slope f x y 
goal: slope (fun t => -f t) x y = -slope f x y

full_name: slope_neg_fun
code: @[simp] lemma slope_neg_fun (f : k → E) : slope (-f) = -slope f 
goal: slope (-f) = -slope f

full_name: sub_div_sub_smul_slope_add_sub_div_sub_smul_slope
code: /-- `slope f a c` is a linear combination of `slope f a b` and `slope f b c`. This version
explicitly provides coefficients. If `a ≠ c`, then the sum of the coefficients is `1`, so it is
actually an affine combination, see `lineMap_slope_slope_sub_div_sub`. -/
theorem sub_div_sub_smul_slope_add_sub_div_sub_smul_slope (f : k → PE) (a b c : k) :
    ((b - a) / (c - a)) • slope f a b + ((c - b) / (c - a)) • slope f b c = slope f a c 
goal: ((b - a) / (c - a)) • slope f a b + ((c - b) / (c - a)) • slope f b c = slope f a c

full_name: lineMap_slope_slope_sub_div_sub
code: /-- `slope f a c` is an affine combination of `slope f a b` and `slope f b c`. This version uses
`lineMap` to express this property. -/
theorem lineMap_slope_slope_sub_div_sub (f : k → PE) (a b c : k) (h : a ≠ c) :
    lineMap (slope f a b) (slope f b c) ((c - b) / (c - a)) = slope f a c 
goal: (AffineMap.lineMap (slope f a b) (slope f b c)) ((c - b) / (c - a)) = slope f a c

full_name: lineMap_slope_lineMap_slope_lineMap
code: /-- `slope f a b` is an affine combination of `slope f a (lineMap a b r)` and
`slope f (lineMap a b r) b`. We use `lineMap` to express this property. -/
theorem lineMap_slope_lineMap_slope_lineMap (f : k → PE) (a b r : k) :
    lineMap (slope f (lineMap a b r) b) (slope f a (lineMap a b r)) r = slope f a b 
goal: (AffineMap.lineMap (slope f ((AffineMap.lineMap a b) r) b) (slope f a ((AffineMap.lineMap a b) r))) r = slope f a b