l3lab/ntp-mathlib huggingface dataset:
/-- A function `ψ` on a `SuccOrder` is strictly monotone before some `n` if for all `m` such that
`m < n`, we have `ψ m < ψ (succ m)`. -/
theorem strictMonoOn_Iic_of_lt_succ [SuccOrder α] [IsSuccArchimedean α] {n : α}
    (hψ : ∀ m, m < n → ψ m < ψ (succ m)) : StrictMonoOn ψ (Set.Iic n) := by
  intro x hx y hy hxy
  obtain ⟨i, rfl⟩ := hxy.le.exists_succ_iterate
  induction' i with k ih
  · simp at hxy
  cases' k with k
  · exact hψ _ (lt_of_lt_of_le hxy hy)
  rw [Set.mem_Iic] at *
  simp only [Function.iterate_succ', Function.comp_apply] at ih hxy hy ⊢
  by_cases hmax : IsMax (succ^[k] x)
  · rw [succ_eq_iff_isMax.2 hmax] at hxy ⊢
    exact ih (le_trans (le_succ _) hy) hxy
  by_cases hmax' : IsMax (succ (succ^[k] x))
  · rw [succ_eq_iff_isMax.2 hmax'] at hxy ⊢
    exact ih (le_trans (le_succ _) hy) hxy
  

Proof state:
case neg
α : Type u_1
β : Type u_2
inst✝³ : PartialOrder α
inst✝² : Preorder β
ψ : α → β
inst✝¹ : SuccOrder α
inst✝ : IsSuccArchimedean α
n : α
hψ : ∀ m < n, ψ m < ψ (succ m)
x : α
hx : x ≤ n
k : ℕ
ih : succ (succ^[k] x) ≤ n → x < succ (succ^[k] x) → ψ x < ψ (succ (succ^[k] x))
hxy : x < succ (succ (succ^[k] x))
hy : succ (succ (succ^[k] x)) ≤ n
hmax : ¬IsMax (succ^[k] x)
hmax' : ¬IsMax (succ (succ^[k] x))
⊢ ψ x < ψ (succ (succ (succ^[k] x)))

Next tactic:
refine'
    lt_trans
      (ih (le_trans (le_succ _) hy)
        (lt_of_le_of_lt (le_succ_iterate k _) (lt_succ_iff_not_isMax.2 hmax)))
      _
/-- A function `ψ` on a `SuccOrder` is strictly monotone before some `n` if for all `m` such that
`m < n`, we have `ψ m < ψ (succ m)`. -/
theorem strictMonoOn_Iic_of_lt_succ [SuccOrder α] [IsSuccArchimedean α] {n : α}
    (hψ : ∀ m, m < n → ψ m < ψ (succ m)) : StrictMonoOn ψ (Set.Iic n) := by
  intro x hx y hy hxy
  obtain ⟨i, rfl⟩ := hxy.le.exists_succ_iterate
  induction' i with k ih
  · simp at hxy
  cases' k with k
  · exact hψ _ (lt_of_lt_of_le hxy hy)
  rw [Set.mem_Iic] at *
  simp only [Function.iterate_succ', Function.comp_apply] at ih hxy hy ⊢
  by_cases hmax : IsMax (succ^[k] x)
  · rw [succ_eq_iff_isMax.2 hmax] at hxy ⊢
    exact ih (le_trans (le_succ _) hy) hxy
  by_cases hmax' : IsMax (succ (succ^[k] x))
  · rw [succ_eq_iff_isMax.2 hmax'] at hxy ⊢
    exact ih (le_trans (le_succ _) hy) hxy
  refine'
    lt_trans
      (ih (le_trans (le_succ _) hy)
        (lt_of_le_of_lt (le_succ_iterate k _) (lt_succ_iff_not_isMax.2 hmax)))
      _
  

Proof state:
case neg
α : Type u_1
β : Type u_2
inst✝³ : PartialOrder α
inst✝² : Preorder β
ψ : α → β
inst✝¹ : SuccOrder α
inst✝ : IsSuccArchimedean α
n : α
hψ : ∀ m < n, ψ m < ψ (succ m)
x : α
hx : x ≤ n
k : ℕ
ih : succ (succ^[k] x) ≤ n → x < succ (succ^[k] x) → ψ x < ψ (succ (succ^[k] x))
hxy : x < succ (succ (succ^[k] x))
hy : succ (succ (succ^[k] x)) ≤ n
hmax : ¬IsMax (succ^[k] x)
hmax' : ¬IsMax (succ (succ^[k] x))
⊢ ψ (succ (succ^[k] x)) < ψ (succ (succ (succ^[k] x)))

Next tactic:
rw [← Function.comp_apply (f := succ), ← Function.iterate_succ']
/-- A function `ψ` on a `SuccOrder` is strictly monotone before some `n` if for all `m` such that
`m < n`, we have `ψ m < ψ (succ m)`. -/
theorem strictMonoOn_Iic_of_lt_succ [SuccOrder α] [IsSuccArchimedean α] {n : α}
    (hψ : ∀ m, m < n → ψ m < ψ (succ m)) : StrictMonoOn ψ (Set.Iic n) := by
  intro x hx y hy hxy
  obtain ⟨i, rfl⟩ := hxy.le.exists_succ_iterate
  induction' i with k ih
  · simp at hxy
  cases' k with k
  · exact hψ _ (lt_of_lt_of_le hxy hy)
  rw [Set.mem_Iic] at *
  simp only [Function.iterate_succ', Function.comp_apply] at ih hxy hy ⊢
  by_cases hmax : IsMax (succ^[k] x)
  · rw [succ_eq_iff_isMax.2 hmax] at hxy ⊢
    exact ih (le_trans (le_succ _) hy) hxy
  by_cases hmax' : IsMax (succ (succ^[k] x))
  · rw [succ_eq_iff_isMax.2 hmax'] at hxy ⊢
    exact ih (le_trans (le_succ _) hy) hxy
  refine'
    lt_trans
      (ih (le_trans (le_succ _) hy)
        (lt_of_le_of_lt (le_succ_iterate k _) (lt_succ_iff_not_isMax.2 hmax)))
      _
  rw [← Function.comp_apply (f := succ), ← Function.iterate_succ']
  

Proof state:
case neg
α : Type u_1
β : Type u_2
inst✝³ : PartialOrder α
inst✝² : Preorder β
ψ : α → β
inst✝¹ : SuccOrder α
inst✝ : IsSuccArchimedean α
n : α
hψ : ∀ m < n, ψ m < ψ (succ m)
x : α
hx : x ≤ n
k : ℕ
ih : succ (succ^[k] x) ≤ n → x < succ (succ^[k] x) → ψ x < ψ (succ (succ^[k] x))
hxy : x < succ (succ (succ^[k] x))
hy : succ (succ (succ^[k] x)) ≤ n
hmax : ¬IsMax (succ^[k] x)
hmax' : ¬IsMax (succ (succ^[k] x))
⊢ ψ (succ^[Nat.succ k] x) < ψ (succ (succ^[Nat.succ k] x))

Next tactic:
refine' hψ _ (lt_of_lt_of_le _ hy)
/-- A function `ψ` on a `SuccOrder` is strictly monotone before some `n` if for all `m` such that
`m < n`, we have `ψ m < ψ (succ m)`. -/
theorem strictMonoOn_Iic_of_lt_succ [SuccOrder α] [IsSuccArchimedean α] {n : α}
    (hψ : ∀ m, m < n → ψ m < ψ (succ m)) : StrictMonoOn ψ (Set.Iic n) := by
  intro x hx y hy hxy
  obtain ⟨i, rfl⟩ := hxy.le.exists_succ_iterate
  induction' i with k ih
  · simp at hxy
  cases' k with k
  · exact hψ _ (lt_of_lt_of_le hxy hy)
  rw [Set.mem_Iic] at *
  simp only [Function.iterate_succ', Function.comp_apply] at ih hxy hy ⊢
  by_cases hmax : IsMax (succ^[k] x)
  · rw [succ_eq_iff_isMax.2 hmax] at hxy ⊢
    exact ih (le_trans (le_succ _) hy) hxy
  by_cases hmax' : IsMax (succ (succ^[k] x))
  · rw [succ_eq_iff_isMax.2 hmax'] at hxy ⊢
    exact ih (le_trans (le_succ _) hy) hxy
  refine'
    lt_trans
      (ih (le_trans (le_succ _) hy)
        (lt_of_le_of_lt (le_succ_iterate k _) (lt_succ_iff_not_isMax.2 hmax)))
      _
  rw [← Function.comp_apply (f := succ), ← Function.iterate_succ']
  refine' hψ _ (lt_of_lt_of_le _ hy)
  

Proof state:
case neg
α : Type u_1
β : Type u_2
inst✝³ : PartialOrder α
inst✝² : Preorder β
ψ : α → β
inst✝¹ : SuccOrder α
inst✝ : IsSuccArchimedean α
n : α
hψ : ∀ m < n, ψ m < ψ (succ m)
x : α
hx : x ≤ n
k : ℕ
ih : succ (succ^[k] x) ≤ n → x < succ (succ^[k] x) → ψ x < ψ (succ (succ^[k] x))
hxy : x < succ (succ (succ^[k] x))
hy : succ (succ (succ^[k] x)) ≤ n
hmax : ¬IsMax (succ^[k] x)
hmax' : ¬IsMax (succ (succ^[k] x))
⊢ succ^[Nat.succ k] x < succ (succ (succ^[k] x))

Next tactic:
rwa [Function.iterate_succ', Function.comp_apply, lt_succ_iff_not_isMax]
instance PUnit.normedCommRing : NormedCommRing PUnit :=
  { PUnit.normedAddCommGroup, PUnit.commRing with
    norm_mul := fun _ _ => by 

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
src✝¹ : NormedAddCommGroup PUnit.{?u.5134 + 1} := normedAddCommGroup
src✝ : CommRing PUnit.{?u.5134 + 1} := commRing
x✝¹ x✝ : PUnit.{?u.5134 + 1}
⊢ ‖x✝¹ * x✝‖ ≤ ‖x✝¹‖ * ‖x✝‖

Next tactic:
simp
theorem NormOneClass.nontrivial (α : Type*) [SeminormedAddCommGroup α] [One α] [NormOneClass α] :
    Nontrivial α :=
  nontrivial_of_ne 0 1 <| ne_of_apply_ne norm <| by 

Proof state:
α✝ : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
α : Type u_5
inst✝² : SeminormedAddCommGroup α
inst✝¹ : One α
inst✝ : NormOneClass α
⊢ ‖0‖ ≠ ‖1‖

Next tactic:
simp
instance ULift.normOneClass [SeminormedAddCommGroup α] [One α] [NormOneClass α] :
    NormOneClass (ULift α) :=
  ⟨by 

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝² : SeminormedAddCommGroup α
inst✝¹ : One α
inst✝ : NormOneClass α
⊢ ‖1‖ = 1

Next tactic:
simp [ULift.norm_def]
instance Prod.normOneClass [SeminormedAddCommGroup α] [One α] [NormOneClass α]
    [SeminormedAddCommGroup β] [One β] [NormOneClass β] : NormOneClass (α × β) :=
  ⟨by 

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝⁵ : SeminormedAddCommGroup α
inst✝⁴ : One α
inst✝³ : NormOneClass α
inst✝² : SeminormedAddCommGroup β
inst✝¹ : One β
inst✝ : NormOneClass β
⊢ ‖1‖ = 1

Next tactic:
simp [Prod.norm_def]
instance Pi.normOneClass {ι : Type*} {α : ι → Type*} [Nonempty ι] [Fintype ι]
    [∀ i, SeminormedAddCommGroup (α i)] [∀ i, One (α i)] [∀ i, NormOneClass (α i)] :
    NormOneClass (∀ i, α i) :=
  ⟨by 

Proof state:
α✝ : Type u_1
β : Type u_2
γ : Type u_3
ι✝ : Type u_4
ι : Type u_5
α : ι → Type u_6
inst✝⁴ : Nonempty ι
inst✝³ : Fintype ι
inst✝² : (i : ι) → SeminormedAddCommGroup (α i)
inst✝¹ : (i : ι) → One (α i)
inst✝ : ∀ (i : ι), NormOneClass (α i)
⊢ ‖1‖ = 1

Next tactic:
simp [Pi.norm_def]
instance Pi.normOneClass {ι : Type*} {α : ι → Type*} [Nonempty ι] [Fintype ι]
    [∀ i, SeminormedAddCommGroup (α i)] [∀ i, One (α i)] [∀ i, NormOneClass (α i)] :
    NormOneClass (∀ i, α i) :=
  ⟨by simp [Pi.norm_def]; 

Proof state:
α✝ : Type u_1
β : Type u_2
γ : Type u_3
ι✝ : Type u_4
ι : Type u_5
α : ι → Type u_6
inst✝⁴ : Nonempty ι
inst✝³ : Fintype ι
inst✝² : (i : ι) → SeminormedAddCommGroup (α i)
inst✝¹ : (i : ι) → One (α i)
inst✝ : ∀ (i : ι), NormOneClass (α i)
⊢ (Finset.sup Finset.univ fun b => 1) = 1

Next tactic:
exact Finset.sup_const Finset.univ_nonempty 1
theorem nnnorm_mul_le (a b : α) : ‖a * b‖₊ ≤ ‖a‖₊ * ‖b‖₊ := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝ : NonUnitalSeminormedRing α
a b : α
⊢ ‖a * b‖₊ ≤ ‖a‖₊ * ‖b‖₊

Next tactic:
simpa only [← norm_toNNReal, ← Real.toNNReal_mul (norm_nonneg _)] using
    Real.toNNReal_mono (norm_mul_le _ _)
theorem one_le_norm_one (β) [NormedRing β] [Nontrivial β] : 1 ≤ ‖(1 : β)‖ :=
  (le_mul_iff_one_le_left <| norm_pos_iff.mpr (one_ne_zero : (1 : β) ≠ 0)).mp
    (by 

Proof state:
α : Type u_1
β✝ : Type u_2
γ : Type u_3
ι : Type u_4
inst✝² : NonUnitalSeminormedRing α
β : Type u_5
inst✝¹ : NormedRing β
inst✝ : Nontrivial β
⊢ ‖1‖ ≤ ‖1‖ * ‖1‖

Next tactic:
simpa only [mul_one] using norm_mul_le (1 : β) 1
/-- In a seminormed ring, the right-multiplication `AddMonoidHom` is bounded. -/
theorem mulRight_bound (x : α) : ∀ y : α, ‖AddMonoidHom.mulRight x y‖ ≤ ‖x‖ * ‖y‖ := fun y => by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝ : NonUnitalSeminormedRing α
x y : α
⊢ ‖(AddMonoidHom.mulRight x) y‖ ≤ ‖x‖ * ‖y‖

Next tactic:
rw [mul_comm]
/-- In a seminormed ring, the right-multiplication `AddMonoidHom` is bounded. -/
theorem mulRight_bound (x : α) : ∀ y : α, ‖AddMonoidHom.mulRight x y‖ ≤ ‖x‖ * ‖y‖ := fun y => by
  rw [mul_comm]
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝ : NonUnitalSeminormedRing α
x y : α
⊢ ‖(AddMonoidHom.mulRight x) y‖ ≤ ‖y‖ * ‖x‖

Next tactic:
exact norm_mul_le y x
/-- Non-unital seminormed ring structure on the product of two non-unital seminormed rings,
  using the sup norm. -/
instance Prod.nonUnitalSeminormedRing [NonUnitalSeminormedRing β] :
    NonUnitalSeminormedRing (α × β) :=
  { seminormedAddCommGroup, instNonUnitalRing with
    norm_mul := fun x y =>
      calc
        ‖x * y‖ = ‖(x.1 * y.1, x.2 * y.2)‖ := rfl
        _ = max ‖x.1 * y.1‖ ‖x.2 * y.2‖ := rfl
        _ ≤ max (‖x.1‖ * ‖y.1‖) (‖x.2‖ * ‖y.2‖) :=
          (max_le_max (norm_mul_le x.1 y.1) (norm_mul_le x.2 y.2))
        _ = max (‖x.1‖ * ‖y.1‖) (‖y.2‖ * ‖x.2‖) := by 

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝¹ : NonUnitalSeminormedRing α
inst✝ : NonUnitalSeminormedRing β
src✝¹ : SeminormedAddCommGroup (α × β) := seminormedAddCommGroup
src✝ : NonUnitalRing (α × β) := instNonUnitalRing
x y : α × β
⊢ max (‖x.1‖ * ‖y.1‖) (‖x.2‖ * ‖y.2‖) = max (‖x.1‖ * ‖y.1‖) (‖y.2‖ * ‖x.2‖)

Next tactic:
simp [mul_comm]
/-- Non-unital seminormed ring structure on the product of two non-unital seminormed rings,
  using the sup norm. -/
instance Prod.nonUnitalSeminormedRing [NonUnitalSeminormedRing β] :
    NonUnitalSeminormedRing (α × β) :=
  { seminormedAddCommGroup, instNonUnitalRing with
    norm_mul := fun x y =>
      calc
        ‖x * y‖ = ‖(x.1 * y.1, x.2 * y.2)‖ := rfl
        _ = max ‖x.1 * y.1‖ ‖x.2 * y.2‖ := rfl
        _ ≤ max (‖x.1‖ * ‖y.1‖) (‖x.2‖ * ‖y.2‖) :=
          (max_le_max (norm_mul_le x.1 y.1) (norm_mul_le x.2 y.2))
        _ = max (‖x.1‖ * ‖y.1‖) (‖y.2‖ * ‖x.2‖) := by simp [mul_comm]
        _ ≤ max ‖x.1‖ ‖x.2‖ * max ‖y.2‖ ‖y.1‖ := by
          

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝¹ : NonUnitalSeminormedRing α
inst✝ : NonUnitalSeminormedRing β
src✝¹ : SeminormedAddCommGroup (α × β) := seminormedAddCommGroup
src✝ : NonUnitalRing (α × β) := instNonUnitalRing
x y : α × β
⊢ max (‖x.1‖ * ‖y.1‖) (‖y.2‖ * ‖x.2‖) ≤ max ‖x.1‖ ‖x.2‖ * max ‖y.2‖ ‖y.1‖

Next tactic:
apply max_mul_mul_le_max_mul_max
/-- Non-unital seminormed ring structure on the product of two non-unital seminormed rings,
  using the sup norm. -/
instance Prod.nonUnitalSeminormedRing [NonUnitalSeminormedRing β] :
    NonUnitalSeminormedRing (α × β) :=
  { seminormedAddCommGroup, instNonUnitalRing with
    norm_mul := fun x y =>
      calc
        ‖x * y‖ = ‖(x.1 * y.1, x.2 * y.2)‖ := rfl
        _ = max ‖x.1 * y.1‖ ‖x.2 * y.2‖ := rfl
        _ ≤ max (‖x.1‖ * ‖y.1‖) (‖x.2‖ * ‖y.2‖) :=
          (max_le_max (norm_mul_le x.1 y.1) (norm_mul_le x.2 y.2))
        _ = max (‖x.1‖ * ‖y.1‖) (‖y.2‖ * ‖x.2‖) := by simp [mul_comm]
        _ ≤ max ‖x.1‖ ‖x.2‖ * max ‖y.2‖ ‖y.1‖ := by
          apply max_mul_mul_le_max_mul_max <;> 

Proof state:
case ha
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝¹ : NonUnitalSeminormedRing α
inst✝ : NonUnitalSeminormedRing β
src✝¹ : SeminormedAddCommGroup (α × β) := seminormedAddCommGroup
src✝ : NonUnitalRing (α × β) := instNonUnitalRing
x y : α × β
⊢ 0 ≤ ‖x.1‖

Next tactic:
simp [norm_nonneg]
/-- Non-unital seminormed ring structure on the product of two non-unital seminormed rings,
  using the sup norm. -/
instance Prod.nonUnitalSeminormedRing [NonUnitalSeminormedRing β] :
    NonUnitalSeminormedRing (α × β) :=
  { seminormedAddCommGroup, instNonUnitalRing with
    norm_mul := fun x y =>
      calc
        ‖x * y‖ = ‖(x.1 * y.1, x.2 * y.2)‖ := rfl
        _ = max ‖x.1 * y.1‖ ‖x.2 * y.2‖ := rfl
        _ ≤ max (‖x.1‖ * ‖y.1‖) (‖x.2‖ * ‖y.2‖) :=
          (max_le_max (norm_mul_le x.1 y.1) (norm_mul_le x.2 y.2))
        _ = max (‖x.1‖ * ‖y.1‖) (‖y.2‖ * ‖x.2‖) := by simp [mul_comm]
        _ ≤ max ‖x.1‖ ‖x.2‖ * max ‖y.2‖ ‖y.1‖ := by
          apply max_mul_mul_le_max_mul_max <;> 

Proof state:
case hd
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝¹ : NonUnitalSeminormedRing α
inst✝ : NonUnitalSeminormedRing β
src✝¹ : SeminormedAddCommGroup (α × β) := seminormedAddCommGroup
src✝ : NonUnitalRing (α × β) := instNonUnitalRing
x y : α × β
⊢ 0 ≤ ‖y.2‖

Next tactic:
simp [norm_nonneg]
/-- Non-unital seminormed ring structure on the product of two non-unital seminormed rings,
  using the sup norm. -/
instance Prod.nonUnitalSeminormedRing [NonUnitalSeminormedRing β] :
    NonUnitalSeminormedRing (α × β) :=
  { seminormedAddCommGroup, instNonUnitalRing with
    norm_mul := fun x y =>
      calc
        ‖x * y‖ = ‖(x.1 * y.1, x.2 * y.2)‖ := rfl
        _ = max ‖x.1 * y.1‖ ‖x.2 * y.2‖ := rfl
        _ ≤ max (‖x.1‖ * ‖y.1‖) (‖x.2‖ * ‖y.2‖) :=
          (max_le_max (norm_mul_le x.1 y.1) (norm_mul_le x.2 y.2))
        _ = max (‖x.1‖ * ‖y.1‖) (‖y.2‖ * ‖x.2‖) := by simp [mul_comm]
        _ ≤ max ‖x.1‖ ‖x.2‖ * max ‖y.2‖ ‖y.1‖ := by
          apply max_mul_mul_le_max_mul_max <;> simp [norm_nonneg]
        _ = max ‖x.1‖ ‖x.2‖ * max ‖y.1‖ ‖y.2‖ := by 

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝¹ : NonUnitalSeminormedRing α
inst✝ : NonUnitalSeminormedRing β
src✝¹ : SeminormedAddCommGroup (α × β) := seminormedAddCommGroup
src✝ : NonUnitalRing (α × β) := instNonUnitalRing
x y : α × β
⊢ max ‖x.1‖ ‖x.2‖ * max ‖y.2‖ ‖y.1‖ = max ‖x.1‖ ‖x.2‖ * max ‖y.1‖ ‖y.2‖

Next tactic:
simp [max_comm]
theorem Nat.norm_cast_le : ∀ n : ℕ, ‖(n : α)‖ ≤ n * ‖(1 : α)‖
  | 0 => by 

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝ : SeminormedRing α
⊢ ‖↑0‖ ≤ ↑0 * ‖1‖

Next tactic:
simp
theorem Nat.norm_cast_le : ∀ n : ℕ, ‖(n : α)‖ ≤ n * ‖(1 : α)‖
  | 0 => by simp
  | n + 1 => by
    

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝ : SeminormedRing α
n : ℕ
⊢ ‖↑(n + 1)‖ ≤ ↑(n + 1) * ‖1‖

Next tactic:
rw [n.cast_succ, n.cast_succ, add_mul, one_mul]
theorem Nat.norm_cast_le : ∀ n : ℕ, ‖(n : α)‖ ≤ n * ‖(1 : α)‖
  | 0 => by simp
  | n + 1 => by
    rw [n.cast_succ, n.cast_succ, add_mul, one_mul]
    

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝ : SeminormedRing α
n : ℕ
⊢ ‖↑n + 1‖ ≤ ↑n * ‖1‖ + ‖1‖

Next tactic:
exact norm_add_le_of_le (Nat.norm_cast_le n) le_rfl
theorem List.norm_prod_le' : ∀ {l : List α}, l ≠ [] → ‖l.prod‖ ≤ (l.map norm).prod
  | [], h => (h rfl).elim
  | [a], _ => by 

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝ : SeminormedRing α
a : α
x✝ : [a] ≠ []
⊢ ‖prod [a]‖ ≤ prod (map norm [a])

Next tactic:
simp
theorem List.norm_prod_le' : ∀ {l : List α}, l ≠ [] → ‖l.prod‖ ≤ (l.map norm).prod
  | [], h => (h rfl).elim
  | [a], _ => by simp
  | a::b::l, _ => by
    

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝ : SeminormedRing α
a b : α
l : List α
x✝ : a :: b :: l ≠ []
⊢ ‖prod (a :: b :: l)‖ ≤ prod (map norm (a :: b :: l))

Next tactic:
rw [List.map_cons, List.prod_cons, @List.prod_cons _ _ _ ‖a‖]
theorem List.norm_prod_le' : ∀ {l : List α}, l ≠ [] → ‖l.prod‖ ≤ (l.map norm).prod
  | [], h => (h rfl).elim
  | [a], _ => by simp
  | a::b::l, _ => by
    rw [List.map_cons, List.prod_cons, @List.prod_cons _ _ _ ‖a‖]
    

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝ : SeminormedRing α
a b : α
l : List α
x✝ : a :: b :: l ≠ []
⊢ ‖a * prod (b :: l)‖ ≤ ‖a‖ * prod (map norm (b :: l))

Next tactic:
refine' le_trans (norm_mul_le _ _) (mul_le_mul_of_nonneg_left _ (norm_nonneg _))
theorem List.norm_prod_le' : ∀ {l : List α}, l ≠ [] → ‖l.prod‖ ≤ (l.map norm).prod
  | [], h => (h rfl).elim
  | [a], _ => by simp
  | a::b::l, _ => by
    rw [List.map_cons, List.prod_cons, @List.prod_cons _ _ _ ‖a‖]
    refine' le_trans (norm_mul_le _ _) (mul_le_mul_of_nonneg_left _ (norm_nonneg _))
    

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝ : SeminormedRing α
a b : α
l : List α
x✝ : a :: b :: l ≠ []
⊢ ‖prod (b :: l)‖ ≤ prod (map norm (b :: l))

Next tactic:
exact List.norm_prod_le' (List.cons_ne_nil b l)
theorem List.nnnorm_prod_le' {l : List α} (hl : l ≠ []) : ‖l.prod‖₊ ≤ (l.map nnnorm).prod :=
  (List.norm_prod_le' hl).trans_eq <| by 

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝ : SeminormedRing α
l : List α
hl : l ≠ []
⊢ prod (map norm l) = (fun a => ↑a) (prod (map nnnorm l))

Next tactic:
simp [NNReal.coe_list_prod, List.map_map]
theorem List.norm_prod_le [NormOneClass α] : ∀ l : List α, ‖l.prod‖ ≤ (l.map norm).prod
  | [] => by 

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝¹ : SeminormedRing α
inst✝ : NormOneClass α
⊢ ‖prod []‖ ≤ prod (map norm [])

Next tactic:
simp
theorem List.nnnorm_prod_le [NormOneClass α] (l : List α) : ‖l.prod‖₊ ≤ (l.map nnnorm).prod :=
  l.norm_prod_le.trans_eq <| by 

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝¹ : SeminormedRing α
inst✝ : NormOneClass α
l : List α
⊢ prod (map norm l) = (fun a => ↑a) (prod (map nnnorm l))

Next tactic:
simp [NNReal.coe_list_prod, List.map_map]
theorem Finset.norm_prod_le' {α : Type*} [NormedCommRing α] (s : Finset ι) (hs : s.Nonempty)
    (f : ι → α) : ‖∏ i in s, f i‖ ≤ ∏ i in s, ‖f i‖ := by
  

Proof state:
α✝ : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝¹ : SeminormedRing α✝
α : Type u_5
inst✝ : NormedCommRing α
s : Finset ι
hs : Finset.Nonempty s
f : ι → α
⊢ ‖∏ i in s, f i‖ ≤ ∏ i in s, ‖f i‖

Next tactic:
rcases s with ⟨⟨l⟩, hl⟩
theorem Finset.norm_prod_le' {α : Type*} [NormedCommRing α] (s : Finset ι) (hs : s.Nonempty)
    (f : ι → α) : ‖∏ i in s, f i‖ ≤ ∏ i in s, ‖f i‖ := by
  rcases s with ⟨⟨l⟩, hl⟩
  

Proof state:
case mk.mk
α✝ : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝¹ : SeminormedRing α✝
α : Type u_5
inst✝ : NormedCommRing α
f : ι → α
val✝ : Multiset ι
l : List ι
hl : Multiset.Nodup (Quot.mk Setoid.r l)
hs : Finset.Nonempty { val := Quot.mk Setoid.r l, nodup := hl }
⊢ ‖∏ i in { val := Quot.mk Setoid.r l, nodup := hl }, f i‖ ≤ ∏ i in { val := Quot.mk Setoid.r l, nodup := hl }, ‖f i‖

Next tactic:
have : l.map f ≠ [] := by simpa using hs
theorem Finset.norm_prod_le' {α : Type*} [NormedCommRing α] (s : Finset ι) (hs : s.Nonempty)
    (f : ι → α) : ‖∏ i in s, f i‖ ≤ ∏ i in s, ‖f i‖ := by
  rcases s with ⟨⟨l⟩, hl⟩
  have : l.map f ≠ [] := by 

Proof state:
α✝ : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝¹ : SeminormedRing α✝
α : Type u_5
inst✝ : NormedCommRing α
f : ι → α
val✝ : Multiset ι
l : List ι
hl : Multiset.Nodup (Quot.mk Setoid.r l)
hs : Finset.Nonempty { val := Quot.mk Setoid.r l, nodup := hl }
⊢ List.map f l ≠ []

Next tactic:
simpa using hs
theorem Finset.norm_prod_le' {α : Type*} [NormedCommRing α] (s : Finset ι) (hs : s.Nonempty)
    (f : ι → α) : ‖∏ i in s, f i‖ ≤ ∏ i in s, ‖f i‖ := by
  rcases s with ⟨⟨l⟩, hl⟩
  have : l.map f ≠ [] := by simpa using hs
  

Proof state:
case mk.mk
α✝ : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝¹ : SeminormedRing α✝
α : Type u_5
inst✝ : NormedCommRing α
f : ι → α
val✝ : Multiset ι
l : List ι
hl : Multiset.Nodup (Quot.mk Setoid.r l)
hs : Finset.Nonempty { val := Quot.mk Setoid.r l, nodup := hl }
this : List.map f l ≠ []
⊢ ‖∏ i in { val := Quot.mk Setoid.r l, nodup := hl }, f i‖ ≤ ∏ i in { val := Quot.mk Setoid.r l, nodup := hl }, ‖f i‖

Next tactic:
simpa using List.norm_prod_le' this
theorem Finset.nnnorm_prod_le' {α : Type*} [NormedCommRing α] (s : Finset ι) (hs : s.Nonempty)
    (f : ι → α) : ‖∏ i in s, f i‖₊ ≤ ∏ i in s, ‖f i‖₊ :=
  (s.norm_prod_le' hs f).trans_eq <| by 

Proof state:
α✝ : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝¹ : SeminormedRing α✝
α : Type u_5
inst✝ : NormedCommRing α
s : Finset ι
hs : Finset.Nonempty s
f : ι → α
⊢ ∏ i in s, ‖f i‖ = (fun a => ↑a) (∏ i in s, ‖f i‖₊)

Next tactic:
simp [NNReal.coe_prod]
theorem Finset.norm_prod_le {α : Type*} [NormedCommRing α] [NormOneClass α] (s : Finset ι)
    (f : ι → α) : ‖∏ i in s, f i‖ ≤ ∏ i in s, ‖f i‖ := by
  

Proof state:
α✝ : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝² : SeminormedRing α✝
α : Type u_5
inst✝¹ : NormedCommRing α
inst✝ : NormOneClass α
s : Finset ι
f : ι → α
⊢ ‖∏ i in s, f i‖ ≤ ∏ i in s, ‖f i‖

Next tactic:
rcases s with ⟨⟨l⟩, hl⟩
theorem Finset.norm_prod_le {α : Type*} [NormedCommRing α] [NormOneClass α] (s : Finset ι)
    (f : ι → α) : ‖∏ i in s, f i‖ ≤ ∏ i in s, ‖f i‖ := by
  rcases s with ⟨⟨l⟩, hl⟩
  

Proof state:
case mk.mk
α✝ : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝² : SeminormedRing α✝
α : Type u_5
inst✝¹ : NormedCommRing α
inst✝ : NormOneClass α
f : ι → α
val✝ : Multiset ι
l : List ι
hl : Multiset.Nodup (Quot.mk Setoid.r l)
⊢ ‖∏ i in { val := Quot.mk Setoid.r l, nodup := hl }, f i‖ ≤ ∏ i in { val := Quot.mk Setoid.r l, nodup := hl }, ‖f i‖

Next tactic:
simpa using (l.map f).norm_prod_le
theorem Finset.nnnorm_prod_le {α : Type*} [NormedCommRing α] [NormOneClass α] (s : Finset ι)
    (f : ι → α) : ‖∏ i in s, f i‖₊ ≤ ∏ i in s, ‖f i‖₊ :=
  (s.norm_prod_le f).trans_eq <| by 

Proof state:
α✝ : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝² : SeminormedRing α✝
α : Type u_5
inst✝¹ : NormedCommRing α
inst✝ : NormOneClass α
s : Finset ι
f : ι → α
⊢ ∏ i in s, ‖f i‖ = (fun a => ↑a) (∏ i in s, ‖f i‖₊)

Next tactic:
simp [NNReal.coe_prod]
/-- If `α` is a seminormed ring, then `‖a ^ n‖₊ ≤ ‖a‖₊ ^ n` for `n > 0`.
See also `nnnorm_pow_le`. -/
theorem nnnorm_pow_le' (a : α) : ∀ {n : ℕ}, 0 < n → ‖a ^ n‖₊ ≤ ‖a‖₊ ^ n
  | 1, _ => by 

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝ : SeminormedRing α
a : α
x✝ : 0 < 1
⊢ ‖a ^ 1‖₊ ≤ ‖a‖₊ ^ 1

Next tactic:
simp only [pow_one, le_rfl]
/-- If `α` is a seminormed ring, then `‖a ^ n‖₊ ≤ ‖a‖₊ ^ n` for `n > 0`.
See also `nnnorm_pow_le`. -/
theorem nnnorm_pow_le' (a : α) : ∀ {n : ℕ}, 0 < n → ‖a ^ n‖₊ ≤ ‖a‖₊ ^ n
  | 1, _ => by simp only [pow_one, le_rfl]
  | n + 2, _ => by
    

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝ : SeminormedRing α
a : α
n : ℕ
x✝ : 0 < n + 2
⊢ ‖a ^ (n + 2)‖₊ ≤ ‖a‖₊ ^ (n + 2)

Next tactic:
simpa only [pow_succ _ (n + 1)] using
      le_trans (nnnorm_mul_le _ _) (mul_le_mul_left' (nnnorm_pow_le' a n.succ_pos) _)
/-- If `α` is a seminormed ring with `‖1‖₊ = 1`, then `‖a ^ n‖₊ ≤ ‖a‖₊ ^ n`.
See also `nnnorm_pow_le'`.-/
theorem nnnorm_pow_le [NormOneClass α] (a : α) (n : ℕ) : ‖a ^ n‖₊ ≤ ‖a‖₊ ^ n :=
  Nat.recOn n (by 

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝¹ : SeminormedRing α
inst✝ : NormOneClass α
a : α
n : ℕ
⊢ ‖a ^ Nat.zero‖₊ ≤ ‖a‖₊ ^ Nat.zero

Next tactic:
simp only [Nat.zero_eq, pow_zero, nnnorm_one, le_rfl]