Theorem: MeasureTheory.integral_divergence_prod_Icc_of_hasFDerivWithinAt_off_countable_of_le
File: Mathlib/MeasureTheory/Integral/DivergenceTheorem.lean

tactic: refine' integral_divergence_of_hasFDerivWithinAt_off_countable_of_equiv e _ _ ![f, g]
  ![f', g'] s hs a b hle _ (fun x hx => _) _ _ Hi
state_before: E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f g : ℝ × ℝ → E
f' g' : ℝ × ℝ → ℝ × ℝ →L[ℝ] E
a b : ℝ × ℝ
hle : a ≤ b
s : Set (ℝ × ℝ)
hs : Set.Countable s
Hcf : ContinuousOn f (Set.Icc a b)
Hcg : ContinuousOn g (Set.Icc a b)
Hdf : ∀ (x : ℝ × ℝ), x ∈ Set.Ioo a.fst b.fst ×ˢ Set.Ioo a.snd b.snd \ s → HasFDerivAt f (f' x) x
Hdg : ∀ (x : ℝ × ℝ), x ∈ Set.Ioo a.fst b.fst ×ˢ Set.Ioo a.snd b.snd \ s → HasFDerivAt g (g' x) x
Hi : IntegrableOn (fun x => ↑(f' x) (1, 0) + ↑(g' x) (0, 1)) (Set.Icc a b)
e : (ℝ × ℝ) ≃L[ℝ] Fin 2 → ℝ := ContinuousLinearEquiv.symm (ContinuousLinearEquiv.finTwoArrow ℝ ℝ)
⊢ (∫ (x : ℝ × ℝ) in Set.Icc a b, ↑(f' x) (1, 0) + ↑(g' x) (0, 1)) =
    ∑ i : Fin 2,
      ((∫ (x : Fin 1 → ℝ) in Set.Icc (↑e a ∘ ↑(Fin.succAbove i)) (↑e b ∘ ↑(Fin.succAbove i)),
          Matrix.vecCons f ![g] i (↑(ContinuousLinearEquiv.symm e) (Fin.insertNth i (↑e b i) x))) -
        ∫ (x : Fin 1 → ℝ) in Set.Icc (↑e a ∘ ↑(Fin.succAbove i)) (↑e b ∘ ↑(Fin.succAbove i)),
          Matrix.vecCons f ![g] i (↑(ContinuousLinearEquiv.symm e) (Fin.insertNth i (↑e a i) x)))

tactic: exact fun x y => (OrderIso.finTwoArrowIso ℝ).symm.le_iff_le
state_before: case refine'_1
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f g : ℝ × ℝ → E
f' g' : ℝ × ℝ → ℝ × ℝ →L[ℝ] E
a b : ℝ × ℝ
hle : a ≤ b
s : Set (ℝ × ℝ)
hs : Set.Countable s
Hcf : ContinuousOn f (Set.Icc a b)
Hcg : ContinuousOn g (Set.Icc a b)
Hdf : ∀ (x : ℝ × ℝ), x ∈ Set.Ioo a.fst b.fst ×ˢ Set.Ioo a.snd b.snd \ s → HasFDerivAt f (f' x) x
Hdg : ∀ (x : ℝ × ℝ), x ∈ Set.Ioo a.fst b.fst ×ˢ Set.Ioo a.snd b.snd \ s → HasFDerivAt g (g' x) x
Hi : IntegrableOn (fun x => ↑(f' x) (1, 0) + ↑(g' x) (0, 1)) (Set.Icc a b)
e : (ℝ × ℝ) ≃L[ℝ] Fin 2 → ℝ := ContinuousLinearEquiv.symm (ContinuousLinearEquiv.finTwoArrow ℝ ℝ)
⊢ ∀ (x y : ℝ × ℝ), ↑e x ≤ ↑e y ↔ x ≤ y

tactic: exact (volume_preserving_finTwoArrow ℝ).symm _
state_before: case refine'_2
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f g : ℝ × ℝ → E
f' g' : ℝ × ℝ → ℝ × ℝ →L[ℝ] E
a b : ℝ × ℝ
hle : a ≤ b
s : Set (ℝ × ℝ)
hs : Set.Countable s
Hcf : ContinuousOn f (Set.Icc a b)
Hcg : ContinuousOn g (Set.Icc a b)
Hdf : ∀ (x : ℝ × ℝ), x ∈ Set.Ioo a.fst b.fst ×ˢ Set.Ioo a.snd b.snd \ s → HasFDerivAt f (f' x) x
Hdg : ∀ (x : ℝ × ℝ), x ∈ Set.Ioo a.fst b.fst ×ˢ Set.Ioo a.snd b.snd \ s → HasFDerivAt g (g' x) x
Hi : IntegrableOn (fun x => ↑(f' x) (1, 0) + ↑(g' x) (0, 1)) (Set.Icc a b)
e : (ℝ × ℝ) ≃L[ℝ] Fin 2 → ℝ := ContinuousLinearEquiv.symm (ContinuousLinearEquiv.finTwoArrow ℝ ℝ)
⊢ MeasurePreserving ↑e

tactic: exact Fin.forall_fin_two.2 ⟨Hcf, Hcg⟩
state_before: case refine'_3
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f g : ℝ × ℝ → E
f' g' : ℝ × ℝ → ℝ × ℝ →L[ℝ] E
a b : ℝ × ℝ
hle : a ≤ b
s : Set (ℝ × ℝ)
hs : Set.Countable s
Hcf : ContinuousOn f (Set.Icc a b)
Hcg : ContinuousOn g (Set.Icc a b)
Hdf : ∀ (x : ℝ × ℝ), x ∈ Set.Ioo a.fst b.fst ×ˢ Set.Ioo a.snd b.snd \ s → HasFDerivAt f (f' x) x
Hdg : ∀ (x : ℝ × ℝ), x ∈ Set.Ioo a.fst b.fst ×ˢ Set.Ioo a.snd b.snd \ s → HasFDerivAt g (g' x) x
Hi : IntegrableOn (fun x => ↑(f' x) (1, 0) + ↑(g' x) (0, 1)) (Set.Icc a b)
e : (ℝ × ℝ) ≃L[ℝ] Fin 2 → ℝ := ContinuousLinearEquiv.symm (ContinuousLinearEquiv.finTwoArrow ℝ ℝ)
⊢ ∀ (i : Fin (1 + 1)), ContinuousOn (Matrix.vecCons f ![g] i) (Set.Icc a b)

tactic: rw [Icc_prod_eq, interior_prod_eq, interior_Icc, interior_Icc] at hx
state_before: case refine'_4
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f g : ℝ × ℝ → E
f' g' : ℝ × ℝ → ℝ × ℝ →L[ℝ] E
a b : ℝ × ℝ
hle : a ≤ b
s : Set (ℝ × ℝ)
hs : Set.Countable s
Hcf : ContinuousOn f (Set.Icc a b)
Hcg : ContinuousOn g (Set.Icc a b)
Hdf : ∀ (x : ℝ × ℝ), x ∈ Set.Ioo a.fst b.fst ×ˢ Set.Ioo a.snd b.snd \ s → HasFDerivAt f (f' x) x
Hdg : ∀ (x : ℝ × ℝ), x ∈ Set.Ioo a.fst b.fst ×ˢ Set.Ioo a.snd b.snd \ s → HasFDerivAt g (g' x) x
Hi : IntegrableOn (fun x => ↑(f' x) (1, 0) + ↑(g' x) (0, 1)) (Set.Icc a b)
e : (ℝ × ℝ) ≃L[ℝ] Fin 2 → ℝ := ContinuousLinearEquiv.symm (ContinuousLinearEquiv.finTwoArrow ℝ ℝ)
x : ℝ × ℝ
hx : x ∈ interior (Set.Icc a b) \ s
⊢ ∀ (i : Fin (1 + 1)), HasFDerivAt (Matrix.vecCons f ![g] i) (Matrix.vecCons f' ![g'] i x) x

tactic: exact Fin.forall_fin_two.2 ⟨Hdf x hx, Hdg x hx⟩
state_before: case refine'_4
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f g : ℝ × ℝ → E
f' g' : ℝ × ℝ → ℝ × ℝ →L[ℝ] E
a b : ℝ × ℝ
hle : a ≤ b
s : Set (ℝ × ℝ)
hs : Set.Countable s
Hcf : ContinuousOn f (Set.Icc a b)
Hcg : ContinuousOn g (Set.Icc a b)
Hdf : ∀ (x : ℝ × ℝ), x ∈ Set.Ioo a.fst b.fst ×ˢ Set.Ioo a.snd b.snd \ s → HasFDerivAt f (f' x) x
Hdg : ∀ (x : ℝ × ℝ), x ∈ Set.Ioo a.fst b.fst ×ˢ Set.Ioo a.snd b.snd \ s → HasFDerivAt g (g' x) x
Hi : IntegrableOn (fun x => ↑(f' x) (1, 0) + ↑(g' x) (0, 1)) (Set.Icc a b)
e : (ℝ × ℝ) ≃L[ℝ] Fin 2 → ℝ := ContinuousLinearEquiv.symm (ContinuousLinearEquiv.finTwoArrow ℝ ℝ)
x : ℝ × ℝ
hx : x ∈ Set.Ioo a.fst b.fst ×ˢ Set.Ioo a.snd b.snd \ s
⊢ ∀ (i : Fin (1 + 1)), HasFDerivAt (Matrix.vecCons f ![g] i) (Matrix.vecCons f' ![g'] i x) x

tactic: intro x
state_before: case refine'_5
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f g : ℝ × ℝ → E
f' g' : ℝ × ℝ → ℝ × ℝ →L[ℝ] E
a b : ℝ × ℝ
hle : a ≤ b
s : Set (ℝ × ℝ)
hs : Set.Countable s
Hcf : ContinuousOn f (Set.Icc a b)
Hcg : ContinuousOn g (Set.Icc a b)
Hdf : ∀ (x : ℝ × ℝ), x ∈ Set.Ioo a.fst b.fst ×ˢ Set.Ioo a.snd b.snd \ s → HasFDerivAt f (f' x) x
Hdg : ∀ (x : ℝ × ℝ), x ∈ Set.Ioo a.fst b.fst ×ˢ Set.Ioo a.snd b.snd \ s → HasFDerivAt g (g' x) x
Hi : IntegrableOn (fun x => ↑(f' x) (1, 0) + ↑(g' x) (0, 1)) (Set.Icc a b)
e : (ℝ × ℝ) ≃L[ℝ] Fin 2 → ℝ := ContinuousLinearEquiv.symm (ContinuousLinearEquiv.finTwoArrow ℝ ℝ)
⊢ ∀ (x : ℝ × ℝ),
    ↑(f' x) (1, 0) + ↑(g' x) (0, 1) =
      ∑ i : Fin (1 + 1), ↑(Matrix.vecCons f' ![g'] i x) (↑(ContinuousLinearEquiv.symm e) (Pi.single i 1))

tactic: rw [Fin.sum_univ_two]
state_before: case refine'_5
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f g : ℝ × ℝ → E
f' g' : ℝ × ℝ → ℝ × ℝ →L[ℝ] E
a b : ℝ × ℝ
hle : a ≤ b
s : Set (ℝ × ℝ)
hs : Set.Countable s
Hcf : ContinuousOn f (Set.Icc a b)
Hcg : ContinuousOn g (Set.Icc a b)
Hdf : ∀ (x : ℝ × ℝ), x ∈ Set.Ioo a.fst b.fst ×ˢ Set.Ioo a.snd b.snd \ s → HasFDerivAt f (f' x) x
Hdg : ∀ (x : ℝ × ℝ), x ∈ Set.Ioo a.fst b.fst ×ˢ Set.Ioo a.snd b.snd \ s → HasFDerivAt g (g' x) x
Hi : IntegrableOn (fun x => ↑(f' x) (1, 0) + ↑(g' x) (0, 1)) (Set.Icc a b)
e : (ℝ × ℝ) ≃L[ℝ] Fin 2 → ℝ := ContinuousLinearEquiv.symm (ContinuousLinearEquiv.finTwoArrow ℝ ℝ)
x : ℝ × ℝ
⊢ ↑(f' x) (1, 0) + ↑(g' x) (0, 1) =
    ∑ i : Fin (1 + 1), ↑(Matrix.vecCons f' ![g'] i x) (↑(ContinuousLinearEquiv.symm e) (Pi.single i 1))

tactic: rfl
state_before: case refine'_5
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f g : ℝ × ℝ → E
f' g' : ℝ × ℝ → ℝ × ℝ →L[ℝ] E
a b : ℝ × ℝ
hle : a ≤ b
s : Set (ℝ × ℝ)
hs : Set.Countable s
Hcf : ContinuousOn f (Set.Icc a b)
Hcg : ContinuousOn g (Set.Icc a b)
Hdf : ∀ (x : ℝ × ℝ), x ∈ Set.Ioo a.fst b.fst ×ˢ Set.Ioo a.snd b.snd \ s → HasFDerivAt f (f' x) x
Hdg : ∀ (x : ℝ × ℝ), x ∈ Set.Ioo a.fst b.fst ×ˢ Set.Ioo a.snd b.snd \ s → HasFDerivAt g (g' x) x
Hi : IntegrableOn (fun x => ↑(f' x) (1, 0) + ↑(g' x) (0, 1)) (Set.Icc a b)
e : (ℝ × ℝ) ≃L[ℝ] Fin 2 → ℝ := ContinuousLinearEquiv.symm (ContinuousLinearEquiv.finTwoArrow ℝ ℝ)
x : ℝ × ℝ
⊢ ↑(f' x) (1, 0) + ↑(g' x) (0, 1) =
    ↑(Matrix.vecCons f' ![g'] 0 x) (↑(ContinuousLinearEquiv.symm e) (Pi.single 0 1)) +
      ↑(Matrix.vecCons f' ![g'] 1 x) (↑(ContinuousLinearEquiv.symm e) (Pi.single 1 1))

tactic: have : ∀ (a b : ℝ¹) (f : ℝ¹ → E),
    (∫ x in Icc a b, f x) = ∫ x in Icc (a 0) (b 0), f fun _ => x := fun a b f ↦ by
  convert (((volume_preserving_funUnique (Fin 1) ℝ).symm _).set_integral_preimage_emb
    (MeasurableEquiv.measurableEmbedding _) f _).symm
  exact ((OrderIso.funUnique (Fin 1) ℝ).symm.preimage_Icc a b).symm
state_before: E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f g : ℝ × ℝ → E
f' g' : ℝ × ℝ → ℝ × ℝ →L[ℝ] E
a b : ℝ × ℝ
hle : a ≤ b
s : Set (ℝ × ℝ)
hs : Set.Countable s
Hcf : ContinuousOn f (Set.Icc a b)
Hcg : ContinuousOn g (Set.Icc a b)
Hdf : ∀ (x : ℝ × ℝ), x ∈ Set.Ioo a.fst b.fst ×ˢ Set.Ioo a.snd b.snd \ s → HasFDerivAt f (f' x) x
Hdg : ∀ (x : ℝ × ℝ), x ∈ Set.Ioo a.fst b.fst ×ˢ Set.Ioo a.snd b.snd \ s → HasFDerivAt g (g' x) x
Hi : IntegrableOn (fun x => ↑(f' x) (1, 0) + ↑(g' x) (0, 1)) (Set.Icc a b)
e : (ℝ × ℝ) ≃L[ℝ] Fin 2 → ℝ := ContinuousLinearEquiv.symm (ContinuousLinearEquiv.finTwoArrow ℝ ℝ)
⊢ ∑ i : Fin 2,
      ((∫ (x : Fin 1 → ℝ) in Set.Icc (↑e a ∘ ↑(Fin.succAbove i)) (↑e b ∘ ↑(Fin.succAbove i)),
          Matrix.vecCons f ![g] i (↑(ContinuousLinearEquiv.symm e) (Fin.insertNth i (↑e b i) x))) -
        ∫ (x : Fin 1 → ℝ) in Set.Icc (↑e a ∘ ↑(Fin.succAbove i)) (↑e b ∘ ↑(Fin.succAbove i)),
          Matrix.vecCons f ![g] i (↑(ContinuousLinearEquiv.symm e) (Fin.insertNth i (↑e a i) x))) =
    ((∫ (y : ℝ) in Set.Icc a.snd b.snd, f (b.fst, y)) - ∫ (y : ℝ) in Set.Icc a.snd b.snd, f (a.fst, y)) +
      ((∫ (x : ℝ) in Set.Icc a.fst b.fst, g (x, b.snd)) - ∫ (x : ℝ) in Set.Icc a.fst b.fst, g (x, a.snd))

tactic: simp only [Fin.sum_univ_two, this]
state_before: E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f g : ℝ × ℝ → E
f' g' : ℝ × ℝ → ℝ × ℝ →L[ℝ] E
a b : ℝ × ℝ
hle : a ≤ b
s : Set (ℝ × ℝ)
hs : Set.Countable s
Hcf : ContinuousOn f (Set.Icc a b)
Hcg : ContinuousOn g (Set.Icc a b)
Hdf : ∀ (x : ℝ × ℝ), x ∈ Set.Ioo a.fst b.fst ×ˢ Set.Ioo a.snd b.snd \ s → HasFDerivAt f (f' x) x
Hdg : ∀ (x : ℝ × ℝ), x ∈ Set.Ioo a.fst b.fst ×ˢ Set.Ioo a.snd b.snd \ s → HasFDerivAt g (g' x) x
Hi : IntegrableOn (fun x => ↑(f' x) (1, 0) + ↑(g' x) (0, 1)) (Set.Icc a b)
e : (ℝ × ℝ) ≃L[ℝ] Fin 2 → ℝ := ContinuousLinearEquiv.symm (ContinuousLinearEquiv.finTwoArrow ℝ ℝ)
this :
  ∀ (a b : Fin 1 → ℝ) (f : (Fin 1 → ℝ) → E),
    (∫ (x : Fin 1 → ℝ) in Set.Icc a b, f x) = ∫ (x : ℝ) in Set.Icc (a 0) (b 0), f fun x_1 => x
⊢ ∑ i : Fin 2,
      ((∫ (x : Fin 1 → ℝ) in Set.Icc (↑e a ∘ ↑(Fin.succAbove i)) (↑e b ∘ ↑(Fin.succAbove i)),
          Matrix.vecCons f ![g] i (↑(ContinuousLinearEquiv.symm e) (Fin.insertNth i (↑e b i) x))) -
        ∫ (x : Fin 1 → ℝ) in Set.Icc (↑e a ∘ ↑(Fin.succAbove i)) (↑e b ∘ ↑(Fin.succAbove i)),
          Matrix.vecCons f ![g] i (↑(ContinuousLinearEquiv.symm e) (Fin.insertNth i (↑e a i) x))) =
    ((∫ (y : ℝ) in Set.Icc a.snd b.snd, f (b.fst, y)) - ∫ (y : ℝ) in Set.Icc a.snd b.snd, f (a.fst, y)) +
      ((∫ (x : ℝ) in Set.Icc a.fst b.fst, g (x, b.snd)) - ∫ (x : ℝ) in Set.Icc a.fst b.fst, g (x, a.snd))

tactic: rfl
state_before: E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f g : ℝ × ℝ → E
f' g' : ℝ × ℝ → ℝ × ℝ →L[ℝ] E
a b : ℝ × ℝ
hle : a ≤ b
s : Set (ℝ × ℝ)
hs : Set.Countable s
Hcf : ContinuousOn f (Set.Icc a b)
Hcg : ContinuousOn g (Set.Icc a b)
Hdf : ∀ (x : ℝ × ℝ), x ∈ Set.Ioo a.fst b.fst ×ˢ Set.Ioo a.snd b.snd \ s → HasFDerivAt f (f' x) x
Hdg : ∀ (x : ℝ × ℝ), x ∈ Set.Ioo a.fst b.fst ×ˢ Set.Ioo a.snd b.snd \ s → HasFDerivAt g (g' x) x
Hi : IntegrableOn (fun x => ↑(f' x) (1, 0) + ↑(g' x) (0, 1)) (Set.Icc a b)
e : (ℝ × ℝ) ≃L[ℝ] Fin 2 → ℝ := ContinuousLinearEquiv.symm (ContinuousLinearEquiv.finTwoArrow ℝ ℝ)
this :
  ∀ (a b : Fin 1 → ℝ) (f : (Fin 1 → ℝ) → E),
    (∫ (x : Fin 1 → ℝ) in Set.Icc a b, f x) = ∫ (x : ℝ) in Set.Icc (a 0) (b 0), f fun x_1 => x
⊢ ((∫ (x : ℝ) in
          Set.Icc ((↑(ContinuousLinearEquiv.symm (ContinuousLinearEquiv.finTwoArrow ℝ ℝ)) a ∘ ↑(Fin.succAbove 0)) 0)
            ((↑(ContinuousLinearEquiv.symm (ContinuousLinearEquiv.finTwoArrow ℝ ℝ)) b ∘ ↑(Fin.succAbove 0)) 0),
          Matrix.vecCons f ![g] 0
            (↑(ContinuousLinearEquiv.symm (ContinuousLinearEquiv.symm (ContinuousLinearEquiv.finTwoArrow ℝ ℝ)))
              (Fin.insertNth 0 (↑(ContinuousLinearEquiv.symm (ContinuousLinearEquiv.finTwoArrow ℝ ℝ)) b 0) fun x_1 =>
                x))) -
        ∫ (x : ℝ) in
          Set.Icc ((↑(ContinuousLinearEquiv.symm (ContinuousLinearEquiv.finTwoArrow ℝ ℝ)) a ∘ ↑(Fin.succAbove 0)) 0)
            ((↑(ContinuousLinearEquiv.symm (ContinuousLinearEquiv.finTwoArrow ℝ ℝ)) b ∘ ↑(Fin.succAbove 0)) 0),
          Matrix.vecCons f ![g] 0
            (↑(ContinuousLinearEquiv.symm (ContinuousLinearEquiv.symm (ContinuousLinearEquiv.finTwoArrow ℝ ℝ)))
              (Fin.insertNth 0 (↑(ContinuousLinearEquiv.symm (ContinuousLinearEquiv.finTwoArrow ℝ ℝ)) a 0) fun x_1 =>
                x))) +
      ((∫ (x : ℝ) in
          Set.Icc ((↑(ContinuousLinearEquiv.symm (ContinuousLinearEquiv.finTwoArrow ℝ ℝ)) a ∘ ↑(Fin.succAbove 1)) 0)
            ((↑(ContinuousLinearEquiv.symm (ContinuousLinearEquiv.finTwoArrow ℝ ℝ)) b ∘ ↑(Fin.succAbove 1)) 0),
          Matrix.vecCons f ![g] 1
            (↑(ContinuousLinearEquiv.symm (ContinuousLinearEquiv.symm (ContinuousLinearEquiv.finTwoArrow ℝ ℝ)))
              (Fin.insertNth 1 (↑(ContinuousLinearEquiv.symm (ContinuousLinearEquiv.finTwoArrow ℝ ℝ)) b 1) fun x_1 =>
                x))) -
        ∫ (x : ℝ) in
          Set.Icc ((↑(ContinuousLinearEquiv.symm (ContinuousLinearEquiv.finTwoArrow ℝ ℝ)) a ∘ ↑(Fin.succAbove 1)) 0)
            ((↑(ContinuousLinearEquiv.symm (ContinuousLinearEquiv.finTwoArrow ℝ ℝ)) b ∘ ↑(Fin.succAbove 1)) 0),
          Matrix.vecCons f ![g] 1
            (↑(ContinuousLinearEquiv.symm (ContinuousLinearEquiv.symm (ContinuousLinearEquiv.finTwoArrow ℝ ℝ)))
              (Fin.insertNth 1 (↑(ContinuousLinearEquiv.symm (ContinuousLinearEquiv.finTwoArrow ℝ ℝ)) a 1) fun x_1 =>
                x))) =
    ((∫ (y : ℝ) in Set.Icc a.snd b.snd, f (b.fst, y)) - ∫ (y : ℝ) in Set.Icc a.snd b.snd, f (a.fst, y)) +
      ((∫ (x : ℝ) in Set.Icc a.fst b.fst, g (x, b.snd)) - ∫ (x : ℝ) in Set.Icc a.fst b.fst, g (x, a.snd))

tactic: convert (((volume_preserving_funUnique (Fin 1) ℝ).symm _).set_integral_preimage_emb
  (MeasurableEquiv.measurableEmbedding _) f _).symm
state_before: E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f✝ g : ℝ × ℝ → E
f' g' : ℝ × ℝ → ℝ × ℝ →L[ℝ] E
a✝ b✝ : ℝ × ℝ
hle : a✝ ≤ b✝
s : Set (ℝ × ℝ)
hs : Set.Countable s
Hcf : ContinuousOn f✝ (Set.Icc a✝ b✝)
Hcg : ContinuousOn g (Set.Icc a✝ b✝)
Hdf : ∀ (x : ℝ × ℝ), x ∈ Set.Ioo a✝.fst b✝.fst ×ˢ Set.Ioo a✝.snd b✝.snd \ s → HasFDerivAt f✝ (f' x) x
Hdg : ∀ (x : ℝ × ℝ), x ∈ Set.Ioo a✝.fst b✝.fst ×ˢ Set.Ioo a✝.snd b✝.snd \ s → HasFDerivAt g (g' x) x
Hi : IntegrableOn (fun x => ↑(f' x) (1, 0) + ↑(g' x) (0, 1)) (Set.Icc a✝ b✝)
e : (ℝ × ℝ) ≃L[ℝ] Fin 2 → ℝ := ContinuousLinearEquiv.symm (ContinuousLinearEquiv.finTwoArrow ℝ ℝ)
a b : Fin 1 → ℝ
f : (Fin 1 → ℝ) → E
⊢ (∫ (x : Fin 1 → ℝ) in Set.Icc a b, f x) = ∫ (x : ℝ) in Set.Icc (a 0) (b 0), f fun x_1 => x

tactic: exact ((OrderIso.funUnique (Fin 1) ℝ).symm.preimage_Icc a b).symm
state_before: case h.e'_3.h.e'_7.h.e'_4
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f✝ g : ℝ × ℝ → E
f' g' : ℝ × ℝ → ℝ × ℝ →L[ℝ] E
a✝ b✝ : ℝ × ℝ
hle : a✝ ≤ b✝
s : Set (ℝ × ℝ)
hs : Set.Countable s
Hcf : ContinuousOn f✝ (Set.Icc a✝ b✝)
Hcg : ContinuousOn g (Set.Icc a✝ b✝)
Hdf : ∀ (x : ℝ × ℝ), x ∈ Set.Ioo a✝.fst b✝.fst ×ˢ Set.Ioo a✝.snd b✝.snd \ s → HasFDerivAt f✝ (f' x) x
Hdg : ∀ (x : ℝ × ℝ), x ∈ Set.Ioo a✝.fst b✝.fst ×ˢ Set.Ioo a✝.snd b✝.snd \ s → HasFDerivAt g (g' x) x
Hi : IntegrableOn (fun x => ↑(f' x) (1, 0) + ↑(g' x) (0, 1)) (Set.Icc a✝ b✝)
e : (ℝ × ℝ) ≃L[ℝ] Fin 2 → ℝ := ContinuousLinearEquiv.symm (ContinuousLinearEquiv.finTwoArrow ℝ ℝ)
a b : Fin 1 → ℝ
f : (Fin 1 → ℝ) → E
⊢ Set.Icc (a 0) (b 0) = ↑(MeasurableEquiv.symm (MeasurableEquiv.funUnique (Fin 1) ℝ)) ⁻¹' Set.Icc a b

tactic: simp only [intervalIntegral.integral_of_le hle.1, intervalIntegral.integral_of_le hle.2,
  set_integral_congr_set_ae (Ioc_ae_eq_Icc (α := ℝ) (μ := volume))]
state_before: E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f g : ℝ × ℝ → E
f' g' : ℝ × ℝ → ℝ × ℝ →L[ℝ] E
a b : ℝ × ℝ
hle : a ≤ b
s : Set (ℝ × ℝ)
hs : Set.Countable s
Hcf : ContinuousOn f (Set.Icc a b)
Hcg : ContinuousOn g (Set.Icc a b)
Hdf : ∀ (x : ℝ × ℝ), x ∈ Set.Ioo a.fst b.fst ×ˢ Set.Ioo a.snd b.snd \ s → HasFDerivAt f (f' x) x
Hdg : ∀ (x : ℝ × ℝ), x ∈ Set.Ioo a.fst b.fst ×ˢ Set.Ioo a.snd b.snd \ s → HasFDerivAt g (g' x) x
Hi : IntegrableOn (fun x => ↑(f' x) (1, 0) + ↑(g' x) (0, 1)) (Set.Icc a b)
e : (ℝ × ℝ) ≃L[ℝ] Fin 2 → ℝ := ContinuousLinearEquiv.symm (ContinuousLinearEquiv.finTwoArrow ℝ ℝ)
⊢ ((∫ (y : ℝ) in Set.Icc a.snd b.snd, f (b.fst, y)) - ∫ (y : ℝ) in Set.Icc a.snd b.snd, f (a.fst, y)) +
      ((∫ (x : ℝ) in Set.Icc a.fst b.fst, g (x, b.snd)) - ∫ (x : ℝ) in Set.Icc a.fst b.fst, g (x, a.snd)) =
    (((∫ (x : ℝ) in a.fst..b.fst, g (x, b.snd)) - ∫ (x : ℝ) in a.fst..b.fst, g (x, a.snd)) +
        ∫ (y : ℝ) in a.snd..b.snd, f (b.fst, y)) -
      ∫ (y : ℝ) in a.snd..b.snd, f (a.fst, y)

tactic: abel
state_before: E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f g : ℝ × ℝ → E
f' g' : ℝ × ℝ → ℝ × ℝ →L[ℝ] E
a b : ℝ × ℝ
hle : a ≤ b
s : Set (ℝ × ℝ)
hs : Set.Countable s
Hcf : ContinuousOn f (Set.Icc a b)
Hcg : ContinuousOn g (Set.Icc a b)
Hdf : ∀ (x : ℝ × ℝ), x ∈ Set.Ioo a.fst b.fst ×ˢ Set.Ioo a.snd b.snd \ s → HasFDerivAt f (f' x) x
Hdg : ∀ (x : ℝ × ℝ), x ∈ Set.Ioo a.fst b.fst ×ˢ Set.Ioo a.snd b.snd \ s → HasFDerivAt g (g' x) x
Hi : IntegrableOn (fun x => ↑(f' x) (1, 0) + ↑(g' x) (0, 1)) (Set.Icc a b)
e : (ℝ × ℝ) ≃L[ℝ] Fin 2 → ℝ := ContinuousLinearEquiv.symm (ContinuousLinearEquiv.finTwoArrow ℝ ℝ)
⊢ ((∫ (y : ℝ) in Set.Icc a.snd b.snd, f (b.fst, y)) - ∫ (y : ℝ) in Set.Icc a.snd b.snd, f (a.fst, y)) +
      ((∫ (x : ℝ) in Set.Icc a.fst b.fst, g (x, b.snd)) - ∫ (x : ℝ) in Set.Icc a.fst b.fst, g (x, a.snd)) =
    (((∫ (x : ℝ) in Set.Icc a.fst b.fst, g (x, b.snd)) - ∫ (x : ℝ) in Set.Icc a.fst b.fst, g (x, a.snd)) +
        ∫ (x : ℝ) in Set.Icc a.snd b.snd, f (b.fst, x)) -
      ∫ (x : ℝ) in Set.Icc a.snd b.snd, f (a.fst, x)