l3lab/ntp-mathlib huggingface dataset:
/-- An `R`-linear map between two `S⁻¹R`-modules is actually `S⁻¹R`-linear. -/
def LinearMap.extendScalarsOfIsLocalization (f : M →ₗ[R] N) : M →ₗ[A] N where
  toFun := f
  map_add' := f.map_add
  map_smul' := by
    intro r m
    simp only [RingHom.id_apply]
    rcases mk'_surjective S r with ⟨r, s, rfl⟩
    calc f (mk' A r s • m)
        = ((s : R) • mk' A 1 s) • f (mk' A r s • m) := by simp
      _ = (mk' A 1 s) • (s : R) • f (mk' A r s • m) := by rw [smul_comm, smul_assoc]
      _ = (mk' A 1 s) • f ((s : R) • mk' A r s • m) := by simp
      _ = (mk' A 1 s) • f (r • m) := by rw [← smul_assoc, smul_mk'_self, algebraMap_smul]
      _ = (mk' A 1 s) • r • f m := by simp
      _ = mk' A r s • f m := by 

Proof state:
R : Type u_1
inst✝¹¹ : CommRing R
S : Submonoid R
A : Type u_2
inst✝¹⁰ : CommRing A
inst✝⁹ : Algebra R A
inst✝⁸ : IsLocalization S A
M : Type u_3
N : Type u_4
inst✝⁷ : AddCommMonoid M
inst✝⁶ : Module R M
inst✝⁵ : Module A M
inst✝⁴ : IsScalarTower R A M
inst✝³ : AddCommMonoid N
inst✝² : Module R N
inst✝¹ : Module A N
inst✝ : IsScalarTower R A N
f : M →ₗ[R] N
m : M
r : R
s : ↥S
⊢ mk' A 1 s • r • f m = mk' A r s • f m

Next tactic:
rw [smul_comm, ← smul_assoc, smul_mk'_one]
theorem min_def (a b : α) : min a b = if a ≤ b then a else b := by
  

Proof state:
α : Type u
inst✝ : LinearOrder α
a b : α
⊢ min a b = if a ≤ b then a else b

Next tactic:
rw [LinearOrder.min_def a]
theorem max_def (a b : α) : max a b = if a ≤ b then b else a := by
  

Proof state:
α : Type u
inst✝ : LinearOrder α
a b : α
⊢ max a b = if a ≤ b then b else a

Next tactic:
rw [LinearOrder.max_def a]
theorem min_le_left (a b : α) : min a b ≤ a := by
  -- porting note: no `min_tac` tactic
  

Proof state:
α : Type u
inst✝ : LinearOrder α
a b : α
⊢ min a b ≤ a

Next tactic:
if h : a ≤ b
  then simp [min_def, if_pos h, le_refl]
  else simp [min_def, if_neg h]; exact le_of_not_le h
theorem min_le_left (a b : α) : min a b ≤ a := by
  -- porting note: no `min_tac` tactic
  if h : a ≤ b
  then 

Proof state:
α : Type u
inst✝ : LinearOrder α
a b : α
h : a ≤ b
⊢ min a b ≤ a

Next tactic:
simp [min_def, if_pos h, le_refl]
theorem min_le_left (a b : α) : min a b ≤ a := by
  -- porting note: no `min_tac` tactic
  if h : a ≤ b
  then simp [min_def, if_pos h, le_refl]
  else 

Proof state:
α : Type u
inst✝ : LinearOrder α
a b : α
h : ¬a ≤ b
⊢ min a b ≤ a

Next tactic:
simp [min_def, if_neg h]
theorem min_le_left (a b : α) : min a b ≤ a := by
  -- porting note: no `min_tac` tactic
  if h : a ≤ b
  then simp [min_def, if_pos h, le_refl]
  else simp [min_def, if_neg h]; 

Proof state:
α : Type u
inst✝ : LinearOrder α
a b : α
h : ¬a ≤ b
⊢ b ≤ a

Next tactic:
exact le_of_not_le h
theorem min_le_right (a b : α) : min a b ≤ b := by
  -- porting note: no `min_tac` tactic
  

Proof state:
α : Type u
inst✝ : LinearOrder α
a b : α
⊢ min a b ≤ b

Next tactic:
if h : a ≤ b
  then simp [min_def, if_pos h]; exact h
  else simp [min_def, if_neg h, le_refl]
theorem min_le_right (a b : α) : min a b ≤ b := by
  -- porting note: no `min_tac` tactic
  if h : a ≤ b
  then 

Proof state:
α : Type u
inst✝ : LinearOrder α
a b : α
h : a ≤ b
⊢ min a b ≤ b

Next tactic:
simp [min_def, if_pos h]
theorem min_le_right (a b : α) : min a b ≤ b := by
  -- porting note: no `min_tac` tactic
  if h : a ≤ b
  then simp [min_def, if_pos h]; 

Proof state:
α : Type u
inst✝ : LinearOrder α
a b : α
h : a ≤ b
⊢ a ≤ b

Next tactic:
exact h
theorem min_le_right (a b : α) : min a b ≤ b := by
  -- porting note: no `min_tac` tactic
  if h : a ≤ b
  then simp [min_def, if_pos h]; exact h
  else 

Proof state:
α : Type u
inst✝ : LinearOrder α
a b : α
h : ¬a ≤ b
⊢ min a b ≤ b

Next tactic:
simp [min_def, if_neg h, le_refl]
theorem le_min {a b c : α} (h₁ : c ≤ a) (h₂ : c ≤ b) : c ≤ min a b := by
  -- porting note: no `min_tac` tactic
  

Proof state:
α : Type u
inst✝ : LinearOrder α
a b c : α
h₁ : c ≤ a
h₂ : c ≤ b
⊢ c ≤ min a b

Next tactic:
if h : a ≤ b
  then simp [min_def, if_pos h]; exact h₁
  else simp [min_def, if_neg h]; exact h₂
theorem le_min {a b c : α} (h₁ : c ≤ a) (h₂ : c ≤ b) : c ≤ min a b := by
  -- porting note: no `min_tac` tactic
  if h : a ≤ b
  then 

Proof state:
α : Type u
inst✝ : LinearOrder α
a b c : α
h₁ : c ≤ a
h₂ : c ≤ b
h : a ≤ b
⊢ c ≤ min a b

Next tactic:
simp [min_def, if_pos h]
theorem le_min {a b c : α} (h₁ : c ≤ a) (h₂ : c ≤ b) : c ≤ min a b := by
  -- porting note: no `min_tac` tactic
  if h : a ≤ b
  then simp [min_def, if_pos h]; 

Proof state:
α : Type u
inst✝ : LinearOrder α
a b c : α
h₁ : c ≤ a
h₂ : c ≤ b
h : a ≤ b
⊢ c ≤ a

Next tactic:
exact h₁
theorem le_min {a b c : α} (h₁ : c ≤ a) (h₂ : c ≤ b) : c ≤ min a b := by
  -- porting note: no `min_tac` tactic
  if h : a ≤ b
  then simp [min_def, if_pos h]; exact h₁
  else 

Proof state:
α : Type u
inst✝ : LinearOrder α
a b c : α
h₁ : c ≤ a
h₂ : c ≤ b
h : ¬a ≤ b
⊢ c ≤ min a b

Next tactic:
simp [min_def, if_neg h]
theorem le_min {a b c : α} (h₁ : c ≤ a) (h₂ : c ≤ b) : c ≤ min a b := by
  -- porting note: no `min_tac` tactic
  if h : a ≤ b
  then simp [min_def, if_pos h]; exact h₁
  else simp [min_def, if_neg h]; 

Proof state:
α : Type u
inst✝ : LinearOrder α
a b c : α
h₁ : c ≤ a
h₂ : c ≤ b
h : ¬a ≤ b
⊢ c ≤ b

Next tactic:
exact h₂
theorem le_max_left (a b : α) : a ≤ max a b := by
  -- porting note: no `min_tac` tactic
  

Proof state:
α : Type u
inst✝ : LinearOrder α
a b : α
⊢ a ≤ max a b

Next tactic:
if h : a ≤ b
  then simp [max_def, if_pos h]; exact h
  else simp [max_def, if_neg h, le_refl]
theorem le_max_left (a b : α) : a ≤ max a b := by
  -- porting note: no `min_tac` tactic
  if h : a ≤ b
  then 

Proof state:
α : Type u
inst✝ : LinearOrder α
a b : α
h : a ≤ b
⊢ a ≤ max a b

Next tactic:
simp [max_def, if_pos h]
theorem le_max_left (a b : α) : a ≤ max a b := by
  -- porting note: no `min_tac` tactic
  if h : a ≤ b
  then simp [max_def, if_pos h]; 

Proof state:
α : Type u
inst✝ : LinearOrder α
a b : α
h : a ≤ b
⊢ a ≤ b

Next tactic:
exact h
theorem le_max_left (a b : α) : a ≤ max a b := by
  -- porting note: no `min_tac` tactic
  if h : a ≤ b
  then simp [max_def, if_pos h]; exact h
  else 

Proof state:
α : Type u
inst✝ : LinearOrder α
a b : α
h : ¬a ≤ b
⊢ a ≤ max a b

Next tactic:
simp [max_def, if_neg h, le_refl]
theorem le_max_right (a b : α) : b ≤ max a b := by
  -- porting note: no `min_tac` tactic
  

Proof state:
α : Type u
inst✝ : LinearOrder α
a b : α
⊢ b ≤ max a b

Next tactic:
if h : a ≤ b
  then simp [max_def, if_pos h, le_refl]
  else simp [max_def, if_neg h]; exact le_of_not_le h
theorem le_max_right (a b : α) : b ≤ max a b := by
  -- porting note: no `min_tac` tactic
  if h : a ≤ b
  then 

Proof state:
α : Type u
inst✝ : LinearOrder α
a b : α
h : a ≤ b
⊢ b ≤ max a b

Next tactic:
simp [max_def, if_pos h, le_refl]
theorem le_max_right (a b : α) : b ≤ max a b := by
  -- porting note: no `min_tac` tactic
  if h : a ≤ b
  then simp [max_def, if_pos h, le_refl]
  else 

Proof state:
α : Type u
inst✝ : LinearOrder α
a b : α
h : ¬a ≤ b
⊢ b ≤ max a b

Next tactic:
simp [max_def, if_neg h]
theorem le_max_right (a b : α) : b ≤ max a b := by
  -- porting note: no `min_tac` tactic
  if h : a ≤ b
  then simp [max_def, if_pos h, le_refl]
  else simp [max_def, if_neg h]; 

Proof state:
α : Type u
inst✝ : LinearOrder α
a b : α
h : ¬a ≤ b
⊢ b ≤ a

Next tactic:
exact le_of_not_le h
theorem max_le {a b c : α} (h₁ : a ≤ c) (h₂ : b ≤ c) : max a b ≤ c := by
  -- porting note: no `min_tac` tactic
  

Proof state:
α : Type u
inst✝ : LinearOrder α
a b c : α
h₁ : a ≤ c
h₂ : b ≤ c
⊢ max a b ≤ c

Next tactic:
if h : a ≤ b
  then simp [max_def, if_pos h]; exact h₂
  else simp [max_def, if_neg h]; exact h₁
theorem max_le {a b c : α} (h₁ : a ≤ c) (h₂ : b ≤ c) : max a b ≤ c := by
  -- porting note: no `min_tac` tactic
  if h : a ≤ b
  then 

Proof state:
α : Type u
inst✝ : LinearOrder α
a b c : α
h₁ : a ≤ c
h₂ : b ≤ c
h : a ≤ b
⊢ max a b ≤ c

Next tactic:
simp [max_def, if_pos h]
theorem max_le {a b c : α} (h₁ : a ≤ c) (h₂ : b ≤ c) : max a b ≤ c := by
  -- porting note: no `min_tac` tactic
  if h : a ≤ b
  then simp [max_def, if_pos h]; 

Proof state:
α : Type u
inst✝ : LinearOrder α
a b c : α
h₁ : a ≤ c
h₂ : b ≤ c
h : a ≤ b
⊢ b ≤ c

Next tactic:
exact h₂
theorem max_le {a b c : α} (h₁ : a ≤ c) (h₂ : b ≤ c) : max a b ≤ c := by
  -- porting note: no `min_tac` tactic
  if h : a ≤ b
  then simp [max_def, if_pos h]; exact h₂
  else 

Proof state:
α : Type u
inst✝ : LinearOrder α
a b c : α
h₁ : a ≤ c
h₂ : b ≤ c
h : ¬a ≤ b
⊢ max a b ≤ c

Next tactic:
simp [max_def, if_neg h]
theorem max_le {a b c : α} (h₁ : a ≤ c) (h₂ : b ≤ c) : max a b ≤ c := by
  -- porting note: no `min_tac` tactic
  if h : a ≤ b
  then simp [max_def, if_pos h]; exact h₂
  else simp [max_def, if_neg h]; 

Proof state:
α : Type u
inst✝ : LinearOrder α
a b c : α
h₁ : a ≤ c
h₂ : b ≤ c
h : ¬a ≤ b
⊢ a ≤ c

Next tactic:
exact h₁
theorem min_assoc (a b c : α) : min (min a b) c = min a (min b c) := by
  

Proof state:
α : Type u
inst✝ : LinearOrder α
a b c : α
⊢ min (min a b) c = min a (min b c)

Next tactic:
apply eq_min
theorem min_assoc (a b c : α) : min (min a b) c = min a (min b c) := by
  apply eq_min
  · 

Proof state:
case h₁
α : Type u
inst✝ : LinearOrder α
a b c : α
⊢ min (min a b) c ≤ a

Next tactic:
apply le_trans
theorem min_assoc (a b c : α) : min (min a b) c = min a (min b c) := by
  apply eq_min
  · apply le_trans; 

Proof state:
case h₁.a
α : Type u
inst✝ : LinearOrder α
a b c : α
⊢ min (min a b) c ≤ ?h₁.b
case h₁.a
α : Type u
inst✝ : LinearOrder α
a b c : α
⊢ ?h₁.b ≤ a
case h₁.b α : Type u inst✝ : LinearOrder α a b c : α ⊢ α

Next tactic:
apply min_le_left
theorem min_assoc (a b c : α) : min (min a b) c = min a (min b c) := by
  apply eq_min
  · apply le_trans; apply min_le_left; 

Proof state:
case h₁.a
α : Type u
inst✝ : LinearOrder α
a b c : α
⊢ min a b ≤ a

Next tactic:
apply min_le_left
theorem min_assoc (a b c : α) : min (min a b) c = min a (min b c) := by
  apply eq_min
  · apply le_trans; apply min_le_left; apply min_le_left
  · 

Proof state:
case h₂
α : Type u
inst✝ : LinearOrder α
a b c : α
⊢ min (min a b) c ≤ min b c

Next tactic:
apply le_min
theorem min_assoc (a b c : α) : min (min a b) c = min a (min b c) := by
  apply eq_min
  · apply le_trans; apply min_le_left; apply min_le_left
  · apply le_min; 

Proof state:
case h₂.h₁
α : Type u
inst✝ : LinearOrder α
a b c : α
⊢ min (min a b) c ≤ b
case h₂.h₂ α : Type u inst✝ : LinearOrder α a b c : α ⊢ min (min a b) c ≤ c

Next tactic:
apply le_trans
theorem min_assoc (a b c : α) : min (min a b) c = min a (min b c) := by
  apply eq_min
  · apply le_trans; apply min_le_left; apply min_le_left
  · apply le_min; apply le_trans; 

Proof state:
case h₂.h₁.a
α : Type u
inst✝ : LinearOrder α
a b c : α
⊢ min (min a b) c ≤ ?h₂.h₁.b
case h₂.h₁.a
α : Type u
inst✝ : LinearOrder α
a b c : α
⊢ ?h₂.h₁.b ≤ b
case h₂.h₁.b
α : Type u
inst✝ : LinearOrder α
a b c : α
⊢ α
case h₂.h₂ α : Type u inst✝ : LinearOrder α a b c : α ⊢ min (min a b) c ≤ c

Next tactic:
apply min_le_left
theorem min_assoc (a b c : α) : min (min a b) c = min a (min b c) := by
  apply eq_min
  · apply le_trans; apply min_le_left; apply min_le_left
  · apply le_min; apply le_trans; apply min_le_left; 

Proof state:
case h₂.h₁.a
α : Type u
inst✝ : LinearOrder α
a b c : α
⊢ min a b ≤ b
case h₂.h₂ α : Type u inst✝ : LinearOrder α a b c : α ⊢ min (min a b) c ≤ c

Next tactic:
apply min_le_right
theorem min_assoc (a b c : α) : min (min a b) c = min a (min b c) := by
  apply eq_min
  · apply le_trans; apply min_le_left; apply min_le_left
  · apply le_min; apply le_trans; apply min_le_left; apply min_le_right; 

Proof state:
case h₂.h₂
α : Type u
inst✝ : LinearOrder α
a b c : α
⊢ min (min a b) c ≤ c

Next tactic:
apply min_le_right
theorem min_assoc (a b c : α) : min (min a b) c = min a (min b c) := by
  apply eq_min
  · apply le_trans; apply min_le_left; apply min_le_left
  · apply le_min; apply le_trans; apply min_le_left; apply min_le_right; apply min_le_right
  · 

Proof state:
case h₃
α : Type u
inst✝ : LinearOrder α
a b c : α
⊢ ∀ {d : α}, d ≤ a → d ≤ min b c → d ≤ min (min a b) c

Next tactic:
intro d h₁ h₂
theorem min_assoc (a b c : α) : min (min a b) c = min a (min b c) := by
  apply eq_min
  · apply le_trans; apply min_le_left; apply min_le_left
  · apply le_min; apply le_trans; apply min_le_left; apply min_le_right; apply min_le_right
  · intro d h₁ h₂; 

Proof state:
case h₃
α : Type u
inst✝ : LinearOrder α
a b c d : α
h₁ : d ≤ a
h₂ : d ≤ min b c
⊢ d ≤ min (min a b) c

Next tactic:
apply le_min
theorem min_assoc (a b c : α) : min (min a b) c = min a (min b c) := by
  apply eq_min
  · apply le_trans; apply min_le_left; apply min_le_left
  · apply le_min; apply le_trans; apply min_le_left; apply min_le_right; apply min_le_right
  · intro d h₁ h₂; apply le_min; 

Proof state:
case h₃.h₁
α : Type u
inst✝ : LinearOrder α
a b c d : α
h₁ : d ≤ a
h₂ : d ≤ min b c
⊢ d ≤ min a b
case h₃.h₂ α : Type u inst✝ : LinearOrder α a b c d : α h₁ : d ≤ a h₂ : d ≤ min b c ⊢ d ≤ c

Next tactic:
apply le_min h₁
theorem min_assoc (a b c : α) : min (min a b) c = min a (min b c) := by
  apply eq_min
  · apply le_trans; apply min_le_left; apply min_le_left
  · apply le_min; apply le_trans; apply min_le_left; apply min_le_right; apply min_le_right
  · intro d h₁ h₂; apply le_min; apply le_min h₁; 

Proof state:
case h₃.h₁
α : Type u
inst✝ : LinearOrder α
a b c d : α
h₁ : d ≤ a
h₂ : d ≤ min b c
⊢ d ≤ b
case h₃.h₂ α : Type u inst✝ : LinearOrder α a b c d : α h₁ : d ≤ a h₂ : d ≤ min b c ⊢ d ≤ c

Next tactic:
apply le_trans h₂
theorem min_assoc (a b c : α) : min (min a b) c = min a (min b c) := by
  apply eq_min
  · apply le_trans; apply min_le_left; apply min_le_left
  · apply le_min; apply le_trans; apply min_le_left; apply min_le_right; apply min_le_right
  · intro d h₁ h₂; apply le_min; apply le_min h₁; apply le_trans h₂; 

Proof state:
case h₃.h₁
α : Type u
inst✝ : LinearOrder α
a b c d : α
h₁ : d ≤ a
h₂ : d ≤ min b c
⊢ min b c ≤ b
case h₃.h₂ α : Type u inst✝ : LinearOrder α a b c d : α h₁ : d ≤ a h₂ : d ≤ min b c ⊢ d ≤ c

Next tactic:
apply min_le_left
theorem min_assoc (a b c : α) : min (min a b) c = min a (min b c) := by
  apply eq_min
  · apply le_trans; apply min_le_left; apply min_le_left
  · apply le_min; apply le_trans; apply min_le_left; apply min_le_right; apply min_le_right
  · intro d h₁ h₂; apply le_min; apply le_min h₁; apply le_trans h₂; apply min_le_left
    

Proof state:
case h₃.h₂
α : Type u
inst✝ : LinearOrder α
a b c d : α
h₁ : d ≤ a
h₂ : d ≤ min b c
⊢ d ≤ c

Next tactic:
apply le_trans h₂
theorem min_assoc (a b c : α) : min (min a b) c = min a (min b c) := by
  apply eq_min
  · apply le_trans; apply min_le_left; apply min_le_left
  · apply le_min; apply le_trans; apply min_le_left; apply min_le_right; apply min_le_right
  · intro d h₁ h₂; apply le_min; apply le_min h₁; apply le_trans h₂; apply min_le_left
    apply le_trans h₂; 

Proof state:
case h₃.h₂
α : Type u
inst✝ : LinearOrder α
a b c d : α
h₁ : d ≤ a
h₂ : d ≤ min b c
⊢ min b c ≤ c

Next tactic:
apply min_le_right
@[simp]
theorem min_self (a : α) : min a a = a := by 

Proof state:
α : Type u
inst✝ : LinearOrder α
a : α
⊢ min a a = a

Next tactic:
simp [min_def]
theorem min_eq_left {a b : α} (h : a ≤ b) : min a b = a := by
  

Proof state:
α : Type u
inst✝ : LinearOrder α
a b : α
h : a ≤ b
⊢ min a b = a

Next tactic:
apply Eq.symm
theorem min_eq_left {a b : α} (h : a ≤ b) : min a b = a := by
  apply Eq.symm; 

Proof state:
case h
α : Type u
inst✝ : LinearOrder α
a b : α
h : a ≤ b
⊢ a = min a b

Next tactic:
apply eq_min (le_refl _) h
theorem min_eq_left {a b : α} (h : a ≤ b) : min a b = a := by
  apply Eq.symm; apply eq_min (le_refl _) h; 

Proof state:
case h
α : Type u
inst✝ : LinearOrder α
a b : α
h : a ≤ b
⊢ ∀ {d : α}, d ≤ a → d ≤ b → d ≤ a

Next tactic:
intros
theorem min_eq_left {a b : α} (h : a ≤ b) : min a b = a := by
  apply Eq.symm; apply eq_min (le_refl _) h; intros; 

Proof state:
case h
α : Type u
inst✝ : LinearOrder α
a b : α
h : a ≤ b
d✝ : α
a✝¹ : d✝ ≤ a
a✝ : d✝ ≤ b
⊢ d✝ ≤ a

Next tactic:
assumption
theorem max_assoc (a b c : α) : max (max a b) c = max a (max b c) := by
  

Proof state:
α : Type u
inst✝ : LinearOrder α
a b c : α
⊢ max (max a b) c = max a (max b c)

Next tactic:
apply eq_max
theorem max_assoc (a b c : α) : max (max a b) c = max a (max b c) := by
  apply eq_max
  · 

Proof state:
case h₁
α : Type u
inst✝ : LinearOrder α
a b c : α
⊢ a ≤ max (max a b) c

Next tactic:
apply le_trans
theorem max_assoc (a b c : α) : max (max a b) c = max a (max b c) := by
  apply eq_max
  · apply le_trans; 

Proof state:
case h₁.a
α : Type u
inst✝ : LinearOrder α
a b c : α
⊢ a ≤ ?h₁.b
case h₁.a
α : Type u
inst✝ : LinearOrder α
a b c : α
⊢ ?h₁.b ≤ max (max a b) c
case h₁.b α : Type u inst✝ : LinearOrder α a b c : α ⊢ α

Next tactic:
apply le_max_left a b
theorem max_assoc (a b c : α) : max (max a b) c = max a (max b c) := by
  apply eq_max
  · apply le_trans; apply le_max_left a b; 

Proof state:
case h₁.a
α : Type u
inst✝ : LinearOrder α
a b c : α
⊢ max a b ≤ max (max a b) c

Next tactic:
apply le_max_left
theorem max_assoc (a b c : α) : max (max a b) c = max a (max b c) := by
  apply eq_max
  · apply le_trans; apply le_max_left a b; apply le_max_left
  · 

Proof state:
case h₂
α : Type u
inst✝ : LinearOrder α
a b c : α
⊢ max b c ≤ max (max a b) c

Next tactic:
apply max_le
theorem max_assoc (a b c : α) : max (max a b) c = max a (max b c) := by
  apply eq_max
  · apply le_trans; apply le_max_left a b; apply le_max_left
  · apply max_le; 

Proof state:
case h₂.h₁
α : Type u
inst✝ : LinearOrder α
a b c : α
⊢ b ≤ max (max a b) c
case h₂.h₂ α : Type u inst✝ : LinearOrder α a b c : α ⊢ c ≤ max (max a b) c

Next tactic:
apply le_trans
theorem max_assoc (a b c : α) : max (max a b) c = max a (max b c) := by
  apply eq_max
  · apply le_trans; apply le_max_left a b; apply le_max_left
  · apply max_le; apply le_trans; 

Proof state:
case h₂.h₁.a
α : Type u
inst✝ : LinearOrder α
a b c : α
⊢ b ≤ ?h₂.h₁.b
case h₂.h₁.a
α : Type u
inst✝ : LinearOrder α
a b c : α
⊢ ?h₂.h₁.b ≤ max (max a b) c
case h₂.h₁.b
α : Type u
inst✝ : LinearOrder α
a b c : α
⊢ α
case h₂.h₂ α : Type u inst✝ : LinearOrder α a b c : α ⊢ c ≤ max (max a b) c

Next tactic:
apply le_max_right a b
theorem max_assoc (a b c : α) : max (max a b) c = max a (max b c) := by
  apply eq_max
  · apply le_trans; apply le_max_left a b; apply le_max_left
  · apply max_le; apply le_trans; apply le_max_right a b; 

Proof state:
case h₂.h₁.a
α : Type u
inst✝ : LinearOrder α
a b c : α
⊢ max a b ≤ max (max a b) c
case h₂.h₂ α : Type u inst✝ : LinearOrder α a b c : α ⊢ c ≤ max (max a b) c

Next tactic:
apply le_max_left
theorem max_assoc (a b c : α) : max (max a b) c = max a (max b c) := by
  apply eq_max
  · apply le_trans; apply le_max_left a b; apply le_max_left
  · apply max_le; apply le_trans; apply le_max_right a b; apply le_max_left; 

Proof state:
case h₂.h₂
α : Type u
inst✝ : LinearOrder α
a b c : α
⊢ c ≤ max (max a b) c

Next tactic:
apply le_max_right
theorem max_assoc (a b c : α) : max (max a b) c = max a (max b c) := by
  apply eq_max
  · apply le_trans; apply le_max_left a b; apply le_max_left
  · apply max_le; apply le_trans; apply le_max_right a b; apply le_max_left; apply le_max_right
  · 

Proof state:
case h₃
α : Type u
inst✝ : LinearOrder α
a b c : α
⊢ ∀ {d : α}, a ≤ d → max b c ≤ d → max (max a b) c ≤ d

Next tactic:
intro d h₁ h₂
theorem max_assoc (a b c : α) : max (max a b) c = max a (max b c) := by
  apply eq_max
  · apply le_trans; apply le_max_left a b; apply le_max_left
  · apply max_le; apply le_trans; apply le_max_right a b; apply le_max_left; apply le_max_right
  · intro d h₁ h₂; 

Proof state:
case h₃
α : Type u
inst✝ : LinearOrder α
a b c d : α
h₁ : a ≤ d
h₂ : max b c ≤ d
⊢ max (max a b) c ≤ d

Next tactic:
apply max_le
theorem max_assoc (a b c : α) : max (max a b) c = max a (max b c) := by
  apply eq_max
  · apply le_trans; apply le_max_left a b; apply le_max_left
  · apply max_le; apply le_trans; apply le_max_right a b; apply le_max_left; apply le_max_right
  · intro d h₁ h₂; apply max_le; 

Proof state:
case h₃.h₁
α : Type u
inst✝ : LinearOrder α
a b c d : α
h₁ : a ≤ d
h₂ : max b c ≤ d
⊢ max a b ≤ d
case h₃.h₂ α : Type u inst✝ : LinearOrder α a b c d : α h₁ : a ≤ d h₂ : max b c ≤ d ⊢ c ≤ d

Next tactic:
apply max_le h₁
theorem max_assoc (a b c : α) : max (max a b) c = max a (max b c) := by
  apply eq_max
  · apply le_trans; apply le_max_left a b; apply le_max_left
  · apply max_le; apply le_trans; apply le_max_right a b; apply le_max_left; apply le_max_right
  · intro d h₁ h₂; apply max_le; apply max_le h₁; 

Proof state:
case h₃.h₁
α : Type u
inst✝ : LinearOrder α
a b c d : α
h₁ : a ≤ d
h₂ : max b c ≤ d
⊢ b ≤ d
case h₃.h₂ α : Type u inst✝ : LinearOrder α a b c d : α h₁ : a ≤ d h₂ : max b c ≤ d ⊢ c ≤ d

Next tactic:
apply le_trans (le_max_left _ _) h₂
theorem max_assoc (a b c : α) : max (max a b) c = max a (max b c) := by
  apply eq_max
  · apply le_trans; apply le_max_left a b; apply le_max_left
  · apply max_le; apply le_trans; apply le_max_right a b; apply le_max_left; apply le_max_right
  · intro d h₁ h₂; apply max_le; apply max_le h₁; apply le_trans (le_max_left _ _) h₂
    

Proof state:
case h₃.h₂
α : Type u
inst✝ : LinearOrder α
a b c d : α
h₁ : a ≤ d
h₂ : max b c ≤ d
⊢ c ≤ d

Next tactic:
apply le_trans (le_max_right _ _) h₂
@[simp]
theorem max_self (a : α) : max a a = a := by 

Proof state:
α : Type u
inst✝ : LinearOrder α
a : α
⊢ max a a = a

Next tactic:
simp [max_def]
theorem max_eq_left {a b : α} (h : b ≤ a) : max a b = a := by
  

Proof state:
α : Type u
inst✝ : LinearOrder α
a b : α
h : b ≤ a
⊢ max a b = a

Next tactic:
apply Eq.symm
theorem max_eq_left {a b : α} (h : b ≤ a) : max a b = a := by
  apply Eq.symm; 

Proof state:
case h
α : Type u
inst✝ : LinearOrder α
a b : α
h : b ≤ a
⊢ a = max a b

Next tactic:
apply eq_max (le_refl _) h
theorem max_eq_left {a b : α} (h : b ≤ a) : max a b = a := by
  apply Eq.symm; apply eq_max (le_refl _) h; 

Proof state:
case h
α : Type u
inst✝ : LinearOrder α
a b : α
h : b ≤ a
⊢ ∀ {d : α}, a ≤ d → b ≤ d → a ≤ d

Next tactic:
intros
theorem max_eq_left {a b : α} (h : b ≤ a) : max a b = a := by
  apply Eq.symm; apply eq_max (le_refl _) h; intros; 

Proof state:
case h
α : Type u
inst✝ : LinearOrder α
a b : α
h : b ≤ a
d✝ : α
a✝¹ : a ≤ d✝
a✝ : b ≤ d✝
⊢ a ≤ d✝

Next tactic:
assumption
theorem lt_min {a b c : α} (h₁ : a < b) (h₂ : a < c) : a < min b c :=
  -- porting note: no `min_tac` tactic
  Or.elim (le_or_gt b c)
    (λ h : b ≤ c => by 

Proof state:
α : Type u
inst✝ : LinearOrder α
a b c : α
h₁ : a < b
h₂ : a < c
h : b ≤ c
⊢ a < min b c

Next tactic:
rwa [min_eq_left h]
theorem lt_min {a b c : α} (h₁ : a < b) (h₂ : a < c) : a < min b c :=
  -- porting note: no `min_tac` tactic
  Or.elim (le_or_gt b c)
    (λ h : b ≤ c => by rwa [min_eq_left h])
    (λ h : b > c => by 

Proof state:
α : Type u
inst✝ : LinearOrder α
a b c : α
h₁ : a < b
h₂ : a < c
h : b > c
⊢ a < min b c

Next tactic:
rwa [min_eq_right_of_lt h]
theorem max_lt {a b c : α} (h₁ : a < c) (h₂ : b < c) : max a b < c :=
  -- porting note: no `min_tac` tactic
  Or.elim (le_or_gt a b)
    (λ h : a ≤ b => by 

Proof state:
α : Type u
inst✝ : LinearOrder α
a b c : α
h₁ : a < c
h₂ : b < c
h : a ≤ b
⊢ max a b < c

Next tactic:
rwa [max_eq_right h]
theorem max_lt {a b c : α} (h₁ : a < c) (h₂ : b < c) : max a b < c :=
  -- porting note: no `min_tac` tactic
  Or.elim (le_or_gt a b)
    (λ h : a ≤ b => by rwa [max_eq_right h])
    (λ h : a > b => by 

Proof state:
α : Type u
inst✝ : LinearOrder α
a b c : α
h₁ : a < c
h₂ : b < c
h : a > b
⊢ max a b < c

Next tactic:
rwa [max_eq_left_of_lt h]
@[to_additive]
theorem smul_Lp_add (c : Mᵈᵐᵃ) : ∀ f g : Lp E p μ, c • (f + g) = c • f + c • g := by
  

Proof state:
M : Type u_1
N : Type u_2
α : Type u_3
E : Type u_4
inst✝⁶ : MeasurableSpace M
inst✝⁵ : MeasurableSpace N
inst✝⁴ : MeasurableSpace α
inst✝³ : NormedAddCommGroup E
μ : Measure α
p : ℝ≥0∞
inst✝² : SMul M α
inst✝¹ : SMulInvariantMeasure M α μ
inst✝ : MeasurableSMul M α
c : Mᵈᵐᵃ
⊢ ∀ (f g : ↥(Lp E p)), c • (f + g) = c • f + c • g

Next tactic:
rintro ⟨⟨⟩, _⟩ ⟨⟨⟩, _⟩