[GOAL]
E : Type u_1
inst✝ : NormedAddCommGroup E
x : E
⊢ sqrt (1 + ‖x‖ ^ 2) ≤ 1 + ‖x‖
[PROOFSTEP]
rw [sqrt_le_left (by positivity)]
[GOAL]
E : Type u_1
inst✝ : NormedAddCommGroup E
x : E
⊢ 0 ≤ 1 + ‖x‖
[PROOFSTEP]
positivity
[GOAL]
E : Type u_1
inst✝ : NormedAddCommGroup E
x : E
⊢ 1 + ‖x‖ ^ 2 ≤ (1 + ‖x‖) ^ 2
[PROOFSTEP]
simp [add_sq]
[GOAL]
E : Type u_1
inst✝ : NormedAddCommGroup E
x : E
⊢ 1 + ‖x‖ ≤ sqrt 2 * sqrt (1 + ‖x‖ ^ 2)
[PROOFSTEP]
rw [← sqrt_mul zero_le_two]
[GOAL]
E : Type u_1
inst✝ : NormedAddCommGroup E
x : E
⊢ 1 + ‖x‖ ≤ sqrt (2 * (1 + ‖x‖ ^ 2))
[PROOFSTEP]
have := sq_nonneg (‖x‖ - 1)
[GOAL]
E : Type u_1
inst✝ : NormedAddCommGroup E
x : E
this : 0 ≤ (‖x‖ - 1) ^ 2
⊢ 1 + ‖x‖ ≤ sqrt (2 * (1 + ‖x‖ ^ 2))
[PROOFSTEP]
apply le_sqrt_of_sq_le
[GOAL]
case h
E : Type u_1
inst✝ : NormedAddCommGroup E
x : E
this : 0 ≤ (‖x‖ - 1) ^ 2
⊢ (1 + ‖x‖) ^ 2 ≤ 2 * (1 + ‖x‖ ^ 2)
[PROOFSTEP]
linarith
[GOAL]
E : Type u_1
inst✝ : NormedAddCommGroup E
r : ℝ
x : E
hr : 0 < r
⊢ (1 + ‖x‖ ^ 2) ^ (-r / 2) = 2 ^ (r / 2) * ((sqrt 2 * sqrt (1 + ‖x‖ ^ 2)) ^ r)⁻¹
[PROOFSTEP]
rw [rpow_div_two_eq_sqrt, rpow_div_two_eq_sqrt, mul_rpow, mul_inv, rpow_neg, mul_inv_cancel_left₀]
[GOAL]
case h
E : Type u_1
inst✝ : NormedAddCommGroup E
r : ℝ
x : E
hr : 0 < r
⊢ sqrt 2 ^ r ≠ 0
[PROOFSTEP]
positivity
[GOAL]
case hx
E : Type u_1
inst✝ : NormedAddCommGroup E
r : ℝ
x : E
hr : 0 < r
⊢ 0 ≤ sqrt (1 + ‖x‖ ^ 2)
[PROOFSTEP]
positivity
[GOAL]
case h
E : Type u_1
inst✝ : NormedAddCommGroup E
r : ℝ
x : E
hr : 0 < r
⊢ 0 ≤ sqrt 2
[PROOFSTEP]
positivity
[GOAL]
case h₁
E : Type u_1
inst✝ : NormedAddCommGroup E
r : ℝ
x : E
hr : 0 < r
⊢ 0 ≤ sqrt (1 + ‖x‖ ^ 2)
[PROOFSTEP]
positivity
[GOAL]
case hx
E : Type u_1
inst✝ : NormedAddCommGroup E
r : ℝ
x : E
hr : 0 < r
⊢ 0 ≤ 2
[PROOFSTEP]
positivity
[GOAL]
case hx
E : Type u_1
inst✝ : NormedAddCommGroup E
r : ℝ
x : E
hr : 0 < r
⊢ 0 ≤ 1 + ‖x‖ ^ 2
[PROOFSTEP]
positivity
[GOAL]
E : Type u_1
inst✝ : NormedAddCommGroup E
r : ℝ
x : E
hr : 0 < r
⊢ 2 ^ (r / 2) * ((sqrt 2 * sqrt (1 + ‖x‖ ^ 2)) ^ r)⁻¹ ≤ 2 ^ (r / 2) * ((1 + ‖x‖) ^ r)⁻¹
[PROOFSTEP]
gcongr
[GOAL]
case h.h.h₁
E : Type u_1
inst✝ : NormedAddCommGroup E
r : ℝ
x : E
hr : 0 < r
⊢ 1 + ‖x‖ ≤ sqrt 2 * sqrt (1 + ‖x‖ ^ 2)
[PROOFSTEP]
apply one_add_norm_le_sqrt_two_mul_sqrt
[GOAL]
E : Type u_1
inst✝ : NormedAddCommGroup E
r : ℝ
x : E
hr : 0 < r
⊢ 2 ^ (r / 2) * ((1 + ‖x‖) ^ r)⁻¹ = 2 ^ (r / 2) * (1 + ‖x‖) ^ (-r)
[PROOFSTEP]
rw [rpow_neg]
[GOAL]
case hx
E : Type u_1
inst✝ : NormedAddCommGroup E
r : ℝ
x : E
hr : 0 < r
⊢ 0 ≤ 1 + ‖x‖
[PROOFSTEP]
positivity
[GOAL]
E : Type u_1
inst✝ : NormedAddCommGroup E
r t : ℝ
hr : 0 < r
ht : 0 < t
x : E
⊢ t ≤ (1 + ‖x‖) ^ (-r) ↔ ‖x‖ ≤ t ^ (-r⁻¹) - 1
[PROOFSTEP]
rw [le_sub_iff_add_le', neg_inv]
[GOAL]
E : Type u_1
inst✝ : NormedAddCommGroup E
r t : ℝ
hr : 0 < r
ht : 0 < t
x : E
⊢ t ≤ (1 + ‖x‖) ^ (-r) ↔ 1 + ‖x‖ ≤ t ^ (-r)⁻¹
[PROOFSTEP]
exact (Real.le_rpow_inv_iff_of_neg (by positivity) ht (neg_lt_zero.mpr hr)).symm
[GOAL]
E : Type u_1
inst✝ : NormedAddCommGroup E
r t : ℝ
hr : 0 < r
ht : 0 < t
x : E
⊢ 0 < 1 + ‖x‖
[PROOFSTEP]
positivity
[GOAL]
E : Type u_1
inst✝ : NormedAddCommGroup E
r t : ℝ
hr : 0 < r
ht : 1 < t
⊢ Metric.closedBall 0 (t ^ (-r⁻¹) - 1) = ∅
[PROOFSTEP]
rw [Metric.closedBall_eq_empty, sub_neg]
[GOAL]
E : Type u_1
inst✝ : NormedAddCommGroup E
r t : ℝ
hr : 0 < r
ht : 1 < t
⊢ t ^ (-r⁻¹) < 1
[PROOFSTEP]
exact Real.rpow_lt_one_of_one_lt_of_neg ht (by simp only [hr, Right.neg_neg_iff, inv_pos])
[GOAL]
E : Type u_1
inst✝ : NormedAddCommGroup E
r t : ℝ
hr : 0 < r
ht : 1 < t
⊢ -r⁻¹ < 0
[PROOFSTEP]
simp only [hr, Right.neg_neg_iff, inv_pos]
[GOAL]
E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : FiniteDimensional ℝ E
r : ℝ
n : ℕ
hnr : ↑n < r
⊢ ∫⁻ (x : ℝ) in Ioc 0 1, ENNReal.ofReal ((x ^ (-r⁻¹) - 1) ^ n) < ⊤
[PROOFSTEP]
have hr : 0 < r := lt_of_le_of_lt n.cast_nonneg hnr
[GOAL]
E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : FiniteDimensional ℝ E
r : ℝ
n : ℕ
hnr : ↑n < r
hr : 0 < r
⊢ ∫⁻ (x : ℝ) in Ioc 0 1, ENNReal.ofReal ((x ^ (-r⁻¹) - 1) ^ n) < ⊤
[PROOFSTEP]
have h_int : ∀ x : ℝ, x ∈ Ioc (0 : ℝ) 1 → ENNReal.ofReal ((x ^ (-r⁻¹) - 1) ^ n) ≤ ENNReal.ofReal (x ^ (-(r⁻¹ * n))) :=
  fun x hx ↦ by
  apply ENNReal.ofReal_le_ofReal
  rw [← neg_mul, rpow_mul hx.1.le, rpow_nat_cast]
  refine' pow_le_pow_of_le_left _ (by simp only [sub_le_self_iff, zero_le_one]) n
  rw [le_sub_iff_add_le', add_zero]
  refine' Real.one_le_rpow_of_pos_of_le_one_of_nonpos hx.1 hx.2 _
  rw [Right.neg_nonpos_iff, inv_nonneg]
  exact hr.le
[GOAL]
E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : FiniteDimensional ℝ E
r : ℝ
n : ℕ
hnr : ↑n < r
hr : 0 < r
x : ℝ
hx : x ∈ Ioc 0 1
⊢ ENNReal.ofReal ((x ^ (-r⁻¹) - 1) ^ n) ≤ ENNReal.ofReal (x ^ (-(r⁻¹ * ↑n)))
[PROOFSTEP]
apply ENNReal.ofReal_le_ofReal
[GOAL]
case h
E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : FiniteDimensional ℝ E
r : ℝ
n : ℕ
hnr : ↑n < r
hr : 0 < r
x : ℝ
hx : x ∈ Ioc 0 1
⊢ (x ^ (-r⁻¹) - 1) ^ n ≤ x ^ (-(r⁻¹ * ↑n))
[PROOFSTEP]
rw [← neg_mul, rpow_mul hx.1.le, rpow_nat_cast]
[GOAL]
case h
E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : FiniteDimensional ℝ E
r : ℝ
n : ℕ
hnr : ↑n < r
hr : 0 < r
x : ℝ
hx : x ∈ Ioc 0 1
⊢ (x ^ (-r⁻¹) - 1) ^ n ≤ (x ^ (-r⁻¹)) ^ n
[PROOFSTEP]
refine' pow_le_pow_of_le_left _ (by simp only [sub_le_self_iff, zero_le_one]) n
[GOAL]
E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : FiniteDimensional ℝ E
r : ℝ
n : ℕ
hnr : ↑n < r
hr : 0 < r
x : ℝ
hx : x ∈ Ioc 0 1
⊢ x ^ (-r⁻¹) - 1 ≤ x ^ (-r⁻¹)
[PROOFSTEP]
simp only [sub_le_self_iff, zero_le_one]
[GOAL]
case h
E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : FiniteDimensional ℝ E
r : ℝ
n : ℕ
hnr : ↑n < r
hr : 0 < r
x : ℝ
hx : x ∈ Ioc 0 1
⊢ 0 ≤ x ^ (-r⁻¹) - 1
[PROOFSTEP]
rw [le_sub_iff_add_le', add_zero]
[GOAL]
case h
E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : FiniteDimensional ℝ E
r : ℝ
n : ℕ
hnr : ↑n < r
hr : 0 < r
x : ℝ
hx : x ∈ Ioc 0 1
⊢ 1 ≤ x ^ (-r⁻¹)
[PROOFSTEP]
refine' Real.one_le_rpow_of_pos_of_le_one_of_nonpos hx.1 hx.2 _
[GOAL]
case h
E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : FiniteDimensional ℝ E
r : ℝ
n : ℕ
hnr : ↑n < r
hr : 0 < r
x : ℝ
hx : x ∈ Ioc 0 1
⊢ -r⁻¹ ≤ 0
[PROOFSTEP]
rw [Right.neg_nonpos_iff, inv_nonneg]
[GOAL]
case h
E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : FiniteDimensional ℝ E
r : ℝ
n : ℕ
hnr : ↑n < r
hr : 0 < r
x : ℝ
hx : x ∈ Ioc 0 1
⊢ 0 ≤ r
[PROOFSTEP]
exact hr.le
[GOAL]
E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : FiniteDimensional ℝ E
r : ℝ
n : ℕ
hnr : ↑n < r
hr : 0 < r
h_int : ∀ (x : ℝ), x ∈ Ioc 0 1 → ENNReal.ofReal ((x ^ (-r⁻¹) - 1) ^ n) ≤ ENNReal.ofReal (x ^ (-(r⁻¹ * ↑n)))
⊢ ∫⁻ (x : ℝ) in Ioc 0 1, ENNReal.ofReal ((x ^ (-r⁻¹) - 1) ^ n) < ⊤
[PROOFSTEP]
refine' lt_of_le_of_lt (set_lintegral_mono' measurableSet_Ioc h_int) _
[GOAL]
E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : FiniteDimensional ℝ E
r : ℝ
n : ℕ
hnr : ↑n < r
hr : 0 < r
h_int : ∀ (x : ℝ), x ∈ Ioc 0 1 → ENNReal.ofReal ((x ^ (-r⁻¹) - 1) ^ n) ≤ ENNReal.ofReal (x ^ (-(r⁻¹ * ↑n)))
⊢ ∫⁻ (x : ℝ) in Ioc 0 1, ENNReal.ofReal (x ^ (-(r⁻¹ * ↑n))) < ⊤
[PROOFSTEP]
refine' IntegrableOn.set_lintegral_lt_top _
[GOAL]
E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : FiniteDimensional ℝ E
r : ℝ
n : ℕ
hnr : ↑n < r
hr : 0 < r
h_int : ∀ (x : ℝ), x ∈ Ioc 0 1 → ENNReal.ofReal ((x ^ (-r⁻¹) - 1) ^ n) ≤ ENNReal.ofReal (x ^ (-(r⁻¹ * ↑n)))
⊢ IntegrableOn (fun x => x ^ (-(r⁻¹ * ↑n))) (Ioc 0 1)
[PROOFSTEP]
rw [← intervalIntegrable_iff_integrable_Ioc_of_le zero_le_one]
[GOAL]
E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : FiniteDimensional ℝ E
r : ℝ
n : ℕ
hnr : ↑n < r
hr : 0 < r
h_int : ∀ (x : ℝ), x ∈ Ioc 0 1 → ENNReal.ofReal ((x ^ (-r⁻¹) - 1) ^ n) ≤ ENNReal.ofReal (x ^ (-(r⁻¹ * ↑n)))
⊢ IntervalIntegrable (fun x => x ^ (-(r⁻¹ * ↑n))) volume 0 1
[PROOFSTEP]
apply intervalIntegral.intervalIntegrable_rpow'
[GOAL]
case h
E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : FiniteDimensional ℝ E
r : ℝ
n : ℕ
hnr : ↑n < r
hr : 0 < r
h_int : ∀ (x : ℝ), x ∈ Ioc 0 1 → ENNReal.ofReal ((x ^ (-r⁻¹) - 1) ^ n) ≤ ENNReal.ofReal (x ^ (-(r⁻¹ * ↑n)))
⊢ -1 < -(r⁻¹ * ↑n)
[PROOFSTEP]
rwa [neg_lt_neg_iff, inv_mul_lt_iff' hr, one_mul]
[GOAL]
E : Type u_1
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : MeasureSpace E
inst✝¹ : BorelSpace E
inst✝ : Measure.IsAddHaarMeasure volume
r : ℝ
hnr : ↑(finrank ℝ E) < r
⊢ ∫⁻ (x : E), ENNReal.ofReal ((1 + ‖x‖) ^ (-r)) < ⊤
[PROOFSTEP]
have hr : 0 < r := lt_of_le_of_lt (finrank ℝ E).cast_nonneg hnr
[GOAL]
E : Type u_1
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : MeasureSpace E
inst✝¹ : BorelSpace E
inst✝ : Measure.IsAddHaarMeasure volume
r : ℝ
hnr : ↑(finrank ℝ E) < r
hr : 0 < r
⊢ ∫⁻ (x : E), ENNReal.ofReal ((1 + ‖x‖) ^ (-r)) < ⊤
[PROOFSTEP]
have h_meas : Measurable fun ω : E => (1 + ‖ω‖) ^ (-r) :=
  -- porting note: was `by measurability`(measurable_norm.const_add _).pow_const _
[GOAL]
E : Type u_1
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : MeasureSpace E
inst✝¹ : BorelSpace E
inst✝ : Measure.IsAddHaarMeasure volume
r : ℝ
hnr : ↑(finrank ℝ E) < r
hr : 0 < r
h_meas : Measurable fun ω => (1 + ‖ω‖) ^ (-r)
⊢ ∫⁻ (x : E), ENNReal.ofReal ((1 + ‖x‖) ^ (-r)) < ⊤
[PROOFSTEP]
have h_pos : ∀ x : E, 0 ≤ (1 + ‖x‖) ^ (-r) := fun x ↦ by positivity
[GOAL]
E : Type u_1
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : MeasureSpace E
inst✝¹ : BorelSpace E
inst✝ : Measure.IsAddHaarMeasure volume
r : ℝ
hnr : ↑(finrank ℝ E) < r
hr : 0 < r
h_meas : Measurable fun ω => (1 + ‖ω‖) ^ (-r)
x : E
⊢ 0 ≤ (1 + ‖x‖) ^ (-r)
[PROOFSTEP]
positivity
[GOAL]
E : Type u_1
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : MeasureSpace E
inst✝¹ : BorelSpace E
inst✝ : Measure.IsAddHaarMeasure volume
r : ℝ
hnr : ↑(finrank ℝ E) < r
hr : 0 < r
h_meas : Measurable fun ω => (1 + ‖ω‖) ^ (-r)
h_pos : ∀ (x : E), 0 ≤ (1 + ‖x‖) ^ (-r)
⊢ ∫⁻ (x : E), ENNReal.ofReal ((1 + ‖x‖) ^ (-r)) < ⊤
[PROOFSTEP]
rw [lintegral_eq_lintegral_meas_le volume h_pos h_meas]
[GOAL]
E : Type u_1
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : MeasureSpace E
inst✝¹ : BorelSpace E
inst✝ : Measure.IsAddHaarMeasure volume
r : ℝ
hnr : ↑(finrank ℝ E) < r
hr : 0 < r
h_meas : Measurable fun ω => (1 + ‖ω‖) ^ (-r)
h_pos : ∀ (x : E), 0 ≤ (1 + ‖x‖) ^ (-r)
⊢ ∫⁻ (t : ℝ) in Ioi 0, ↑↑volume {a | t ≤ (1 + ‖a‖) ^ (-r)} < ⊤
[PROOFSTEP]
have h_int : ∀ t, 0 < t → volume {a : E | t ≤ (1 + ‖a‖) ^ (-r)} = volume (Metric.closedBall (0 : E) (t ^ (-r⁻¹) - 1)) :=
  fun t ht ↦ by
  congr 1
  ext x
  simp only [mem_setOf_eq, mem_closedBall_zero_iff]
  exact le_rpow_one_add_norm_iff_norm_le hr (mem_Ioi.mp ht) x
[GOAL]
E : Type u_1
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : MeasureSpace E
inst✝¹ : BorelSpace E
inst✝ : Measure.IsAddHaarMeasure volume
r : ℝ
hnr : ↑(finrank ℝ E) < r
hr : 0 < r
h_meas : Measurable fun ω => (1 + ‖ω‖) ^ (-r)
h_pos : ∀ (x : E), 0 ≤ (1 + ‖x‖) ^ (-r)
t : ℝ
ht : 0 < t
⊢ ↑↑volume {a | t ≤ (1 + ‖a‖) ^ (-r)} = ↑↑volume (Metric.closedBall 0 (t ^ (-r⁻¹) - 1))
[PROOFSTEP]
congr 1
[GOAL]
case e_a
E : Type u_1
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : MeasureSpace E
inst✝¹ : BorelSpace E
inst✝ : Measure.IsAddHaarMeasure volume
r : ℝ
hnr : ↑(finrank ℝ E) < r
hr : 0 < r
h_meas : Measurable fun ω => (1 + ‖ω‖) ^ (-r)
h_pos : ∀ (x : E), 0 ≤ (1 + ‖x‖) ^ (-r)
t : ℝ
ht : 0 < t
⊢ {a | t ≤ (1 + ‖a‖) ^ (-r)} = Metric.closedBall 0 (t ^ (-r⁻¹) - 1)
[PROOFSTEP]
ext x
[GOAL]
case e_a.h
E : Type u_1
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : MeasureSpace E
inst✝¹ : BorelSpace E
inst✝ : Measure.IsAddHaarMeasure volume
r : ℝ
hnr : ↑(finrank ℝ E) < r
hr : 0 < r
h_meas : Measurable fun ω => (1 + ‖ω‖) ^ (-r)
h_pos : ∀ (x : E), 0 ≤ (1 + ‖x‖) ^ (-r)
t : ℝ
ht : 0 < t
x : E
⊢ x ∈ {a | t ≤ (1 + ‖a‖) ^ (-r)} ↔ x ∈ Metric.closedBall 0 (t ^ (-r⁻¹) - 1)
[PROOFSTEP]
simp only [mem_setOf_eq, mem_closedBall_zero_iff]
[GOAL]
case e_a.h
E : Type u_1
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : MeasureSpace E
inst✝¹ : BorelSpace E
inst✝ : Measure.IsAddHaarMeasure volume
r : ℝ
hnr : ↑(finrank ℝ E) < r
hr : 0 < r
h_meas : Measurable fun ω => (1 + ‖ω‖) ^ (-r)
h_pos : ∀ (x : E), 0 ≤ (1 + ‖x‖) ^ (-r)
t : ℝ
ht : 0 < t
x : E
⊢ t ≤ (1 + ‖x‖) ^ (-r) ↔ ‖x‖ ≤ t ^ (-r⁻¹) - 1
[PROOFSTEP]
exact le_rpow_one_add_norm_iff_norm_le hr (mem_Ioi.mp ht) x
[GOAL]
E : Type u_1
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : MeasureSpace E
inst✝¹ : BorelSpace E
inst✝ : Measure.IsAddHaarMeasure volume
r : ℝ
hnr : ↑(finrank ℝ E) < r
hr : 0 < r
h_meas : Measurable fun ω => (1 + ‖ω‖) ^ (-r)
h_pos : ∀ (x : E), 0 ≤ (1 + ‖x‖) ^ (-r)
h_int : ∀ (t : ℝ), 0 < t → ↑↑volume {a | t ≤ (1 + ‖a‖) ^ (-r)} = ↑↑volume (Metric.closedBall 0 (t ^ (-r⁻¹) - 1))
⊢ ∫⁻ (t : ℝ) in Ioi 0, ↑↑volume {a | t ≤ (1 + ‖a‖) ^ (-r)} < ⊤
[PROOFSTEP]
rw [set_lintegral_congr_fun measurableSet_Ioi (eventually_of_forall h_int)]
[GOAL]
E : Type u_1
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : MeasureSpace E
inst✝¹ : BorelSpace E
inst✝ : Measure.IsAddHaarMeasure volume
r : ℝ
hnr : ↑(finrank ℝ E) < r
hr : 0 < r
h_meas : Measurable fun ω => (1 + ‖ω‖) ^ (-r)
h_pos : ∀ (x : E), 0 ≤ (1 + ‖x‖) ^ (-r)
h_int : ∀ (t : ℝ), 0 < t → ↑↑volume {a | t ≤ (1 + ‖a‖) ^ (-r)} = ↑↑volume (Metric.closedBall 0 (t ^ (-r⁻¹) - 1))
⊢ ∫⁻ (x : ℝ) in Ioi 0, ↑↑volume (Metric.closedBall 0 (x ^ (-r⁻¹) - 1)) < ⊤
[PROOFSTEP]
set f := fun t : ℝ ↦ volume (Metric.closedBall (0 : E) (t ^ (-r⁻¹) - 1))
[GOAL]
E : Type u_1
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : MeasureSpace E
inst✝¹ : BorelSpace E
inst✝ : Measure.IsAddHaarMeasure volume
r : ℝ
hnr : ↑(finrank ℝ E) < r
hr : 0 < r
h_meas : Measurable fun ω => (1 + ‖ω‖) ^ (-r)
h_pos : ∀ (x : E), 0 ≤ (1 + ‖x‖) ^ (-r)
h_int : ∀ (t : ℝ), 0 < t → ↑↑volume {a | t ≤ (1 + ‖a‖) ^ (-r)} = ↑↑volume (Metric.closedBall 0 (t ^ (-r⁻¹) - 1))
f : ℝ → ℝ≥0∞ := fun t => ↑↑volume (Metric.closedBall 0 (t ^ (-r⁻¹) - 1))
⊢ lintegral (Measure.restrict volume (Ioi 0)) f < ⊤
[PROOFSTEP]
set mB :=
  volume
    (Metric.ball (0 : E) 1)
      -- the next two inequalities are in fact equalities but we don't need that
[GOAL]
E : Type u_1
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : MeasureSpace E
inst✝¹ : BorelSpace E
inst✝ : Measure.IsAddHaarMeasure volume
r : ℝ
hnr : ↑(finrank ℝ E) < r
hr : 0 < r
h_meas : Measurable fun ω => (1 + ‖ω‖) ^ (-r)
h_pos : ∀ (x : E), 0 ≤ (1 + ‖x‖) ^ (-r)
h_int : ∀ (t : ℝ), 0 < t → ↑↑volume {a | t ≤ (1 + ‖a‖) ^ (-r)} = ↑↑volume (Metric.closedBall 0 (t ^ (-r⁻¹) - 1))
f : ℝ → ℝ≥0∞ := fun t => ↑↑volume (Metric.closedBall 0 (t ^ (-r⁻¹) - 1))
mB : ℝ≥0∞ := ↑↑volume (Metric.ball 0 1)
⊢ lintegral (Measure.restrict volume (Ioi 0)) f < ⊤
[PROOFSTEP]
calc
  ∫⁻ t in Ioi 0, f t ≤ ∫⁻ t in Ioc 0 1 ∪ Ioi 1, f t := lintegral_mono_set Ioi_subset_Ioc_union_Ioi
  _ ≤ (∫⁻ t in Ioc 0 1, f t) + ∫⁻ t in Ioi 1, f t := (lintegral_union_le _ _ _)
  _ < ∞ := ENNReal.add_lt_top.2 ⟨?_, ?_⟩
[GOAL]
case calc_1
E : Type u_1
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : MeasureSpace E
inst✝¹ : BorelSpace E
inst✝ : Measure.IsAddHaarMeasure volume
r : ℝ
hnr : ↑(finrank ℝ E) < r
hr : 0 < r
h_meas : Measurable fun ω => (1 + ‖ω‖) ^ (-r)
h_pos : ∀ (x : E), 0 ≤ (1 + ‖x‖) ^ (-r)
h_int : ∀ (t : ℝ), 0 < t → ↑↑volume {a | t ≤ (1 + ‖a‖) ^ (-r)} = ↑↑volume (Metric.closedBall 0 (t ^ (-r⁻¹) - 1))
f : ℝ → ℝ≥0∞ := fun t => ↑↑volume (Metric.closedBall 0 (t ^ (-r⁻¹) - 1))
mB : ℝ≥0∞ := ↑↑volume (Metric.ball 0 1)
⊢ ∫⁻ (t : ℝ) in Ioc 0 1, f t < ⊤
[PROOFSTEP]
have h_int' : ∀ t ∈ Ioc (0 : ℝ) 1, f t = ENNReal.ofReal ((t ^ (-r⁻¹) - 1) ^ finrank ℝ E) * mB := fun t ht ↦
  by
  refine' volume.addHaar_closedBall (0 : E) _
  rw [sub_nonneg]
  exact Real.one_le_rpow_of_pos_of_le_one_of_nonpos ht.1 ht.2 (by simp [hr.le])
[GOAL]
E : Type u_1
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : MeasureSpace E
inst✝¹ : BorelSpace E
inst✝ : Measure.IsAddHaarMeasure volume
r : ℝ
hnr : ↑(finrank ℝ E) < r
hr : 0 < r
h_meas : Measurable fun ω => (1 + ‖ω‖) ^ (-r)
h_pos : ∀ (x : E), 0 ≤ (1 + ‖x‖) ^ (-r)
h_int : ∀ (t : ℝ), 0 < t → ↑↑volume {a | t ≤ (1 + ‖a‖) ^ (-r)} = ↑↑volume (Metric.closedBall 0 (t ^ (-r⁻¹) - 1))
f : ℝ → ℝ≥0∞ := fun t => ↑↑volume (Metric.closedBall 0 (t ^ (-r⁻¹) - 1))
mB : ℝ≥0∞ := ↑↑volume (Metric.ball 0 1)
t : ℝ
ht : t ∈ Ioc 0 1
⊢ f t = ENNReal.ofReal ((t ^ (-r⁻¹) - 1) ^ finrank ℝ E) * mB
[PROOFSTEP]
refine' volume.addHaar_closedBall (0 : E) _
[GOAL]
E : Type u_1
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : MeasureSpace E
inst✝¹ : BorelSpace E
inst✝ : Measure.IsAddHaarMeasure volume
r : ℝ
hnr : ↑(finrank ℝ E) < r
hr : 0 < r
h_meas : Measurable fun ω => (1 + ‖ω‖) ^ (-r)
h_pos : ∀ (x : E), 0 ≤ (1 + ‖x‖) ^ (-r)
h_int : ∀ (t : ℝ), 0 < t → ↑↑volume {a | t ≤ (1 + ‖a‖) ^ (-r)} = ↑↑volume (Metric.closedBall 0 (t ^ (-r⁻¹) - 1))
f : ℝ → ℝ≥0∞ := fun t => ↑↑volume (Metric.closedBall 0 (t ^ (-r⁻¹) - 1))
mB : ℝ≥0∞ := ↑↑volume (Metric.ball 0 1)
t : ℝ
ht : t ∈ Ioc 0 1
⊢ 0 ≤ t ^ (-r⁻¹) - 1
[PROOFSTEP]
rw [sub_nonneg]
[GOAL]
E : Type u_1
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : MeasureSpace E
inst✝¹ : BorelSpace E
inst✝ : Measure.IsAddHaarMeasure volume
r : ℝ
hnr : ↑(finrank ℝ E) < r
hr : 0 < r
h_meas : Measurable fun ω => (1 + ‖ω‖) ^ (-r)
h_pos : ∀ (x : E), 0 ≤ (1 + ‖x‖) ^ (-r)
h_int : ∀ (t : ℝ), 0 < t → ↑↑volume {a | t ≤ (1 + ‖a‖) ^ (-r)} = ↑↑volume (Metric.closedBall 0 (t ^ (-r⁻¹) - 1))
f : ℝ → ℝ≥0∞ := fun t => ↑↑volume (Metric.closedBall 0 (t ^ (-r⁻¹) - 1))
mB : ℝ≥0∞ := ↑↑volume (Metric.ball 0 1)
t : ℝ
ht : t ∈ Ioc 0 1
⊢ 1 ≤ t ^ (-r⁻¹)
[PROOFSTEP]
exact Real.one_le_rpow_of_pos_of_le_one_of_nonpos ht.1 ht.2 (by simp [hr.le])
[GOAL]
E : Type u_1
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : MeasureSpace E
inst✝¹ : BorelSpace E
inst✝ : Measure.IsAddHaarMeasure volume
r : ℝ
hnr : ↑(finrank ℝ E) < r
hr : 0 < r
h_meas : Measurable fun ω => (1 + ‖ω‖) ^ (-r)
h_pos : ∀ (x : E), 0 ≤ (1 + ‖x‖) ^ (-r)
h_int : ∀ (t : ℝ), 0 < t → ↑↑volume {a | t ≤ (1 + ‖a‖) ^ (-r)} = ↑↑volume (Metric.closedBall 0 (t ^ (-r⁻¹) - 1))
f : ℝ → ℝ≥0∞ := fun t => ↑↑volume (Metric.closedBall 0 (t ^ (-r⁻¹) - 1))
mB : ℝ≥0∞ := ↑↑volume (Metric.ball 0 1)
t : ℝ
ht : t ∈ Ioc 0 1
⊢ -r⁻¹ ≤ 0
[PROOFSTEP]
simp [hr.le]
[GOAL]
case calc_1
E : Type u_1
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : MeasureSpace E
inst✝¹ : BorelSpace E
inst✝ : Measure.IsAddHaarMeasure volume
r : ℝ
hnr : ↑(finrank ℝ E) < r
hr : 0 < r
h_meas : Measurable fun ω => (1 + ‖ω‖) ^ (-r)
h_pos : ∀ (x : E), 0 ≤ (1 + ‖x‖) ^ (-r)
h_int : ∀ (t : ℝ), 0 < t → ↑↑volume {a | t ≤ (1 + ‖a‖) ^ (-r)} = ↑↑volume (Metric.closedBall 0 (t ^ (-r⁻¹) - 1))
f : ℝ → ℝ≥0∞ := fun t => ↑↑volume (Metric.closedBall 0 (t ^ (-r⁻¹) - 1))
mB : ℝ≥0∞ := ↑↑volume (Metric.ball 0 1)
h_int' : ∀ (t : ℝ), t ∈ Ioc 0 1 → f t = ENNReal.ofReal ((t ^ (-r⁻¹) - 1) ^ finrank ℝ E) * mB
⊢ ∫⁻ (t : ℝ) in Ioc 0 1, f t < ⊤
[PROOFSTEP]
rw [set_lintegral_congr_fun measurableSet_Ioc (ae_of_all _ h_int'), lintegral_mul_const' _ _ measure_ball_lt_top.ne]
[GOAL]
case calc_1
E : Type u_1
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : MeasureSpace E
inst✝¹ : BorelSpace E
inst✝ : Measure.IsAddHaarMeasure volume
r : ℝ
hnr : ↑(finrank ℝ E) < r
hr : 0 < r
h_meas : Measurable fun ω => (1 + ‖ω‖) ^ (-r)
h_pos : ∀ (x : E), 0 ≤ (1 + ‖x‖) ^ (-r)
h_int : ∀ (t : ℝ), 0 < t → ↑↑volume {a | t ≤ (1 + ‖a‖) ^ (-r)} = ↑↑volume (Metric.closedBall 0 (t ^ (-r⁻¹) - 1))
f : ℝ → ℝ≥0∞ := fun t => ↑↑volume (Metric.closedBall 0 (t ^ (-r⁻¹) - 1))
mB : ℝ≥0∞ := ↑↑volume (Metric.ball 0 1)
h_int' : ∀ (t : ℝ), t ∈ Ioc 0 1 → f t = ENNReal.ofReal ((t ^ (-r⁻¹) - 1) ^ finrank ℝ E) * mB
⊢ (∫⁻ (a : ℝ) in Ioc 0 1, ENNReal.ofReal ((a ^ (-r⁻¹) - 1) ^ finrank ℝ E)) * ↑↑volume (Metric.ball 0 1) < ⊤
[PROOFSTEP]
exact ENNReal.mul_lt_top (finite_integral_rpow_sub_one_pow_aux (finrank ℝ E) hnr).ne measure_ball_lt_top.ne
[GOAL]
case calc_2
E : Type u_1
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : MeasureSpace E
inst✝¹ : BorelSpace E
inst✝ : Measure.IsAddHaarMeasure volume
r : ℝ
hnr : ↑(finrank ℝ E) < r
hr : 0 < r
h_meas : Measurable fun ω => (1 + ‖ω‖) ^ (-r)
h_pos : ∀ (x : E), 0 ≤ (1 + ‖x‖) ^ (-r)
h_int : ∀ (t : ℝ), 0 < t → ↑↑volume {a | t ≤ (1 + ‖a‖) ^ (-r)} = ↑↑volume (Metric.closedBall 0 (t ^ (-r⁻¹) - 1))
f : ℝ → ℝ≥0∞ := fun t => ↑↑volume (Metric.closedBall 0 (t ^ (-r⁻¹) - 1))
mB : ℝ≥0∞ := ↑↑volume (Metric.ball 0 1)
⊢ ∫⁻ (t : ℝ) in Ioi 1, f t < ⊤
[PROOFSTEP]
have h_int'' : ∀ t ∈ Ioi (1 : ℝ), f t = 0 := fun t ht => by
  simp only [closedBall_rpow_sub_one_eq_empty_aux E hr ht, measure_empty]
    -- The integral over the constant zero function is finite:
[GOAL]
E : Type u_1
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : MeasureSpace E
inst✝¹ : BorelSpace E
inst✝ : Measure.IsAddHaarMeasure volume
r : ℝ
hnr : ↑(finrank ℝ E) < r
hr : 0 < r
h_meas : Measurable fun ω => (1 + ‖ω‖) ^ (-r)
h_pos : ∀ (x : E), 0 ≤ (1 + ‖x‖) ^ (-r)
h_int : ∀ (t : ℝ), 0 < t → ↑↑volume {a | t ≤ (1 + ‖a‖) ^ (-r)} = ↑↑volume (Metric.closedBall 0 (t ^ (-r⁻¹) - 1))
f : ℝ → ℝ≥0∞ := fun t => ↑↑volume (Metric.closedBall 0 (t ^ (-r⁻¹) - 1))
mB : ℝ≥0∞ := ↑↑volume (Metric.ball 0 1)
t : ℝ
ht : t ∈ Ioi 1
⊢ f t = 0
[PROOFSTEP]
simp only [closedBall_rpow_sub_one_eq_empty_aux E hr ht, measure_empty]
  -- The integral over the constant zero function is finite:
[GOAL]
case calc_2
E : Type u_1
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : MeasureSpace E
inst✝¹ : BorelSpace E
inst✝ : Measure.IsAddHaarMeasure volume
r : ℝ
hnr : ↑(finrank ℝ E) < r
hr : 0 < r
h_meas : Measurable fun ω => (1 + ‖ω‖) ^ (-r)
h_pos : ∀ (x : E), 0 ≤ (1 + ‖x‖) ^ (-r)
h_int : ∀ (t : ℝ), 0 < t → ↑↑volume {a | t ≤ (1 + ‖a‖) ^ (-r)} = ↑↑volume (Metric.closedBall 0 (t ^ (-r⁻¹) - 1))
f : ℝ → ℝ≥0∞ := fun t => ↑↑volume (Metric.closedBall 0 (t ^ (-r⁻¹) - 1))
mB : ℝ≥0∞ := ↑↑volume (Metric.ball 0 1)
h_int'' : ∀ (t : ℝ), t ∈ Ioi 1 → f t = 0
⊢ ∫⁻ (t : ℝ) in Ioi 1, f t < ⊤
[PROOFSTEP]
rw [set_lintegral_congr_fun measurableSet_Ioi (ae_of_all volume <| h_int''), lintegral_const 0, zero_mul]
[GOAL]
case calc_2
E : Type u_1
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : MeasureSpace E
inst✝¹ : BorelSpace E
inst✝ : Measure.IsAddHaarMeasure volume
r : ℝ
hnr : ↑(finrank ℝ E) < r
hr : 0 < r
h_meas : Measurable fun ω => (1 + ‖ω‖) ^ (-r)
h_pos : ∀ (x : E), 0 ≤ (1 + ‖x‖) ^ (-r)
h_int : ∀ (t : ℝ), 0 < t → ↑↑volume {a | t ≤ (1 + ‖a‖) ^ (-r)} = ↑↑volume (Metric.closedBall 0 (t ^ (-r⁻¹) - 1))
f : ℝ → ℝ≥0∞ := fun t => ↑↑volume (Metric.closedBall 0 (t ^ (-r⁻¹) - 1))
mB : ℝ≥0∞ := ↑↑volume (Metric.ball 0 1)
h_int'' : ∀ (t : ℝ), t ∈ Ioi 1 → f t = 0
⊢ 0 < ⊤
[PROOFSTEP]
exact WithTop.zero_lt_top
[GOAL]
E : Type u_1
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : MeasureSpace E
inst✝¹ : BorelSpace E
inst✝ : Measure.IsAddHaarMeasure volume
r : ℝ
hnr : ↑(finrank ℝ E) < r
⊢ Integrable fun x => (1 + ‖x‖) ^ (-r)
[PROOFSTEP]
constructor
[GOAL]
case left
E : Type u_1
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : MeasureSpace E
inst✝¹ : BorelSpace E
inst✝ : Measure.IsAddHaarMeasure volume
r : ℝ
hnr : ↑(finrank ℝ E) < r
⊢ AEStronglyMeasurable (fun x => (1 + ‖x‖) ^ (-r)) volume
[PROOFSTEP]
exact ((measurable_norm.const_add _).pow_const _).aestronglyMeasurable
[GOAL]
case right
E : Type u_1
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : MeasureSpace E
inst✝¹ : BorelSpace E
inst✝ : Measure.IsAddHaarMeasure volume
r : ℝ
hnr : ↑(finrank ℝ E) < r
⊢ HasFiniteIntegral fun x => (1 + ‖x‖) ^ (-r)
[PROOFSTEP]
have : (∫⁻ a : E, ‖(1 + ‖a‖) ^ (-r)‖₊) = ∫⁻ a : E, ENNReal.ofReal ((1 + ‖a‖) ^ (-r)) :=
  lintegral_nnnorm_eq_of_nonneg fun _ => rpow_nonneg_of_nonneg (by positivity) _
[GOAL]
E : Type u_1
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : MeasureSpace E
inst✝¹ : BorelSpace E
inst✝ : Measure.IsAddHaarMeasure volume
r : ℝ
hnr : ↑(finrank ℝ E) < r
x✝ : E
⊢ 0 ≤ 1 + ‖x✝‖
[PROOFSTEP]
positivity
[GOAL]
case right
E : Type u_1
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : MeasureSpace E
inst✝¹ : BorelSpace E
inst✝ : Measure.IsAddHaarMeasure volume
r : ℝ
hnr : ↑(finrank ℝ E) < r
this : ∫⁻ (a : E), ↑‖(1 + ‖a‖) ^ (-r)‖₊ = ∫⁻ (a : E), ENNReal.ofReal ((1 + ‖a‖) ^ (-r))
⊢ HasFiniteIntegral fun x => (1 + ‖x‖) ^ (-r)
[PROOFSTEP]
rw [HasFiniteIntegral, this]
[GOAL]
case right
E : Type u_1
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : MeasureSpace E
inst✝¹ : BorelSpace E
inst✝ : Measure.IsAddHaarMeasure volume
r : ℝ
hnr : ↑(finrank ℝ E) < r
this : ∫⁻ (a : E), ↑‖(1 + ‖a‖) ^ (-r)‖₊ = ∫⁻ (a : E), ENNReal.ofReal ((1 + ‖a‖) ^ (-r))
⊢ ∫⁻ (a : E), ENNReal.ofReal ((1 + ‖a‖) ^ (-r)) < ⊤
[PROOFSTEP]
exact finite_integral_one_add_norm hnr
[GOAL]
E : Type u_1
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : MeasureSpace E
inst✝¹ : BorelSpace E
inst✝ : Measure.IsAddHaarMeasure volume
r : ℝ
hnr : ↑(finrank ℝ E) < r
⊢ Integrable fun x => (1 + ‖x‖ ^ 2) ^ (-r / 2)
[PROOFSTEP]
have hr : 0 < r := lt_of_le_of_lt (finrank ℝ E).cast_nonneg hnr
[GOAL]
E : Type u_1
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : MeasureSpace E
inst✝¹ : BorelSpace E
inst✝ : Measure.IsAddHaarMeasure volume
r : ℝ
hnr : ↑(finrank ℝ E) < r
hr : 0 < r
⊢ Integrable fun x => (1 + ‖x‖ ^ 2) ^ (-r / 2)
[PROOFSTEP]
refine ((integrable_one_add_norm hnr).const_mul <| (2 : ℝ) ^ (r / 2)).mono' ?_ (eventually_of_forall fun x => ?_)
[GOAL]
case refine_1
E : Type u_1
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : MeasureSpace E
inst✝¹ : BorelSpace E
inst✝ : Measure.IsAddHaarMeasure volume
r : ℝ
hnr : ↑(finrank ℝ E) < r
hr : 0 < r
⊢ AEStronglyMeasurable (fun x => (1 + ‖x‖ ^ 2) ^ (-r / 2)) volume
[PROOFSTEP]
exact (((measurable_id.norm.pow_const _).const_add _).pow_const _).aestronglyMeasurable
[GOAL]
case refine_2
E : Type u_1
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : MeasureSpace E
inst✝¹ : BorelSpace E
inst✝ : Measure.IsAddHaarMeasure volume
r : ℝ
hnr : ↑(finrank ℝ E) < r
hr : 0 < r
x : E
⊢ ‖(1 + ‖x‖ ^ 2) ^ (-r / 2)‖ ≤ 2 ^ (r / 2) * (1 + ‖x‖) ^ (-r)
[PROOFSTEP]
refine (abs_of_pos ?_).trans_le (rpow_neg_one_add_norm_sq_le x hr)
[GOAL]
case refine_2
E : Type u_1
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : MeasureSpace E
inst✝¹ : BorelSpace E
inst✝ : Measure.IsAddHaarMeasure volume
r : ℝ
hnr : ↑(finrank ℝ E) < r
hr : 0 < r
x : E
⊢ 0 < (1 + ‖x‖ ^ 2) ^ (-r / 2)
[PROOFSTEP]
positivity


[GOAL]
α : Type u
β : Type v
γ : Type w
a✝ : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
as : List α
⊢ length ((a :: as) {0 ↦ a✝}) = max (length (a :: as)) (0 + 1)
[PROOFSTEP]
rw [max_eq_left]
[GOAL]
α : Type u
β : Type v
γ : Type w
a✝ : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
as : List α
⊢ length ((a :: as) {0 ↦ a✝}) = length (a :: as)
[PROOFSTEP]
rfl
[GOAL]
α : Type u
β : Type v
γ : Type w
a✝ : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
as : List α
⊢ 0 + 1 ≤ length (a :: as)
[PROOFSTEP]
simp [Nat.le_add_right]
[GOAL]
α : Type u
β : Type v
γ : Type w
a✝ : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
as : List α
⊢ 1 ≤ Nat.succ (length as)
[PROOFSTEP]
exact Nat.succ_le_succ (Nat.zero_le _)
[GOAL]
α : Type u
β : Type v
γ : Type w
a : α
as as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
m : ℕ
⊢ length ([] {m + 1 ↦ a}) = max (length []) (m + 1 + 1)
[PROOFSTEP]
have := @length_set m []
[GOAL]
α : Type u
β : Type v
γ : Type w
a : α
as as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
m : ℕ
this : length ([] {m ↦ a}) = max (length []) (m + 1)
⊢ length ([] {m + 1 ↦ a}) = max (length []) (m + 1 + 1)
[PROOFSTEP]
simp [set, length, @length_set m, Nat.zero_max]
[GOAL]
α : Type u
β : Type v
γ : Type w
a : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
m : ℕ
head✝ : α
as : List α
⊢ length ((head✝ :: as) {m + 1 ↦ a}) = max (length (head✝ :: as)) (m + 1 + 1)
[PROOFSTEP]
simp [set, length, @length_set m, Nat.max_succ_succ]
[GOAL]
α : Type u
β : Type v
γ : Type w
a : α
as as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
k : ℕ
⊢ get k [] = default
[PROOFSTEP]
cases k
[GOAL]
case zero
α : Type u
β : Type v
γ : Type w
a : α
as as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
⊢ get Nat.zero [] = default
[PROOFSTEP]
rfl
[GOAL]
case succ
α : Type u
β : Type v
γ : Type w
a : α
as as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
n✝ : ℕ
⊢ get (Nat.succ n✝) [] = default
[PROOFSTEP]
rfl
[GOAL]
α : Type u
β : Type v
γ : Type w
a✝ : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
as : List α
h1 : length (a :: as) ≤ 0
⊢ get 0 (a :: as) = default
[PROOFSTEP]
cases h1
[GOAL]
α : Type u
β : Type v
γ : Type w
a : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
k : ℕ
head✝ : α
as : List α
h1 : length (head✝ :: as) ≤ k + 1
⊢ get (k + 1) (head✝ :: as) = default
[PROOFSTEP]
apply get_eq_default_of_le k
[GOAL]
α : Type u
β : Type v
γ : Type w
a : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
k : ℕ
head✝ : α
as : List α
h1 : length (head✝ :: as) ≤ k + 1
⊢ length as ≤ k
[PROOFSTEP]
rw [← Nat.succ_le_succ_iff]
[GOAL]
α : Type u
β : Type v
γ : Type w
a : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
k : ℕ
head✝ : α
as : List α
h1 : length (head✝ :: as) ≤ k + 1
⊢ Nat.succ (length as) ≤ Nat.succ k
[PROOFSTEP]
apply h1
[GOAL]
α : Type u
β : Type v
γ : Type w
a✝ : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
as : List α
⊢ get 0 (as {0 ↦ a}) = a
[PROOFSTEP]
cases as
[GOAL]
case nil
α : Type u
β : Type v
γ : Type w
a✝ : α
as as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
⊢ get 0 ([] {0 ↦ a}) = a
[PROOFSTEP]
rfl
[GOAL]
case cons
α : Type u
β : Type v
γ : Type w
a✝ : α
as as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a head✝ : α
tail✝ : List α
⊢ get 0 ((head✝ :: tail✝) {0 ↦ a}) = a
[PROOFSTEP]
rfl
[GOAL]
α : Type u
β : Type v
γ : Type w
a✝ : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
k : ℕ
as : List α
⊢ get (k + 1) (as {k + 1 ↦ a}) = a
[PROOFSTEP]
cases as
[GOAL]
case nil
α : Type u
β : Type v
γ : Type w
a✝ : α
as as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
k : ℕ
⊢ get (k + 1) ([] {k + 1 ↦ a}) = a
[PROOFSTEP]
simp [get_set]
[GOAL]
case cons
α : Type u
β : Type v
γ : Type w
a✝ : α
as as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
k : ℕ
head✝ : α
tail✝ : List α
⊢ get (k + 1) ((head✝ :: tail✝) {k + 1 ↦ a}) = a
[PROOFSTEP]
simp [get_set]
[GOAL]
α : Type u
β : Type v
γ : Type w
a✝ : α
as as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
h : a ∈ []
⊢ ∃ n, a = get n []
[PROOFSTEP]
cases h
[GOAL]
α : Type u
β : Type v
γ : Type w
a✝ : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a b : α
as : List α
h : a ∈ b :: as
⊢ ∃ n, a = get n (b :: as)
[PROOFSTEP]
rw [mem_cons] at h
[GOAL]
α : Type u
β : Type v
γ : Type w
a✝ : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a b : α
as : List α
h : a = b ∨ a ∈ as
⊢ ∃ n, a = get n (b :: as)
[PROOFSTEP]
cases h with
| inl h => exact ⟨0, h⟩
| inr h =>
  rcases eq_get_of_mem h with ⟨n, h⟩
  exact ⟨n + 1, h⟩
[GOAL]
α : Type u
β : Type v
γ : Type w
a✝ : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a b : α
as : List α
h : a = b ∨ a ∈ as
⊢ ∃ n, a = get n (b :: as)
[PROOFSTEP]
cases h with
| inl h => exact ⟨0, h⟩
| inr h =>
  rcases eq_get_of_mem h with ⟨n, h⟩
  exact ⟨n + 1, h⟩
[GOAL]
case inl
α : Type u
β : Type v
γ : Type w
a✝ : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a b : α
as : List α
h : a = b
⊢ ∃ n, a = get n (b :: as)
[PROOFSTEP]

| inl h => exact ⟨0, h⟩
[GOAL]
case inl
α : Type u
β : Type v
γ : Type w
a✝ : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a b : α
as : List α
h : a = b
⊢ ∃ n, a = get n (b :: as)
[PROOFSTEP]
exact ⟨0, h⟩
[GOAL]
case inr
α : Type u
β : Type v
γ : Type w
a✝ : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a b : α
as : List α
h : a ∈ as
⊢ ∃ n, a = get n (b :: as)
[PROOFSTEP]

| inr h =>
  rcases eq_get_of_mem h with ⟨n, h⟩
  exact ⟨n + 1, h⟩
[GOAL]
case inr
α : Type u
β : Type v
γ : Type w
a✝ : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a b : α
as : List α
h : a ∈ as
⊢ ∃ n, a = get n (b :: as)
[PROOFSTEP]
rcases eq_get_of_mem h with ⟨n, h⟩
[GOAL]
case inr.intro
α : Type u
β : Type v
γ : Type w
a✝ : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a b : α
as : List α
h✝ : a ∈ as
n : ℕ
h : a = get n as
⊢ ∃ n, a = get n (b :: as)
[PROOFSTEP]
exact ⟨n + 1, h⟩
[GOAL]
α : Type u
β : Type v
γ : Type w
a : α
as as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
x✝ : ℕ
h1 : x✝ < length []
⊢ get x✝ [] ∈ []
[PROOFSTEP]
cases h1
[GOAL]
α : Type u
β : Type v
γ : Type w
a✝ : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
as : List α
x✝ : 0 < length (a :: as)
⊢ get 0 (a :: as) ∈ a :: as
[PROOFSTEP]
rw [mem_cons]
[GOAL]
α : Type u
β : Type v
γ : Type w
a✝ : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
as : List α
x✝ : 0 < length (a :: as)
⊢ get 0 (a :: as) = a ∨ get 0 (a :: as) ∈ as
[PROOFSTEP]
exact Or.inl rfl
[GOAL]
α : Type u
β : Type v
γ : Type w
a✝ : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
n : ℕ
a : α
as : List α
h1 : n + 1 < length (a :: as)
⊢ get (n + 1) (a :: as) ∈ a :: as
[PROOFSTEP]
rw [mem_cons]
[GOAL]
α : Type u
β : Type v
γ : Type w
a✝ : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
n : ℕ
a : α
as : List α
h1 : n + 1 < length (a :: as)
⊢ get (n + 1) (a :: as) = a ∨ get (n + 1) (a :: as) ∈ as
[PROOFSTEP]
apply Or.inr
[GOAL]
case h
α : Type u
β : Type v
γ : Type w
a✝ : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
n : ℕ
a : α
as : List α
h1 : n + 1 < length (a :: as)
⊢ get (n + 1) (a :: as) ∈ as
[PROOFSTEP]
unfold get
[GOAL]
case h
α : Type u
β : Type v
γ : Type w
a✝ : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
n : ℕ
a : α
as : List α
h1 : n + 1 < length (a :: as)
⊢ get (Nat.add n 0) as ∈ as
[PROOFSTEP]
apply mem_get_of_le
[GOAL]
case h.a
α : Type u
β : Type v
γ : Type w
a✝ : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
n : ℕ
a : α
as : List α
h1 : n + 1 < length (a :: as)
⊢ Nat.add n 0 < length as
[PROOFSTEP]
apply Nat.lt_of_succ_lt_succ h1
[GOAL]
α : Type u
β : Type v
γ : Type w
a : α
as as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
x✝ : ℕ
h1 : get x✝ [] ≠ default
⊢ get x✝ [] ∈ []
[PROOFSTEP]
exfalso
[GOAL]
case h
α : Type u
β : Type v
γ : Type w
a : α
as as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
x✝ : ℕ
h1 : get x✝ [] ≠ default
⊢ False
[PROOFSTEP]
apply h1
[GOAL]
case h
α : Type u
β : Type v
γ : Type w
a : α
as as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
x✝ : ℕ
h1 : get x✝ [] ≠ default
⊢ get x✝ [] = default
[PROOFSTEP]
rw [get_nil]
[GOAL]
α : Type u
β : Type v
γ : Type w
a✝ : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
as : List α
x✝ : get 0 (a :: as) ≠ default
⊢ get 0 (a :: as) ∈ a :: as
[PROOFSTEP]
rw [mem_cons]
[GOAL]
α : Type u
β : Type v
γ : Type w
a✝ : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
as : List α
x✝ : get 0 (a :: as) ≠ default
⊢ get 0 (a :: as) = a ∨ get 0 (a :: as) ∈ as
[PROOFSTEP]
exact Or.inl rfl
[GOAL]
α : Type u
β : Type v
γ : Type w
a✝ : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
n : ℕ
a : α
as : List α
h1 : get (n + 1) (a :: as) ≠ default
⊢ get (n + 1) (a :: as) ∈ a :: as
[PROOFSTEP]
rw [mem_cons]
[GOAL]
α : Type u
β : Type v
γ : Type w
a✝ : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
n : ℕ
a : α
as : List α
h1 : get (n + 1) (a :: as) ≠ default
⊢ get (n + 1) (a :: as) = a ∨ get (n + 1) (a :: as) ∈ as
[PROOFSTEP]
unfold get
[GOAL]
α : Type u
β : Type v
γ : Type w
a✝ : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
n : ℕ
a : α
as : List α
h1 : get (n + 1) (a :: as) ≠ default
⊢ get (Nat.add n 0) as = a ∨ get (Nat.add n 0) as ∈ as
[PROOFSTEP]
apply Or.inr (mem_get_of_ne_zero _)
[GOAL]
α : Type u
β : Type v
γ : Type w
a✝ : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
n : ℕ
a : α
as : List α
h1 : get (n + 1) (a :: as) ≠ default
⊢ get (Nat.add n 0) as ≠ default
[PROOFSTEP]
apply h1
[GOAL]
α : Type u
β : Type v
γ : Type w
a✝ : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
as : List α
m : ℕ
h1 : m ≠ 0
⊢ get m (as {0 ↦ a}) = get m as
[PROOFSTEP]
cases m
[GOAL]
case zero
α : Type u
β : Type v
γ : Type w
a✝ : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
as : List α
h1 : Nat.zero ≠ 0
⊢ get Nat.zero (as {0 ↦ a}) = get Nat.zero as
case succ
α : Type u
β : Type v
γ : Type w
a✝ : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
as : List α
n✝ : ℕ
h1 : Nat.succ n✝ ≠ 0
⊢ get (Nat.succ n✝) (as {0 ↦ a}) = get (Nat.succ n✝) as
[PROOFSTEP]
contradiction
[GOAL]
case succ
α : Type u
β : Type v
γ : Type w
a✝ : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
as : List α
n✝ : ℕ
h1 : Nat.succ n✝ ≠ 0
⊢ get (Nat.succ n✝) (as {0 ↦ a}) = get (Nat.succ n✝) as
[PROOFSTEP]
cases as
[GOAL]
case succ.nil
α : Type u
β : Type v
γ : Type w
a✝ : α
as as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
n✝ : ℕ
h1 : Nat.succ n✝ ≠ 0
⊢ get (Nat.succ n✝) ([] {0 ↦ a}) = get (Nat.succ n✝) []
[PROOFSTEP]
simp only [set, get, get_nil]
[GOAL]
case succ.cons
α : Type u
β : Type v
γ : Type w
a✝ : α
as as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
n✝ : ℕ
h1 : Nat.succ n✝ ≠ 0
head✝ : α
tail✝ : List α
⊢ get (Nat.succ n✝) ((head✝ :: tail✝) {0 ↦ a}) = get (Nat.succ n✝) (head✝ :: tail✝)
[PROOFSTEP]
simp only [set, get, get_nil]
[GOAL]
α : Type u
β : Type v
γ : Type w
a✝ : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
as : List α
k m : ℕ
h1 : m ≠ k + 1
⊢ get m (as {k + 1 ↦ a}) = get m as
[PROOFSTEP]
cases as
[GOAL]
case nil
α : Type u
β : Type v
γ : Type w
a✝ : α
as as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
k m : ℕ
h1 : m ≠ k + 1
⊢ get m ([] {k + 1 ↦ a}) = get m []
[PROOFSTEP]
cases m
[GOAL]
case cons
α : Type u
β : Type v
γ : Type w
a✝ : α
as as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
k m : ℕ
h1 : m ≠ k + 1
head✝ : α
tail✝ : List α
⊢ get m ((head✝ :: tail✝) {k + 1 ↦ a}) = get m (head✝ :: tail✝)
[PROOFSTEP]
cases m
[GOAL]
case nil.zero
α : Type u
β : Type v
γ : Type w
a✝ : α
as as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
k : ℕ
h1 : Nat.zero ≠ k + 1
⊢ get Nat.zero ([] {k + 1 ↦ a}) = get Nat.zero []
case nil.succ
α : Type u
β : Type v
γ : Type w
a✝ : α
as as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
k n✝ : ℕ
h1 : Nat.succ n✝ ≠ k + 1
⊢ get (Nat.succ n✝) ([] {k + 1 ↦ a}) = get (Nat.succ n✝) []
case cons.zero
α : Type u
β : Type v
γ : Type w
a✝ : α
as as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
k : ℕ
head✝ : α
tail✝ : List α
h1 : Nat.zero ≠ k + 1
⊢ get Nat.zero ((head✝ :: tail✝) {k + 1 ↦ a}) = get Nat.zero (head✝ :: tail✝)
case cons.succ
α : Type u
β : Type v
γ : Type w
a✝ : α
as as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
k : ℕ
head✝ : α
tail✝ : List α
n✝ : ℕ
h1 : Nat.succ n✝ ≠ k + 1
⊢ get (Nat.succ n✝) ((head✝ :: tail✝) {k + 1 ↦ a}) = get (Nat.succ n✝) (head✝ :: tail✝)
[PROOFSTEP]
case nil => simp only [set, get]
[GOAL]
α : Type u
β : Type v
γ : Type w
a✝ : α
as as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
k : ℕ
h1 : Nat.zero ≠ k + 1
⊢ get Nat.zero ([] {k + 1 ↦ a}) = get Nat.zero []
[PROOFSTEP]
case nil => simp only [set, get]
[GOAL]
α : Type u
β : Type v
γ : Type w
a✝ : α
as as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
k : ℕ
h1 : Nat.zero ≠ k + 1
⊢ get Nat.zero ([] {k + 1 ↦ a}) = get Nat.zero []
[PROOFSTEP]
simp only [set, get]
[GOAL]
case nil.succ
α : Type u
β : Type v
γ : Type w
a✝ : α
as as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
k n✝ : ℕ
h1 : Nat.succ n✝ ≠ k + 1
⊢ get (Nat.succ n✝) ([] {k + 1 ↦ a}) = get (Nat.succ n✝) []
case cons.zero
α : Type u
β : Type v
γ : Type w
a✝ : α
as as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
k : ℕ
head✝ : α
tail✝ : List α
h1 : Nat.zero ≠ k + 1
⊢ get Nat.zero ((head✝ :: tail✝) {k + 1 ↦ a}) = get Nat.zero (head✝ :: tail✝)
case cons.succ
α : Type u
β : Type v
γ : Type w
a✝ : α
as as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
k : ℕ
head✝ : α
tail✝ : List α
n✝ : ℕ
h1 : Nat.succ n✝ ≠ k + 1
⊢ get (Nat.succ n✝) ((head✝ :: tail✝) {k + 1 ↦ a}) = get (Nat.succ n✝) (head✝ :: tail✝)
[PROOFSTEP]
case nil
  m =>
  have h3 : get m (nil {k ↦ a}) = default :=
    by
    rw [get_set_eq_of_ne k m, get_nil]
    intro hc
    apply h1
    simp [hc]
  apply h3
[GOAL]
α : Type u
β : Type v
γ : Type w
a✝ : α
as as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
k m : ℕ
h1 : Nat.succ m ≠ k + 1
⊢ get (Nat.succ m) ([] {k + 1 ↦ a}) = get (Nat.succ m) []
[PROOFSTEP]
case nil
  m =>
  have h3 : get m (nil {k ↦ a}) = default :=
    by
    rw [get_set_eq_of_ne k m, get_nil]
    intro hc
    apply h1
    simp [hc]
  apply h3
[GOAL]
α : Type u
β : Type v
γ : Type w
a✝ : α
as as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
k m : ℕ
h1 : Nat.succ m ≠ k + 1
⊢ get (Nat.succ m) ([] {k + 1 ↦ a}) = get (Nat.succ m) []
[PROOFSTEP]
have h3 : get m (nil {k ↦ a}) = default :=
  by
  rw [get_set_eq_of_ne k m, get_nil]
  intro hc
  apply h1
  simp [hc]
[GOAL]
α : Type u
β : Type v
γ : Type w
a✝ : α
as as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
k m : ℕ
h1 : Nat.succ m ≠ k + 1
⊢ get m ([] {k ↦ a}) = default
[PROOFSTEP]
rw [get_set_eq_of_ne k m, get_nil]
[GOAL]
α : Type u
β : Type v
γ : Type w
a✝ : α
as as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
k m : ℕ
h1 : Nat.succ m ≠ k + 1
⊢ m ≠ k
[PROOFSTEP]
intro hc
[GOAL]
α : Type u
β : Type v
γ : Type w
a✝ : α
as as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
k m : ℕ
h1 : Nat.succ m ≠ k + 1
hc : m = k
⊢ False
[PROOFSTEP]
apply h1
[GOAL]
α : Type u
β : Type v
γ : Type w
a✝ : α
as as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
k m : ℕ
h1 : Nat.succ m ≠ k + 1
hc : m = k
⊢ Nat.succ m = k + 1
[PROOFSTEP]
simp [hc]
[GOAL]
α : Type u
β : Type v
γ : Type w
a✝ : α
as as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
k m : ℕ
h1 : Nat.succ m ≠ k + 1
h3 : get m ([] {k ↦ a}) = default
⊢ get (Nat.succ m) ([] {k + 1 ↦ a}) = get (Nat.succ m) []
[PROOFSTEP]
apply h3
[GOAL]
case cons.zero
α : Type u
β : Type v
γ : Type w
a✝ : α
as as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
k : ℕ
head✝ : α
tail✝ : List α
h1 : Nat.zero ≠ k + 1
⊢ get Nat.zero ((head✝ :: tail✝) {k + 1 ↦ a}) = get Nat.zero (head✝ :: tail✝)
case cons.succ
α : Type u
β : Type v
γ : Type w
a✝ : α
as as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
k : ℕ
head✝ : α
tail✝ : List α
n✝ : ℕ
h1 : Nat.succ n✝ ≠ k + 1
⊢ get (Nat.succ n✝) ((head✝ :: tail✝) {k + 1 ↦ a}) = get (Nat.succ n✝) (head✝ :: tail✝)
[PROOFSTEP]
case zero => simp only [set, get]
[GOAL]
α : Type u
β : Type v
γ : Type w
a✝ : α
as as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
k : ℕ
head✝ : α
tail✝ : List α
h1 : Nat.zero ≠ k + 1
⊢ get Nat.zero ((head✝ :: tail✝) {k + 1 ↦ a}) = get Nat.zero (head✝ :: tail✝)
[PROOFSTEP]
case zero => simp only [set, get]
[GOAL]
α : Type u
β : Type v
γ : Type w
a✝ : α
as as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
k : ℕ
head✝ : α
tail✝ : List α
h1 : Nat.zero ≠ k + 1
⊢ get Nat.zero ((head✝ :: tail✝) {k + 1 ↦ a}) = get Nat.zero (head✝ :: tail✝)
[PROOFSTEP]
simp only [set, get]
[GOAL]
case cons.succ
α : Type u
β : Type v
γ : Type w
a✝ : α
as as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
k : ℕ
head✝ : α
tail✝ : List α
n✝ : ℕ
h1 : Nat.succ n✝ ≠ k + 1
⊢ get (Nat.succ n✝) ((head✝ :: tail✝) {k + 1 ↦ a}) = get (Nat.succ n✝) (head✝ :: tail✝)
[PROOFSTEP]
case _ _ m =>
  apply get_set_eq_of_ne k m
  intro hc
  apply h1
  simp [hc]
[GOAL]
α : Type u
β : Type v
γ : Type w
a✝ : α
as as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
k : ℕ
head✝ : α
tail✝ : List α
m : ℕ
h1 : Nat.succ m ≠ k + 1
⊢ get (Nat.succ m) ((head✝ :: tail✝) {k + 1 ↦ a}) = get (Nat.succ m) (head✝ :: tail✝)
[PROOFSTEP]
case _ _ m =>
  apply get_set_eq_of_ne k m
  intro hc
  apply h1
  simp [hc]
[GOAL]
α : Type u
β : Type v
γ : Type w
a✝ : α
as as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
k : ℕ
head✝ : α
tail✝ : List α
m : ℕ
h1 : Nat.succ m ≠ k + 1
⊢ get (Nat.succ m) ((head✝ :: tail✝) {k + 1 ↦ a}) = get (Nat.succ m) (head✝ :: tail✝)
[PROOFSTEP]
apply get_set_eq_of_ne k m
[GOAL]
α : Type u
β : Type v
γ : Type w
a✝ : α
as as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
k : ℕ
head✝ : α
tail✝ : List α
m : ℕ
h1 : Nat.succ m ≠ k + 1
⊢ m ≠ k
[PROOFSTEP]
intro hc
[GOAL]
α : Type u
β : Type v
γ : Type w
a✝ : α
as as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
k : ℕ
head✝ : α
tail✝ : List α
m : ℕ
h1 : Nat.succ m ≠ k + 1
hc : m = k
⊢ False
[PROOFSTEP]
apply h1
[GOAL]
α : Type u
β : Type v
γ : Type w
a✝ : α
as as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a : α
k : ℕ
head✝ : α
tail✝ : List α
m : ℕ
h1 : Nat.succ m ≠ k + 1
hc : m = k
⊢ Nat.succ m = k + 1
[PROOFSTEP]
simp [hc]
[GOAL]
α : Type u
β : Type v
γ : Type w
a : α
as as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
f : α → β
x✝ : ℕ
h : x✝ < length []
⊢ get x✝ (map f []) = f (get x✝ [])
[PROOFSTEP]
cases h
[GOAL]
α : Type u
β : Type v
γ : Type w
a : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
f : α → β
n : ℕ
head✝ : α
as : List α
h1 : n + 1 < length (head✝ :: as)
⊢ get (n + 1) (map f (head✝ :: as)) = f (get (n + 1) (head✝ :: as))
[PROOFSTEP]
have h2 : n < length as := by
  rw [← Nat.succ_le_iff, ← Nat.lt_succ_iff]
  apply h1
[GOAL]
α : Type u
β : Type v
γ : Type w
a : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
f : α → β
n : ℕ
head✝ : α
as : List α
h1 : n + 1 < length (head✝ :: as)
⊢ n < length as
[PROOFSTEP]
rw [← Nat.succ_le_iff, ← Nat.lt_succ_iff]
[GOAL]
α : Type u
β : Type v
γ : Type w
a : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
f : α → β
n : ℕ
head✝ : α
as : List α
h1 : n + 1 < length (head✝ :: as)
⊢ Nat.succ n < Nat.succ (length as)
[PROOFSTEP]
apply h1
[GOAL]
α : Type u
β : Type v
γ : Type w
a : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
f : α → β
n : ℕ
head✝ : α
as : List α
h1 : n + 1 < length (head✝ :: as)
h2 : n < length as
⊢ get (n + 1) (map f (head✝ :: as)) = f (get (n + 1) (head✝ :: as))
[PROOFSTEP]
apply get_map h2
[GOAL]
α : Type u
β : Type v
γ : Type w
a : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
f : α → β
n : ℕ
as : List α
⊢ f default = default → get n (map f as) = f (get n as)
[PROOFSTEP]
intro h1
[GOAL]
α : Type u
β : Type v
γ : Type w
a : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
f : α → β
n : ℕ
as : List α
h1 : f default = default
⊢ get n (map f as) = f (get n as)
[PROOFSTEP]
by_cases h2 : n < as.length
[GOAL]
case pos
α : Type u
β : Type v
γ : Type w
a : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
f : α → β
n : ℕ
as : List α
h1 : f default = default
h2 : n < length as
⊢ get n (map f as) = f (get n as)
[PROOFSTEP]
apply get_map h2
[GOAL]
case neg
α : Type u
β : Type v
γ : Type w
a : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
f : α → β
n : ℕ
as : List α
h1 : f default = default
h2 : ¬n < length as
⊢ get n (map f as) = f (get n as)
[PROOFSTEP]
rw [not_lt] at h2
[GOAL]
case neg
α : Type u
β : Type v
γ : Type w
a : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
f : α → β
n : ℕ
as : List α
h1 : f default = default
h2 : length as ≤ n
⊢ get n (map f as) = f (get n as)
[PROOFSTEP]
rw [get_eq_default_of_le _ h2, get_eq_default_of_le, h1]
[GOAL]
case neg.a
α : Type u
β : Type v
γ : Type w
a : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
f : α → β
n : ℕ
as : List α
h1 : f default = default
h2 : length as ≤ n
⊢ length (map f as) ≤ n
[PROOFSTEP]
rw [length_map]
[GOAL]
case neg.a
α : Type u
β : Type v
γ : Type w
a : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
f : α → β
n : ℕ
as : List α
h1 : f default = default
h2 : length as ≤ n
⊢ length as ≤ n
[PROOFSTEP]
apply h2
[GOAL]
α : Type u
β : Type v
γ : Type w
a : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
as : List α
p : α → Prop
⊢ p default → (∀ (x : α), x ∈ as → p x) → ∀ (n : ℕ), p (get n as)
[PROOFSTEP]
intro h1 h2 n
[GOAL]
α : Type u
β : Type v
γ : Type w
a : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
as : List α
p : α → Prop
h1 : p default
h2 : ∀ (x : α), x ∈ as → p x
n : ℕ
⊢ p (get n as)
[PROOFSTEP]
by_cases h3 : n < as.length
[GOAL]
case pos
α : Type u
β : Type v
γ : Type w
a : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
as : List α
p : α → Prop
h1 : p default
h2 : ∀ (x : α), x ∈ as → p x
n : ℕ
h3 : n < length as
⊢ p (get n as)
[PROOFSTEP]
apply h2 _ (mem_get_of_le h3)
[GOAL]
case neg
α : Type u
β : Type v
γ : Type w
a : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
as : List α
p : α → Prop
h1 : p default
h2 : ∀ (x : α), x ∈ as → p x
n : ℕ
h3 : ¬n < length as
⊢ p (get n as)
[PROOFSTEP]
rw [not_lt] at h3
[GOAL]
case neg
α : Type u
β : Type v
γ : Type w
a : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
as : List α
p : α → Prop
h1 : p default
h2 : ∀ (x : α), x ∈ as → p x
n : ℕ
h3 : length as ≤ n
⊢ p (get n as)
[PROOFSTEP]
rw [get_eq_default_of_le _ h3]
[GOAL]
case neg
α : Type u
β : Type v
γ : Type w
a : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
as : List α
p : α → Prop
h1 : p default
h2 : ∀ (x : α), x ∈ as → p x
n : ℕ
h3 : length as ≤ n
⊢ p default
[PROOFSTEP]
apply h1
[GOAL]
α : Type u
β : Type v
γ : Type w
a : α
as as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
⊢ as1 = as2 → Equiv as1 as2
[PROOFSTEP]
intro h1
[GOAL]
α : Type u
β : Type v
γ : Type w
a : α
as as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
h1 : as1 = as2
⊢ Equiv as1 as2
[PROOFSTEP]
rw [h1]
[GOAL]
α : Type u
β : Type v
γ : Type w
a : α
as as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
h1 : as1 = as2
⊢ Equiv as2 as2
[PROOFSTEP]
apply equiv_refl
[GOAL]
α : Type u
β : Type v
γ : Type w
a : α
as as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
head✝ : α
tail✝ : List α
h1 : length (head✝ :: tail✝) = length []
x✝ : Equiv (head✝ :: tail✝) []
⊢ head✝ :: tail✝ = []
[PROOFSTEP]
cases h1
[GOAL]
α : Type u
β : Type v
γ : Type w
a : α
as as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
head✝ : α
tail✝ : List α
h1 : length [] = length (head✝ :: tail✝)
x✝ : Equiv [] (head✝ :: tail✝)
⊢ [] = head✝ :: tail✝
[PROOFSTEP]
cases h1
[GOAL]
α : Type u
β : Type v
γ : Type w
a : α
as as1✝ as2✝ as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a1 : α
as1 : List α
a2 : α
as2 : List α
h1 : length (a1 :: as1) = length (a2 :: as2)
h2 : Equiv (a1 :: as1) (a2 :: as2)
⊢ a1 :: as1 = a2 :: as2
[PROOFSTEP]
congr
[GOAL]
case e_head
α : Type u
β : Type v
γ : Type w
a : α
as as1✝ as2✝ as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a1 : α
as1 : List α
a2 : α
as2 : List α
h1 : length (a1 :: as1) = length (a2 :: as2)
h2 : Equiv (a1 :: as1) (a2 :: as2)
⊢ a1 = a2
[PROOFSTEP]
apply h2 0
[GOAL]
case e_tail
α : Type u
β : Type v
γ : Type w
a : α
as as1✝ as2✝ as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a1 : α
as1 : List α
a2 : α
as2 : List α
h1 : length (a1 :: as1) = length (a2 :: as2)
h2 : Equiv (a1 :: as1) (a2 :: as2)
⊢ as1 = as2
[PROOFSTEP]
have h3 : as1.length = as2.length := by simpa [add_left_inj, add_comm, length] using h1
[GOAL]
α : Type u
β : Type v
γ : Type w
a : α
as as1✝ as2✝ as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a1 : α
as1 : List α
a2 : α
as2 : List α
h1 : length (a1 :: as1) = length (a2 :: as2)
h2 : Equiv (a1 :: as1) (a2 :: as2)
⊢ length as1 = length as2
[PROOFSTEP]
simpa [add_left_inj, add_comm, length] using h1
[GOAL]
case e_tail
α : Type u
β : Type v
γ : Type w
a : α
as as1✝ as2✝ as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a1 : α
as1 : List α
a2 : α
as2 : List α
h1 : length (a1 :: as1) = length (a2 :: as2)
h2 : Equiv (a1 :: as1) (a2 :: as2)
h3 : length as1 = length as2
⊢ as1 = as2
[PROOFSTEP]
apply eq_of_equiv h3
[GOAL]
case e_tail
α : Type u
β : Type v
γ : Type w
a : α
as as1✝ as2✝ as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a1 : α
as1 : List α
a2 : α
as2 : List α
h1 : length (a1 :: as1) = length (a2 :: as2)
h2 : Equiv (a1 :: as1) (a2 :: as2)
h3 : length as1 = length as2
⊢ Equiv as1 as2
[PROOFSTEP]
intro m
[GOAL]
case e_tail
α : Type u
β : Type v
γ : Type w
a : α
as as1✝ as2✝ as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a1 : α
as1 : List α
a2 : α
as2 : List α
h1 : length (a1 :: as1) = length (a2 :: as2)
h2 : Equiv (a1 :: as1) (a2 :: as2)
h3 : length as1 = length as2
m : ℕ
⊢ get m as1 = get m as2
[PROOFSTEP]
apply h2 (m + 1)
[GOAL]
α : Type u
β : Type v
γ : Type w
inst✝ : AddGroup α
k : ℕ
as : List α
⊢ get k (neg as) = -get k as
[PROOFSTEP]
unfold neg
[GOAL]
α : Type u
β : Type v
γ : Type w
inst✝ : AddGroup α
k : ℕ
as : List α
⊢ get k (map (fun a => -a) as) = -get k as
[PROOFSTEP]
rw [@get_map' α α ⟨0⟩ ⟨0⟩]
  -- porting note: had to add a `⟨0⟩` b/c of instance troubles
[GOAL]
case a
α : Type u
β : Type v
γ : Type w
inst✝ : AddGroup α
k : ℕ
as : List α
⊢ -default = default
[PROOFSTEP]
apply neg_zero
[GOAL]
α : Type u
β : Type v
γ : Type w
inst✝ : Neg α
as : List α
⊢ length (neg as) = length as
[PROOFSTEP]
simp only [neg, length_map]
[GOAL]
α : Type u
β : Type v
γ : Type w
inst✝¹ : Inhabited α
inst✝ : Inhabited β
f : α → β → γ
b : β
bs : List β
⊢ pointwise f [] (b :: bs) = map (f default) (b :: bs)
[PROOFSTEP]
simp only [nil_pointwise bs, pointwise, eq_self_iff_true, and_self_iff, map]
[GOAL]
α : Type u
β : Type v
γ : Type w
inst✝¹ : Inhabited α
inst✝ : Inhabited β
f : α → β → γ
a : α
as : List α
⊢ pointwise f (a :: as) [] = map (fun a => f a default) (a :: as)
[PROOFSTEP]
simp only [pointwise_nil as, pointwise, eq_self_iff_true, and_self_iff, List.map]
[GOAL]
α : Type u
β : Type v
γ : Type w
inst✝² : Inhabited α
inst✝¹ : Inhabited β
inst✝ : Inhabited γ
f : α → β → γ
h1 : f default default = default
k : ℕ
⊢ get k (pointwise f [] []) = f (get k []) (get k [])
[PROOFSTEP]
simp only [h1, get_nil, pointwise, get]
[GOAL]
α : Type u
β : Type v
γ : Type w
inst✝² : Inhabited α
inst✝¹ : Inhabited β
inst✝ : Inhabited γ
f : α → β → γ
h1 : f default default = default
b : β
tail✝ : List β
⊢ get 0 (pointwise f [] (b :: tail✝)) = f (get 0 []) (get 0 (b :: tail✝))
[PROOFSTEP]
simp only [get_pointwise, get_nil, pointwise, get, Nat.zero_eq, map]
[GOAL]
α : Type u
β : Type v
γ : Type w
inst✝² : Inhabited α
inst✝¹ : Inhabited β
inst✝ : Inhabited γ
f : α → β → γ
h1 : f default default = default
k : ℕ
b : β
bs : List β
⊢ get (k + 1) (pointwise f [] (b :: bs)) = f (get (k + 1) []) (get (k + 1) (b :: bs))
[PROOFSTEP]
have : get k (map (f default) bs) = f default (get k bs) := by
  simpa [nil_pointwise, get_nil] using get_pointwise h1 k [] bs
[GOAL]
α : Type u
β : Type v
γ : Type w
inst✝² : Inhabited α
inst✝¹ : Inhabited β
inst✝ : Inhabited γ
f : α → β → γ
h1 : f default default = default
k : ℕ
b : β
bs : List β
⊢ get k (map (f default) bs) = f default (get k bs)
[PROOFSTEP]
simpa [nil_pointwise, get_nil] using get_pointwise h1 k [] bs
[GOAL]
α : Type u
β : Type v
γ : Type w
inst✝² : Inhabited α
inst✝¹ : Inhabited β
inst✝ : Inhabited γ
f : α → β → γ
h1 : f default default = default
k : ℕ
b : β
bs : List β
this : get k (map (f default) bs) = f default (get k bs)
⊢ get (k + 1) (pointwise f [] (b :: bs)) = f (get (k + 1) []) (get (k + 1) (b :: bs))
[PROOFSTEP]
simpa [get, get_nil, pointwise, map]
[GOAL]
α : Type u
β : Type v
γ : Type w
inst✝² : Inhabited α
inst✝¹ : Inhabited β
inst✝ : Inhabited γ
f : α → β → γ
h1 : f default default = default
a : α
tail✝ : List α
⊢ get 0 (pointwise f (a :: tail✝) []) = f (get 0 (a :: tail✝)) (get 0 [])
[PROOFSTEP]
simp only [get_pointwise, get_nil, pointwise, get, Nat.zero_eq, map]
[GOAL]
α : Type u
β : Type v
γ : Type w
inst✝² : Inhabited α
inst✝¹ : Inhabited β
inst✝ : Inhabited γ
f : α → β → γ
h1 : f default default = default
k : ℕ
a : α
as : List α
⊢ get (k + 1) (pointwise f (a :: as) []) = f (get (k + 1) (a :: as)) (get (k + 1) [])
[PROOFSTEP]
simpa [get, get_nil, pointwise, map, pointwise_nil, get_nil] using get_pointwise h1 k as []
[GOAL]
α : Type u
β : Type v
γ : Type w
inst✝² : Inhabited α
inst✝¹ : Inhabited β
inst✝ : Inhabited γ
f : α → β → γ
h1 : f default default = default
a : α
tail✝¹ : List α
b : β
tail✝ : List β
⊢ get 0 (pointwise f (a :: tail✝¹) (b :: tail✝)) = f (get 0 (a :: tail✝¹)) (get 0 (b :: tail✝))
[PROOFSTEP]
simp only [pointwise, get]
[GOAL]
α : Type u
β : Type v
γ : Type w
inst✝² : Inhabited α
inst✝¹ : Inhabited β
inst✝ : Inhabited γ
f : α → β → γ
h1 : f default default = default
k : ℕ
head✝¹ : α
as : List α
head✝ : β
bs : List β
⊢ get (k + 1) (pointwise f (head✝¹ :: as) (head✝ :: bs)) = f (get (k + 1) (head✝¹ :: as)) (get (k + 1) (head✝ :: bs))
[PROOFSTEP]
simp only [get, Nat.add_eq, add_zero, get_pointwise h1 k as bs]
[GOAL]
α : Type u
β : Type v
γ : Type w
inst✝¹ : Inhabited α
inst✝ : Inhabited β
f : α → β → γ
head✝ : β
bs : List β
⊢ length (pointwise f [] (head✝ :: bs)) = max (length []) (length (head✝ :: bs))
[PROOFSTEP]
simp only [pointwise, length, length_map, max_eq_right (Nat.zero_le (length bs + 1))]
[GOAL]
α : Type u
β : Type v
γ : Type w
inst✝¹ : Inhabited α
inst✝ : Inhabited β
f : α → β → γ
head✝ : α
as : List α
⊢ length (pointwise f (head✝ :: as) []) = max (length (head✝ :: as)) (length [])
[PROOFSTEP]
simp only [pointwise, length, length_map, max_eq_left (Nat.zero_le (length as + 1))]
[GOAL]
α : Type u
β : Type v
γ : Type w
inst✝¹ : Inhabited α
inst✝ : Inhabited β
f : α → β → γ
head✝¹ : α
as : List α
head✝ : β
bs : List β
⊢ length (pointwise f (head✝¹ :: as) (head✝ :: bs)) = max (length (head✝¹ :: as)) (length (head✝ :: bs))
[PROOFSTEP]
simp only [pointwise, length, Nat.max_succ_succ, @length_pointwise _ as bs]
[GOAL]
α✝ : Type u
β : Type v
γ : Type w
α : Type u
inst✝ : AddMonoid α
k : ℕ
xs ys : List α
⊢ get k (add xs ys) = get k xs + get k ys
[PROOFSTEP]
apply @get_pointwise _ _ _ ⟨0⟩ ⟨0⟩ ⟨0⟩
[GOAL]
case h1
α✝ : Type u
β : Type v
γ : Type w
α : Type u
inst✝ : AddMonoid α
k : ℕ
xs ys : List α
⊢ default + default = default
[PROOFSTEP]
apply zero_add
[GOAL]
α✝ : Type u
β : Type v
γ : Type w
α : Type u
inst✝ : AddMonoid α
as : List α
⊢ add [] as = as
[PROOFSTEP]
rw [add, @nil_pointwise α α α ⟨0⟩ ⟨0⟩]
[GOAL]
α✝ : Type u
β : Type v
γ : Type w
α : Type u
inst✝ : AddMonoid α
as : List α
⊢ map (fun x => default + x) as = as
[PROOFSTEP]
apply Eq.trans _ (map_id as)
[GOAL]
α✝ : Type u
β : Type v
γ : Type w
α : Type u
inst✝ : AddMonoid α
as : List α
⊢ map (fun x => default + x) as = map id as
[PROOFSTEP]
congr with x
[GOAL]
case e_f.h
α✝ : Type u
β : Type v
γ : Type w
α : Type u
inst✝ : AddMonoid α
as : List α
x : α
⊢ default + x = id x
[PROOFSTEP]
exact zero_add x
[GOAL]
α✝ : Type u
β : Type v
γ : Type w
α : Type u
inst✝ : AddMonoid α
as : List α
⊢ add as [] = as
[PROOFSTEP]
rw [add, @pointwise_nil α α α ⟨0⟩ ⟨0⟩]
[GOAL]
α✝ : Type u
β : Type v
γ : Type w
α : Type u
inst✝ : AddMonoid α
as : List α
⊢ map (fun a => a + default) as = as
[PROOFSTEP]
apply Eq.trans _ (map_id as)
[GOAL]
α✝ : Type u
β : Type v
γ : Type w
α : Type u
inst✝ : AddMonoid α
as : List α
⊢ map (fun a => a + default) as = map id as
[PROOFSTEP]
congr with x
[GOAL]
case e_f.h
α✝ : Type u
β : Type v
γ : Type w
α : Type u
inst✝ : AddMonoid α
as : List α
x : α
⊢ x + default = id x
[PROOFSTEP]
exact add_zero x
[GOAL]
α✝ : Type u
β : Type v
γ : Type w
α : Type u
inst✝ : AddMonoid α
f g : α → α
as : List α
⊢ add (map f as) (map g as) = map (fun x => f x + g x) as
[PROOFSTEP]
apply @eq_of_equiv _ (⟨0⟩ : Inhabited α)
[GOAL]
case a
α✝ : Type u
β : Type v
γ : Type w
α : Type u
inst✝ : AddMonoid α
f g : α → α
as : List α
⊢ length (add (map f as) (map g as)) = length (map (fun x => f x + g x) as)
[PROOFSTEP]
rw [length_map, length_add, max_eq_left, length_map]
[GOAL]
case a
α✝ : Type u
β : Type v
γ : Type w
α : Type u
inst✝ : AddMonoid α
f g : α → α
as : List α
⊢ length (map g as) ≤ length (map f as)
[PROOFSTEP]
apply le_of_eq
[GOAL]
case a.a
α✝ : Type u
β : Type v
γ : Type w
α : Type u
inst✝ : AddMonoid α
f g : α → α
as : List α
⊢ length (map g as) = length (map f as)
[PROOFSTEP]
rw [length_map, length_map]
[GOAL]
case a
α✝ : Type u
β : Type v
γ : Type w
α : Type u
inst✝ : AddMonoid α
f g : α → α
as : List α
⊢ Equiv (add (map f as) (map g as)) (map (fun x => f x + g x) as)
[PROOFSTEP]
intro m
[GOAL]
case a
α✝ : Type u
β : Type v
γ : Type w
α : Type u
inst✝ : AddMonoid α
f g : α → α
as : List α
m : ℕ
⊢ get m (add (map f as) (map g as)) = get m (map (fun x => f x + g x) as)
[PROOFSTEP]
rw [get_add]
[GOAL]
case a
α✝ : Type u
β : Type v
γ : Type w
α : Type u
inst✝ : AddMonoid α
f g : α → α
as : List α
m : ℕ
⊢ get m (map f as) + get m (map g as) = get m (map (fun x => f x + g x) as)
[PROOFSTEP]
by_cases h : m < length as
[GOAL]
case pos
α✝ : Type u
β : Type v
γ : Type w
α : Type u
inst✝ : AddMonoid α
f g : α → α
as : List α
m : ℕ
h : m < length as
⊢ get m (map f as) + get m (map g as) = get m (map (fun x => f x + g x) as)
[PROOFSTEP]
repeat' rw [@get_map α α ⟨0⟩ ⟨0⟩ _ _ _ h]
[GOAL]
case pos
α✝ : Type u
β : Type v
γ : Type w
α : Type u
inst✝ : AddMonoid α
f g : α → α
as : List α
m : ℕ
h : m < length as
⊢ get m (map f as) + get m (map g as) = get m (map (fun x => f x + g x) as)
[PROOFSTEP]
rw [@get_map α α ⟨0⟩ ⟨0⟩ _ _ _ h]
[GOAL]
case pos
α✝ : Type u
β : Type v
γ : Type w
α : Type u
inst✝ : AddMonoid α
f g : α → α
as : List α
m : ℕ
h : m < length as
⊢ f (get m as) + get m (map g as) = get m (map (fun x => f x + g x) as)
[PROOFSTEP]
rw [@get_map α α ⟨0⟩ ⟨0⟩ _ _ _ h]
[GOAL]
case pos
α✝ : Type u
β : Type v
γ : Type w
α : Type u
inst✝ : AddMonoid α
f g : α → α
as : List α
m : ℕ
h : m < length as
⊢ f (get m as) + g (get m as) = get m (map (fun x => f x + g x) as)
[PROOFSTEP]
rw [@get_map α α ⟨0⟩ ⟨0⟩ _ _ _ h]
[GOAL]
case neg
α✝ : Type u
β : Type v
γ : Type w
α : Type u
inst✝ : AddMonoid α
f g : α → α
as : List α
m : ℕ
h : ¬m < length as
⊢ get m (map f as) + get m (map g as) = get m (map (fun x => f x + g x) as)
[PROOFSTEP]
rw [not_lt] at h
[GOAL]
case neg
α✝ : Type u
β : Type v
γ : Type w
α : Type u
inst✝ : AddMonoid α
f g : α → α
as : List α
m : ℕ
h : length as ≤ m
⊢ get m (map f as) + get m (map g as) = get m (map (fun x => f x + g x) as)
[PROOFSTEP]
repeat' rw [@get_eq_default_of_le _ ⟨0⟩ m] <;> try rw [length_map]; apply h
[GOAL]
case neg
α✝ : Type u
β : Type v
γ : Type w
α : Type u
inst✝ : AddMonoid α
f g : α → α
as : List α
m : ℕ
h : length as ≤ m
⊢ get m (map f as) + get m (map g as) = get m (map (fun x => f x + g x) as)
[PROOFSTEP]
rw [@get_eq_default_of_le _ ⟨0⟩ m]
[GOAL]
case neg
α✝ : Type u
β : Type v
γ : Type w
α : Type u
inst✝ : AddMonoid α
f g : α → α
as : List α
m : ℕ
h : length as ≤ m
⊢ default + get m (map g as) = get m (map (fun x => f x + g x) as)
[PROOFSTEP]
try rw [length_map]; apply h
[GOAL]
case neg
α✝ : Type u
β : Type v
γ : Type w
α : Type u
inst✝ : AddMonoid α
f g : α → α
as : List α
m : ℕ
h : length as ≤ m
⊢ default + get m (map g as) = get m (map (fun x => f x + g x) as)
[PROOFSTEP]
rw [length_map]
[GOAL]
case neg.a
α✝ : Type u
β : Type v
γ : Type w
α : Type u
inst✝ : AddMonoid α
f g : α → α
as : List α
m : ℕ
h : length as ≤ m
⊢ length (map f as) ≤ m
[PROOFSTEP]
try rw [length_map]; apply h
[GOAL]
case neg.a
α✝ : Type u
β : Type v
γ : Type w
α : Type u
inst✝ : AddMonoid α
f g : α → α
as : List α
m : ℕ
h : length as ≤ m
⊢ length (map f as) ≤ m
[PROOFSTEP]
rw [length_map]
[GOAL]
case neg.a
α✝ : Type u
β : Type v
γ : Type w
α : Type u
inst✝ : AddMonoid α
f g : α → α
as : List α
m : ℕ
h : length as ≤ m
⊢ length as ≤ m
[PROOFSTEP]
apply h
[GOAL]
case neg
α✝ : Type u
β : Type v
γ : Type w
α : Type u
inst✝ : AddMonoid α
f g : α → α
as : List α
m : ℕ
h : length as ≤ m
⊢ default + get m (map g as) = get m (map (fun x => f x + g x) as)
[PROOFSTEP]
rw [@get_eq_default_of_le _ ⟨0⟩ m]
[GOAL]
case neg
α✝ : Type u
β : Type v
γ : Type w
α : Type u
inst✝ : AddMonoid α
f g : α → α
as : List α
m : ℕ
h : length as ≤ m
⊢ default + default = get m (map (fun x => f x + g x) as)
[PROOFSTEP]
try rw [length_map]; apply h
[GOAL]
case neg
α✝ : Type u
β : Type v
γ : Type w
α : Type u
inst✝ : AddMonoid α
f g : α → α
as : List α
m : ℕ
h : length as ≤ m
⊢ default + default = get m (map (fun x => f x + g x) as)
[PROOFSTEP]
rw [length_map]
[GOAL]
case neg.a
α✝ : Type u
β : Type v
γ : Type w
α : Type u
inst✝ : AddMonoid α
f g : α → α
as : List α
m : ℕ
h : length as ≤ m
⊢ length (map g as) ≤ m
[PROOFSTEP]
try rw [length_map]; apply h
[GOAL]
case neg.a
α✝ : Type u
β : Type v
γ : Type w
α : Type u
inst✝ : AddMonoid α
f g : α → α
as : List α
m : ℕ
h : length as ≤ m
⊢ length (map g as) ≤ m
[PROOFSTEP]
rw [length_map]
[GOAL]
case neg.a
α✝ : Type u
β : Type v
γ : Type w
α : Type u
inst✝ : AddMonoid α
f g : α → α
as : List α
m : ℕ
h : length as ≤ m
⊢ length as ≤ m
[PROOFSTEP]
apply h
[GOAL]
case neg
α✝ : Type u
β : Type v
γ : Type w
α : Type u
inst✝ : AddMonoid α
f g : α → α
as : List α
m : ℕ
h : length as ≤ m
⊢ default + default = get m (map (fun x => f x + g x) as)
[PROOFSTEP]
rw [@get_eq_default_of_le _ ⟨0⟩ m]
[GOAL]
case neg
α✝ : Type u
β : Type v
γ : Type w
α : Type u
inst✝ : AddMonoid α
f g : α → α
as : List α
m : ℕ
h : length as ≤ m
⊢ default + default = default
[PROOFSTEP]
try rw [length_map]; apply h
[GOAL]
case neg
α✝ : Type u
β : Type v
γ : Type w
α : Type u
inst✝ : AddMonoid α
f g : α → α
as : List α
m : ℕ
h : length as ≤ m
⊢ default + default = default
[PROOFSTEP]
rw [length_map]
[GOAL]
case neg.a
α✝ : Type u
β : Type v
γ : Type w
α : Type u
inst✝ : AddMonoid α
f g : α → α
as : List α
m : ℕ
h : length as ≤ m
⊢ length (map (fun x => f x + g x) as) ≤ m
[PROOFSTEP]
try rw [length_map]; apply h
[GOAL]
case neg.a
α✝ : Type u
β : Type v
γ : Type w
α : Type u
inst✝ : AddMonoid α
f g : α → α
as : List α
m : ℕ
h : length as ≤ m
⊢ length (map (fun x => f x + g x) as) ≤ m
[PROOFSTEP]
rw [length_map]
[GOAL]
case neg.a
α✝ : Type u
β : Type v
γ : Type w
α : Type u
inst✝ : AddMonoid α
f g : α → α
as : List α
m : ℕ
h : length as ≤ m
⊢ length as ≤ m
[PROOFSTEP]
apply h
[GOAL]
case neg
α✝ : Type u
β : Type v
γ : Type w
α : Type u
inst✝ : AddMonoid α
f g : α → α
as : List α
m : ℕ
h : length as ≤ m
⊢ default + default = default
[PROOFSTEP]
rw [@get_eq_default_of_le _ ⟨0⟩ m]
[GOAL]
case neg
α✝ : Type u
β : Type v
γ : Type w
α : Type u
inst✝ : AddMonoid α
f g : α → α
as : List α
m : ℕ
h : length as ≤ m
⊢ default + default = default
[PROOFSTEP]
exact zero_add _
[GOAL]
α✝ : Type u
β : Type v
γ : Type w
α : Type u
inst✝ : AddGroup α
k : ℕ
xs ys : List α
⊢ get k (sub xs ys) = get k xs - get k ys
[PROOFSTEP]
apply @get_pointwise _ _ _ ⟨0⟩ ⟨0⟩ ⟨0⟩
[GOAL]
case h1
α✝ : Type u
β : Type v
γ : Type w
α : Type u
inst✝ : AddGroup α
k : ℕ
xs ys : List α
⊢ Sub.sub default default = default
[PROOFSTEP]
apply sub_zero
[GOAL]
α✝ : Type u
β : Type v
γ : Type w
α : Type u_1
inst✝ : AddGroup α
as : List α
⊢ sub [] as = neg as
[PROOFSTEP]
rw [sub, @nil_pointwise _ _ _ ⟨0⟩ ⟨0⟩]
[GOAL]
α✝ : Type u
β : Type v
γ : Type w
α : Type u_1
inst✝ : AddGroup α
as : List α
⊢ map (Sub.sub default) as = neg as
[PROOFSTEP]
congr with x
[GOAL]
case e_f.h
α✝ : Type u
β : Type v
γ : Type w
α : Type u_1
inst✝ : AddGroup α
as : List α
x : α
⊢ Sub.sub default x = -x
[PROOFSTEP]
exact zero_sub x
[GOAL]
α✝ : Type u
β : Type v
γ : Type w
α : Type u_1
inst✝ : AddGroup α
as : List α
⊢ sub as [] = as
[PROOFSTEP]
rw [sub, @pointwise_nil _ _ _ ⟨0⟩ ⟨0⟩]
[GOAL]
α✝ : Type u
β : Type v
γ : Type w
α : Type u_1
inst✝ : AddGroup α
as : List α
⊢ map (fun a => Sub.sub a default) as = as
[PROOFSTEP]
apply Eq.trans _ (map_id as)
[GOAL]
α✝ : Type u
β : Type v
γ : Type w
α : Type u_1
inst✝ : AddGroup α
as : List α
⊢ map (fun a => Sub.sub a default) as = map id as
[PROOFSTEP]
congr with x
[GOAL]
case e_f.h
α✝ : Type u
β : Type v
γ : Type w
α : Type u_1
inst✝ : AddGroup α
as : List α
x : α
⊢ Sub.sub x default = id x
[PROOFSTEP]
exact sub_zero x


[GOAL]
𝕜 : Type u_1
V : Type u_2
W : Type u_3
inst✝⁴ : NontriviallyNormedField 𝕜
inst✝³ : NormedAddCommGroup V
inst✝² : NormedSpace 𝕜 V
inst✝¹ : NormedAddCommGroup W
inst✝ : NormedSpace 𝕜 W
n : ℕ∞
f : V →A[𝕜] W
⊢ ContDiff 𝕜 n ↑f
[PROOFSTEP]
rw [f.decomp]
[GOAL]
𝕜 : Type u_1
V : Type u_2
W : Type u_3
inst✝⁴ : NontriviallyNormedField 𝕜
inst✝³ : NormedAddCommGroup V
inst✝² : NormedSpace 𝕜 V
inst✝¹ : NormedAddCommGroup W
inst✝ : NormedSpace 𝕜 W
n : ℕ∞
f : V →A[𝕜] W
⊢ ContDiff 𝕜 n (↑(contLinear f) + Function.const V (↑f 0))
[PROOFSTEP]
apply f.contLinear.contDiff.add
[GOAL]
𝕜 : Type u_1
V : Type u_2
W : Type u_3
inst✝⁴ : NontriviallyNormedField 𝕜
inst✝³ : NormedAddCommGroup V
inst✝² : NormedSpace 𝕜 V
inst✝¹ : NormedAddCommGroup W
inst✝ : NormedSpace 𝕜 W
n : ℕ∞
f : V →A[𝕜] W
⊢ ContDiff 𝕜 n fun x => Function.const V (↑f 0) x
[PROOFSTEP]
simp only
[GOAL]
𝕜 : Type u_1
V : Type u_2
W : Type u_3
inst✝⁴ : NontriviallyNormedField 𝕜
inst✝³ : NormedAddCommGroup V
inst✝² : NormedSpace 𝕜 V
inst✝¹ : NormedAddCommGroup W
inst✝ : NormedSpace 𝕜 W
n : ℕ∞
f : V →A[𝕜] W
⊢ ContDiff 𝕜 n fun x => Function.const V (↑f 0) x
[PROOFSTEP]
exact contDiff_const


[GOAL]
α : Type u
β : Type v
inst✝¹ : LinearOrder α
inst✝ : LinearOrder β
f : α → β
s : Set α
a✝ b✝ c d a b : α
⊢ min a b = a ∧ a ≤ b ∨ min a b = b ∧ b < a
[PROOFSTEP]
by_cases h : a ≤ b
[GOAL]
case pos
α : Type u
β : Type v
inst✝¹ : LinearOrder α
inst✝ : LinearOrder β
f : α → β
s : Set α
a✝ b✝ c d a b : α
h : a ≤ b
⊢ min a b = a ∧ a ≤ b ∨ min a b = b ∧ b < a
[PROOFSTEP]
left
[GOAL]
case pos.h
α : Type u
β : Type v
inst✝¹ : LinearOrder α
inst✝ : LinearOrder β
f : α → β
s : Set α
a✝ b✝ c d a b : α
h : a ≤ b
⊢ min a b = a ∧ a ≤ b
[PROOFSTEP]
exact ⟨min_eq_left h, h⟩
[GOAL]
case neg
α : Type u
β : Type v
inst✝¹ : LinearOrder α
inst✝ : LinearOrder β
f : α → β
s : Set α
a✝ b✝ c d a b : α
h : ¬a ≤ b
⊢ min a b = a ∧ a ≤ b ∨ min a b = b ∧ b < a
[PROOFSTEP]
right
[GOAL]
case neg.h
α : Type u
β : Type v
inst✝¹ : LinearOrder α
inst✝ : LinearOrder β
f : α → β
s : Set α
a✝ b✝ c d a b : α
h : ¬a ≤ b
⊢ min a b = b ∧ b < a
[PROOFSTEP]
exact ⟨min_eq_right (le_of_lt (not_le.mp h)), not_le.mp h⟩
[GOAL]
α : Type u
β : Type v
inst✝¹ : LinearOrder α
inst✝ : LinearOrder β
f : α → β
s : Set α
a b c d : α
⊢ min a b = c ↔ a = c ∧ a ≤ b ∨ b = c ∧ b ≤ a
[PROOFSTEP]
constructor
[GOAL]
case mp
α : Type u
β : Type v
inst✝¹ : LinearOrder α
inst✝ : LinearOrder β
f : α → β
s : Set α
a b c d : α
⊢ min a b = c → a = c ∧ a ≤ b ∨ b = c ∧ b ≤ a
[PROOFSTEP]
intro h
[GOAL]
case mp
α : Type u
β : Type v
inst✝¹ : LinearOrder α
inst✝ : LinearOrder β
f : α → β
s : Set α
a b c d : α
h : min a b = c
⊢ a = c ∧ a ≤ b ∨ b = c ∧ b ≤ a
[PROOFSTEP]
refine' Or.imp (fun h' => _) (fun h' => _) (le_total a b)
[GOAL]
case mp.refine'_1
α : Type u
β : Type v
inst✝¹ : LinearOrder α
inst✝ : LinearOrder β
f : α → β
s : Set α
a b c d : α
h : min a b = c
h' : a ≤ b
⊢ a = c ∧ a ≤ b
[PROOFSTEP]
exact ⟨by simpa [h'] using h, h'⟩
[GOAL]
α : Type u
β : Type v
inst✝¹ : LinearOrder α
inst✝ : LinearOrder β
f : α → β
s : Set α
a b c d : α
h : min a b = c
h' : a ≤ b
⊢ a = c
[PROOFSTEP]
simpa [h'] using h
[GOAL]
case mp.refine'_2
α : Type u
β : Type v
inst✝¹ : LinearOrder α
inst✝ : LinearOrder β
f : α → β
s : Set α
a b c d : α
h : min a b = c
h' : b ≤ a
⊢ b = c ∧ b ≤ a
[PROOFSTEP]
exact ⟨by simpa [h'] using h, h'⟩
[GOAL]
α : Type u
β : Type v
inst✝¹ : LinearOrder α
inst✝ : LinearOrder β
f : α → β
s : Set α
a b c d : α
h : min a b = c
h' : b ≤ a
⊢ b = c
[PROOFSTEP]
simpa [h'] using h
[GOAL]
case mpr
α : Type u
β : Type v
inst✝¹ : LinearOrder α
inst✝ : LinearOrder β
f : α → β
s : Set α
a b c d : α
⊢ a = c ∧ a ≤ b ∨ b = c ∧ b ≤ a → min a b = c
[PROOFSTEP]
rintro (⟨rfl, h⟩ | ⟨rfl, h⟩)
[GOAL]
case mpr.inl.intro
α : Type u
β : Type v
inst✝¹ : LinearOrder α
inst✝ : LinearOrder β
f : α → β
s : Set α
a b d : α
h : a ≤ b
⊢ min a b = a
[PROOFSTEP]
simp [h]
[GOAL]
case mpr.inr.intro
α : Type u
β : Type v
inst✝¹ : LinearOrder α
inst✝ : LinearOrder β
f : α → β
s : Set α
a b d : α
h : b ≤ a
⊢ min a b = b
[PROOFSTEP]
simp [h]
[GOAL]
α : Type u
β : Type v
inst✝¹ : LinearOrder α
inst✝ : LinearOrder β
f : α → β
s : Set α
a b c d : α
⊢ min a c < min b c ↔ a < b ∧ a < c
[PROOFSTEP]
simp_rw [lt_min_iff, min_lt_iff, or_iff_left (lt_irrefl _)]
[GOAL]
α : Type u
β : Type v
inst✝¹ : LinearOrder α
inst✝ : LinearOrder β
f : α → β
s : Set α
a b c d : α
⊢ (a < b ∨ c < b) ∧ a < c ↔ a < b ∧ a < c
[PROOFSTEP]
exact and_congr_left fun h => or_iff_left_of_imp h.trans
[GOAL]
α : Type u
β : Type v
inst✝¹ : LinearOrder α
inst✝ : LinearOrder β
f : α → β
s : Set α
a b c d : α
⊢ min a b < min a c ↔ b < c ∧ b < a
[PROOFSTEP]
simp_rw [min_comm a, min_lt_min_left_iff]
[GOAL]
α : Type u
β : Type v
inst✝¹ : LinearOrder α
inst✝ : LinearOrder β
f : α → β
s : Set α
a b c d : α
⊢ ∀ (a : α), max a a = a
[PROOFSTEP]
simp
[GOAL]
α : Type u
β : Type v
inst✝¹ : LinearOrder α
inst✝ : LinearOrder β
f : α → β
s : Set α
a b c d : α
⊢ ∀ (a : α), min a a = a
[PROOFSTEP]
simp
[GOAL]
α : Type u
β : Type v
inst✝¹ : LinearOrder α
inst✝ : LinearOrder β
f : α → β
s : Set α
a b c d : α
hf : MonotoneOn f s
ha : a ∈ s
hb : b ∈ s
⊢ f (max a b) = max (f a) (f b)
[PROOFSTEP]
cases' le_total a b with h h
[GOAL]
case inl
α : Type u
β : Type v
inst✝¹ : LinearOrder α
inst✝ : LinearOrder β
f : α → β
s : Set α
a b c d : α
hf : MonotoneOn f s
ha : a ∈ s
hb : b ∈ s
h : a ≤ b
⊢ f (max a b) = max (f a) (f b)
[PROOFSTEP]
simp only [max_eq_right, max_eq_left, hf ha hb, hf hb ha, h]
[GOAL]
case inr
α : Type u
β : Type v
inst✝¹ : LinearOrder α
inst✝ : LinearOrder β
f : α → β
s : Set α
a b c d : α
hf : MonotoneOn f s
ha : a ∈ s
hb : b ∈ s
h : b ≤ a
⊢ f (max a b) = max (f a) (f b)
[PROOFSTEP]
simp only [max_eq_right, max_eq_left, hf ha hb, hf hb ha, h]
[GOAL]
α : Type u
β : Type v
inst✝¹ : LinearOrder α
inst✝ : LinearOrder β
f : α → β
s : Set α
a b c d : α
hf : Monotone f
⊢ f (max a b) = max (f a) (f b)
[PROOFSTEP]
cases' le_total a b with h h
[GOAL]
case inl
α : Type u
β : Type v
inst✝¹ : LinearOrder α
inst✝ : LinearOrder β
f : α → β
s : Set α
a b c d : α
hf : Monotone f
h : a ≤ b
⊢ f (max a b) = max (f a) (f b)
[PROOFSTEP]
simp [h, hf h]
[GOAL]
case inr
α : Type u
β : Type v
inst✝¹ : LinearOrder α
inst✝ : LinearOrder β
f : α → β
s : Set α
a b c d : α
hf : Monotone f
h : b ≤ a
⊢ f (max a b) = max (f a) (f b)
[PROOFSTEP]
simp [h, hf h]
[GOAL]
α : Type u
β : Type v
inst✝¹ : LinearOrder α
inst✝ : LinearOrder β
f : α → β
s : Set α
a b c d : α
hf : Antitone f
⊢ f (max a b) = min (f a) (f b)
[PROOFSTEP]
cases' le_total a b with h h
[GOAL]
case inl
α : Type u
β : Type v
inst✝¹ : LinearOrder α
inst✝ : LinearOrder β
f : α → β
s : Set α
a b c d : α
hf : Antitone f
h : a ≤ b
⊢ f (max a b) = min (f a) (f b)
[PROOFSTEP]
simp [h, hf h]
[GOAL]
case inr
α : Type u
β : Type v
inst✝¹ : LinearOrder α
inst✝ : LinearOrder β
f : α → β
s : Set α
a b c d : α
hf : Antitone f
h : b ≤ a
⊢ f (max a b) = min (f a) (f b)
[PROOFSTEP]
simp [h, hf h]
[GOAL]
α : Type u
β : Type v
inst✝¹ : LinearOrder α
inst✝ : LinearOrder β
f : α → β
s : Set α
a✝ b✝ c d a b : α
⊢ min a b = a ∨ min a b = b
[PROOFSTEP]
cases le_total a b
[GOAL]
case inl
α : Type u
β : Type v
inst✝¹ : LinearOrder α
inst✝ : LinearOrder β
f : α → β
s : Set α
a✝ b✝ c d a b : α
h✝ : a ≤ b
⊢ min a b = a ∨ min a b = b
[PROOFSTEP]
simp [*]
[GOAL]
case inr
α : Type u
β : Type v
inst✝¹ : LinearOrder α
inst✝ : LinearOrder β
f : α → β
s : Set α
a✝ b✝ c d a b : α
h✝ : b ≤ a
⊢ min a b = a ∨ min a b = b
[PROOFSTEP]
simp [*]


[GOAL]
K✝ : Type u_1
inst✝⁴ : DivisionRing K✝
inst✝³ : TopologicalSpace K✝
α : Type u_2
inst✝² : Field α
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalDivisionRing α
K : Subfield α
src✝ : Subring α := Subring.topologicalClosure K.toSubring
x : α
hx :
  x ∈
    {
              toSubsemiring :=
                {
                  toSubmonoid :=
                    {
                      toSubsemigroup :=
                        { carrier := _root_.closure ↑K,
                          mul_mem' := (_ : ∀ {a b : α}, a ∈ src✝.carrier → b ∈ src✝.carrier → a * b ∈ src✝.carrier) },
                      one_mem' := (_ : 1 ∈ src✝.carrier) },
                  add_mem' := (_ : ∀ {a b : α}, a ∈ src✝.carrier → b ∈ src✝.carrier → a + b ∈ src✝.carrier),
                  zero_mem' := (_ : 0 ∈ src✝.carrier) },
              neg_mem' :=
                (_ : ∀ {x : α}, x ∈ src✝.carrier → -x ∈ src✝.carrier) }.toSubsemiring.toSubmonoid.toSubsemigroup.carrier
⊢ x⁻¹ ∈
    {
              toSubsemiring :=
                {
                  toSubmonoid :=
                    {
                      toSubsemigroup :=
                        { carrier := _root_.closure ↑K,
                          mul_mem' := (_ : ∀ {a b : α}, a ∈ src✝.carrier → b ∈ src✝.carrier → a * b ∈ src✝.carrier) },
                      one_mem' := (_ : 1 ∈ src✝.carrier) },
                  add_mem' := (_ : ∀ {a b : α}, a ∈ src✝.carrier → b ∈ src✝.carrier → a + b ∈ src✝.carrier),
                  zero_mem' := (_ : 0 ∈ src✝.carrier) },
              neg_mem' :=
                (_ : ∀ {x : α}, x ∈ src✝.carrier → -x ∈ src✝.carrier) }.toSubsemiring.toSubmonoid.toSubsemigroup.carrier
[PROOFSTEP]
dsimp only at hx ⊢
[GOAL]
K✝ : Type u_1
inst✝⁴ : DivisionRing K✝
inst✝³ : TopologicalSpace K✝
α : Type u_2
inst✝² : Field α
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalDivisionRing α
K : Subfield α
src✝ : Subring α := Subring.topologicalClosure K.toSubring
x : α
hx : x ∈ _root_.closure ↑K
⊢ x⁻¹ ∈ _root_.closure ↑K
[PROOFSTEP]
rcases eq_or_ne x 0 with (rfl | h)
[GOAL]
case inl
K✝ : Type u_1
inst✝⁴ : DivisionRing K✝
inst✝³ : TopologicalSpace K✝
α : Type u_2
inst✝² : Field α
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalDivisionRing α
K : Subfield α
src✝ : Subring α := Subring.topologicalClosure K.toSubring
hx : 0 ∈ _root_.closure ↑K
⊢ 0⁻¹ ∈ _root_.closure ↑K
[PROOFSTEP]
rwa [inv_zero]
[GOAL]
case inr
K✝ : Type u_1
inst✝⁴ : DivisionRing K✝
inst✝³ : TopologicalSpace K✝
α : Type u_2
inst✝² : Field α
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalDivisionRing α
K : Subfield α
src✝ : Subring α := Subring.topologicalClosure K.toSubring
x : α
hx : x ∈ _root_.closure ↑K
h : x ≠ 0
⊢ x⁻¹ ∈ _root_.closure ↑K
[PROOFSTEP]
rw [← @inv_coe_set α (Subfield α) _ _ SubfieldClass.toInvMemClass K, ← Set.image_inv]
[GOAL]
case inr
K✝ : Type u_1
inst✝⁴ : DivisionRing K✝
inst✝³ : TopologicalSpace K✝
α : Type u_2
inst✝² : Field α
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalDivisionRing α
K : Subfield α
src✝ : Subring α := Subring.topologicalClosure K.toSubring
x : α
hx : x ∈ _root_.closure ↑K
h : x ≠ 0
⊢ x⁻¹ ∈ _root_.closure (Inv.inv '' ↑K)
[PROOFSTEP]
exact mem_closure_image (continuousAt_inv₀ h) hx
[GOAL]
K : Type u_1
inst✝⁴ : DivisionRing K
inst✝³ : TopologicalSpace K
𝕜 : Type u_2
inst✝² : Field 𝕜
inst✝¹ : TopologicalSpace 𝕜
inst✝ : TopologicalRing 𝕜
a b : 𝕜
h : a ≠ 0
x : 𝕜
⊢ (fun y => (y - b) / a) ((fun x => a * x + b) x) = x
[PROOFSTEP]
simp only [add_sub_cancel]
[GOAL]
K : Type u_1
inst✝⁴ : DivisionRing K
inst✝³ : TopologicalSpace K
𝕜 : Type u_2
inst✝² : Field 𝕜
inst✝¹ : TopologicalSpace 𝕜
inst✝ : TopologicalRing 𝕜
a b : 𝕜
h : a ≠ 0
x : 𝕜
⊢ a * x / a = x
[PROOFSTEP]
exact mul_div_cancel_left x h
[GOAL]
K : Type u_1
inst✝⁴ : DivisionRing K
inst✝³ : TopologicalSpace K
𝕜 : Type u_2
inst✝² : Field 𝕜
inst✝¹ : TopologicalSpace 𝕜
inst✝ : TopologicalRing 𝕜
a b : 𝕜
h : a ≠ 0
y : 𝕜
⊢ (fun x => a * x + b) ((fun y => (y - b) / a) y) = y
[PROOFSTEP]
simp [mul_div_cancel' _ h]
[GOAL]
K : Type u_1
inst✝³ : DivisionRing K
inst✝² : TopologicalSpace K
α : Type u_2
β : Type u_3
inst✝¹ : TopologicalSpace α
inst✝ : LinearOrderedSemifield β
a✝ : α
f : α → β
a : α
h1 : IsLocalMin f a
h2 : ∀ᶠ (z : α) in 𝓝 a, 0 < f z
⊢ IsLocalMax f⁻¹ a
[PROOFSTEP]
filter_upwards [h1, h2] with z h3 h4 using (inv_le_inv h4 h2.self_of_nhds).mpr h3
[GOAL]
K : Type u_1
inst✝⁶ : DivisionRing K
inst✝⁵ : TopologicalSpace K
α : Type u_2
𝕜 : Type u_3
f g : α → 𝕜
S : Set α
inst✝⁴ : TopologicalSpace α
inst✝³ : TopologicalSpace 𝕜
inst✝² : T1Space 𝕜
inst✝¹ : Ring 𝕜
inst✝ : NoZeroDivisors 𝕜
hS : IsPreconnected S
hf : ContinuousOn f S
hsq : EqOn (f ^ 2) 1 S
⊢ EqOn f 1 S ∨ EqOn f (-1) S
[PROOFSTEP]
have : DiscreteTopology ({1, -1} : Set 𝕜) := discrete_of_t1_of_finite
[GOAL]
K : Type u_1
inst✝⁶ : DivisionRing K
inst✝⁵ : TopologicalSpace K
α : Type u_2
𝕜 : Type u_3
f g : α → 𝕜
S : Set α
inst✝⁴ : TopologicalSpace α
inst✝³ : TopologicalSpace 𝕜
inst✝² : T1Space 𝕜
inst✝¹ : Ring 𝕜
inst✝ : NoZeroDivisors 𝕜
hS : IsPreconnected S
hf : ContinuousOn f S
hsq : EqOn (f ^ 2) 1 S
this : DiscreteTopology ↑{1, -1}
⊢ EqOn f 1 S ∨ EqOn f (-1) S
[PROOFSTEP]
have hmaps : MapsTo f S {1, -1}
[GOAL]
case hmaps
K : Type u_1
inst✝⁶ : DivisionRing K
inst✝⁵ : TopologicalSpace K
α : Type u_2
𝕜 : Type u_3
f g : α → 𝕜
S : Set α
inst✝⁴ : TopologicalSpace α
inst✝³ : TopologicalSpace 𝕜
inst✝² : T1Space 𝕜
inst✝¹ : Ring 𝕜
inst✝ : NoZeroDivisors 𝕜
hS : IsPreconnected S
hf : ContinuousOn f S
hsq : EqOn (f ^ 2) 1 S
this : DiscreteTopology ↑{1, -1}
⊢ MapsTo f S {1, -1}
[PROOFSTEP]
simpa only [EqOn, Pi.one_apply, Pi.pow_apply, sq_eq_one_iff] using hsq
[GOAL]
K : Type u_1
inst✝⁶ : DivisionRing K
inst✝⁵ : TopologicalSpace K
α : Type u_2
𝕜 : Type u_3
f g : α → 𝕜
S : Set α
inst✝⁴ : TopologicalSpace α
inst✝³ : TopologicalSpace 𝕜
inst✝² : T1Space 𝕜
inst✝¹ : Ring 𝕜
inst✝ : NoZeroDivisors 𝕜
hS : IsPreconnected S
hf : ContinuousOn f S
hsq : EqOn (f ^ 2) 1 S
this : DiscreteTopology ↑{1, -1}
hmaps : MapsTo f S {1, -1}
⊢ EqOn f 1 S ∨ EqOn f (-1) S
[PROOFSTEP]
simpa using hS.eqOn_const_of_mapsTo hf hmaps
[GOAL]
K : Type u_1
inst✝⁷ : DivisionRing K
inst✝⁶ : TopologicalSpace K
α : Type u_2
𝕜 : Type u_3
f g : α → 𝕜
S : Set α
inst✝⁵ : TopologicalSpace α
inst✝⁴ : TopologicalSpace 𝕜
inst✝³ : T1Space 𝕜
inst✝² : Field 𝕜
inst✝¹ : HasContinuousInv₀ 𝕜
inst✝ : ContinuousMul 𝕜
hS : IsPreconnected S
hf : ContinuousOn f S
hg : ContinuousOn g S
hsq : EqOn (f ^ 2) (g ^ 2) S
hg_ne : ∀ {x : α}, x ∈ S → g x ≠ 0
⊢ EqOn f g S ∨ EqOn f (-g) S
[PROOFSTEP]
have hsq : EqOn ((f / g) ^ 2) 1 S := fun x hx => by simpa [div_eq_one_iff_eq (pow_ne_zero _ (hg_ne hx))] using hsq hx
[GOAL]
K : Type u_1
inst✝⁷ : DivisionRing K
inst✝⁶ : TopologicalSpace K
α : Type u_2
𝕜 : Type u_3
f g : α → 𝕜
S : Set α
inst✝⁵ : TopologicalSpace α
inst✝⁴ : TopologicalSpace 𝕜
inst✝³ : T1Space 𝕜
inst✝² : Field 𝕜
inst✝¹ : HasContinuousInv₀ 𝕜
inst✝ : ContinuousMul 𝕜
hS : IsPreconnected S
hf : ContinuousOn f S
hg : ContinuousOn g S
hsq : EqOn (f ^ 2) (g ^ 2) S
hg_ne : ∀ {x : α}, x ∈ S → g x ≠ 0
x : α
hx : x ∈ S
⊢ ((f / g) ^ 2) x = OfNat.ofNat 1 x
[PROOFSTEP]
simpa [div_eq_one_iff_eq (pow_ne_zero _ (hg_ne hx))] using hsq hx
[GOAL]
K : Type u_1
inst✝⁷ : DivisionRing K
inst✝⁶ : TopologicalSpace K
α : Type u_2
𝕜 : Type u_3
f g : α → 𝕜
S : Set α
inst✝⁵ : TopologicalSpace α
inst✝⁴ : TopologicalSpace 𝕜
inst✝³ : T1Space 𝕜
inst✝² : Field 𝕜
inst✝¹ : HasContinuousInv₀ 𝕜
inst✝ : ContinuousMul 𝕜
hS : IsPreconnected S
hf : ContinuousOn f S
hg : ContinuousOn g S
hsq✝ : EqOn (f ^ 2) (g ^ 2) S
hg_ne : ∀ {x : α}, x ∈ S → g x ≠ 0
hsq : EqOn ((f / g) ^ 2) 1 S
⊢ EqOn f g S ∨ EqOn f (-g) S
[PROOFSTEP]
simpa (config := { contextual := true }) [EqOn, div_eq_iff (hg_ne _)] using
  hS.eq_one_or_eq_neg_one_of_sq_eq (hf.div hg fun z => hg_ne) hsq
[GOAL]
K : Type u_1
inst✝⁷ : DivisionRing K
inst✝⁶ : TopologicalSpace K
α : Type u_2
𝕜 : Type u_3
f g : α → 𝕜
S : Set α
inst✝⁵ : TopologicalSpace α
inst✝⁴ : TopologicalSpace 𝕜
inst✝³ : T1Space 𝕜
inst✝² : Field 𝕜
inst✝¹ : HasContinuousInv₀ 𝕜
inst✝ : ContinuousMul 𝕜
hS : IsPreconnected S
hf : ContinuousOn f S
hg : ContinuousOn g S
hsq : EqOn (f ^ 2) (g ^ 2) S
hg_ne : ∀ {x : α}, x ∈ S → g x ≠ 0
y : α
hy : y ∈ S
hy' : f y = g y
x : α
hx : x ∈ S
⊢ f x = g x
[PROOFSTEP]
rcases hS.eq_or_eq_neg_of_sq_eq hf hg @hsq @hg_ne with (h | h)
[GOAL]
case inl
K : Type u_1
inst✝⁷ : DivisionRing K
inst✝⁶ : TopologicalSpace K
α : Type u_2
𝕜 : Type u_3
f g : α → 𝕜
S : Set α
inst✝⁵ : TopologicalSpace α
inst✝⁴ : TopologicalSpace 𝕜
inst✝³ : T1Space 𝕜
inst✝² : Field 𝕜
inst✝¹ : HasContinuousInv₀ 𝕜
inst✝ : ContinuousMul 𝕜
hS : IsPreconnected S
hf : ContinuousOn f S
hg : ContinuousOn g S
hsq : EqOn (f ^ 2) (g ^ 2) S
hg_ne : ∀ {x : α}, x ∈ S → g x ≠ 0
y : α
hy : y ∈ S
hy' : f y = g y
x : α
hx : x ∈ S
h : EqOn f g S
⊢ f x = g x
[PROOFSTEP]
exact h hx
[GOAL]
case inr
K : Type u_1
inst✝⁷ : DivisionRing K
inst✝⁶ : TopologicalSpace K
α : Type u_2
𝕜 : Type u_3
f g : α → 𝕜
S : Set α
inst✝⁵ : TopologicalSpace α
inst✝⁴ : TopologicalSpace 𝕜
inst✝³ : T1Space 𝕜
inst✝² : Field 𝕜
inst✝¹ : HasContinuousInv₀ 𝕜
inst✝ : ContinuousMul 𝕜
hS : IsPreconnected S
hf : ContinuousOn f S
hg : ContinuousOn g S
hsq : EqOn (f ^ 2) (g ^ 2) S
hg_ne : ∀ {x : α}, x ∈ S → g x ≠ 0
y : α
hy : y ∈ S
hy' : f y = g y
x : α
hx : x ∈ S
h : EqOn f (-g) S
⊢ f x = g x
[PROOFSTEP]
rw [h _, Pi.neg_apply, neg_eq_iff_add_eq_zero, ← two_mul, mul_eq_zero, iff_false_iff.2 (hg_ne _)] at hy' ⊢
[GOAL]
case inr
K : Type u_1
inst✝⁷ : DivisionRing K
inst✝⁶ : TopologicalSpace K
α : Type u_2
𝕜 : Type u_3
f g : α → 𝕜
S : Set α
inst✝⁵ : TopologicalSpace α
inst✝⁴ : TopologicalSpace 𝕜
inst✝³ : T1Space 𝕜
inst✝² : Field 𝕜
inst✝¹ : HasContinuousInv₀ 𝕜
inst✝ : ContinuousMul 𝕜
hS : IsPreconnected S
hf : ContinuousOn f S
hg : ContinuousOn g S
hsq : EqOn (f ^ 2) (g ^ 2) S
hg_ne : ∀ {x : α}, x ∈ S → g x ≠ 0
y : α
hy : y ∈ S
hy' : 2 = 0 ∨ False
x : α
hx : x ∈ S
h : EqOn f (-g) S
⊢ 2 = 0 ∨ False
[PROOFSTEP]
assumption
[GOAL]
K : Type u_1
inst✝⁷ : DivisionRing K
inst✝⁶ : TopologicalSpace K
α : Type u_2
𝕜 : Type u_3
f g : α → 𝕜
S : Set α
inst✝⁵ : TopologicalSpace α
inst✝⁴ : TopologicalSpace 𝕜
inst✝³ : T1Space 𝕜
inst✝² : Field 𝕜
inst✝¹ : HasContinuousInv₀ 𝕜
inst✝ : ContinuousMul 𝕜
hS : IsPreconnected S
hf : ContinuousOn f S
hg : ContinuousOn g S
hsq : EqOn (f ^ 2) (g ^ 2) S
hg_ne : ∀ {x : α}, x ∈ S → g x ≠ 0
y : α
hy : y ∈ S
hy' : 2 = 0 ∨ False
x : α
hx : x ∈ S
h : EqOn f (-g) S
⊢ x ∈ S
[PROOFSTEP]
assumption
[GOAL]
K : Type u_1
inst✝⁷ : DivisionRing K
inst✝⁶ : TopologicalSpace K
α : Type u_2
𝕜 : Type u_3
f g : α → 𝕜
S : Set α
inst✝⁵ : TopologicalSpace α
inst✝⁴ : TopologicalSpace 𝕜
inst✝³ : T1Space 𝕜
inst✝² : Field 𝕜
inst✝¹ : HasContinuousInv₀ 𝕜
inst✝ : ContinuousMul 𝕜
hS : IsPreconnected S
hf : ContinuousOn f S
hg : ContinuousOn g S
hsq : EqOn (f ^ 2) (g ^ 2) S
hg_ne : ∀ {x : α}, x ∈ S → g x ≠ 0
y : α
hy : y ∈ S
hy' : 2 = 0 ∨ g y = 0
x : α
hx : x ∈ S
h : EqOn f (-g) S
⊢ y ∈ S
[PROOFSTEP]
assumption
[GOAL]
K : Type u_1
inst✝⁷ : DivisionRing K
inst✝⁶ : TopologicalSpace K
α : Type u_2
𝕜 : Type u_3
f g : α → 𝕜
S : Set α
inst✝⁵ : TopologicalSpace α
inst✝⁴ : TopologicalSpace 𝕜
inst✝³ : T1Space 𝕜
inst✝² : Field 𝕜
inst✝¹ : HasContinuousInv₀ 𝕜
inst✝ : ContinuousMul 𝕜
hS : IsPreconnected S
hf : ContinuousOn f S
hg : ContinuousOn g S
hsq : EqOn (f ^ 2) (g ^ 2) S
hg_ne : ∀ {x : α}, x ∈ S → g x ≠ 0
y : α
hy : y ∈ S
hy' : (-g) y = g y
x : α
hx : x ∈ S
h : EqOn f (-g) S
⊢ x ∈ S
[PROOFSTEP]
assumption
[GOAL]
K : Type u_1
inst✝⁷ : DivisionRing K
inst✝⁶ : TopologicalSpace K
α : Type u_2
𝕜 : Type u_3
f g : α → 𝕜
S : Set α
inst✝⁵ : TopologicalSpace α
inst✝⁴ : TopologicalSpace 𝕜
inst✝³ : T1Space 𝕜
inst✝² : Field 𝕜
inst✝¹ : HasContinuousInv₀ 𝕜
inst✝ : ContinuousMul 𝕜
hS : IsPreconnected S
hf : ContinuousOn f S
hg : ContinuousOn g S
hsq : EqOn (f ^ 2) (g ^ 2) S
hg_ne : ∀ {x : α}, x ∈ S → g x ≠ 0
y : α
hy : y ∈ S
hy' : f y = g y
x : α
hx : x ∈ S
h : EqOn f (-g) S
⊢ y ∈ S
[PROOFSTEP]
assumption


[GOAL]
α : Type u_1
inst✝¹ : LinearOrderedSemiring α
a : α
inst✝ : Invertible a
⊢ 0 < a * ⅟a
[PROOFSTEP]
simp only [mul_invOf_self, zero_lt_one]
[GOAL]
α : Type u_1
inst✝¹ : LinearOrderedSemiring α
a : α
inst✝ : Invertible a
⊢ ⅟a ≤ 0 ↔ a ≤ 0
[PROOFSTEP]
simp only [← not_lt, invOf_pos]
[GOAL]
α : Type u_1
inst✝¹ : LinearOrderedSemiring α
a : α
inst✝ : Invertible a
⊢ 0 < a * ⅟a
[PROOFSTEP]
simp only [mul_invOf_self, zero_lt_one]
[GOAL]
α : Type u_1
inst✝¹ : LinearOrderedSemiring α
a : α
inst✝ : Invertible a
⊢ ⅟a < 0 ↔ a < 0
[PROOFSTEP]
simp only [← not_le, invOf_nonneg]