[GOAL]
K : Type u_1
inst✝ : Field K
x : (K →+* ℂ) → ℂ
φ : K →+* ℂ
hx : x ∈ Submodule.span ℝ (Set.range ↑(canonicalEmbedding K))
⊢ ↑(starRingEnd ℂ) (x φ) = x (ComplexEmbedding.conjugate φ)
[PROOFSTEP]
refine Submodule.span_induction hx ?_ ?_ (fun _ _ hx hy => ?_) (fun a _ hx => ?_)
[GOAL]
case refine_1
K : Type u_1
inst✝ : Field K
x : (K →+* ℂ) → ℂ
φ : K →+* ℂ
hx : x ∈ Submodule.span ℝ (Set.range ↑(canonicalEmbedding K))
⊢ ∀ (x : (K →+* ℂ) → ℂ),
    x ∈ Set.range ↑(canonicalEmbedding K) → ↑(starRingEnd ℂ) (x φ) = x (ComplexEmbedding.conjugate φ)
[PROOFSTEP]
rintro _ ⟨x, rfl⟩
[GOAL]
case refine_1.intro
K : Type u_1
inst✝ : Field K
x✝ : (K →+* ℂ) → ℂ
φ : K →+* ℂ
hx : x✝ ∈ Submodule.span ℝ (Set.range ↑(canonicalEmbedding K))
x : K
⊢ ↑(starRingEnd ℂ) (↑(canonicalEmbedding K) x φ) = ↑(canonicalEmbedding K) x (ComplexEmbedding.conjugate φ)
[PROOFSTEP]
rw [apply_at, apply_at, ComplexEmbedding.conjugate_coe_eq]
[GOAL]
case refine_2
K : Type u_1
inst✝ : Field K
x : (K →+* ℂ) → ℂ
φ : K →+* ℂ
hx : x ∈ Submodule.span ℝ (Set.range ↑(canonicalEmbedding K))
⊢ ↑(starRingEnd ℂ) (OfNat.ofNat 0 φ) = OfNat.ofNat 0 (ComplexEmbedding.conjugate φ)
[PROOFSTEP]
rw [Pi.zero_apply, Pi.zero_apply, map_zero]
[GOAL]
case refine_3
K : Type u_1
inst✝ : Field K
x : (K →+* ℂ) → ℂ
φ : K →+* ℂ
hx✝ : x ∈ Submodule.span ℝ (Set.range ↑(canonicalEmbedding K))
x✝¹ x✝ : (K →+* ℂ) → ℂ
hx : ↑(starRingEnd ℂ) (x✝¹ φ) = x✝¹ (ComplexEmbedding.conjugate φ)
hy : ↑(starRingEnd ℂ) (x✝ φ) = x✝ (ComplexEmbedding.conjugate φ)
⊢ ↑(starRingEnd ℂ) ((x✝¹ + x✝) φ) = (x✝¹ + x✝) (ComplexEmbedding.conjugate φ)
[PROOFSTEP]
rw [Pi.add_apply, Pi.add_apply, map_add, hx, hy]
[GOAL]
case refine_4
K : Type u_1
inst✝ : Field K
x : (K →+* ℂ) → ℂ
φ : K →+* ℂ
hx✝ : x ∈ Submodule.span ℝ (Set.range ↑(canonicalEmbedding K))
a : ℝ
x✝ : (K →+* ℂ) → ℂ
hx : ↑(starRingEnd ℂ) (x✝ φ) = x✝ (ComplexEmbedding.conjugate φ)
⊢ ↑(starRingEnd ℂ) ((a • x✝) φ) = (a • x✝) (ComplexEmbedding.conjugate φ)
[PROOFSTEP]
rw [Pi.smul_apply, Complex.real_smul, map_mul, Complex.conj_ofReal]
[GOAL]
case refine_4
K : Type u_1
inst✝ : Field K
x : (K →+* ℂ) → ℂ
φ : K →+* ℂ
hx✝ : x ∈ Submodule.span ℝ (Set.range ↑(canonicalEmbedding K))
a : ℝ
x✝ : (K →+* ℂ) → ℂ
hx : ↑(starRingEnd ℂ) (x✝ φ) = x✝ (ComplexEmbedding.conjugate φ)
⊢ ↑a * ↑(starRingEnd ℂ) (x✝ φ) = (a • x✝) (ComplexEmbedding.conjugate φ)
[PROOFSTEP]
exact congrArg ((a : ℂ) * ·) hx
[GOAL]
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
x : K
⊢ ‖↑(canonicalEmbedding K) x‖₊ = Finset.sup Finset.univ fun φ => ‖↑φ x‖₊
[PROOFSTEP]
simp_rw [Pi.nnnorm_def, apply_at]
[GOAL]
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
x : K
r : ℝ
⊢ ‖↑(canonicalEmbedding K) x‖ ≤ r ↔ ∀ (φ : K →+* ℂ), ‖↑φ x‖ ≤ r
[PROOFSTEP]
obtain hr | hr := lt_or_le r 0
[GOAL]
case inl
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
x : K
r : ℝ
hr : r < 0
⊢ ‖↑(canonicalEmbedding K) x‖ ≤ r ↔ ∀ (φ : K →+* ℂ), ‖↑φ x‖ ≤ r
[PROOFSTEP]
obtain ⟨φ⟩ := (inferInstance : Nonempty (K →+* ℂ))
[GOAL]
case inl.intro
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
x : K
r : ℝ
hr : r < 0
φ : K →+* ℂ
⊢ ‖↑(canonicalEmbedding K) x‖ ≤ r ↔ ∀ (φ : K →+* ℂ), ‖↑φ x‖ ≤ r
[PROOFSTEP]
refine iff_of_false ?_ ?_
[GOAL]
case inl.intro.refine_1
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
x : K
r : ℝ
hr : r < 0
φ : K →+* ℂ
⊢ ¬‖↑(canonicalEmbedding K) x‖ ≤ r
case inl.intro.refine_2
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
x : K
r : ℝ
hr : r < 0
φ : K →+* ℂ
⊢ ¬∀ (φ : K →+* ℂ), ‖↑φ x‖ ≤ r
[PROOFSTEP]
exact (hr.trans_le (norm_nonneg _)).not_le
[GOAL]
case inl.intro.refine_2
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
x : K
r : ℝ
hr : r < 0
φ : K →+* ℂ
⊢ ¬∀ (φ : K →+* ℂ), ‖↑φ x‖ ≤ r
[PROOFSTEP]
exact fun h => hr.not_le (le_trans (norm_nonneg _) (h φ))
[GOAL]
case inr
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
x : K
r : ℝ
hr : 0 ≤ r
⊢ ‖↑(canonicalEmbedding K) x‖ ≤ r ↔ ∀ (φ : K →+* ℂ), ‖↑φ x‖ ≤ r
[PROOFSTEP]
lift r to NNReal using hr
[GOAL]
case inr.intro
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
x : K
r : NNReal
⊢ ‖↑(canonicalEmbedding K) x‖ ≤ ↑r ↔ ∀ (φ : K →+* ℂ), ‖↑φ x‖ ≤ ↑r
[PROOFSTEP]
simp_rw [← coe_nnnorm, nnnorm_eq, NNReal.coe_le_coe, Finset.sup_le_iff, Finset.mem_univ, forall_true_left]
[GOAL]
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
r : ℝ
⊢ Set.Finite (↑(integerLattice K) ∩ Metric.closedBall 0 r)
[PROOFSTEP]
obtain hr | _ := lt_or_le r 0
[GOAL]
case inl
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
r : ℝ
hr : r < 0
⊢ Set.Finite (↑(integerLattice K) ∩ Metric.closedBall 0 r)
[PROOFSTEP]
simp [Metric.closedBall_eq_empty.2 hr]
[GOAL]
case inr
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
r : ℝ
h✝ : 0 ≤ r
⊢ Set.Finite (↑(integerLattice K) ∩ Metric.closedBall 0 r)
[PROOFSTEP]
have heq : ∀ x, canonicalEmbedding K x ∈ Metric.closedBall 0 r ↔ ∀ φ : K →+* ℂ, ‖φ x‖ ≤ r := by intro x;
  rw [← norm_le_iff, mem_closedBall_zero_iff]
[GOAL]
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
r : ℝ
h✝ : 0 ≤ r
⊢ ∀ (x : K), ↑(canonicalEmbedding K) x ∈ Metric.closedBall 0 r ↔ ∀ (φ : K →+* ℂ), ‖↑φ x‖ ≤ r
[PROOFSTEP]
intro x
[GOAL]
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
r : ℝ
h✝ : 0 ≤ r
x : K
⊢ ↑(canonicalEmbedding K) x ∈ Metric.closedBall 0 r ↔ ∀ (φ : K →+* ℂ), ‖↑φ x‖ ≤ r
[PROOFSTEP]
rw [← norm_le_iff, mem_closedBall_zero_iff]
[GOAL]
case inr
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
r : ℝ
h✝ : 0 ≤ r
heq : ∀ (x : K), ↑(canonicalEmbedding K) x ∈ Metric.closedBall 0 r ↔ ∀ (φ : K →+* ℂ), ‖↑φ x‖ ≤ r
⊢ Set.Finite (↑(integerLattice K) ∩ Metric.closedBall 0 r)
[PROOFSTEP]
convert (Embeddings.finite_of_norm_le K ℂ r).image (canonicalEmbedding K)
[GOAL]
case h.e'_2
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
r : ℝ
h✝ : 0 ≤ r
heq : ∀ (x : K), ↑(canonicalEmbedding K) x ∈ Metric.closedBall 0 r ↔ ∀ (φ : K →+* ℂ), ‖↑φ x‖ ≤ r
⊢ ↑(integerLattice K) ∩ Metric.closedBall 0 r =
    ↑(canonicalEmbedding K) '' {x | IsIntegral ℤ x ∧ ∀ (φ : K →+* ℂ), ‖↑φ x‖ ≤ r}
[PROOFSTEP]
ext
[GOAL]
case h.e'_2.h
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
r : ℝ
h✝ : 0 ≤ r
heq : ∀ (x : K), ↑(canonicalEmbedding K) x ∈ Metric.closedBall 0 r ↔ ∀ (φ : K →+* ℂ), ‖↑φ x‖ ≤ r
x✝ : (K →+* ℂ) → ℂ
⊢ x✝ ∈ ↑(integerLattice K) ∩ Metric.closedBall 0 r ↔
    x✝ ∈ ↑(canonicalEmbedding K) '' {x | IsIntegral ℤ x ∧ ∀ (φ : K →+* ℂ), ‖↑φ x‖ ≤ r}
[PROOFSTEP]
constructor
[GOAL]
case h.e'_2.h.mp
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
r : ℝ
h✝ : 0 ≤ r
heq : ∀ (x : K), ↑(canonicalEmbedding K) x ∈ Metric.closedBall 0 r ↔ ∀ (φ : K →+* ℂ), ‖↑φ x‖ ≤ r
x✝ : (K →+* ℂ) → ℂ
⊢ x✝ ∈ ↑(integerLattice K) ∩ Metric.closedBall 0 r →
    x✝ ∈ ↑(canonicalEmbedding K) '' {x | IsIntegral ℤ x ∧ ∀ (φ : K →+* ℂ), ‖↑φ x‖ ≤ r}
[PROOFSTEP]
rintro ⟨⟨_, ⟨x, rfl⟩, rfl⟩, hx⟩
[GOAL]
case h.e'_2.h.mp.intro.intro.intro.intro
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
r : ℝ
h✝ : 0 ≤ r
heq : ∀ (x : K), ↑(canonicalEmbedding K) x ∈ Metric.closedBall 0 r ↔ ∀ (φ : K →+* ℂ), ‖↑φ x‖ ≤ r
x : { x // x ∈ 𝓞 K }
hx : ↑(canonicalEmbedding K) (↑(algebraMap { x // x ∈ 𝓞 K } K) x) ∈ Metric.closedBall 0 r
⊢ ↑(canonicalEmbedding K) (↑(algebraMap { x // x ∈ 𝓞 K } K) x) ∈
    ↑(canonicalEmbedding K) '' {x | IsIntegral ℤ x ∧ ∀ (φ : K →+* ℂ), ‖↑φ x‖ ≤ r}
[PROOFSTEP]
exact ⟨↑x, ⟨SetLike.coe_mem x, fun φ => (heq x).mp hx φ⟩, rfl⟩
[GOAL]
case h.e'_2.h.mpr
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
r : ℝ
h✝ : 0 ≤ r
heq : ∀ (x : K), ↑(canonicalEmbedding K) x ∈ Metric.closedBall 0 r ↔ ∀ (φ : K →+* ℂ), ‖↑φ x‖ ≤ r
x✝ : (K →+* ℂ) → ℂ
⊢ x✝ ∈ ↑(canonicalEmbedding K) '' {x | IsIntegral ℤ x ∧ ∀ (φ : K →+* ℂ), ‖↑φ x‖ ≤ r} →
    x✝ ∈ ↑(integerLattice K) ∩ Metric.closedBall 0 r
[PROOFSTEP]
rintro ⟨x, ⟨hx1, hx2⟩, rfl⟩
[GOAL]
case h.e'_2.h.mpr.intro.intro.intro
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
r : ℝ
h✝ : 0 ≤ r
heq : ∀ (x : K), ↑(canonicalEmbedding K) x ∈ Metric.closedBall 0 r ↔ ∀ (φ : K →+* ℂ), ‖↑φ x‖ ≤ r
x : K
hx1 : IsIntegral ℤ x
hx2 : ∀ (φ : K →+* ℂ), ‖↑φ x‖ ≤ r
⊢ ↑(canonicalEmbedding K) x ∈ ↑(integerLattice K) ∩ Metric.closedBall 0 r
[PROOFSTEP]
exact ⟨⟨x, ⟨⟨x, hx1⟩, rfl⟩, rfl⟩, (heq x).mpr hx2⟩
[GOAL]
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
⊢ Basis (Free.ChooseBasisIndex ℤ { x // x ∈ 𝓞 K }) ℂ ((K →+* ℂ) → ℂ)
[PROOFSTEP]
classical
  -- Let `B` be the canonical basis of `(K →+* ℂ) → ℂ`. We prove that the determinant of
    -- the image by `canonicalEmbedding` of the integral basis of `K` is nonzero. This
    -- will imply the result.
let B := Pi.basisFun ℂ (K →+* ℂ)
let e : (K →+* ℂ) ≃ Free.ChooseBasisIndex ℤ (𝓞 K) :=
  equivOfCardEq ((Embeddings.card K ℂ).trans (finrank_eq_card_basis (integralBasis K)))
let M := B.toMatrix (fun i => canonicalEmbedding K (integralBasis K (e i)))
suffices M.det ≠ 0 by
  rw [← isUnit_iff_ne_zero, ← Basis.det_apply, ← is_basis_iff_det] at this
  refine basisOfLinearIndependentOfCardEqFinrank ((linearIndependent_equiv e.symm).mpr this.1) ?_
  rw [← finrank_eq_card_chooseBasisIndex, RingOfIntegers.rank, finrank_fintype_fun_eq_card, Embeddings.card]
    -- In order to prove that the determinant is nonzero, we show that it is equal to the
      -- square of the discriminant of the integral basis and thus it is not zero
let N := Algebra.embeddingsMatrixReindex ℚ ℂ (fun i => integralBasis K (e i)) RingHom.equivRatAlgHom
rw [show M = N.transpose by {ext : 2; rfl
  }]
rw [Matrix.det_transpose, ← @pow_ne_zero_iff ℂ _ _ _ 2 (by norm_num)]
convert (map_ne_zero_iff _ (algebraMap ℚ ℂ).injective).mpr (Algebra.discr_not_zero_of_basis ℚ (integralBasis K))
rw [← Algebra.discr_reindex ℚ (integralBasis K) e.symm]
exact
  (Algebra.discr_eq_det_embeddingsMatrixReindex_pow_two ℚ ℂ (fun i => integralBasis K (e i))
      RingHom.equivRatAlgHom).symm
[GOAL]
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
⊢ Basis (Free.ChooseBasisIndex ℤ { x // x ∈ 𝓞 K }) ℂ ((K →+* ℂ) → ℂ)
[PROOFSTEP]
let B := Pi.basisFun ℂ (K →+* ℂ)
[GOAL]
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
B : Basis (K →+* ℂ) ℂ ((K →+* ℂ) → ℂ) := Pi.basisFun ℂ (K →+* ℂ)
⊢ Basis (Free.ChooseBasisIndex ℤ { x // x ∈ 𝓞 K }) ℂ ((K →+* ℂ) → ℂ)
[PROOFSTEP]
let e : (K →+* ℂ) ≃ Free.ChooseBasisIndex ℤ (𝓞 K) :=
  equivOfCardEq ((Embeddings.card K ℂ).trans (finrank_eq_card_basis (integralBasis K)))
[GOAL]
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
B : Basis (K →+* ℂ) ℂ ((K →+* ℂ) → ℂ) := Pi.basisFun ℂ (K →+* ℂ)
e : (K →+* ℂ) ≃ Free.ChooseBasisIndex ℤ { x // x ∈ 𝓞 K } :=
  equivOfCardEq (_ : card (K →+* ℂ) = card (Free.ChooseBasisIndex ℤ { x // x ∈ 𝓞 K }))
⊢ Basis (Free.ChooseBasisIndex ℤ { x // x ∈ 𝓞 K }) ℂ ((K →+* ℂ) → ℂ)
[PROOFSTEP]
let M := B.toMatrix (fun i => canonicalEmbedding K (integralBasis K (e i)))
[GOAL]
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
B : Basis (K →+* ℂ) ℂ ((K →+* ℂ) → ℂ) := Pi.basisFun ℂ (K →+* ℂ)
e : (K →+* ℂ) ≃ Free.ChooseBasisIndex ℤ { x // x ∈ 𝓞 K } :=
  equivOfCardEq (_ : card (K →+* ℂ) = card (Free.ChooseBasisIndex ℤ { x // x ∈ 𝓞 K }))
M : Matrix (K →+* ℂ) (K →+* ℂ) ℂ := Basis.toMatrix B fun i => ↑(canonicalEmbedding K) (↑(integralBasis K) (↑e i))
⊢ Basis (Free.ChooseBasisIndex ℤ { x // x ∈ 𝓞 K }) ℂ ((K →+* ℂ) → ℂ)
[PROOFSTEP]
suffices M.det ≠ 0 by
  rw [← isUnit_iff_ne_zero, ← Basis.det_apply, ← is_basis_iff_det] at this
  refine basisOfLinearIndependentOfCardEqFinrank ((linearIndependent_equiv e.symm).mpr this.1) ?_
  rw [← finrank_eq_card_chooseBasisIndex, RingOfIntegers.rank, finrank_fintype_fun_eq_card, Embeddings.card]
    -- In order to prove that the determinant is nonzero, we show that it is equal to the
      -- square of the discriminant of the integral basis and thus it is not zero
[GOAL]
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
B : Basis (K →+* ℂ) ℂ ((K →+* ℂ) → ℂ) := Pi.basisFun ℂ (K →+* ℂ)
e : (K →+* ℂ) ≃ Free.ChooseBasisIndex ℤ { x // x ∈ 𝓞 K } :=
  equivOfCardEq (_ : card (K →+* ℂ) = card (Free.ChooseBasisIndex ℤ { x // x ∈ 𝓞 K }))
M : Matrix (K →+* ℂ) (K →+* ℂ) ℂ := Basis.toMatrix B fun i => ↑(canonicalEmbedding K) (↑(integralBasis K) (↑e i))
this : Matrix.det M ≠ 0
⊢ Basis (Free.ChooseBasisIndex ℤ { x // x ∈ 𝓞 K }) ℂ ((K →+* ℂ) → ℂ)
[PROOFSTEP]
rw [← isUnit_iff_ne_zero, ← Basis.det_apply, ← is_basis_iff_det] at this
[GOAL]
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
B : Basis (K →+* ℂ) ℂ ((K →+* ℂ) → ℂ) := Pi.basisFun ℂ (K →+* ℂ)
e : (K →+* ℂ) ≃ Free.ChooseBasisIndex ℤ { x // x ∈ 𝓞 K } :=
  equivOfCardEq (_ : card (K →+* ℂ) = card (Free.ChooseBasisIndex ℤ { x // x ∈ 𝓞 K }))
M : Matrix (K →+* ℂ) (K →+* ℂ) ℂ := Basis.toMatrix B fun i => ↑(canonicalEmbedding K) (↑(integralBasis K) (↑e i))
this :
  (LinearIndependent ℂ fun i => ↑(canonicalEmbedding K) (↑(integralBasis K) (↑e i))) ∧
    Submodule.span ℂ (Set.range fun i => ↑(canonicalEmbedding K) (↑(integralBasis K) (↑e i))) = ⊤
⊢ Basis (Free.ChooseBasisIndex ℤ { x // x ∈ 𝓞 K }) ℂ ((K →+* ℂ) → ℂ)
[PROOFSTEP]
refine basisOfLinearIndependentOfCardEqFinrank ((linearIndependent_equiv e.symm).mpr this.1) ?_
[GOAL]
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
B : Basis (K →+* ℂ) ℂ ((K →+* ℂ) → ℂ) := Pi.basisFun ℂ (K →+* ℂ)
e : (K →+* ℂ) ≃ Free.ChooseBasisIndex ℤ { x // x ∈ 𝓞 K } :=
  equivOfCardEq (_ : card (K →+* ℂ) = card (Free.ChooseBasisIndex ℤ { x // x ∈ 𝓞 K }))
M : Matrix (K →+* ℂ) (K →+* ℂ) ℂ := Basis.toMatrix B fun i => ↑(canonicalEmbedding K) (↑(integralBasis K) (↑e i))
this :
  (LinearIndependent ℂ fun i => ↑(canonicalEmbedding K) (↑(integralBasis K) (↑e i))) ∧
    Submodule.span ℂ (Set.range fun i => ↑(canonicalEmbedding K) (↑(integralBasis K) (↑e i))) = ⊤
⊢ card (Free.ChooseBasisIndex ℤ { x // x ∈ 𝓞 K }) = finrank ℂ ((K →+* ℂ) → ℂ)
[PROOFSTEP]
rw [← finrank_eq_card_chooseBasisIndex, RingOfIntegers.rank, finrank_fintype_fun_eq_card, Embeddings.card]
  -- In order to prove that the determinant is nonzero, we show that it is equal to the
    -- square of the discriminant of the integral basis and thus it is not zero
[GOAL]
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
B : Basis (K →+* ℂ) ℂ ((K →+* ℂ) → ℂ) := Pi.basisFun ℂ (K →+* ℂ)
e : (K →+* ℂ) ≃ Free.ChooseBasisIndex ℤ { x // x ∈ 𝓞 K } :=
  equivOfCardEq (_ : card (K →+* ℂ) = card (Free.ChooseBasisIndex ℤ { x // x ∈ 𝓞 K }))
M : Matrix (K →+* ℂ) (K →+* ℂ) ℂ := Basis.toMatrix B fun i => ↑(canonicalEmbedding K) (↑(integralBasis K) (↑e i))
⊢ Matrix.det M ≠ 0
[PROOFSTEP]
let N := Algebra.embeddingsMatrixReindex ℚ ℂ (fun i => integralBasis K (e i)) RingHom.equivRatAlgHom
[GOAL]
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
B : Basis (K →+* ℂ) ℂ ((K →+* ℂ) → ℂ) := Pi.basisFun ℂ (K →+* ℂ)
e : (K →+* ℂ) ≃ Free.ChooseBasisIndex ℤ { x // x ∈ 𝓞 K } :=
  equivOfCardEq (_ : card (K →+* ℂ) = card (Free.ChooseBasisIndex ℤ { x // x ∈ 𝓞 K }))
M : Matrix (K →+* ℂ) (K →+* ℂ) ℂ := Basis.toMatrix B fun i => ↑(canonicalEmbedding K) (↑(integralBasis K) (↑e i))
N : (fun x => Matrix (K →+* ℂ) (K →+* ℂ) ℂ) (Algebra.embeddingsMatrix ℚ ℂ fun i => ↑(integralBasis K) (↑e i)) :=
  Algebra.embeddingsMatrixReindex ℚ ℂ (fun i => ↑(integralBasis K) (↑e i)) RingHom.equivRatAlgHom
⊢ Matrix.det M ≠ 0
[PROOFSTEP]
rw [show M = N.transpose by {ext : 2; rfl
  }]
[GOAL]
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
B : Basis (K →+* ℂ) ℂ ((K →+* ℂ) → ℂ) := Pi.basisFun ℂ (K →+* ℂ)
e : (K →+* ℂ) ≃ Free.ChooseBasisIndex ℤ { x // x ∈ 𝓞 K } :=
  equivOfCardEq (_ : card (K →+* ℂ) = card (Free.ChooseBasisIndex ℤ { x // x ∈ 𝓞 K }))
M : Matrix (K →+* ℂ) (K →+* ℂ) ℂ := Basis.toMatrix B fun i => ↑(canonicalEmbedding K) (↑(integralBasis K) (↑e i))
N : (fun x => Matrix (K →+* ℂ) (K →+* ℂ) ℂ) (Algebra.embeddingsMatrix ℚ ℂ fun i => ↑(integralBasis K) (↑e i)) :=
  Algebra.embeddingsMatrixReindex ℚ ℂ (fun i => ↑(integralBasis K) (↑e i)) RingHom.equivRatAlgHom
⊢ M = Matrix.transpose N
[PROOFSTEP]
{ext : 2; rfl
}
[GOAL]
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
B : Basis (K →+* ℂ) ℂ ((K →+* ℂ) → ℂ) := Pi.basisFun ℂ (K →+* ℂ)
e : (K →+* ℂ) ≃ Free.ChooseBasisIndex ℤ { x // x ∈ 𝓞 K } :=
  equivOfCardEq (_ : card (K →+* ℂ) = card (Free.ChooseBasisIndex ℤ { x // x ∈ 𝓞 K }))
M : Matrix (K →+* ℂ) (K →+* ℂ) ℂ := Basis.toMatrix B fun i => ↑(canonicalEmbedding K) (↑(integralBasis K) (↑e i))
N : (fun x => Matrix (K →+* ℂ) (K →+* ℂ) ℂ) (Algebra.embeddingsMatrix ℚ ℂ fun i => ↑(integralBasis K) (↑e i)) :=
  Algebra.embeddingsMatrixReindex ℚ ℂ (fun i => ↑(integralBasis K) (↑e i)) RingHom.equivRatAlgHom
⊢ M = Matrix.transpose N
[PROOFSTEP]
ext : 2
[GOAL]
case a.h
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
B : Basis (K →+* ℂ) ℂ ((K →+* ℂ) → ℂ) := Pi.basisFun ℂ (K →+* ℂ)
e : (K →+* ℂ) ≃ Free.ChooseBasisIndex ℤ { x // x ∈ 𝓞 K } :=
  equivOfCardEq (_ : card (K →+* ℂ) = card (Free.ChooseBasisIndex ℤ { x // x ∈ 𝓞 K }))
M : Matrix (K →+* ℂ) (K →+* ℂ) ℂ := Basis.toMatrix B fun i => ↑(canonicalEmbedding K) (↑(integralBasis K) (↑e i))
N : (fun x => Matrix (K →+* ℂ) (K →+* ℂ) ℂ) (Algebra.embeddingsMatrix ℚ ℂ fun i => ↑(integralBasis K) (↑e i)) :=
  Algebra.embeddingsMatrixReindex ℚ ℂ (fun i => ↑(integralBasis K) (↑e i)) RingHom.equivRatAlgHom
i✝ x✝ : K →+* ℂ
⊢ M i✝ x✝ = Matrix.transpose N i✝ x✝
[PROOFSTEP]
rfl
[GOAL]
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
B : Basis (K →+* ℂ) ℂ ((K →+* ℂ) → ℂ) := Pi.basisFun ℂ (K →+* ℂ)
e : (K →+* ℂ) ≃ Free.ChooseBasisIndex ℤ { x // x ∈ 𝓞 K } :=
  equivOfCardEq (_ : card (K →+* ℂ) = card (Free.ChooseBasisIndex ℤ { x // x ∈ 𝓞 K }))
M : Matrix (K →+* ℂ) (K →+* ℂ) ℂ := Basis.toMatrix B fun i => ↑(canonicalEmbedding K) (↑(integralBasis K) (↑e i))
N : (fun x => Matrix (K →+* ℂ) (K →+* ℂ) ℂ) (Algebra.embeddingsMatrix ℚ ℂ fun i => ↑(integralBasis K) (↑e i)) :=
  Algebra.embeddingsMatrixReindex ℚ ℂ (fun i => ↑(integralBasis K) (↑e i)) RingHom.equivRatAlgHom
⊢ Matrix.det (Matrix.transpose N) ≠ 0
[PROOFSTEP]
rw [Matrix.det_transpose, ← @pow_ne_zero_iff ℂ _ _ _ 2 (by norm_num)]
[GOAL]
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
B : Basis (K →+* ℂ) ℂ ((K →+* ℂ) → ℂ) := Pi.basisFun ℂ (K →+* ℂ)
e : (K →+* ℂ) ≃ Free.ChooseBasisIndex ℤ { x // x ∈ 𝓞 K } :=
  equivOfCardEq (_ : card (K →+* ℂ) = card (Free.ChooseBasisIndex ℤ { x // x ∈ 𝓞 K }))
M : Matrix (K →+* ℂ) (K →+* ℂ) ℂ := Basis.toMatrix B fun i => ↑(canonicalEmbedding K) (↑(integralBasis K) (↑e i))
N : (fun x => Matrix (K →+* ℂ) (K →+* ℂ) ℂ) (Algebra.embeddingsMatrix ℚ ℂ fun i => ↑(integralBasis K) (↑e i)) :=
  Algebra.embeddingsMatrixReindex ℚ ℂ (fun i => ↑(integralBasis K) (↑e i)) RingHom.equivRatAlgHom
⊢ 0 < 2
[PROOFSTEP]
norm_num
[GOAL]
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
B : Basis (K →+* ℂ) ℂ ((K →+* ℂ) → ℂ) := Pi.basisFun ℂ (K →+* ℂ)
e : (K →+* ℂ) ≃ Free.ChooseBasisIndex ℤ { x // x ∈ 𝓞 K } :=
  equivOfCardEq (_ : card (K →+* ℂ) = card (Free.ChooseBasisIndex ℤ { x // x ∈ 𝓞 K }))
M : Matrix (K →+* ℂ) (K →+* ℂ) ℂ := Basis.toMatrix B fun i => ↑(canonicalEmbedding K) (↑(integralBasis K) (↑e i))
N : (fun x => Matrix (K →+* ℂ) (K →+* ℂ) ℂ) (Algebra.embeddingsMatrix ℚ ℂ fun i => ↑(integralBasis K) (↑e i)) :=
  Algebra.embeddingsMatrixReindex ℚ ℂ (fun i => ↑(integralBasis K) (↑e i)) RingHom.equivRatAlgHom
⊢ Matrix.det N ^ 2 ≠ 0
[PROOFSTEP]
convert (map_ne_zero_iff _ (algebraMap ℚ ℂ).injective).mpr (Algebra.discr_not_zero_of_basis ℚ (integralBasis K))
[GOAL]
case h.e'_2
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
B : Basis (K →+* ℂ) ℂ ((K →+* ℂ) → ℂ) := Pi.basisFun ℂ (K →+* ℂ)
e : (K →+* ℂ) ≃ Free.ChooseBasisIndex ℤ { x // x ∈ 𝓞 K } :=
  equivOfCardEq (_ : card (K →+* ℂ) = card (Free.ChooseBasisIndex ℤ { x // x ∈ 𝓞 K }))
M : Matrix (K →+* ℂ) (K →+* ℂ) ℂ := Basis.toMatrix B fun i => ↑(canonicalEmbedding K) (↑(integralBasis K) (↑e i))
N : (fun x => Matrix (K →+* ℂ) (K →+* ℂ) ℂ) (Algebra.embeddingsMatrix ℚ ℂ fun i => ↑(integralBasis K) (↑e i)) :=
  Algebra.embeddingsMatrixReindex ℚ ℂ (fun i => ↑(integralBasis K) (↑e i)) RingHom.equivRatAlgHom
⊢ Matrix.det N ^ 2 = ↑(algebraMap ℚ ℂ) (Algebra.discr ℚ ↑(integralBasis K))
[PROOFSTEP]
rw [← Algebra.discr_reindex ℚ (integralBasis K) e.symm]
[GOAL]
case h.e'_2
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
B : Basis (K →+* ℂ) ℂ ((K →+* ℂ) → ℂ) := Pi.basisFun ℂ (K →+* ℂ)
e : (K →+* ℂ) ≃ Free.ChooseBasisIndex ℤ { x // x ∈ 𝓞 K } :=
  equivOfCardEq (_ : card (K →+* ℂ) = card (Free.ChooseBasisIndex ℤ { x // x ∈ 𝓞 K }))
M : Matrix (K →+* ℂ) (K →+* ℂ) ℂ := Basis.toMatrix B fun i => ↑(canonicalEmbedding K) (↑(integralBasis K) (↑e i))
N : (fun x => Matrix (K →+* ℂ) (K →+* ℂ) ℂ) (Algebra.embeddingsMatrix ℚ ℂ fun i => ↑(integralBasis K) (↑e i)) :=
  Algebra.embeddingsMatrixReindex ℚ ℂ (fun i => ↑(integralBasis K) (↑e i)) RingHom.equivRatAlgHom
⊢ Matrix.det N ^ 2 = ↑(algebraMap ℚ ℂ) (Algebra.discr ℚ (↑(integralBasis K) ∘ ↑e.symm.symm))
[PROOFSTEP]
exact
  (Algebra.discr_eq_det_embeddingsMatrixReindex_pow_two ℚ ℂ (fun i => integralBasis K (e i))
      RingHom.equivRatAlgHom).symm
[GOAL]
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
i : Free.ChooseBasisIndex ℤ { x // x ∈ 𝓞 K }
⊢ ↑(latticeBasis K) i = ↑(canonicalEmbedding K) (↑(integralBasis K) i)
[PROOFSTEP]
simp only [latticeBasis, integralBasis_apply, coe_basisOfLinearIndependentOfCardEqFinrank, Function.comp_apply,
  Equiv.apply_symm_apply]
[GOAL]
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
x : (K →+* ℂ) → ℂ
⊢ x ∈ Submodule.span ℤ (Set.range ↑(latticeBasis K)) ↔ x ∈ ↑(canonicalEmbedding K) '' ↑(𝓞 K)
[PROOFSTEP]
rw [show Set.range (latticeBasis K) = (canonicalEmbedding K).toIntAlgHom.toLinearMap '' (Set.range (integralBasis K)) by
    rw [← Set.range_comp]; exact congrArg Set.range (funext (fun i => latticeBasis_apply K i))]
[GOAL]
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
x : (K →+* ℂ) → ℂ
⊢ Set.range ↑(latticeBasis K) =
    ↑(AlgHom.toLinearMap (RingHom.toIntAlgHom (canonicalEmbedding K))) '' Set.range ↑(integralBasis K)
[PROOFSTEP]
rw [← Set.range_comp]
[GOAL]
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
x : (K →+* ℂ) → ℂ
⊢ Set.range ↑(latticeBasis K) =
    Set.range (↑(AlgHom.toLinearMap (RingHom.toIntAlgHom (canonicalEmbedding K))) ∘ ↑(integralBasis K))
[PROOFSTEP]
exact congrArg Set.range (funext (fun i => latticeBasis_apply K i))
[GOAL]
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
x : (K →+* ℂ) → ℂ
⊢ x ∈
      Submodule.span ℤ
        (↑(AlgHom.toLinearMap (RingHom.toIntAlgHom (canonicalEmbedding K))) '' Set.range ↑(integralBasis K)) ↔
    x ∈ ↑(canonicalEmbedding K) '' ↑(𝓞 K)
[PROOFSTEP]
rw [← Submodule.map_span, ← SetLike.mem_coe, Submodule.map_coe]
[GOAL]
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
x : (K →+* ℂ) → ℂ
⊢ x ∈
      ↑(AlgHom.toLinearMap (RingHom.toIntAlgHom (canonicalEmbedding K))) ''
        ↑(Submodule.span ℤ (Set.range ↑(integralBasis K))) ↔
    x ∈ ↑(canonicalEmbedding K) '' ↑(𝓞 K)
[PROOFSTEP]
rw [show (Submodule.span ℤ (Set.range (integralBasis K)) : Set K) = 𝓞 K by ext; exact mem_span_integralBasis K]
[GOAL]
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
x : (K →+* ℂ) → ℂ
⊢ ↑(Submodule.span ℤ (Set.range ↑(integralBasis K))) = ↑(𝓞 K)
[PROOFSTEP]
ext
[GOAL]
case h
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
x : (K →+* ℂ) → ℂ
x✝ : K
⊢ x✝ ∈ ↑(Submodule.span ℤ (Set.range ↑(integralBasis K))) ↔ x✝ ∈ ↑(𝓞 K)
[PROOFSTEP]
exact mem_span_integralBasis K
[GOAL]
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
x : (K →+* ℂ) → ℂ
⊢ x ∈ ↑(AlgHom.toLinearMap (RingHom.toIntAlgHom (canonicalEmbedding K))) '' ↑(𝓞 K) ↔
    x ∈ ↑(canonicalEmbedding K) '' ↑(𝓞 K)
[PROOFSTEP]
rfl


[GOAL]
𝕜 : Type u_1
inst✝⁶ : IsROrC 𝕜
μ : Measure ℝ
E : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : NormedSpace 𝕜 E
inst✝² : CompleteSpace E
H : Type u_3
inst✝¹ : NormedAddCommGroup H
inst✝ : NormedSpace 𝕜 H
a b ε : ℝ
bound : ℝ → ℝ
F : H → ℝ → E
F' : ℝ → H →L[𝕜] E
x₀ : H
ε_pos : 0 < ε
hF_meas : ∀ᶠ (x : H) in 𝓝 x₀, AEStronglyMeasurable (F x) (Measure.restrict μ (Ι a b))
hF_int : IntervalIntegrable (F x₀) μ a b
hF'_meas : AEStronglyMeasurable F' (Measure.restrict μ (Ι a b))
h_lip : ∀ᵐ (t : ℝ) ∂μ, t ∈ Ι a b → LipschitzOnWith (↑Real.nnabs (bound t)) (fun x => F x t) (ball x₀ ε)
bound_integrable : IntervalIntegrable bound μ a b
h_diff : ∀ᵐ (t : ℝ) ∂μ, t ∈ Ι a b → HasFDerivAt (fun x => F x t) (F' t) x₀
⊢ IntervalIntegrable F' μ a b ∧ HasFDerivAt (fun x => ∫ (t : ℝ) in a..b, F x t ∂μ) (∫ (t : ℝ) in a..b, F' t ∂μ) x₀
[PROOFSTEP]
rw [← ae_restrict_iff' measurableSet_uIoc] at h_lip h_diff
[GOAL]
𝕜 : Type u_1
inst✝⁶ : IsROrC 𝕜
μ : Measure ℝ
E : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : NormedSpace 𝕜 E
inst✝² : CompleteSpace E
H : Type u_3
inst✝¹ : NormedAddCommGroup H
inst✝ : NormedSpace 𝕜 H
a b ε : ℝ
bound : ℝ → ℝ
F : H → ℝ → E
F' : ℝ → H →L[𝕜] E
x₀ : H
ε_pos : 0 < ε
hF_meas : ∀ᶠ (x : H) in 𝓝 x₀, AEStronglyMeasurable (F x) (Measure.restrict μ (Ι a b))
hF_int : IntervalIntegrable (F x₀) μ a b
hF'_meas : AEStronglyMeasurable F' (Measure.restrict μ (Ι a b))
h_lip : ∀ᵐ (x : ℝ) ∂Measure.restrict μ (Ι a b), LipschitzOnWith (↑Real.nnabs (bound x)) (fun x_1 => F x_1 x) (ball x₀ ε)
bound_integrable : IntervalIntegrable bound μ a b
h_diff : ∀ᵐ (x : ℝ) ∂Measure.restrict μ (Ι a b), HasFDerivAt (fun x_1 => F x_1 x) (F' x) x₀
⊢ IntervalIntegrable F' μ a b ∧ HasFDerivAt (fun x => ∫ (t : ℝ) in a..b, F x t ∂μ) (∫ (t : ℝ) in a..b, F' t ∂μ) x₀
[PROOFSTEP]
simp only [intervalIntegrable_iff] at hF_int bound_integrable ⊢
[GOAL]
𝕜 : Type u_1
inst✝⁶ : IsROrC 𝕜
μ : Measure ℝ
E : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : NormedSpace 𝕜 E
inst✝² : CompleteSpace E
H : Type u_3
inst✝¹ : NormedAddCommGroup H
inst✝ : NormedSpace 𝕜 H
a b ε : ℝ
bound : ℝ → ℝ
F : H → ℝ → E
F' : ℝ → H →L[𝕜] E
x₀ : H
ε_pos : 0 < ε
hF_meas : ∀ᶠ (x : H) in 𝓝 x₀, AEStronglyMeasurable (F x) (Measure.restrict μ (Ι a b))
hF'_meas : AEStronglyMeasurable F' (Measure.restrict μ (Ι a b))
h_lip : ∀ᵐ (x : ℝ) ∂Measure.restrict μ (Ι a b), LipschitzOnWith (↑Real.nnabs (bound x)) (fun x_1 => F x_1 x) (ball x₀ ε)
h_diff : ∀ᵐ (x : ℝ) ∂Measure.restrict μ (Ι a b), HasFDerivAt (fun x_1 => F x_1 x) (F' x) x₀
hF_int : IntegrableOn (F x₀) (Ι a b)
bound_integrable : IntegrableOn bound (Ι a b)
⊢ IntegrableOn F' (Ι a b) ∧ HasFDerivAt (fun x => ∫ (t : ℝ) in a..b, F x t ∂μ) (∫ (t : ℝ) in a..b, F' t ∂μ) x₀
[PROOFSTEP]
simp only [intervalIntegral_eq_integral_uIoc]
[GOAL]
𝕜 : Type u_1
inst✝⁶ : IsROrC 𝕜
μ : Measure ℝ
E : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : NormedSpace 𝕜 E
inst✝² : CompleteSpace E
H : Type u_3
inst✝¹ : NormedAddCommGroup H
inst✝ : NormedSpace 𝕜 H
a b ε : ℝ
bound : ℝ → ℝ
F : H → ℝ → E
F' : ℝ → H →L[𝕜] E
x₀ : H
ε_pos : 0 < ε
hF_meas : ∀ᶠ (x : H) in 𝓝 x₀, AEStronglyMeasurable (F x) (Measure.restrict μ (Ι a b))
hF'_meas : AEStronglyMeasurable F' (Measure.restrict μ (Ι a b))
h_lip : ∀ᵐ (x : ℝ) ∂Measure.restrict μ (Ι a b), LipschitzOnWith (↑Real.nnabs (bound x)) (fun x_1 => F x_1 x) (ball x₀ ε)
h_diff : ∀ᵐ (x : ℝ) ∂Measure.restrict μ (Ι a b), HasFDerivAt (fun x_1 => F x_1 x) (F' x) x₀
hF_int : IntegrableOn (F x₀) (Ι a b)
bound_integrable : IntegrableOn bound (Ι a b)
⊢ IntegrableOn F' (Ι a b) ∧
    HasFDerivAt (fun x => (if a ≤ b then 1 else -1) • ∫ (t : ℝ) in Ι a b, F x t ∂μ)
      ((if a ≤ b then 1 else -1) • ∫ (t : ℝ) in Ι a b, F' t ∂μ) x₀
[PROOFSTEP]
have := hasFDerivAt_integral_of_dominated_loc_of_lip ε_pos hF_meas hF_int hF'_meas h_lip bound_integrable h_diff
[GOAL]
𝕜 : Type u_1
inst✝⁶ : IsROrC 𝕜
μ : Measure ℝ
E : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : NormedSpace 𝕜 E
inst✝² : CompleteSpace E
H : Type u_3
inst✝¹ : NormedAddCommGroup H
inst✝ : NormedSpace 𝕜 H
a b ε : ℝ
bound : ℝ → ℝ
F : H → ℝ → E
F' : ℝ → H →L[𝕜] E
x₀ : H
ε_pos : 0 < ε
hF_meas : ∀ᶠ (x : H) in 𝓝 x₀, AEStronglyMeasurable (F x) (Measure.restrict μ (Ι a b))
hF'_meas : AEStronglyMeasurable F' (Measure.restrict μ (Ι a b))
h_lip : ∀ᵐ (x : ℝ) ∂Measure.restrict μ (Ι a b), LipschitzOnWith (↑Real.nnabs (bound x)) (fun x_1 => F x_1 x) (ball x₀ ε)
h_diff : ∀ᵐ (x : ℝ) ∂Measure.restrict μ (Ι a b), HasFDerivAt (fun x_1 => F x_1 x) (F' x) x₀
hF_int : IntegrableOn (F x₀) (Ι a b)
bound_integrable : IntegrableOn bound (Ι a b)
this : Integrable F' ∧ HasFDerivAt (fun x => ∫ (a : ℝ) in Ι a b, F x a ∂μ) (∫ (a : ℝ) in Ι a b, F' a ∂μ) x₀
⊢ IntegrableOn F' (Ι a b) ∧
    HasFDerivAt (fun x => (if a ≤ b then 1 else -1) • ∫ (t : ℝ) in Ι a b, F x t ∂μ)
      ((if a ≤ b then 1 else -1) • ∫ (t : ℝ) in Ι a b, F' t ∂μ) x₀
[PROOFSTEP]
exact ⟨this.1, this.2.const_smul _⟩
[GOAL]
𝕜 : Type u_1
inst✝⁶ : IsROrC 𝕜
μ : Measure ℝ
E : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : NormedSpace 𝕜 E
inst✝² : CompleteSpace E
H : Type u_3
inst✝¹ : NormedAddCommGroup H
inst✝ : NormedSpace 𝕜 H
a b ε : ℝ
bound : ℝ → ℝ
F : H → ℝ → E
F' : H → ℝ → H →L[𝕜] E
x₀ : H
ε_pos : 0 < ε
hF_meas : ∀ᶠ (x : H) in 𝓝 x₀, AEStronglyMeasurable (F x) (Measure.restrict μ (Ι a b))
hF_int : IntervalIntegrable (F x₀) μ a b
hF'_meas : AEStronglyMeasurable (F' x₀) (Measure.restrict μ (Ι a b))
h_bound : ∀ᵐ (t : ℝ) ∂μ, t ∈ Ι a b → ∀ (x : H), x ∈ ball x₀ ε → ‖F' x t‖ ≤ bound t
bound_integrable : IntervalIntegrable bound μ a b
h_diff : ∀ᵐ (t : ℝ) ∂μ, t ∈ Ι a b → ∀ (x : H), x ∈ ball x₀ ε → HasFDerivAt (fun x => F x t) (F' x t) x
⊢ HasFDerivAt (fun x => ∫ (t : ℝ) in a..b, F x t ∂μ) (∫ (t : ℝ) in a..b, F' x₀ t ∂μ) x₀
[PROOFSTEP]
rw [← ae_restrict_iff' measurableSet_uIoc] at h_bound h_diff
[GOAL]
𝕜 : Type u_1
inst✝⁶ : IsROrC 𝕜
μ : Measure ℝ
E : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : NormedSpace 𝕜 E
inst✝² : CompleteSpace E
H : Type u_3
inst✝¹ : NormedAddCommGroup H
inst✝ : NormedSpace 𝕜 H
a b ε : ℝ
bound : ℝ → ℝ
F : H → ℝ → E
F' : H → ℝ → H →L[𝕜] E
x₀ : H
ε_pos : 0 < ε
hF_meas : ∀ᶠ (x : H) in 𝓝 x₀, AEStronglyMeasurable (F x) (Measure.restrict μ (Ι a b))
hF_int : IntervalIntegrable (F x₀) μ a b
hF'_meas : AEStronglyMeasurable (F' x₀) (Measure.restrict μ (Ι a b))
h_bound : ∀ᵐ (x : ℝ) ∂Measure.restrict μ (Ι a b), ∀ (x_1 : H), x_1 ∈ ball x₀ ε → ‖F' x_1 x‖ ≤ bound x
bound_integrable : IntervalIntegrable bound μ a b
h_diff :
  ∀ᵐ (x : ℝ) ∂Measure.restrict μ (Ι a b), ∀ (x_1 : H), x_1 ∈ ball x₀ ε → HasFDerivAt (fun x_2 => F x_2 x) (F' x_1 x) x_1
⊢ HasFDerivAt (fun x => ∫ (t : ℝ) in a..b, F x t ∂μ) (∫ (t : ℝ) in a..b, F' x₀ t ∂μ) x₀
[PROOFSTEP]
simp only [intervalIntegrable_iff] at hF_int bound_integrable
[GOAL]
𝕜 : Type u_1
inst✝⁶ : IsROrC 𝕜
μ : Measure ℝ
E : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : NormedSpace 𝕜 E
inst✝² : CompleteSpace E
H : Type u_3
inst✝¹ : NormedAddCommGroup H
inst✝ : NormedSpace 𝕜 H
a b ε : ℝ
bound : ℝ → ℝ
F : H → ℝ → E
F' : H → ℝ → H →L[𝕜] E
x₀ : H
ε_pos : 0 < ε
hF_meas : ∀ᶠ (x : H) in 𝓝 x₀, AEStronglyMeasurable (F x) (Measure.restrict μ (Ι a b))
hF'_meas : AEStronglyMeasurable (F' x₀) (Measure.restrict μ (Ι a b))
h_bound : ∀ᵐ (x : ℝ) ∂Measure.restrict μ (Ι a b), ∀ (x_1 : H), x_1 ∈ ball x₀ ε → ‖F' x_1 x‖ ≤ bound x
h_diff :
  ∀ᵐ (x : ℝ) ∂Measure.restrict μ (Ι a b), ∀ (x_1 : H), x_1 ∈ ball x₀ ε → HasFDerivAt (fun x_2 => F x_2 x) (F' x_1 x) x_1
hF_int : IntegrableOn (F x₀) (Ι a b)
bound_integrable : IntegrableOn bound (Ι a b)
⊢ HasFDerivAt (fun x => ∫ (t : ℝ) in a..b, F x t ∂μ) (∫ (t : ℝ) in a..b, F' x₀ t ∂μ) x₀
[PROOFSTEP]
simp only [intervalIntegral_eq_integral_uIoc]
[GOAL]
𝕜 : Type u_1
inst✝⁶ : IsROrC 𝕜
μ : Measure ℝ
E : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : NormedSpace 𝕜 E
inst✝² : CompleteSpace E
H : Type u_3
inst✝¹ : NormedAddCommGroup H
inst✝ : NormedSpace 𝕜 H
a b ε : ℝ
bound : ℝ → ℝ
F : H → ℝ → E
F' : H → ℝ → H →L[𝕜] E
x₀ : H
ε_pos : 0 < ε
hF_meas : ∀ᶠ (x : H) in 𝓝 x₀, AEStronglyMeasurable (F x) (Measure.restrict μ (Ι a b))
hF'_meas : AEStronglyMeasurable (F' x₀) (Measure.restrict μ (Ι a b))
h_bound : ∀ᵐ (x : ℝ) ∂Measure.restrict μ (Ι a b), ∀ (x_1 : H), x_1 ∈ ball x₀ ε → ‖F' x_1 x‖ ≤ bound x
h_diff :
  ∀ᵐ (x : ℝ) ∂Measure.restrict μ (Ι a b), ∀ (x_1 : H), x_1 ∈ ball x₀ ε → HasFDerivAt (fun x_2 => F x_2 x) (F' x_1 x) x_1
hF_int : IntegrableOn (F x₀) (Ι a b)
bound_integrable : IntegrableOn bound (Ι a b)
⊢ HasFDerivAt (fun x => (if a ≤ b then 1 else -1) • ∫ (t : ℝ) in Ι a b, F x t ∂μ)
    ((if a ≤ b then 1 else -1) • ∫ (t : ℝ) in Ι a b, F' x₀ t ∂μ) x₀
[PROOFSTEP]
exact
  (hasFDerivAt_integral_of_dominated_of_fderiv_le ε_pos hF_meas hF_int hF'_meas h_bound bound_integrable
        h_diff).const_smul
    _
[GOAL]
𝕜 : Type u_1
inst✝⁶ : IsROrC 𝕜
μ : Measure ℝ
E : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : NormedSpace 𝕜 E
inst✝² : CompleteSpace E
H : Type u_3
inst✝¹ : NormedAddCommGroup H
inst✝ : NormedSpace 𝕜 H
a b ε : ℝ
bound : ℝ → ℝ
F : 𝕜 → ℝ → E
F' : ℝ → E
x₀ : 𝕜
ε_pos : 0 < ε
hF_meas : ∀ᶠ (x : 𝕜) in 𝓝 x₀, AEStronglyMeasurable (F x) (Measure.restrict μ (Ι a b))
hF_int : IntervalIntegrable (F x₀) μ a b
hF'_meas : AEStronglyMeasurable F' (Measure.restrict μ (Ι a b))
h_lipsch : ∀ᵐ (t : ℝ) ∂μ, t ∈ Ι a b → LipschitzOnWith (↑Real.nnabs (bound t)) (fun x => F x t) (ball x₀ ε)
bound_integrable : IntervalIntegrable bound μ a b
h_diff : ∀ᵐ (t : ℝ) ∂μ, t ∈ Ι a b → HasDerivAt (fun x => F x t) (F' t) x₀
⊢ IntervalIntegrable F' μ a b ∧ HasDerivAt (fun x => ∫ (t : ℝ) in a..b, F x t ∂μ) (∫ (t : ℝ) in a..b, F' t ∂μ) x₀
[PROOFSTEP]
rw [← ae_restrict_iff' measurableSet_uIoc] at h_lipsch h_diff
[GOAL]
𝕜 : Type u_1
inst✝⁶ : IsROrC 𝕜
μ : Measure ℝ
E : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : NormedSpace 𝕜 E
inst✝² : CompleteSpace E
H : Type u_3
inst✝¹ : NormedAddCommGroup H
inst✝ : NormedSpace 𝕜 H
a b ε : ℝ
bound : ℝ → ℝ
F : 𝕜 → ℝ → E
F' : ℝ → E
x₀ : 𝕜
ε_pos : 0 < ε
hF_meas : ∀ᶠ (x : 𝕜) in 𝓝 x₀, AEStronglyMeasurable (F x) (Measure.restrict μ (Ι a b))
hF_int : IntervalIntegrable (F x₀) μ a b
hF'_meas : AEStronglyMeasurable F' (Measure.restrict μ (Ι a b))
h_lipsch :
  ∀ᵐ (x : ℝ) ∂Measure.restrict μ (Ι a b), LipschitzOnWith (↑Real.nnabs (bound x)) (fun x_1 => F x_1 x) (ball x₀ ε)
bound_integrable : IntervalIntegrable bound μ a b
h_diff : ∀ᵐ (x : ℝ) ∂Measure.restrict μ (Ι a b), HasDerivAt (fun x_1 => F x_1 x) (F' x) x₀
⊢ IntervalIntegrable F' μ a b ∧ HasDerivAt (fun x => ∫ (t : ℝ) in a..b, F x t ∂μ) (∫ (t : ℝ) in a..b, F' t ∂μ) x₀
[PROOFSTEP]
simp only [intervalIntegrable_iff] at hF_int bound_integrable ⊢
[GOAL]
𝕜 : Type u_1
inst✝⁶ : IsROrC 𝕜
μ : Measure ℝ
E : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : NormedSpace 𝕜 E
inst✝² : CompleteSpace E
H : Type u_3
inst✝¹ : NormedAddCommGroup H
inst✝ : NormedSpace 𝕜 H
a b ε : ℝ
bound : ℝ → ℝ
F : 𝕜 → ℝ → E
F' : ℝ → E
x₀ : 𝕜
ε_pos : 0 < ε
hF_meas : ∀ᶠ (x : 𝕜) in 𝓝 x₀, AEStronglyMeasurable (F x) (Measure.restrict μ (Ι a b))
hF'_meas : AEStronglyMeasurable F' (Measure.restrict μ (Ι a b))
h_lipsch :
  ∀ᵐ (x : ℝ) ∂Measure.restrict μ (Ι a b), LipschitzOnWith (↑Real.nnabs (bound x)) (fun x_1 => F x_1 x) (ball x₀ ε)
h_diff : ∀ᵐ (x : ℝ) ∂Measure.restrict μ (Ι a b), HasDerivAt (fun x_1 => F x_1 x) (F' x) x₀
hF_int : IntegrableOn (F x₀) (Ι a b)
bound_integrable : IntegrableOn bound (Ι a b)
⊢ IntegrableOn F' (Ι a b) ∧ HasDerivAt (fun x => ∫ (t : ℝ) in a..b, F x t ∂μ) (∫ (t : ℝ) in a..b, F' t ∂μ) x₀
[PROOFSTEP]
simp only [intervalIntegral_eq_integral_uIoc]
[GOAL]
𝕜 : Type u_1
inst✝⁶ : IsROrC 𝕜
μ : Measure ℝ
E : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : NormedSpace 𝕜 E
inst✝² : CompleteSpace E
H : Type u_3
inst✝¹ : NormedAddCommGroup H
inst✝ : NormedSpace 𝕜 H
a b ε : ℝ
bound : ℝ → ℝ
F : 𝕜 → ℝ → E
F' : ℝ → E
x₀ : 𝕜
ε_pos : 0 < ε
hF_meas : ∀ᶠ (x : 𝕜) in 𝓝 x₀, AEStronglyMeasurable (F x) (Measure.restrict μ (Ι a b))
hF'_meas : AEStronglyMeasurable F' (Measure.restrict μ (Ι a b))
h_lipsch :
  ∀ᵐ (x : ℝ) ∂Measure.restrict μ (Ι a b), LipschitzOnWith (↑Real.nnabs (bound x)) (fun x_1 => F x_1 x) (ball x₀ ε)
h_diff : ∀ᵐ (x : ℝ) ∂Measure.restrict μ (Ι a b), HasDerivAt (fun x_1 => F x_1 x) (F' x) x₀
hF_int : IntegrableOn (F x₀) (Ι a b)
bound_integrable : IntegrableOn bound (Ι a b)
⊢ IntegrableOn F' (Ι a b) ∧
    HasDerivAt (fun x => (if a ≤ b then 1 else -1) • ∫ (t : ℝ) in Ι a b, F x t ∂μ)
      ((if a ≤ b then 1 else -1) • ∫ (t : ℝ) in Ι a b, F' t ∂μ) x₀
[PROOFSTEP]
have := hasDerivAt_integral_of_dominated_loc_of_lip ε_pos hF_meas hF_int hF'_meas h_lipsch bound_integrable h_diff
[GOAL]
𝕜 : Type u_1
inst✝⁶ : IsROrC 𝕜
μ : Measure ℝ
E : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : NormedSpace 𝕜 E
inst✝² : CompleteSpace E
H : Type u_3
inst✝¹ : NormedAddCommGroup H
inst✝ : NormedSpace 𝕜 H
a b ε : ℝ
bound : ℝ → ℝ
F : 𝕜 → ℝ → E
F' : ℝ → E
x₀ : 𝕜
ε_pos : 0 < ε
hF_meas : ∀ᶠ (x : 𝕜) in 𝓝 x₀, AEStronglyMeasurable (F x) (Measure.restrict μ (Ι a b))
hF'_meas : AEStronglyMeasurable F' (Measure.restrict μ (Ι a b))
h_lipsch :
  ∀ᵐ (x : ℝ) ∂Measure.restrict μ (Ι a b), LipschitzOnWith (↑Real.nnabs (bound x)) (fun x_1 => F x_1 x) (ball x₀ ε)
h_diff : ∀ᵐ (x : ℝ) ∂Measure.restrict μ (Ι a b), HasDerivAt (fun x_1 => F x_1 x) (F' x) x₀
hF_int : IntegrableOn (F x₀) (Ι a b)
bound_integrable : IntegrableOn bound (Ι a b)
this : Integrable F' ∧ HasDerivAt (fun x => ∫ (a : ℝ) in Ι a b, F x a ∂μ) (∫ (a : ℝ) in Ι a b, F' a ∂μ) x₀
⊢ IntegrableOn F' (Ι a b) ∧
    HasDerivAt (fun x => (if a ≤ b then 1 else -1) • ∫ (t : ℝ) in Ι a b, F x t ∂μ)
      ((if a ≤ b then 1 else -1) • ∫ (t : ℝ) in Ι a b, F' t ∂μ) x₀
[PROOFSTEP]
exact ⟨this.1, this.2.const_smul _⟩
[GOAL]
𝕜 : Type u_1
inst✝⁶ : IsROrC 𝕜
μ : Measure ℝ
E : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : NormedSpace 𝕜 E
inst✝² : CompleteSpace E
H : Type u_3
inst✝¹ : NormedAddCommGroup H
inst✝ : NormedSpace 𝕜 H
a b ε : ℝ
bound : ℝ → ℝ
F F' : 𝕜 → ℝ → E
x₀ : 𝕜
ε_pos : 0 < ε
hF_meas : ∀ᶠ (x : 𝕜) in 𝓝 x₀, AEStronglyMeasurable (F x) (Measure.restrict μ (Ι a b))
hF_int : IntervalIntegrable (F x₀) μ a b
hF'_meas : AEStronglyMeasurable (F' x₀) (Measure.restrict μ (Ι a b))
h_bound : ∀ᵐ (t : ℝ) ∂μ, t ∈ Ι a b → ∀ (x : 𝕜), x ∈ ball x₀ ε → ‖F' x t‖ ≤ bound t
bound_integrable : IntervalIntegrable bound μ a b
h_diff : ∀ᵐ (t : ℝ) ∂μ, t ∈ Ι a b → ∀ (x : 𝕜), x ∈ ball x₀ ε → HasDerivAt (fun x => F x t) (F' x t) x
⊢ IntervalIntegrable (F' x₀) μ a b ∧
    HasDerivAt (fun x => ∫ (t : ℝ) in a..b, F x t ∂μ) (∫ (t : ℝ) in a..b, F' x₀ t ∂μ) x₀
[PROOFSTEP]
rw [← ae_restrict_iff' measurableSet_uIoc] at h_bound h_diff
[GOAL]
𝕜 : Type u_1
inst✝⁶ : IsROrC 𝕜
μ : Measure ℝ
E : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : NormedSpace 𝕜 E
inst✝² : CompleteSpace E
H : Type u_3
inst✝¹ : NormedAddCommGroup H
inst✝ : NormedSpace 𝕜 H
a b ε : ℝ
bound : ℝ → ℝ
F F' : 𝕜 → ℝ → E
x₀ : 𝕜
ε_pos : 0 < ε
hF_meas : ∀ᶠ (x : 𝕜) in 𝓝 x₀, AEStronglyMeasurable (F x) (Measure.restrict μ (Ι a b))
hF_int : IntervalIntegrable (F x₀) μ a b
hF'_meas : AEStronglyMeasurable (F' x₀) (Measure.restrict μ (Ι a b))
h_bound : ∀ᵐ (x : ℝ) ∂Measure.restrict μ (Ι a b), ∀ (x_1 : 𝕜), x_1 ∈ ball x₀ ε → ‖F' x_1 x‖ ≤ bound x
bound_integrable : IntervalIntegrable bound μ a b
h_diff :
  ∀ᵐ (x : ℝ) ∂Measure.restrict μ (Ι a b), ∀ (x_1 : 𝕜), x_1 ∈ ball x₀ ε → HasDerivAt (fun x_2 => F x_2 x) (F' x_1 x) x_1
⊢ IntervalIntegrable (F' x₀) μ a b ∧
    HasDerivAt (fun x => ∫ (t : ℝ) in a..b, F x t ∂μ) (∫ (t : ℝ) in a..b, F' x₀ t ∂μ) x₀
[PROOFSTEP]
simp only [intervalIntegrable_iff] at hF_int bound_integrable ⊢
[GOAL]
𝕜 : Type u_1
inst✝⁶ : IsROrC 𝕜
μ : Measure ℝ
E : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : NormedSpace 𝕜 E
inst✝² : CompleteSpace E
H : Type u_3
inst✝¹ : NormedAddCommGroup H
inst✝ : NormedSpace 𝕜 H
a b ε : ℝ
bound : ℝ → ℝ
F F' : 𝕜 → ℝ → E
x₀ : 𝕜
ε_pos : 0 < ε
hF_meas : ∀ᶠ (x : 𝕜) in 𝓝 x₀, AEStronglyMeasurable (F x) (Measure.restrict μ (Ι a b))
hF'_meas : AEStronglyMeasurable (F' x₀) (Measure.restrict μ (Ι a b))
h_bound : ∀ᵐ (x : ℝ) ∂Measure.restrict μ (Ι a b), ∀ (x_1 : 𝕜), x_1 ∈ ball x₀ ε → ‖F' x_1 x‖ ≤ bound x
h_diff :
  ∀ᵐ (x : ℝ) ∂Measure.restrict μ (Ι a b), ∀ (x_1 : 𝕜), x_1 ∈ ball x₀ ε → HasDerivAt (fun x_2 => F x_2 x) (F' x_1 x) x_1
hF_int : IntegrableOn (F x₀) (Ι a b)
bound_integrable : IntegrableOn bound (Ι a b)
⊢ IntegrableOn (F' x₀) (Ι a b) ∧ HasDerivAt (fun x => ∫ (t : ℝ) in a..b, F x t ∂μ) (∫ (t : ℝ) in a..b, F' x₀ t ∂μ) x₀
[PROOFSTEP]
simp only [intervalIntegral_eq_integral_uIoc]
[GOAL]
𝕜 : Type u_1
inst✝⁶ : IsROrC 𝕜
μ : Measure ℝ
E : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : NormedSpace 𝕜 E
inst✝² : CompleteSpace E
H : Type u_3
inst✝¹ : NormedAddCommGroup H
inst✝ : NormedSpace 𝕜 H
a b ε : ℝ
bound : ℝ → ℝ
F F' : 𝕜 → ℝ → E
x₀ : 𝕜
ε_pos : 0 < ε
hF_meas : ∀ᶠ (x : 𝕜) in 𝓝 x₀, AEStronglyMeasurable (F x) (Measure.restrict μ (Ι a b))
hF'_meas : AEStronglyMeasurable (F' x₀) (Measure.restrict μ (Ι a b))
h_bound : ∀ᵐ (x : ℝ) ∂Measure.restrict μ (Ι a b), ∀ (x_1 : 𝕜), x_1 ∈ ball x₀ ε → ‖F' x_1 x‖ ≤ bound x
h_diff :
  ∀ᵐ (x : ℝ) ∂Measure.restrict μ (Ι a b), ∀ (x_1 : 𝕜), x_1 ∈ ball x₀ ε → HasDerivAt (fun x_2 => F x_2 x) (F' x_1 x) x_1
hF_int : IntegrableOn (F x₀) (Ι a b)
bound_integrable : IntegrableOn bound (Ι a b)
⊢ IntegrableOn (F' x₀) (Ι a b) ∧
    HasDerivAt (fun x => (if a ≤ b then 1 else -1) • ∫ (t : ℝ) in Ι a b, F x t ∂μ)
      ((if a ≤ b then 1 else -1) • ∫ (t : ℝ) in Ι a b, F' x₀ t ∂μ) x₀
[PROOFSTEP]
have := hasDerivAt_integral_of_dominated_loc_of_deriv_le ε_pos hF_meas hF_int hF'_meas h_bound bound_integrable h_diff
[GOAL]
𝕜 : Type u_1
inst✝⁶ : IsROrC 𝕜
μ : Measure ℝ
E : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : NormedSpace 𝕜 E
inst✝² : CompleteSpace E
H : Type u_3
inst✝¹ : NormedAddCommGroup H
inst✝ : NormedSpace 𝕜 H
a b ε : ℝ
bound : ℝ → ℝ
F F' : 𝕜 → ℝ → E
x₀ : 𝕜
ε_pos : 0 < ε
hF_meas : ∀ᶠ (x : 𝕜) in 𝓝 x₀, AEStronglyMeasurable (F x) (Measure.restrict μ (Ι a b))
hF'_meas : AEStronglyMeasurable (F' x₀) (Measure.restrict μ (Ι a b))
h_bound : ∀ᵐ (x : ℝ) ∂Measure.restrict μ (Ι a b), ∀ (x_1 : 𝕜), x_1 ∈ ball x₀ ε → ‖F' x_1 x‖ ≤ bound x
h_diff :
  ∀ᵐ (x : ℝ) ∂Measure.restrict μ (Ι a b), ∀ (x_1 : 𝕜), x_1 ∈ ball x₀ ε → HasDerivAt (fun x_2 => F x_2 x) (F' x_1 x) x_1
hF_int : IntegrableOn (F x₀) (Ι a b)
bound_integrable : IntegrableOn bound (Ι a b)
this : Integrable (F' x₀) ∧ HasDerivAt (fun n => ∫ (a : ℝ) in Ι a b, F n a ∂μ) (∫ (a : ℝ) in Ι a b, F' x₀ a ∂μ) x₀
⊢ IntegrableOn (F' x₀) (Ι a b) ∧
    HasDerivAt (fun x => (if a ≤ b then 1 else -1) • ∫ (t : ℝ) in Ι a b, F x t ∂μ)
      ((if a ≤ b then 1 else -1) • ∫ (t : ℝ) in Ι a b, F' x₀ t ∂μ) x₀
[PROOFSTEP]
exact ⟨this.1, this.2.const_smul _⟩


[GOAL]
C : Type u₁
inst✝² : Category.{v₁, u₁} C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
E : Type u₃
inst✝ : Category.{v₃, u₃} E
F : C ⥤ D
G H : D ⥤ E
α : G ⟶ H
X Y : C
f : X ⟶ Y
⊢ (F ⋙ G).map f ≫ (fun X => NatTrans.app α (F.obj X)) Y = (fun X => NatTrans.app α (F.obj X)) X ≫ (F ⋙ H).map f
[PROOFSTEP]
rw [Functor.comp_map, Functor.comp_map, α.naturality]
[GOAL]
C : Type u₁
inst✝² : Category.{v₁, u₁} C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
E : Type u₃
inst✝ : Category.{v₃, u₃} E
G H : C ⥤ D
α : G ⟶ H
F : D ⥤ E
X Y : C
f : X ⟶ Y
⊢ (G ⋙ F).map f ≫ (fun X => F.map (NatTrans.app α X)) Y = (fun X => F.map (NatTrans.app α X)) X ≫ (H ⋙ F).map f
[PROOFSTEP]
rw [Functor.comp_map, Functor.comp_map, ← F.map_comp, ← F.map_comp, α.naturality]
[GOAL]
C : Type u₁
inst✝² : Category.{v₁, u₁} C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
E : Type u₃
inst✝ : Category.{v₃, u₃} E
X✝ Y✝ : C ⥤ D
τ : X✝ ⟶ Y✝
H : D ⥤ E
X Y : C
f : X ⟶ Y
⊢ (((fun F => Functor.mk { obj := fun G => F ⋙ G, map := fun {X Y} α => whiskerLeft F α }) X✝).obj H).map f ≫
      (fun c => H.map (NatTrans.app τ c)) Y =
    (fun c => H.map (NatTrans.app τ c)) X ≫
      (((fun F => Functor.mk { obj := fun G => F ⋙ G, map := fun {X Y} α => whiskerLeft F α }) Y✝).obj H).map f
[PROOFSTEP]
dsimp
[GOAL]
C : Type u₁
inst✝² : Category.{v₁, u₁} C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
E : Type u₃
inst✝ : Category.{v₃, u₃} E
X✝ Y✝ : C ⥤ D
τ : X✝ ⟶ Y✝
H : D ⥤ E
X Y : C
f : X ⟶ Y
⊢ H.map (X✝.map f) ≫ H.map (NatTrans.app τ Y) = H.map (NatTrans.app τ X) ≫ H.map (Y✝.map f)
[PROOFSTEP]
rw [← H.map_comp, ← H.map_comp, ← τ.naturality]
[GOAL]
C : Type u₁
inst✝² : Category.{v₁, u₁} C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
E : Type u₃
inst✝ : Category.{v₃, u₃} E
X✝ Y✝ : C ⥤ D
τ : X✝ ⟶ Y✝
X Y : D ⥤ E
f : X ⟶ Y
⊢ ((fun F => Functor.mk { obj := fun G => F ⋙ G, map := fun {X Y} α => whiskerLeft F α }) X✝).map f ≫
      (fun H => NatTrans.mk fun c => H.map (NatTrans.app τ c)) Y =
    (fun H => NatTrans.mk fun c => H.map (NatTrans.app τ c)) X ≫
      ((fun F => Functor.mk { obj := fun G => F ⋙ G, map := fun {X Y} α => whiskerLeft F α }) Y✝).map f
[PROOFSTEP]
ext
[GOAL]
case w.h
C : Type u₁
inst✝² : Category.{v₁, u₁} C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
E : Type u₃
inst✝ : Category.{v₃, u₃} E
X✝ Y✝ : C ⥤ D
τ : X✝ ⟶ Y✝
X Y : D ⥤ E
f : X ⟶ Y
x✝ : C
⊢ NatTrans.app
      (((fun F => Functor.mk { obj := fun G => F ⋙ G, map := fun {X Y} α => whiskerLeft F α }) X✝).map f ≫
        (fun H => NatTrans.mk fun c => H.map (NatTrans.app τ c)) Y)
      x✝ =
    NatTrans.app
      ((fun H => NatTrans.mk fun c => H.map (NatTrans.app τ c)) X ≫
        ((fun F => Functor.mk { obj := fun G => F ⋙ G, map := fun {X Y} α => whiskerLeft F α }) Y✝).map f)
      x✝
[PROOFSTEP]
dsimp
[GOAL]
case w.h
C : Type u₁
inst✝² : Category.{v₁, u₁} C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
E : Type u₃
inst✝ : Category.{v₃, u₃} E
X✝ Y✝ : C ⥤ D
τ : X✝ ⟶ Y✝
X Y : D ⥤ E
f : X ⟶ Y
x✝ : C
⊢ NatTrans.app f (X✝.obj x✝) ≫ Y.map (NatTrans.app τ x✝) = X.map (NatTrans.app τ x✝) ≫ NatTrans.app f (Y✝.obj x✝)
[PROOFSTEP]
rw [f.naturality]
[GOAL]
C : Type u₁
inst✝² : Category.{v₁, u₁} C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
E : Type u₃
inst✝ : Category.{v₃, u₃} E
X✝ Y✝ : D ⥤ E
τ : X✝ ⟶ Y✝
F : C ⥤ D
X Y : C
f : X ⟶ Y
⊢ (((fun H => Functor.mk { obj := fun F => F ⋙ H, map := fun {X Y} α => whiskerRight α H }) X✝).obj F).map f ≫
      (fun c => NatTrans.app τ (F.obj c)) Y =
    (fun c => NatTrans.app τ (F.obj c)) X ≫
      (((fun H => Functor.mk { obj := fun F => F ⋙ H, map := fun {X Y} α => whiskerRight α H }) Y✝).obj F).map f
[PROOFSTEP]
dsimp
[GOAL]
C : Type u₁
inst✝² : Category.{v₁, u₁} C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
E : Type u₃
inst✝ : Category.{v₃, u₃} E
X✝ Y✝ : D ⥤ E
τ : X✝ ⟶ Y✝
F : C ⥤ D
X Y : C
f : X ⟶ Y
⊢ X✝.map (F.map f) ≫ NatTrans.app τ (F.obj Y) = NatTrans.app τ (F.obj X) ≫ Y✝.map (F.map f)
[PROOFSTEP]
rw [τ.naturality]
[GOAL]
C : Type u₁
inst✝² : Category.{v₁, u₁} C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
E : Type u₃
inst✝ : Category.{v₃, u₃} E
X✝ Y✝ : D ⥤ E
τ : X✝ ⟶ Y✝
X Y : C ⥤ D
f : X ⟶ Y
⊢ ((fun H => Functor.mk { obj := fun F => F ⋙ H, map := fun {X Y} α => whiskerRight α H }) X✝).map f ≫
      (fun F => NatTrans.mk fun c => NatTrans.app τ (F.obj c)) Y =
    (fun F => NatTrans.mk fun c => NatTrans.app τ (F.obj c)) X ≫
      ((fun H => Functor.mk { obj := fun F => F ⋙ H, map := fun {X Y} α => whiskerRight α H }) Y✝).map f
[PROOFSTEP]
ext
[GOAL]
case w.h
C : Type u₁
inst✝² : Category.{v₁, u₁} C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
E : Type u₃
inst✝ : Category.{v₃, u₃} E
X✝ Y✝ : D ⥤ E
τ : X✝ ⟶ Y✝
X Y : C ⥤ D
f : X ⟶ Y
x✝ : C
⊢ NatTrans.app
      (((fun H => Functor.mk { obj := fun F => F ⋙ H, map := fun {X Y} α => whiskerRight α H }) X✝).map f ≫
        (fun F => NatTrans.mk fun c => NatTrans.app τ (F.obj c)) Y)
      x✝ =
    NatTrans.app
      ((fun F => NatTrans.mk fun c => NatTrans.app τ (F.obj c)) X ≫
        ((fun H => Functor.mk { obj := fun F => F ⋙ H, map := fun {X Y} α => whiskerRight α H }) Y✝).map f)
      x✝
[PROOFSTEP]
dsimp
[GOAL]
case w.h
C : Type u₁
inst✝² : Category.{v₁, u₁} C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
E : Type u₃
inst✝ : Category.{v₃, u₃} E
X✝ Y✝ : D ⥤ E
τ : X✝ ⟶ Y✝
X Y : C ⥤ D
f : X ⟶ Y
x✝ : C
⊢ X✝.map (NatTrans.app f x✝) ≫ NatTrans.app τ (Y.obj x✝) = NatTrans.app τ (X.obj x✝) ≫ Y✝.map (NatTrans.app f x✝)
[PROOFSTEP]
rw [← NatTrans.naturality]
[GOAL]
C : Type u₁
inst✝³ : Category.{v₁, u₁} C
D : Type u₂
inst✝² : Category.{v₂, u₂} D
E : Type u₃
inst✝¹ : Category.{v₃, u₃} E
F : D ⥤ E
inst✝ : Faithful F
X✝ Y✝ : C ⥤ D
a₁✝ a₂✝ : X✝ ⟶ Y✝
hαβ : ((whiskeringRight C D E).obj F).map a₁✝ = ((whiskeringRight C D E).obj F).map a₂✝
⊢ a₁✝ = a₂✝
[PROOFSTEP]
ext X
[GOAL]
case w.h
C : Type u₁
inst✝³ : Category.{v₁, u₁} C
D : Type u₂
inst✝² : Category.{v₂, u₂} D
E : Type u₃
inst✝¹ : Category.{v₃, u₃} E
F : D ⥤ E
inst✝ : Faithful F
X✝ Y✝ : C ⥤ D
a₁✝ a₂✝ : X✝ ⟶ Y✝
hαβ : ((whiskeringRight C D E).obj F).map a₁✝ = ((whiskeringRight C D E).obj F).map a₂✝
X : C
⊢ NatTrans.app a₁✝ X = NatTrans.app a₂✝ X
[PROOFSTEP]
exact (F.map_injective <| congr_fun (congr_arg NatTrans.app hαβ) X)
[GOAL]
A : Type u₁
inst✝³ : Category.{v₁, u₁} A
B : Type u₂
inst✝² : Category.{v₂, u₂} B
C : Type u₃
inst✝¹ : Category.{v₃, u₃} C
D : Type u₄
inst✝ : Category.{v₄, u₄} D
F : A ⥤ B
G : B ⥤ C
⊢ (associator F (𝟭 B) G).hom ≫ whiskerLeft F (leftUnitor G).hom = whiskerRight (rightUnitor F).hom G
[PROOFSTEP]
aesop_cat
[GOAL]
A : Type u₁
inst✝⁴ : Category.{v₁, u₁} A
B : Type u₂
inst✝³ : Category.{v₂, u₂} B
C : Type u₃
inst✝² : Category.{v₃, u₃} C
D : Type u₄
inst✝¹ : Category.{v₄, u₄} D
E : Type u₅
inst✝ : Category.{v₅, u₅} E
F : A ⥤ B
G : B ⥤ C
H : C ⥤ D
K : D ⥤ E
⊢ whiskerRight (associator F G H).hom K ≫ (associator F (G ⋙ H) K).hom ≫ whiskerLeft F (associator G H K).hom =
    (associator (F ⋙ G) H K).hom ≫ (associator F G (H ⋙ K)).hom
[PROOFSTEP]
aesop_cat


[GOAL]
M : Type u_1
N : Type u_2
α : Type u_3
E : Type u_4
inst✝⁶ : MeasurableSpace M
inst✝⁵ : MeasurableSpace N
inst✝⁴ : MeasurableSpace α
inst✝³ : NormedAddCommGroup E
μ : Measure α
p : ℝ≥0∞
inst✝² : SMul M α
inst✝¹ : SMulInvariantMeasure M α μ
inst✝ : MeasurableSMul M α
c : Mᵈᵐᵃ
⊢ ∀ (f g : { x // x ∈ Lp E p }), c • (f + g) = c • f + c • g
[PROOFSTEP]
rintro ⟨⟨⟩, _⟩ ⟨⟨⟩, _⟩
[GOAL]
case mk.mk.mk.mk
M : Type u_1
N : Type u_2
α : Type u_3
E : Type u_4
inst✝⁶ : MeasurableSpace M
inst✝⁵ : MeasurableSpace N
inst✝⁴ : MeasurableSpace α
inst✝³ : NormedAddCommGroup E
μ : Measure α
p : ℝ≥0∞
inst✝² : SMul M α
inst✝¹ : SMulInvariantMeasure M α μ
inst✝ : MeasurableSMul M α
c : Mᵈᵐᵃ
val✝¹ : α →ₘ[μ] E
a✝¹ : { f // AEStronglyMeasurable f μ }
property✝¹ : Quot.mk Setoid.r a✝¹ ∈ Lp E p
val✝ : α →ₘ[μ] E
a✝ : { f // AEStronglyMeasurable f μ }
property✝ : Quot.mk Setoid.r a✝ ∈ Lp E p
⊢ c •
      ({ val := Quot.mk Setoid.r a✝¹, property := property✝¹ } +
        { val := Quot.mk Setoid.r a✝, property := property✝ }) =
    c • { val := Quot.mk Setoid.r a✝¹, property := property✝¹ } +
      c • { val := Quot.mk Setoid.r a✝, property := property✝ }
[PROOFSTEP]
rfl
[GOAL]
M : Type u_1
N : Type u_2
α : Type u_3
E : Type u_4
inst✝⁶ : MeasurableSpace M
inst✝⁵ : MeasurableSpace N
inst✝⁴ : MeasurableSpace α
inst✝³ : NormedAddCommGroup E
μ : Measure α
p : ℝ≥0∞
inst✝² : SMul M α
inst✝¹ : SMulInvariantMeasure M α μ
inst✝ : MeasurableSMul M α
c : Mᵈᵐᵃ
f : { x // x ∈ Lp E p }
⊢ c • -f = -(c • f)
[PROOFSTEP]
rcases f with ⟨⟨_⟩, _⟩
[GOAL]
case mk.mk
M : Type u_1
N : Type u_2
α : Type u_3
E : Type u_4
inst✝⁶ : MeasurableSpace M
inst✝⁵ : MeasurableSpace N
inst✝⁴ : MeasurableSpace α
inst✝³ : NormedAddCommGroup E
μ : Measure α
p : ℝ≥0∞
inst✝² : SMul M α
inst✝¹ : SMulInvariantMeasure M α μ
inst✝ : MeasurableSMul M α
c : Mᵈᵐᵃ
val✝ : α →ₘ[μ] E
a✝ : { f // AEStronglyMeasurable f μ }
property✝ : Quot.mk Setoid.r a✝ ∈ Lp E p
⊢ c • -{ val := Quot.mk Setoid.r a✝, property := property✝ } =
    -(c • { val := Quot.mk Setoid.r a✝, property := property✝ })
[PROOFSTEP]
rfl
[GOAL]
M : Type u_1
N : Type u_2
α : Type u_3
E : Type u_4
inst✝⁶ : MeasurableSpace M
inst✝⁵ : MeasurableSpace N
inst✝⁴ : MeasurableSpace α
inst✝³ : NormedAddCommGroup E
μ : Measure α
p : ℝ≥0∞
inst✝² : SMul M α
inst✝¹ : SMulInvariantMeasure M α μ
inst✝ : MeasurableSMul M α
c : Mᵈᵐᵃ
⊢ ∀ (f g : { x // x ∈ Lp E p }), c • (f - g) = c • f - c • g
[PROOFSTEP]
rintro ⟨⟨⟩, _⟩ ⟨⟨⟩, _⟩
[GOAL]
case mk.mk.mk.mk
M : Type u_1
N : Type u_2
α : Type u_3
E : Type u_4
inst✝⁶ : MeasurableSpace M
inst✝⁵ : MeasurableSpace N
inst✝⁴ : MeasurableSpace α
inst✝³ : NormedAddCommGroup E
μ : Measure α
p : ℝ≥0∞
inst✝² : SMul M α
inst✝¹ : SMulInvariantMeasure M α μ
inst✝ : MeasurableSMul M α
c : Mᵈᵐᵃ
val✝¹ : α →ₘ[μ] E
a✝¹ : { f // AEStronglyMeasurable f μ }
property✝¹ : Quot.mk Setoid.r a✝¹ ∈ Lp E p
val✝ : α →ₘ[μ] E
a✝ : { f // AEStronglyMeasurable f μ }
property✝ : Quot.mk Setoid.r a✝ ∈ Lp E p
⊢ c •
      ({ val := Quot.mk Setoid.r a✝¹, property := property✝¹ } -
        { val := Quot.mk Setoid.r a✝, property := property✝ }) =
    c • { val := Quot.mk Setoid.r a✝¹, property := property✝¹ } -
      c • { val := Quot.mk Setoid.r a✝, property := property✝ }
[PROOFSTEP]
rfl
[GOAL]
M : Type u_1
N : Type u_2
α : Type u_3
E : Type u_4
inst✝⁶ : MeasurableSpace M
inst✝⁵ : MeasurableSpace N
inst✝⁴ : MeasurableSpace α
inst✝³ : NormedAddCommGroup E
μ : Measure α
p : ℝ≥0∞
inst✝² : SMul M α
inst✝¹ : SMulInvariantMeasure M α μ
inst✝ : MeasurableSMul M α
⊢ ∀ (a : Mᵈᵐᵃ) (x y : { x // x ∈ Lp E p }), a • (x + y) = a • x + a • y
[PROOFSTEP]
rintro _ ⟨⟨⟩, _⟩ ⟨⟨⟩, _⟩
[GOAL]
case mk.mk.mk.mk
M : Type u_1
N : Type u_2
α : Type u_3
E : Type u_4
inst✝⁶ : MeasurableSpace M
inst✝⁵ : MeasurableSpace N
inst✝⁴ : MeasurableSpace α
inst✝³ : NormedAddCommGroup E
μ : Measure α
p : ℝ≥0∞
inst✝² : SMul M α
inst✝¹ : SMulInvariantMeasure M α μ
inst✝ : MeasurableSMul M α
a✝² : Mᵈᵐᵃ
val✝¹ : α →ₘ[μ] E
a✝¹ : { f // AEStronglyMeasurable f μ }
property✝¹ : Quot.mk Setoid.r a✝¹ ∈ Lp E p
val✝ : α →ₘ[μ] E
a✝ : { f // AEStronglyMeasurable f μ }
property✝ : Quot.mk Setoid.r a✝ ∈ Lp E p
⊢ a✝² •
      ({ val := Quot.mk Setoid.r a✝¹, property := property✝¹ } +
        { val := Quot.mk Setoid.r a✝, property := property✝ }) =
    a✝² • { val := Quot.mk Setoid.r a✝¹, property := property✝¹ } +
      a✝² • { val := Quot.mk Setoid.r a✝, property := property✝ }
[PROOFSTEP]
rfl
  -- The next few lemmas follow from the `IsometricSMul` instance if `1 ≤ p`
[GOAL]
M : Type u_1
N : Type u_2
α : Type u_3
E : Type u_4
inst✝⁶ : MeasurableSpace M
inst✝⁵ : MeasurableSpace N
inst✝⁴ : MeasurableSpace α
inst✝³ : NormedAddCommGroup E
μ : Measure α
p : ℝ≥0∞
inst✝² : SMul M α
inst✝¹ : SMulInvariantMeasure M α μ
inst✝ : MeasurableSMul M α
c : Mᵈᵐᵃ
f g : { x // x ∈ Lp E p }
⊢ dist (c • f) (c • g) = dist f g
[PROOFSTEP]
simp only [dist, ← smul_Lp_sub, norm_smul_Lp]
[GOAL]
M : Type u_1
N : Type u_2
α : Type u_3
E : Type u_4
inst✝⁶ : MeasurableSpace M
inst✝⁵ : MeasurableSpace N
inst✝⁴ : MeasurableSpace α
inst✝³ : NormedAddCommGroup E
μ : Measure α
p : ℝ≥0∞
inst✝² : SMul M α
inst✝¹ : SMulInvariantMeasure M α μ
inst✝ : MeasurableSMul M α
c : Mᵈᵐᵃ
f g : { x // x ∈ Lp E p }
⊢ edist (c • f) (c • g) = edist f g
[PROOFSTEP]
simp only [Lp.edist_dist, dist_smul_Lp]