l3lab/ntp-mathlib huggingface dataset:
/-- Let `m` be a sub-σ-algebra of `m0`, `f` an `m0`-measurable function and `g` an `m`-measurable
function, such that their integrals coincide on `m`-measurable sets with finite measure.
Then `∫⁻ x in s, ‖g x‖₊ ∂μ ≤ ∫⁻ x in s, ‖f x‖₊ ∂μ` on all `m`-measurable sets with finite
measure. -/
theorem lintegral_nnnorm_le_of_forall_fin_meas_integral_eq (hm : m ≤ m0) {f g : α → ℝ}
    (hf : StronglyMeasurable f) (hfi : IntegrableOn f s μ) (hg : StronglyMeasurable[m] g)
    (hgi : IntegrableOn g s μ)
    (hgf : ∀ t, MeasurableSet[m] t → μ t < ∞ → ∫ x in t, g x ∂μ = ∫ x in t, f x ∂μ)
    (hs : MeasurableSet[m] s) (hμs : μ s ≠ ∞) : (∫⁻ x in s, ‖g x‖₊ ∂μ) ≤ ∫⁻ x in s, ‖f x‖₊ ∂μ := by
  rw [← ofReal_integral_norm_eq_lintegral_nnnorm hfi, ←
    ofReal_integral_norm_eq_lintegral_nnnorm hgi, ENNReal.ofReal_le_ofReal_iff]
  · 

Proof state:
α : Type u_1
E' : Type u_2
F' : Type u_3
𝕜 : Type u_4
p : ℝ≥0∞
m m0 : MeasurableSpace α
μ : Measure α
inst✝⁸ : IsROrC 𝕜
inst✝⁷ : NormedAddCommGroup E'
inst✝⁶ : InnerProductSpace 𝕜 E'
inst✝⁵ : CompleteSpace E'
inst✝⁴ : NormedSpace ℝ E'
inst✝³ : NormedAddCommGroup F'
inst✝² : NormedSpace 𝕜 F'
inst✝¹ : NormedSpace ℝ F'
inst✝ : CompleteSpace F'
s : Set α
hm : m ≤ m0
f g : α → ℝ
hf : StronglyMeasurable f
hfi : IntegrableOn f s
hg : StronglyMeasurable g
hgi : IntegrableOn g s
hgf : ∀ (t : Set α), MeasurableSet t → ↑↑μ t < ⊤ → ∫ (x : α) in t, g x ∂μ = ∫ (x : α) in t, f x ∂μ
hs : MeasurableSet s
hμs : ↑↑μ s ≠ ⊤
⊢ ∫ (x : α) in s, ‖g x‖ ∂μ ≤ ∫ (x : α) in s, ‖f x‖ ∂μ

Next tactic:
exact integral_norm_le_of_forall_fin_meas_integral_eq hm hf hfi hg hgi hgf hs hμs
/-- Let `m` be a sub-σ-algebra of `m0`, `f` an `m0`-measurable function and `g` an `m`-measurable
function, such that their integrals coincide on `m`-measurable sets with finite measure.
Then `∫⁻ x in s, ‖g x‖₊ ∂μ ≤ ∫⁻ x in s, ‖f x‖₊ ∂μ` on all `m`-measurable sets with finite
measure. -/
theorem lintegral_nnnorm_le_of_forall_fin_meas_integral_eq (hm : m ≤ m0) {f g : α → ℝ}
    (hf : StronglyMeasurable f) (hfi : IntegrableOn f s μ) (hg : StronglyMeasurable[m] g)
    (hgi : IntegrableOn g s μ)
    (hgf : ∀ t, MeasurableSet[m] t → μ t < ∞ → ∫ x in t, g x ∂μ = ∫ x in t, f x ∂μ)
    (hs : MeasurableSet[m] s) (hμs : μ s ≠ ∞) : (∫⁻ x in s, ‖g x‖₊ ∂μ) ≤ ∫⁻ x in s, ‖f x‖₊ ∂μ := by
  rw [← ofReal_integral_norm_eq_lintegral_nnnorm hfi, ←
    ofReal_integral_norm_eq_lintegral_nnnorm hgi, ENNReal.ofReal_le_ofReal_iff]
  · exact integral_norm_le_of_forall_fin_meas_integral_eq hm hf hfi hg hgi hgf hs hμs
  · 

Proof state:
α : Type u_1
E' : Type u_2
F' : Type u_3
𝕜 : Type u_4
p : ℝ≥0∞
m m0 : MeasurableSpace α
μ : Measure α
inst✝⁸ : IsROrC 𝕜
inst✝⁷ : NormedAddCommGroup E'
inst✝⁶ : InnerProductSpace 𝕜 E'
inst✝⁵ : CompleteSpace E'
inst✝⁴ : NormedSpace ℝ E'
inst✝³ : NormedAddCommGroup F'
inst✝² : NormedSpace 𝕜 F'
inst✝¹ : NormedSpace ℝ F'
inst✝ : CompleteSpace F'
s : Set α
hm : m ≤ m0
f g : α → ℝ
hf : StronglyMeasurable f
hfi : IntegrableOn f s
hg : StronglyMeasurable g
hgi : IntegrableOn g s
hgf : ∀ (t : Set α), MeasurableSet t → ↑↑μ t < ⊤ → ∫ (x : α) in t, g x ∂μ = ∫ (x : α) in t, f x ∂μ
hs : MeasurableSet s
hμs : ↑↑μ s ≠ ⊤
⊢ 0 ≤ ∫ (x : α) in s, ‖f x‖ ∂μ

Next tactic:
exact integral_nonneg fun x => norm_nonneg _
@[to_additive (attr := mono) nsmul_le_nsmul_right]
theorem pow_le_pow_left' [CovariantClass M M (swap (· * ·)) (· ≤ ·)] {a b : M} (hab : a ≤ b) :
    ∀ i : ℕ, a ^ i ≤ b ^ i
  | 0 => by 

Proof state:
β : Type u_1
G : Type u_2
M : Type u_3
inst✝³ : Monoid M
inst✝² : Preorder M
inst✝¹ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
x : M
inst✝ : CovariantClass M M (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
a b : M
hab : a ≤ b
⊢ a ^ 0 ≤ b ^ 0

Next tactic:
simp
@[to_additive (attr := mono) nsmul_le_nsmul_right]
theorem pow_le_pow_left' [CovariantClass M M (swap (· * ·)) (· ≤ ·)] {a b : M} (hab : a ≤ b) :
    ∀ i : ℕ, a ^ i ≤ b ^ i
  | 0 => by simp
  | k + 1 => by
    

Proof state:
β : Type u_1
G : Type u_2
M : Type u_3
inst✝³ : Monoid M
inst✝² : Preorder M
inst✝¹ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
x : M
inst✝ : CovariantClass M M (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
a b : M
hab : a ≤ b
k : ℕ
⊢ a ^ (k + 1) ≤ b ^ (k + 1)

Next tactic:
rw [pow_succ, pow_succ]
@[to_additive (attr := mono) nsmul_le_nsmul_right]
theorem pow_le_pow_left' [CovariantClass M M (swap (· * ·)) (· ≤ ·)] {a b : M} (hab : a ≤ b) :
    ∀ i : ℕ, a ^ i ≤ b ^ i
  | 0 => by simp
  | k + 1 => by
    rw [pow_succ, pow_succ]
    

Proof state:
β : Type u_1
G : Type u_2
M : Type u_3
inst✝³ : Monoid M
inst✝² : Preorder M
inst✝¹ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
x : M
inst✝ : CovariantClass M M (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
a b : M
hab : a ≤ b
k : ℕ
⊢ a * a ^ k ≤ b * b ^ k

Next tactic:
exact mul_le_mul' hab (pow_le_pow_left' hab k)
@[to_additive nsmul_nonneg]
theorem one_le_pow_of_one_le' {a : M} (H : 1 ≤ a) : ∀ n : ℕ, 1 ≤ a ^ n
  | 0 => by 

Proof state:
β : Type u_1
G : Type u_2
M : Type u_3
inst✝² : Monoid M
inst✝¹ : Preorder M
inst✝ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
x a : M
H : 1 ≤ a
⊢ 1 ≤ a ^ 0

Next tactic:
simp
@[to_additive nsmul_nonneg]
theorem one_le_pow_of_one_le' {a : M} (H : 1 ≤ a) : ∀ n : ℕ, 1 ≤ a ^ n
  | 0 => by simp
  | k + 1 => by
    

Proof state:
β : Type u_1
G : Type u_2
M : Type u_3
inst✝² : Monoid M
inst✝¹ : Preorder M
inst✝ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
x a : M
H : 1 ≤ a
k : ℕ
⊢ 1 ≤ a ^ (k + 1)

Next tactic:
rw [pow_succ]
@[to_additive nsmul_nonneg]
theorem one_le_pow_of_one_le' {a : M} (H : 1 ≤ a) : ∀ n : ℕ, 1 ≤ a ^ n
  | 0 => by simp
  | k + 1 => by
    rw [pow_succ]
    

Proof state:
β : Type u_1
G : Type u_2
M : Type u_3
inst✝² : Monoid M
inst✝¹ : Preorder M
inst✝ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
x a : M
H : 1 ≤ a
k : ℕ
⊢ 1 ≤ a * a ^ k

Next tactic:
exact one_le_mul H (one_le_pow_of_one_le' H k)
@[to_additive nsmul_le_nsmul_left]
theorem pow_le_pow_right' {a : M} {n m : ℕ} (ha : 1 ≤ a) (h : n ≤ m) : a ^ n ≤ a ^ m :=
  let ⟨k, hk⟩ := Nat.le.dest h
  calc
    a ^ n ≤ a ^ n * a ^ k := le_mul_of_one_le_right' (one_le_pow_of_one_le' ha _)
    _ = a ^ m := by 

Proof state:
β : Type u_1
G : Type u_2
M : Type u_3
inst✝² : Monoid M
inst✝¹ : Preorder M
inst✝ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
x a : M
n m : ℕ
ha : 1 ≤ a
h : n ≤ m
k : ℕ
hk : n + k = m
⊢ a ^ n * a ^ k = a ^ m

Next tactic:
rw [← hk, pow_add]
@[to_additive nsmul_pos]
theorem one_lt_pow' {a : M} (ha : 1 < a) {k : ℕ} (hk : k ≠ 0) : 1 < a ^ k := by
  

Proof state:
β : Type u_1
G : Type u_2
M : Type u_3
inst✝² : Monoid M
inst✝¹ : Preorder M
inst✝ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
x a : M
ha : 1 < a
k : ℕ
hk : k ≠ 0
⊢ 1 < a ^ k

Next tactic:
rcases Nat.exists_eq_succ_of_ne_zero hk with ⟨l, rfl⟩
@[to_additive nsmul_pos]
theorem one_lt_pow' {a : M} (ha : 1 < a) {k : ℕ} (hk : k ≠ 0) : 1 < a ^ k := by
  rcases Nat.exists_eq_succ_of_ne_zero hk with ⟨l, rfl⟩
  

Proof state:
case intro
β : Type u_1
G : Type u_2
M : Type u_3
inst✝² : Monoid M
inst✝¹ : Preorder M
inst✝ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
x a : M
ha : 1 < a
l : ℕ
hk : Nat.succ l ≠ 0
⊢ 1 < a ^ Nat.succ l

Next tactic:
clear hk
@[to_additive nsmul_pos]
theorem one_lt_pow' {a : M} (ha : 1 < a) {k : ℕ} (hk : k ≠ 0) : 1 < a ^ k := by
  rcases Nat.exists_eq_succ_of_ne_zero hk with ⟨l, rfl⟩
  clear hk
  

Proof state:
case intro
β : Type u_1
G : Type u_2
M : Type u_3
inst✝² : Monoid M
inst✝¹ : Preorder M
inst✝ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
x a : M
ha : 1 < a
l : ℕ
⊢ 1 < a ^ Nat.succ l

Next tactic:
induction' l with l IH
@[to_additive nsmul_pos]
theorem one_lt_pow' {a : M} (ha : 1 < a) {k : ℕ} (hk : k ≠ 0) : 1 < a ^ k := by
  rcases Nat.exists_eq_succ_of_ne_zero hk with ⟨l, rfl⟩
  clear hk
  induction' l with l IH
  · 

Proof state:
case intro.zero
β : Type u_1
G : Type u_2
M : Type u_3
inst✝² : Monoid M
inst✝¹ : Preorder M
inst✝ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
x a : M
ha : 1 < a
⊢ 1 < a ^ Nat.succ Nat.zero

Next tactic:
rw [pow_succ]
@[to_additive nsmul_pos]
theorem one_lt_pow' {a : M} (ha : 1 < a) {k : ℕ} (hk : k ≠ 0) : 1 < a ^ k := by
  rcases Nat.exists_eq_succ_of_ne_zero hk with ⟨l, rfl⟩
  clear hk
  induction' l with l IH
  · rw [pow_succ]; 

Proof state:
case intro.zero
β : Type u_1
G : Type u_2
M : Type u_3
inst✝² : Monoid M
inst✝¹ : Preorder M
inst✝ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
x a : M
ha : 1 < a
⊢ 1 < a * a ^ Nat.zero

Next tactic:
simpa using ha
@[to_additive nsmul_pos]
theorem one_lt_pow' {a : M} (ha : 1 < a) {k : ℕ} (hk : k ≠ 0) : 1 < a ^ k := by
  rcases Nat.exists_eq_succ_of_ne_zero hk with ⟨l, rfl⟩
  clear hk
  induction' l with l IH
  · rw [pow_succ]; simpa using ha
  · 

Proof state:
case intro.succ
β : Type u_1
G : Type u_2
M : Type u_3
inst✝² : Monoid M
inst✝¹ : Preorder M
inst✝ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
x a : M
ha : 1 < a
l : ℕ
IH : 1 < a ^ Nat.succ l
⊢ 1 < a ^ Nat.succ (Nat.succ l)

Next tactic:
rw [pow_succ]
@[to_additive nsmul_pos]
theorem one_lt_pow' {a : M} (ha : 1 < a) {k : ℕ} (hk : k ≠ 0) : 1 < a ^ k := by
  rcases Nat.exists_eq_succ_of_ne_zero hk with ⟨l, rfl⟩
  clear hk
  induction' l with l IH
  · rw [pow_succ]; simpa using ha
  · rw [pow_succ]
    

Proof state:
case intro.succ
β : Type u_1
G : Type u_2
M : Type u_3
inst✝² : Monoid M
inst✝¹ : Preorder M
inst✝ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
x a : M
ha : 1 < a
l : ℕ
IH : 1 < a ^ Nat.succ l
⊢ 1 < a * a ^ (l + 1)

Next tactic:
exact one_lt_mul'' ha IH
@[to_additive nsmul_lt_nsmul_left]
theorem pow_lt_pow_right' [CovariantClass M M (· * ·) (· < ·)] {a : M} {n m : ℕ} (ha : 1 < a)
    (h : n < m) : a ^ n < a ^ m := by
  

Proof state:
β : Type u_1
G : Type u_2
M : Type u_3
inst✝³ : Monoid M
inst✝² : Preorder M
inst✝¹ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
x : M
inst✝ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x < x_1
a : M
n m : ℕ
ha : 1 < a
h : n < m
⊢ a ^ n < a ^ m

Next tactic:
rcases Nat.le.dest h with ⟨k, rfl⟩
@[to_additive nsmul_lt_nsmul_left]
theorem pow_lt_pow_right' [CovariantClass M M (· * ·) (· < ·)] {a : M} {n m : ℕ} (ha : 1 < a)
    (h : n < m) : a ^ n < a ^ m := by
  rcases Nat.le.dest h with ⟨k, rfl⟩; 

Proof state:
case intro
β : Type u_1
G : Type u_2
M : Type u_3
inst✝³ : Monoid M
inst✝² : Preorder M
inst✝¹ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
x : M
inst✝ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x < x_1
a : M
n : ℕ
ha : 1 < a
k : ℕ
h : n < Nat.succ n + k
⊢ a ^ n < a ^ (Nat.succ n + k)

Next tactic:
clear h
@[to_additive nsmul_lt_nsmul_left]
theorem pow_lt_pow_right' [CovariantClass M M (· * ·) (· < ·)] {a : M} {n m : ℕ} (ha : 1 < a)
    (h : n < m) : a ^ n < a ^ m := by
  rcases Nat.le.dest h with ⟨k, rfl⟩; clear h
  

Proof state:
case intro
β : Type u_1
G : Type u_2
M : Type u_3
inst✝³ : Monoid M
inst✝² : Preorder M
inst✝¹ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
x : M
inst✝ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x < x_1
a : M
n : ℕ
ha : 1 < a
k : ℕ
⊢ a ^ n < a ^ (Nat.succ n + k)

Next tactic:
rw [pow_add, pow_succ', mul_assoc, ← pow_succ]
@[to_additive nsmul_lt_nsmul_left]
theorem pow_lt_pow_right' [CovariantClass M M (· * ·) (· < ·)] {a : M} {n m : ℕ} (ha : 1 < a)
    (h : n < m) : a ^ n < a ^ m := by
  rcases Nat.le.dest h with ⟨k, rfl⟩; clear h
  rw [pow_add, pow_succ', mul_assoc, ← pow_succ]
  

Proof state:
case intro
β : Type u_1
G : Type u_2
M : Type u_3
inst✝³ : Monoid M
inst✝² : Preorder M
inst✝¹ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
x : M
inst✝ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x < x_1
a : M
n : ℕ
ha : 1 < a
k : ℕ
⊢ a ^ n < a ^ n * a ^ (k + 1)

Next tactic:
exact lt_mul_of_one_lt_right' _ (one_lt_pow' ha k.succ_ne_zero)
@[to_additive Left.pow_nonneg]
theorem Left.one_le_pow_of_le (hx : 1 ≤ x) : ∀ {n : ℕ}, 1 ≤ x ^ n
  | 0 => (pow_zero x).ge
  | n + 1 => by
    

Proof state:
β : Type u_1
G : Type u_2
M : Type u_3
inst✝² : Monoid M
inst✝¹ : Preorder M
inst✝ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
x : M
hx : 1 ≤ x
n : ℕ
⊢ 1 ≤ x ^ (n + 1)

Next tactic:
rw [pow_succ]
@[to_additive Left.pow_nonneg]
theorem Left.one_le_pow_of_le (hx : 1 ≤ x) : ∀ {n : ℕ}, 1 ≤ x ^ n
  | 0 => (pow_zero x).ge
  | n + 1 => by
    rw [pow_succ]
    

Proof state:
β : Type u_1
G : Type u_2
M : Type u_3
inst✝² : Monoid M
inst✝¹ : Preorder M
inst✝ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
x : M
hx : 1 ≤ x
n : ℕ
⊢ 1 ≤ x * x ^ n

Next tactic:
exact Left.one_le_mul hx <| Left.one_le_pow_of_le hx
@[to_additive Left.pow_nonpos]
theorem Left.pow_le_one_of_le (hx : x ≤ 1) : ∀ {n : ℕ}, x ^ n ≤ 1
  | 0 => (pow_zero _).le
  | n + 1 => by
    

Proof state:
β : Type u_1
G : Type u_2
M : Type u_3
inst✝² : Monoid M
inst✝¹ : Preorder M
inst✝ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
x : M
hx : x ≤ 1
n : ℕ
⊢ x ^ (n + 1) ≤ 1

Next tactic:
rw [pow_succ]
@[to_additive Left.pow_nonpos]
theorem Left.pow_le_one_of_le (hx : x ≤ 1) : ∀ {n : ℕ}, x ^ n ≤ 1
  | 0 => (pow_zero _).le
  | n + 1 => by
    rw [pow_succ]
    

Proof state:
β : Type u_1
G : Type u_2
M : Type u_3
inst✝² : Monoid M
inst✝¹ : Preorder M
inst✝ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
x : M
hx : x ≤ 1
n : ℕ
⊢ x * x ^ n ≤ 1

Next tactic:
exact Left.mul_le_one hx <| Left.pow_le_one_of_le hx
@[to_additive Right.pow_nonneg]
theorem Right.one_le_pow_of_le (hx : 1 ≤ x) : ∀ {n : ℕ}, 1 ≤ x ^ n
  | 0 => (pow_zero _).ge
  | n + 1 => by
    

Proof state:
β : Type u_1
G : Type u_2
M : Type u_3
inst✝² : Monoid M
inst✝¹ : Preorder M
inst✝ : CovariantClass M M (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
x : M
hx : 1 ≤ x
n : ℕ
⊢ 1 ≤ x ^ (n + 1)

Next tactic:
rw [pow_succ]
@[to_additive Right.pow_nonneg]
theorem Right.one_le_pow_of_le (hx : 1 ≤ x) : ∀ {n : ℕ}, 1 ≤ x ^ n
  | 0 => (pow_zero _).ge
  | n + 1 => by
    rw [pow_succ]
    

Proof state:
β : Type u_1
G : Type u_2
M : Type u_3
inst✝² : Monoid M
inst✝¹ : Preorder M
inst✝ : CovariantClass M M (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
x : M
hx : 1 ≤ x
n : ℕ
⊢ 1 ≤ x * x ^ n

Next tactic:
exact Right.one_le_mul hx <| Right.one_le_pow_of_le hx
@[to_additive Right.pow_nonpos]
theorem Right.pow_le_one_of_le (hx : x ≤ 1) : ∀ {n : ℕ}, x ^ n ≤ 1
  | 0 => (pow_zero _).le
  | n + 1 => by
    

Proof state:
β : Type u_1
G : Type u_2
M : Type u_3
inst✝² : Monoid M
inst✝¹ : Preorder M
inst✝ : CovariantClass M M (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
x : M
hx : x ≤ 1
n : ℕ
⊢ x ^ (n + 1) ≤ 1

Next tactic:
rw [pow_succ]
@[to_additive Right.pow_nonpos]
theorem Right.pow_le_one_of_le (hx : x ≤ 1) : ∀ {n : ℕ}, x ^ n ≤ 1
  | 0 => (pow_zero _).le
  | n + 1 => by
    rw [pow_succ]
    

Proof state:
β : Type u_1
G : Type u_2
M : Type u_3
inst✝² : Monoid M
inst✝¹ : Preorder M
inst✝ : CovariantClass M M (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
x : M
hx : x ≤ 1
n : ℕ
⊢ x * x ^ n ≤ 1

Next tactic:
exact Right.mul_le_one hx <| Right.pow_le_one_of_le hx
@[to_additive StrictMono.const_nsmul]
theorem StrictMono.pow_const (hf : StrictMono f) : ∀ {n : ℕ}, n ≠ 0 → StrictMono (f · ^ n)
  | 0, hn => (hn rfl).elim
  | 1, _ => by 

Proof state:
β : Type u_1
G : Type u_2
M : Type u_3
inst✝⁴ : Monoid M
inst✝³ : Preorder M
inst✝² : Preorder β
inst✝¹ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x < x_1
inst✝ : CovariantClass M M (swap fun x x_1 => x * x_1) fun x x_1 => x < x_1
f : β → M
n : ℕ
hf : StrictMono f
x✝ : 1 ≠ 0
⊢ StrictMono fun x => f x ^ 1

Next tactic:
simpa
@[to_additive StrictMono.const_nsmul]
theorem StrictMono.pow_const (hf : StrictMono f) : ∀ {n : ℕ}, n ≠ 0 → StrictMono (f · ^ n)
  | 0, hn => (hn rfl).elim
  | 1, _ => by simpa
  | Nat.succ <| Nat.succ n, _ => by
    

Proof state:
β : Type u_1
G : Type u_2
M : Type u_3
inst✝⁴ : Monoid M
inst✝³ : Preorder M
inst✝² : Preorder β
inst✝¹ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x < x_1
inst✝ : CovariantClass M M (swap fun x x_1 => x * x_1) fun x x_1 => x < x_1
f : β → M
n✝ : ℕ
hf : StrictMono f
n : ℕ
x✝ : Nat.succ (Nat.succ n) ≠ 0
⊢ StrictMono fun x => f x ^ Nat.succ (Nat.succ n)

Next tactic:
simpa only [pow_succ] using hf.mul' (hf.pow_const n.succ_ne_zero)
@[to_additive Monotone.const_nsmul]
theorem Monotone.pow_right {f : β → M} (hf : Monotone f) : ∀ n : ℕ, Monotone fun a => f a ^ n
  | 0 => by 

Proof state:
β : Type u_1
G : Type u_2
M : Type u_3
inst✝⁴ : Monoid M
inst✝³ : Preorder M
inst✝² : Preorder β
inst✝¹ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
inst✝ : CovariantClass M M (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
f : β → M
hf : Monotone f
⊢ Monotone fun a => f a ^ 0

Next tactic:
simpa using monotone_const
@[to_additive Monotone.const_nsmul]
theorem Monotone.pow_right {f : β → M} (hf : Monotone f) : ∀ n : ℕ, Monotone fun a => f a ^ n
  | 0 => by simpa using monotone_const
  | n + 1 => by
    

Proof state:
β : Type u_1
G : Type u_2
M : Type u_3
inst✝⁴ : Monoid M
inst✝³ : Preorder M
inst✝² : Preorder β
inst✝¹ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
inst✝ : CovariantClass M M (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
f : β → M
hf : Monotone f
n : ℕ
⊢ Monotone fun a => f a ^ (n + 1)

Next tactic:
simp_rw [pow_succ]
@[to_additive Monotone.const_nsmul]
theorem Monotone.pow_right {f : β → M} (hf : Monotone f) : ∀ n : ℕ, Monotone fun a => f a ^ n
  | 0 => by simpa using monotone_const
  | n + 1 => by
    simp_rw [pow_succ]
    

Proof state:
β : Type u_1
G : Type u_2
M : Type u_3
inst✝⁴ : Monoid M
inst✝³ : Preorder M
inst✝² : Preorder β
inst✝¹ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
inst✝ : CovariantClass M M (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
f : β → M
hf : Monotone f
n : ℕ
⊢ Monotone fun a => f a * f a ^ n

Next tactic:
exact hf.mul' (Monotone.pow_right hf _)
@[to_additive Left.pow_neg]
theorem Left.pow_lt_one_of_lt [CovariantClass M M (· * ·) (· < ·)] {n : ℕ} {x : M} (hn : 0 < n)
    (h : x < 1) : x ^ n < 1 :=
  Nat.le_induction ((pow_one _).trans_lt h)
    (fun n _ ih => by
      

Proof state:
β : Type u_1
G : Type u_2
M : Type u_3
inst✝² : Monoid M
inst✝¹ : Preorder M
inst✝ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x < x_1
n✝ : ℕ
x : M
hn : 0 < n✝
h : x < 1
n : ℕ
x✝ : Nat.succ 0 ≤ n
ih : x ^ n < 1
⊢ x ^ (n + 1) < 1

Next tactic:
rw [pow_succ]
@[to_additive Left.pow_neg]
theorem Left.pow_lt_one_of_lt [CovariantClass M M (· * ·) (· < ·)] {n : ℕ} {x : M} (hn : 0 < n)
    (h : x < 1) : x ^ n < 1 :=
  Nat.le_induction ((pow_one _).trans_lt h)
    (fun n _ ih => by
      rw [pow_succ]
      

Proof state:
β : Type u_1
G : Type u_2
M : Type u_3
inst✝² : Monoid M
inst✝¹ : Preorder M
inst✝ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x < x_1
n✝ : ℕ
x : M
hn : 0 < n✝
h : x < 1
n : ℕ
x✝ : Nat.succ 0 ≤ n
ih : x ^ n < 1
⊢ x * x ^ n < 1

Next tactic:
exact mul_lt_one h ih
@[to_additive Right.pow_neg]
theorem Right.pow_lt_one_of_lt [CovariantClass M M (swap (· * ·)) (· < ·)] {n : ℕ} {x : M}
    (hn : 0 < n) (h : x < 1) : x ^ n < 1 :=
  Nat.le_induction ((pow_one _).trans_lt h)
    (fun n _ ih => by
      

Proof state:
β : Type u_1
G : Type u_2
M : Type u_3
inst✝² : Monoid M
inst✝¹ : Preorder M
inst✝ : CovariantClass M M (swap fun x x_1 => x * x_1) fun x x_1 => x < x_1
n✝ : ℕ
x : M
hn : 0 < n✝
h : x < 1
n : ℕ
x✝ : Nat.succ 0 ≤ n
ih : x ^ n < 1
⊢ x ^ (n + 1) < 1

Next tactic:
rw [pow_succ]
@[to_additive Right.pow_neg]
theorem Right.pow_lt_one_of_lt [CovariantClass M M (swap (· * ·)) (· < ·)] {n : ℕ} {x : M}
    (hn : 0 < n) (h : x < 1) : x ^ n < 1 :=
  Nat.le_induction ((pow_one _).trans_lt h)
    (fun n _ ih => by
      rw [pow_succ]
      

Proof state:
β : Type u_1
G : Type u_2
M : Type u_3
inst✝² : Monoid M
inst✝¹ : Preorder M
inst✝ : CovariantClass M M (swap fun x x_1 => x * x_1) fun x x_1 => x < x_1
n✝ : ℕ
x : M
hn : 0 < n✝
h : x < 1
n : ℕ
x✝ : Nat.succ 0 ≤ n
ih : x ^ n < 1
⊢ x * x ^ n < 1

Next tactic:
exact Right.mul_lt_one h ih
@[to_additive]
theorem pow_eq_one_iff {x : M} {n : ℕ} (hn : n ≠ 0) : x ^ n = 1 ↔ x = 1 := by
  

Proof state:
β : Type u_1
G : Type u_2
M : Type u_3
inst✝² : Monoid M
inst✝¹ : LinearOrder M
inst✝ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
x : M
n : ℕ
hn : n ≠ 0
⊢ x ^ n = 1 ↔ x = 1

Next tactic:
simp only [le_antisymm_iff]
@[to_additive]
theorem pow_eq_one_iff {x : M} {n : ℕ} (hn : n ≠ 0) : x ^ n = 1 ↔ x = 1 := by
  simp only [le_antisymm_iff]
  

Proof state:
β : Type u_1
G : Type u_2
M : Type u_3
inst✝² : Monoid M
inst✝¹ : LinearOrder M
inst✝ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
x : M
n : ℕ
hn : n ≠ 0
⊢ x ^ n ≤ 1 ∧ 1 ≤ x ^ n ↔ x ≤ 1 ∧ 1 ≤ x

Next tactic:
rw [pow_le_one_iff hn, one_le_pow_iff hn]
@[to_additive min_lt_of_add_lt_two_nsmul]
theorem min_lt_of_mul_lt_sq {a b c : M} (h : a * b < c ^ 2) : min a b < c := by
  

Proof state:
β : Type u_1
G : Type u_2
M : Type u_3
inst✝³ : Monoid M
inst✝² : LinearOrder M
inst✝¹ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
inst✝ : CovariantClass M M (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
a b c : M
h : a * b < c ^ 2
⊢ min a b < c

Next tactic:
simpa using min_lt_max_of_mul_lt_mul (h.trans_eq <| pow_two _)
@[to_additive lt_max_of_two_nsmul_lt_add]
theorem lt_max_of_sq_lt_mul {a b c : M} (h : a ^ 2 < b * c) : a < max b c := by
  

Proof state:
β : Type u_1
G : Type u_2
M : Type u_3
inst✝³ : Monoid M
inst✝² : LinearOrder M
inst✝¹ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
inst✝ : CovariantClass M M (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
a b c : M
h : a ^ 2 < b * c
⊢ a < max b c

Next tactic:
simpa using min_lt_max_of_mul_lt_mul ((pow_two _).symm.trans_lt h)
@[to_additive min_le_of_add_le_two_nsmul]
theorem min_le_of_mul_le_sq {a b c : M} (h : a * b ≤ c ^ 2) : min a b ≤ c := by
  

Proof state:
β : Type u_1
G : Type u_2
M : Type u_3
inst✝³ : Monoid M
inst✝² : LinearOrder M
inst✝¹ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x < x_1
inst✝ : CovariantClass M M (swap fun x x_1 => x * x_1) fun x x_1 => x < x_1
a b c : M
h : a * b ≤ c ^ 2
⊢ min a b ≤ c

Next tactic:
simpa using min_le_max_of_mul_le_mul (h.trans_eq <| pow_two _)
@[to_additive le_max_of_two_nsmul_le_add]
theorem le_max_of_sq_le_mul {a b c : M} (h : a ^ 2 ≤ b * c) : a ≤ max b c := by
  

Proof state:
β : Type u_1
G : Type u_2
M : Type u_3
inst✝³ : Monoid M
inst✝² : LinearOrder M
inst✝¹ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x < x_1
inst✝ : CovariantClass M M (swap fun x x_1 => x * x_1) fun x x_1 => x < x_1
a b c : M
h : a ^ 2 ≤ b * c
⊢ a ≤ max b c

Next tactic:
simpa using min_le_max_of_mul_le_mul ((pow_two _).symm.trans_le h)
@[to_additive zsmul_nonneg]
theorem one_le_zpow {x : G} (H : 1 ≤ x) {n : ℤ} (hn : 0 ≤ n) : 1 ≤ x ^ n := by
  

Proof state:
β : Type u_1
G : Type u_2
M : Type u_3
inst✝² : DivInvMonoid G
inst✝¹ : Preorder G
inst✝ : CovariantClass G G (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
x : G
H : 1 ≤ x
n : ℤ
hn : 0 ≤ n
⊢ 1 ≤ x ^ n

Next tactic:
lift n to ℕ using hn
@[to_additive zsmul_nonneg]
theorem one_le_zpow {x : G} (H : 1 ≤ x) {n : ℤ} (hn : 0 ≤ n) : 1 ≤ x ^ n := by
  lift n to ℕ using hn
  

Proof state:
case intro
β : Type u_1
G : Type u_2
M : Type u_3
inst✝² : DivInvMonoid G
inst✝¹ : Preorder G
inst✝ : CovariantClass G G (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
x : G
H : 1 ≤ x
n : ℕ
⊢ 1 ≤ x ^ ↑n

Next tactic:
rw [zpow_ofNat]
@[to_additive zsmul_nonneg]
theorem one_le_zpow {x : G} (H : 1 ≤ x) {n : ℤ} (hn : 0 ≤ n) : 1 ≤ x ^ n := by
  lift n to ℕ using hn
  rw [zpow_ofNat]
  

Proof state:
case intro
β : Type u_1
G : Type u_2
M : Type u_3
inst✝² : DivInvMonoid G
inst✝¹ : Preorder G
inst✝ : CovariantClass G G (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
x : G
H : 1 ≤ x
n : ℕ
⊢ 1 ≤ x ^ n

Next tactic:
apply one_le_pow_of_one_le' H
instance [IsEmpty α] : Unique (Multiset α) where
  default := 0
  uniq := by 

Proof state:
α : Type u_1
β : Type v
γ : Type u_2
inst✝ : IsEmpty α
⊢ ∀ (a : Multiset α), a = default

Next tactic:
rintro ⟨_ | ⟨a, l⟩⟩