Instruction: Explain the Lean statement below in plain mathematical language, then formalize a short related example in Lean 4.

[System] You are Leanstral, a Lean 4 proof assistant. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.RingTheory.UniqueFactorizationDomain.FactorSet).

[User]
Explain the Lean statement below in plain mathematical language, then formalize a short related example in Lean 4.

Open namespaces: UniqueFactorizationMonoid, Associated, Multiset, Classical, in

## Surrounding context in Mathlib/RingTheory/UniqueFactorizationDomain/FactorSet.lean
```lean
-- Mathlib.RingTheory.UniqueFactorizationDomain.FactorSet.FactorSet (L42-L44)
abbrev FactorSet.{u} (α : Type u) [CommMonoidWithZero α] : Type u

-- Mathlib.RingTheory.UniqueFactorizationDomain.FactorSet.FactorSet (L47-L49)
theorem FactorSet.coe_add {a b : Multiset { a : Associates α // Irreducible a }} :
    (↑(a + b) : FactorSet α) = a + b

-- Mathlib.RingTheory.UniqueFactorizationDomain.FactorSet.FactorSet (L50-L61)
theorem FactorSet.sup_add_inf_eq_add [DecidableEq (Associates α)] :
    ∀ a b : FactorSet α, a ⊔ b + a ⊓ b = a + b
  | ⊤, b => show ⊤ ⊔ b + ⊤ ⊓ b = ⊤ + b by simp
  | a, ⊤ => show a ⊔ ⊤ + a ⊓ ⊤ = a + ⊤ by simp
  | WithTop.some a, WithTop.some b =>
    show (a : FactorSet α) ⊔ b + (a : FactorSet α) ⊓ b = a + b by
      rw [← WithTop.coe_sup, ← WithTop.coe_inf, ← WithTop.coe_add, ← WithTop.coe_add,
        WithTop.coe_eq_coe]
      exact Multiset.union_add_inter _ _

/-- Evaluates the product of a `FactorSet` to be the product of the corresponding multiset,
  or `0` if there is none. -/
```

Relevant lemmas available in scope: `hz`, `Multiset.prod_zero`, `p0_irr`, `dvd_of_mk_le_mk`, `dvd_of_mem_factors'`, `ha`, `hb`

```lean
theorem exists_prime_dvd_of_not_inf_one {a b : α} (ha : a ≠ 0) (hb : b ≠ 0)
    (h : Associates.mk a ⊓ Associates.mk b ≠ 1) : ∃ p : α, Prime p ∧ p ∣ a ∧ p ∣ b
```

Declaration: `Mathlib.RingTheory.UniqueFactorizationDomain.FactorSet.exists_prime_dvd_of_not_inf_one` (module Mathlib.RingTheory.UniqueFactorizationDomain.FactorSet).

You are Leanstral, a Lean 4 proof assistant. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.RingTheory.UniqueFactorizationDomain.FactorSet).

Explain the Lean statement below in plain mathematical language, then formalize a short related example in Lean 4.

Open namespaces: UniqueFactorizationMonoid, Associated, Multiset, Classical, in

## Surrounding context in Mathlib/RingTheory/UniqueFactorizationDomain/FactorSet.lean
```lean
-- Mathlib.RingTheory.UniqueFactorizationDomain.FactorSet.FactorSet (L42-L44)
abbrev FactorSet.{u} (α : Type u) [CommMonoidWithZero α] : Type u

-- Mathlib.RingTheory.UniqueFactorizationDomain.FactorSet.FactorSet (L47-L49)
theorem FactorSet.coe_add {a b : Multiset { a : Associates α // Irreducible a }} :
    (↑(a + b) : FactorSet α) = a + b

-- Mathlib.RingTheory.UniqueFactorizationDomain.FactorSet.FactorSet (L50-L61)
theorem FactorSet.sup_add_inf_eq_add [DecidableEq (Associates α)] :
    ∀ a b : FactorSet α, a ⊔ b + a ⊓ b = a + b
  | ⊤, b => show ⊤ ⊔ b + ⊤ ⊓ b = ⊤ + b by simp
  | a, ⊤ => show a ⊔ ⊤ + a ⊓ ⊤ = a + ⊤ by simp
  | WithTop.some a, WithTop.some b =>
    show (a : FactorSet α) ⊔ b + (a : FactorSet α) ⊓ b = a + b by
      rw [← WithTop.coe_sup, ← WithTop.coe_inf, ← WithTop.coe_add, ← WithTop.coe_add,
        WithTop.coe_eq_coe]
      exact Multiset.union_add_inter _ _

/-- Evaluates the product of a `FactorSet` to be the product of the corresponding multiset,
  or `0` if there is none. -/
```

Relevant lemmas available in scope: `hz`, `Multiset.prod_zero`, `p0_irr`, `dvd_of_mk_le_mk`, `dvd_of_mem_factors'`, `ha`, `hb`

```lean
theorem exists_prime_dvd_of_not_inf_one {a b : α} (ha : a ≠ 0) (hb : b ≠ 0)
    (h : Associates.mk a ⊓ Associates.mk b ≠ 1) : ∃ p : α, Prime p ∧ p ∣ a ∧ p ∣ b
```

Declaration: `Mathlib.RingTheory.UniqueFactorizationDomain.FactorSet.exists_prime_dvd_of_not_inf_one` (module Mathlib.RingTheory.UniqueFactorizationDomain.FactorSet).


Instruction: Explain the Lean statement below in plain mathematical language, then formalize a short related example in Lean 4.

[System] You are Leanstral, a Lean 4 proof assistant. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.MeasureTheory.Group.FundamentalDomain).

[User]
Explain the Lean statement below in plain mathematical language, then formalize a short related example in Lean 4.

Open namespaces: scoped, ENNReal, Pointwise, Topology, NNReal, MeasureTheory, MeasureTheory.Measure, Set

## Surrounding context in Mathlib/MeasureTheory/Group/FundamentalDomain.lean
```lean
-- Mathlib.MeasureTheory.Group.FundamentalDomain.mk' (L89-L98)
theorem mk' (h_meas : NullMeasurableSet s μ) (h_exists : ∀ x : α, ∃! g : G, g • x ∈ s) :
    IsFundamentalDomain G s μ where
  nullMeasurableSet

-- Mathlib.MeasureTheory.Group.FundamentalDomain.mk'' (L101-L112)
theorem mk'' (h_meas : NullMeasurableSet s μ) (h_ae_covers : ∀ᵐ x ∂μ, ∃ g : G, g • x ∈ s)
    (h_ae_disjoint : ∀ g, g ≠ (1 : G) → AEDisjoint μ (g • s) s)
    (h_qmp : ∀ g : G, QuasiMeasurePreserving ((g • ·) : α → α) μ μ) :
    IsFundamentalDomain G s μ where
  nullMeasurableSet

-- Mathlib.MeasureTheory.Group.FundamentalDomain.mk_of_measure_univ_le (L118-L135)
theorem mk_of_measure_univ_le [IsFiniteMeasure μ] [Countable G] (h_meas : NullMeasurableSet s μ)
    (h_ae_disjoint : ∀ g ≠ (1 : G), AEDisjoint μ (g • s) s)
    (h_qmp : ∀ g : G, QuasiMeasurePreserving (g • · : α → α) μ μ)
    (h_measure_univ_le : μ (univ : Set α) ≤ ∑' g : G, μ (g • s)) : IsFundamentalDomain G s μ
```

```lean
theorem setIntegral_eq_tsum (h : IsFundamentalDomain G s μ) {f : α → E} {t : Set α}
    (hf : IntegrableOn f t μ) : ∫ x in t, f x ∂μ = ∑' g : G, ∫ x in t ∩ g • s, f x ∂μ
```

Declaration: `Mathlib.MeasureTheory.Group.FundamentalDomain.setIntegral_eq_tsum` (module Mathlib.MeasureTheory.Group.FundamentalDomain).

You are Leanstral, a Lean 4 proof assistant. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.MeasureTheory.Group.FundamentalDomain).

Explain the Lean statement below in plain mathematical language, then formalize a short related example in Lean 4.

Open namespaces: scoped, ENNReal, Pointwise, Topology, NNReal, MeasureTheory, MeasureTheory.Measure, Set

## Surrounding context in Mathlib/MeasureTheory/Group/FundamentalDomain.lean
```lean
-- Mathlib.MeasureTheory.Group.FundamentalDomain.mk' (L89-L98)
theorem mk' (h_meas : NullMeasurableSet s μ) (h_exists : ∀ x : α, ∃! g : G, g • x ∈ s) :
    IsFundamentalDomain G s μ where
  nullMeasurableSet

-- Mathlib.MeasureTheory.Group.FundamentalDomain.mk'' (L101-L112)
theorem mk'' (h_meas : NullMeasurableSet s μ) (h_ae_covers : ∀ᵐ x ∂μ, ∃ g : G, g • x ∈ s)
    (h_ae_disjoint : ∀ g, g ≠ (1 : G) → AEDisjoint μ (g • s) s)
    (h_qmp : ∀ g : G, QuasiMeasurePreserving ((g • ·) : α → α) μ μ) :
    IsFundamentalDomain G s μ where
  nullMeasurableSet

-- Mathlib.MeasureTheory.Group.FundamentalDomain.mk_of_measure_univ_le (L118-L135)
theorem mk_of_measure_univ_le [IsFiniteMeasure μ] [Countable G] (h_meas : NullMeasurableSet s μ)
    (h_ae_disjoint : ∀ g ≠ (1 : G), AEDisjoint μ (g • s) s)
    (h_qmp : ∀ g : G, QuasiMeasurePreserving (g • · : α → α) μ μ)
    (h_measure_univ_le : μ (univ : Set α) ≤ ∑' g : G, μ (g • s)) : IsFundamentalDomain G s μ
```

```lean
theorem setIntegral_eq_tsum (h : IsFundamentalDomain G s μ) {f : α → E} {t : Set α}
    (hf : IntegrableOn f t μ) : ∫ x in t, f x ∂μ = ∑' g : G, ∫ x in t ∩ g • s, f x ∂μ
```

Declaration: `Mathlib.MeasureTheory.Group.FundamentalDomain.setIntegral_eq_tsum` (module Mathlib.MeasureTheory.Group.FundamentalDomain).


Instruction: Explain the Lean statement below in plain mathematical language, then formalize a short related example in Lean 4.

[System] You are Leanstral, a Lean 4 proof assistant. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.Analysis.Calculus.Deriv.Inverse).

[User]
Explain the Lean statement below in plain mathematical language, then formalize a short related example in Lean 4.

Open namespaces: scoped, Topology, Filter, Set

## Surrounding context in Mathlib/Analysis/Calculus/Deriv/Inverse.lean
```lean
-- Mathlib.Analysis.Calculus.Deriv.Inverse.HasStrictDerivAt (L40-L44)
theorem HasStrictDerivAt.hasStrictFDerivAt_equiv {f : 𝕜 → 𝕜} {f' x : 𝕜}
    (hf : HasStrictDerivAt f f' x) (hf' : f' ≠ 0) :
    HasStrictFDerivAt f (ContinuousLinearEquiv.unitsEquivAut 𝕜 (Units.mk0 f' hf') : 𝕜 →L[𝕜] 𝕜) x

-- Mathlib.Analysis.Calculus.Deriv.Inverse.HasDerivAt (L45-L55)
theorem HasDerivAt.hasFDerivAt_equiv {f : 𝕜 → 𝕜} {f' x : 𝕜} (hf : HasDerivAt f f' x)
    (hf' : f' ≠ 0) :
    HasFDerivAt f (ContinuousLinearEquiv.unitsEquivAut 𝕜 (Units.mk0 f' hf') : 𝕜 →L[𝕜] 𝕜) x

-- Mathlib.Analysis.Calculus.Deriv.Inverse.HasStrictDerivAt (L56-L66)
theorem HasStrictDerivAt.of_local_left_inverse {f g : 𝕜 → 𝕜} {f' a : 𝕜} (hg : ContinuousAt g a)
    (hf : HasStrictDerivAt f f' (g a)) (hf' : f' ≠ 0) (hfg : ∀ᶠ y in 𝓝 a, f (g y) = y) :
    HasStrictDerivAt g f'⁻¹ a
```

Relevant lemmas available in scope: `hg`

```lean
theorem not_differentiableAt_of_local_left_inverse_hasDerivAt_zero {f g : 𝕜 → 𝕜} {a : 𝕜}
    (hf : HasDerivAt f 0 (g a)) (hfg : f ∘ g =ᶠ[𝓝 a] id) : ¬DifferentiableAt 𝕜 g a
```

Declaration: `Mathlib.Analysis.Calculus.Deriv.Inverse.not_differentiableAt_of_local_left_inverse_hasDerivAt_zero` (module Mathlib.Analysis.Calculus.Deriv.Inverse).

You are Leanstral, a Lean 4 proof assistant. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.Analysis.Calculus.Deriv.Inverse).

Explain the Lean statement below in plain mathematical language, then formalize a short related example in Lean 4.

Open namespaces: scoped, Topology, Filter, Set

## Surrounding context in Mathlib/Analysis/Calculus/Deriv/Inverse.lean
```lean
-- Mathlib.Analysis.Calculus.Deriv.Inverse.HasStrictDerivAt (L40-L44)
theorem HasStrictDerivAt.hasStrictFDerivAt_equiv {f : 𝕜 → 𝕜} {f' x : 𝕜}
    (hf : HasStrictDerivAt f f' x) (hf' : f' ≠ 0) :
    HasStrictFDerivAt f (ContinuousLinearEquiv.unitsEquivAut 𝕜 (Units.mk0 f' hf') : 𝕜 →L[𝕜] 𝕜) x

-- Mathlib.Analysis.Calculus.Deriv.Inverse.HasDerivAt (L45-L55)
theorem HasDerivAt.hasFDerivAt_equiv {f : 𝕜 → 𝕜} {f' x : 𝕜} (hf : HasDerivAt f f' x)
    (hf' : f' ≠ 0) :
    HasFDerivAt f (ContinuousLinearEquiv.unitsEquivAut 𝕜 (Units.mk0 f' hf') : 𝕜 →L[𝕜] 𝕜) x

-- Mathlib.Analysis.Calculus.Deriv.Inverse.HasStrictDerivAt (L56-L66)
theorem HasStrictDerivAt.of_local_left_inverse {f g : 𝕜 → 𝕜} {f' a : 𝕜} (hg : ContinuousAt g a)
    (hf : HasStrictDerivAt f f' (g a)) (hf' : f' ≠ 0) (hfg : ∀ᶠ y in 𝓝 a, f (g y) = y) :
    HasStrictDerivAt g f'⁻¹ a
```

Relevant lemmas available in scope: `hg`

```lean
theorem not_differentiableAt_of_local_left_inverse_hasDerivAt_zero {f g : 𝕜 → 𝕜} {a : 𝕜}
    (hf : HasDerivAt f 0 (g a)) (hfg : f ∘ g =ᶠ[𝓝 a] id) : ¬DifferentiableAt 𝕜 g a
```

Declaration: `Mathlib.Analysis.Calculus.Deriv.Inverse.not_differentiableAt_of_local_left_inverse_hasDerivAt_zero` (module Mathlib.Analysis.Calculus.Deriv.Inverse).


[System] You are Leanstral, a Lean 4 proof assistant. Complete the task below using the provided Lean source context. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.GroupTheory.GroupAction.Basic).

[User]
The following Lean code fails to compile. Fix it.

```lean
theorem nontrivial_of_fixedPoints_ne_univ (h : fixedPoints G α ≠ .univ) :
    Nontrivial α
  frobnicateTacticThatDoesNotExist :=
(subsingleton_or_nontrivial α).resolve_left fun _ ↦ h fixedPoints_of_subsingleton

section Orbit

-- TODO: This proof is redoing a special case of `MulAction.IsInvariantBlock.isBlock`. Can we move
-- this lemma earlier to golf?
```

## Compiler diagnostic
```
[CompilationUnit(i_begin=0, i_end=219, messages=[Message(data='Function expected at\n  Nontrivial α\nbut this term has type\n  Prop\n\nNote: Expected a function because this term is being applied to the argument\n  frobnicateTacticThatDoesNotExist', pos=Position(line=2, column=4), pos_end=Position(line=3, column=34), severity=<Severity.ERROR: 3>, kind=None), Message(data="Function expected at\n  fixedPoints\nbut this term has type\n  ?m.1\n\nNote: Expected a function because this term is being applied to the argument\n  G\n\nHint: The identifier `fixedPoints` is unknown, and Lean's `autoImplicit` option causes an unknown identifier to be treated as an implicitly bound variable with an unknown type. However, the unknown type cannot be a function, and a function is what Lean expects here. This is often the result of a typo or a missing `import` or `open` statement.", pos=Position(line=1, column=47), pos_end=Position(line=1, column=62), severity=<Severity.ERROR: 3>, kind=None), Message(data='Invalid dotted identifier notation: The expected type of `.univ` could not be determined\n\nHint: Using one of these would be unambiguous:\n  [apply] `AbsConvex.univ`\n  [apply] `Absorbs.univ`\n  [apply] `AlgebraicIndepOn.univ`\n  [apply] `Cardinal.univ`\n  [apply] `Class.univ`\n  [apply] `Finset.univ`\n  [apply] `IsCofinal.univ`\n  [apply] `IsDiscrete.univ`\n  [apply] `IsGδ.univ`\n  [apply] `IsLinearSet.univ`\n  [apply] `IsRetrocompact.univ`\n  [apply] `IsSemilinearSet.univ`\n  [apply] `MeasurableSet.univ`\n  [apply] `Ordinal.univ`\n  [apply] `Semiquot.univ`\n  [apply] `Set.univ`\n  [apply] `UnitsInt.univ`\n  [apply] `AddAction.IsBlock.univ`\n  [apply] `AddAction.IsFixedBlock.univ`\n  [apply] `Cardinal.IsInaccessible.univ`\n  [apply] `Cardinal.IsStrongLimit.univ`\n  [apply] `Equiv.Set.univ`\n  [apply] `Filter.CardinalGenerateSets.univ`\n  [apply] `Filter.CountableGenerateSets.univ`\n  [apply] `Filter.GenerateSets.univ`\n  [apply] `FiniteInter.finiteInterClosure.univ`\n  [apply] `Fintype.IsSimpleOrder.univ`\n  [apply] `Homeomorph.Set.univ`\n  [apply] `Lean.ToLevel.univ`\n  [apply] `Matrix.charpoly.univ`\n  [apply] `MeasurableEquiv.Set.univ`\n  [apply] `MulAction.IsBlock.univ`\n  [apply] `MulAction.IsFixedBlock.univ`\n  [apply] `Order.IsExtent.univ`\n  [apply] `Order.IsIntent.univ`\n  [apply] `OrderIso.Set.univ`\n  [apply] `Rack.toEnvelGroup.univ`\n  [apply] `Set.IsIntersectingOf.univ`\n  [apply] `Set.Sigma.univ`\n  [apply] `TopologicalSpace.GenerateOpen.univ`\n  [apply] `TopologicalSpace.IsCompletelyMetrizableSpace.univ`\n  [apply] `Topology.IsConstructible.univ`\n  [apply] `Topology.IsLocallyConstructible.univ`\n  [apply] `Filter.CardinalGenerateSets.below.univ`\n  [apply] `Filter.CountableGenerateSets.below.univ`\n  [apply] `Filter.GenerateSets.below.univ`\n  [apply] `FiniteInter.finiteInterClosure.below.univ`\n  [apply] `TopologicalSpace.GenerateOpen.below.univ`\n  [apply] `Mathlib.Tactic.Abel.Context.univ`', pos=Position(line=1, column=65), pos_end=Position(line=1, column=70), severity=<Severity.ERROR: 3>, kind='lean.invalidDottedIdent._namedError'), Message(data='Unknown identifier `fixedPoints_of_subsingleton`', pos=Position(line=4, column=54), pos_end=Position(line=4, column=81), severity=<Severity.ERROR: 3>, kind='lean.unknownIdentifier._namedError')], invocations=None, goal_state=None, goal_src_boundaries=None, new_constants=None), CompilationUnit(i_begin=219, i_end=363, messages=[], invocations=None, goal_state=None, goal_src_boundaries=None, new_constants=None)]
```

Return a corrected, compiling version of the code.

<s>[SYSTEM_PROMPT]You are Leanstral, a Lean 4 proof assistant. Complete the task below using the provided Lean source context. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.GroupTheory.GroupAction.Basic).[/SYSTEM_PROMPT][MODEL_SETTINGS]{"reasoning_effort": "none"}[/MODEL_SETTINGS][INST]The following Lean code fails to compile. Fix it.

```lean
theorem nontrivial_of_fixedPoints_ne_univ (h : fixedPoints G α ≠ .univ) :
    Nontrivial α
  frobnicateTacticThatDoesNotExist :=
(subsingleton_or_nontrivial α).resolve_left fun _ ↦ h fixedPoints_of_subsingleton

section Orbit

-- TODO: This proof is redoing a special case of `MulAction.IsInvariantBlock.isBlock`. Can we move
-- this lemma earlier to golf?
```

## Compiler diagnostic
```
[CompilationUnit(i_begin=0, i_end=219, messages=[Message(data='Function expected at\n  Nontrivial α\nbut this term has type\n  Prop\n\nNote: Expected a function because this term is being applied to the argument\n  frobnicateTacticThatDoesNotExist', pos=Position(line=2, column=4), pos_end=Position(line=3, column=34), severity=<Severity.ERROR: 3>, kind=None), Message(data="Function expected at\n  fixedPoints\nbut this term has type\n  ?m.1\n\nNote: Expected a function because this term is being applied to the argument\n  G\n\nHint: The identifier `fixedPoints` is unknown, and Lean's `autoImplicit` option causes an unknown identifier to be treated as an implicitly bound variable with an unknown type. However, the unknown type cannot be a function, and a function is what Lean expects here. This is often the result of a typo or a missing `import` or `open` statement.", pos=Position(line=1, column=47), pos_end=Position(line=1, column=62), severity=<Severity.ERROR: 3>, kind=None), Message(data='Invalid dotted identifier notation: The expected type of `.univ` could not be determined\n\nHint: Using one of these would be unambiguous:\n  [apply] `AbsConvex.univ`\n  [apply] `Absorbs.univ`\n  [apply] `AlgebraicIndepOn.univ`\n  [apply] `Cardinal.univ`\n  [apply] `Class.univ`\n  [apply] `Finset.univ`\n  [apply] `IsCofinal.univ`\n  [apply] `IsDiscrete.univ`\n  [apply] `IsGδ.univ`\n  [apply] `IsLinearSet.univ`\n  [apply] `IsRetrocompact.univ`\n  [apply] `IsSemilinearSet.univ`\n  [apply] `MeasurableSet.univ`\n  [apply] `Ordinal.univ`\n  [apply] `Semiquot.univ`\n  [apply] `Set.univ`\n  [apply] `UnitsInt.univ`\n  [apply] `AddAction.IsBlock.univ`\n  [apply] `AddAction.IsFixedBlock.univ`\n  [apply] `Cardinal.IsInaccessible.univ`\n  [apply] `Cardinal.IsStrongLimit.univ`\n  [apply] `Equiv.Set.univ`\n  [apply] `Filter.CardinalGenerateSets.univ`\n  [apply] `Filter.CountableGenerateSets.univ`\n  [apply] `Filter.GenerateSets.univ`\n  [apply] `FiniteInter.finiteInterClosure.univ`\n  [apply] `Fintype.IsSimpleOrder.univ`\n  [apply] `Homeomorph.Set.univ`\n  [apply] `Lean.ToLevel.univ`\n  [apply] `Matrix.charpoly.univ`\n  [apply] `MeasurableEquiv.Set.univ`\n  [apply] `MulAction.IsBlock.univ`\n  [apply] `MulAction.IsFixedBlock.univ`\n  [apply] `Order.IsExtent.univ`\n  [apply] `Order.IsIntent.univ`\n  [apply] `OrderIso.Set.univ`\n  [apply] `Rack.toEnvelGroup.univ`\n  [apply] `Set.IsIntersectingOf.univ`\n  [apply] `Set.Sigma.univ`\n  [apply] `TopologicalSpace.GenerateOpen.univ`\n  [apply] `TopologicalSpace.IsCompletelyMetrizableSpace.univ`\n  [apply] `Topology.IsConstructible.univ`\n  [apply] `Topology.IsLocallyConstructible.univ`\n  [apply] `Filter.CardinalGenerateSets.below.univ`\n  [apply] `Filter.CountableGenerateSets.below.univ`\n  [apply] `Filter.GenerateSets.below.univ`\n  [apply] `FiniteInter.finiteInterClosure.below.univ`\n  [apply] `TopologicalSpace.GenerateOpen.below.univ`\n  [apply] `Mathlib.Tactic.Abel.Context.univ`', pos=Position(line=1, column=65), pos_end=Position(line=1, column=70), severity=<Severity.ERROR: 3>, kind='lean.invalidDottedIdent._namedError'), Message(data='Unknown identifier `fixedPoints_of_subsingleton`', pos=Position(line=4, column=54), pos_end=Position(line=4, column=81), severity=<Severity.ERROR: 3>, kind='lean.unknownIdentifier._namedError')], invocations=None, goal_state=None, goal_src_boundaries=None, new_constants=None), CompilationUnit(i_begin=219, i_end=363, messages=[], invocations=None, goal_state=None, goal_src_boundaries=None, new_constants=None)]
```

Return a corrected, compiling version of the code.[/INST]


Instruction: Edit `CongrResult` so it still compiles and the proof is simplified where possible. Return the full updated `CongrResult` block.

[System] You are Leanstral, a Lean 4 proof assistant. Complete the task below using the provided Lean source context. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.Tactic.TermCongr).

[User]
You are editing a file in `Mathlib/Tactic/TermCongr.lean` (mathlib commit 5e932f97dd25535344f80f9dd8da3aab83df0fe6).

## Current excerpt (around `Mathlib.Tactic.TermCongr.CongrResult`, L326-L385)
Open namespaces: Lean, Elab, Meta

## Surrounding context in Mathlib/Tactic/TermCongr.lean
```lean
-- Mathlib.Tactic.TermCongr.cHole (L110-L113)
def cHole {α : Sort u} (val : α) {p : Prop} (_pf : p) : α

-- Mathlib.Tactic.TermCongr.mkCHole (L122-L131)
def mkCHole (forLhs : Bool) (val pf : Expr) : MetaM Expr

-- Mathlib.Tactic.TermCongr.cHole (L132-L143)
def cHole? (e : Expr) (mvarCounterSaved? : Option Nat
```

Relevant lemmas available in scope: `non`

```lean
def CongrResult.mk' (lhs rhs : Expr) (pf : Expr) : CongrResult where
  lhs := lhs
rhs := rhs
  pf? :=
    if (isRefl? pf).isSome then
      none
    else
      some fun
      | .eq => do ensureSidesDefeq (← toEqPf)
      | .heq => do ensureSidesDefeq (← toHEqPf)
where
  /-- Given a `pf` of an `Iff`, `Eq`, or `HEq`, return a proof of `Eq`.
  If `pf` is not obviously any of these, weakly try inserting `propext` to make an `Iff`
  and otherwise unify the type with `Eq`. -/
  toEqPf : MetaM Expr := do
    let ty ← whnf (← inferType pf)
    if let some .. := ty.iff? then
      mkPropExt pf
    else if let some .. := ty.eq? then
      return pf
    else if let some (lhsTy, _, rhsTy, _) := ty.heq? then
      unless ← isDefEq lhsTy rhsTy do
        throwError "Cannot turn HEq proof into an equality proof. Has type{indentD ty}"
      mkAppM ``eq_of_heq #[pf]
    else if ← Meta.isProp lhs then
      mkPropExt (← ensureIff pf)
    else
      discard <| mkEqForExpectedType (← inferType pf)
      return pf
  /-- Given a `pf` of an `Iff`, `Eq`, or `HEq`, return a proof of `HEq`.
  If `pf` is not obviously any of these, weakly try making it be an `Eq` or an `Iff`,
  and otherwise make it be a `HEq`. -/
  toHEqPf : MetaM Expr := do
    let ty ← whnf (← inferType pf)
    if let some .. := ty.iff? then
      mkAppM ``heq_of_eq #[← mkPropExt pf]
    else if let some .. := ty.eq? then
      mkAppM ``heq_of_eq #[pf]
    else if let some .. := ty.heq? then
      return pf
    else if ← withNewMCtxDepth <| isDefEq (← inferType lhs) (← inferType rhs) then
      mkAppM ``heq_of_eq #[← toEqPf]
    else
      discard <| mkHEqForExpectedType (← inferType pf)
      return pf
  /-- Get the sides of the type of `pf` and unify them with the respective `lhs` and `rhs`. -/
  ensureSidesDefeq (pf : Expr) : MetaM Expr := do
    let pfTy ← inferType pf
    let some (_, lhs', _, rhs') := (← whnf pfTy).sides?
      | panic! "Unexpectedly did not generate an eq or heq"
    unless ← isDefEq lhs lhs' do
      throwError "Congruence hole has type{indentD pfTy}\n\
        but its left-hand side is not definitionally equal to the expected value{indentD lhs}"
    unless ← isDefEq rhs rhs' do
      throwError "Congruence hole has type{indentD pfTy}\n\
        but its right-hand side is not definitionally equal to the expected value{indentD rhs}"
    return pf

/-- Force the lhs and rhs to be defeq. For when `dsimp`-like congruence is necessary.
Clears the proof. -/
```

## Edit instruction
Edit `CongrResult` so it still compiles and the proof is simplified where possible. Return the full updated `CongrResult` block.

You are Leanstral, a Lean 4 proof assistant. Complete the task below using the provided Lean source context. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.Tactic.TermCongr).

You are editing a file in `Mathlib/Tactic/TermCongr.lean` (mathlib commit 5e932f97dd25535344f80f9dd8da3aab83df0fe6).

## Current excerpt (around `Mathlib.Tactic.TermCongr.CongrResult`, L326-L385)
Open namespaces: Lean, Elab, Meta

## Surrounding context in Mathlib/Tactic/TermCongr.lean
```lean
-- Mathlib.Tactic.TermCongr.cHole (L110-L113)
def cHole {α : Sort u} (val : α) {p : Prop} (_pf : p) : α

-- Mathlib.Tactic.TermCongr.mkCHole (L122-L131)
def mkCHole (forLhs : Bool) (val pf : Expr) : MetaM Expr

-- Mathlib.Tactic.TermCongr.cHole (L132-L143)
def cHole? (e : Expr) (mvarCounterSaved? : Option Nat
```

Relevant lemmas available in scope: `non`

```lean
def CongrResult.mk' (lhs rhs : Expr) (pf : Expr) : CongrResult where
  lhs := lhs
rhs := rhs
  pf? :=
    if (isRefl? pf).isSome then
      none
    else
      some fun
      | .eq => do ensureSidesDefeq (← toEqPf)
      | .heq => do ensureSidesDefeq (← toHEqPf)
where
  /-- Given a `pf` of an `Iff`, `Eq`, or `HEq`, return a proof of `Eq`.
  If `pf` is not obviously any of these, weakly try inserting `propext` to make an `Iff`
  and otherwise unify the type with `Eq`. -/
  toEqPf : MetaM Expr := do
    let ty ← whnf (← inferType pf)
    if let some .. := ty.iff? then
      mkPropExt pf
    else if let some .. := ty.eq? then
      return pf
    else if let some (lhsTy, _, rhsTy, _) := ty.heq? then
      unless ← isDefEq lhsTy rhsTy do
        throwError "Cannot turn HEq proof into an equality proof. Has type{indentD ty}"
      mkAppM ``eq_of_heq #[pf]
    else if ← Meta.isProp lhs then
      mkPropExt (← ensureIff pf)
    else
      discard <| mkEqForExpectedType (← inferType pf)
      return pf
  /-- Given a `pf` of an `Iff`, `Eq`, or `HEq`, return a proof of `HEq`.
  If `pf` is not obviously any of these, weakly try making it be an `Eq` or an `Iff`,
  and otherwise make it be a `HEq`. -/
  toHEqPf : MetaM Expr := do
    let ty ← whnf (← inferType pf)
    if let some .. := ty.iff? then
      mkAppM ``heq_of_eq #[← mkPropExt pf]
    else if let some .. := ty.eq? then
      mkAppM ``heq_of_eq #[pf]
    else if let some .. := ty.heq? then
      return pf
    else if ← withNewMCtxDepth <| isDefEq (← inferType lhs) (← inferType rhs) then
      mkAppM ``heq_of_eq #[← toEqPf]
    else
      discard <| mkHEqForExpectedType (← inferType pf)
      return pf
  /-- Get the sides of the type of `pf` and unify them with the respective `lhs` and `rhs`. -/
  ensureSidesDefeq (pf : Expr) : MetaM Expr := do
    let pfTy ← inferType pf
    let some (_, lhs', _, rhs') := (← whnf pfTy).sides?
      | panic! "Unexpectedly did not generate an eq or heq"
    unless ← isDefEq lhs lhs' do
      throwError "Congruence hole has type{indentD pfTy}\n\
        but its left-hand side is not definitionally equal to the expected value{indentD lhs}"
    unless ← isDefEq rhs rhs' do
      throwError "Congruence hole has type{indentD pfTy}\n\
        but its right-hand side is not definitionally equal to the expected value{indentD rhs}"
    return pf

/-- Force the lhs and rhs to be defeq. For when `dsimp`-like congruence is necessary.
Clears the proof. -/
```

## Edit instruction
Edit `CongrResult` so it still compiles and the proof is simplified where possible. Return the full updated `CongrResult` block.


Instruction: Edit `ae_tendsto_div` so it still compiles and the proof is simplified where possible. Return the full updated `ae_tendsto_div` block.

[System] You are Leanstral, a Lean 4 proof assistant. Complete the task below using the provided Lean source context. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.MeasureTheory.Covering.Differentiation).

[User]
You are editing a file in `Mathlib/MeasureTheory/Covering/Differentiation.lean` (mathlib commit 5e932f97dd25535344f80f9dd8da3aab83df0fe6).

## Current excerpt (around `Mathlib.MeasureTheory.Covering.Differentiation.ae_tendsto_div`, L233-L261)
Open namespaces: MeasureTheory, Metric, Set, Filter, TopologicalSpace, MeasureTheory.Measure, scoped, ENNReal

## Surrounding context in Mathlib/MeasureTheory/Covering/Differentiation.lean
```lean
-- Mathlib.MeasureTheory.Covering.Differentiation.ae_eventually_measure_pos (L98-L117)
theorem ae_eventually_measure_pos [SecondCountableTopology α] :
    ∀ᵐ x ∂μ, ∀ᶠ a in v.filterAt x, 0 < μ a

-- Mathlib.MeasureTheory.Covering.Differentiation.eventually_measure_lt_top (L118-L123)
theorem eventually_measure_lt_top [IsLocallyFiniteMeasure μ] (x : α) :
    ∀ᶠ a in v.filterAt x, μ a < ∞

-- Mathlib.MeasureTheory.Covering.Differentiation.measure_le_of_frequently_le (L124-L149)
theorem measure_le_of_frequently_le [SecondCountableTopology α] [BorelSpace α] {ρ : Measure α}
    (ν : Measure α) [IsLocallyFiniteMeasure ν] (hρ : ρ ≪ μ) (s : Set α)
    (hs : ∀ x ∈ s, ∃ᶠ a in v.filterAt x, ρ a ≤ ν a) : ρ s ≤ ν s
```

Relevant lemmas available in scope: `I`, `A`, `c`, `v.null_of_frequently_le_of_frequently_ge`, `x`, `h1x.mono`, `h2x.mono`, `ENNReal.mul_le_of_le_div`

```lean
theorem ae_tendsto_div : ∀ᵐ x ∂μ, ∃ c, Tendsto (fun a => ρ a / μ a) (v.filterAt x) (𝓝 c) := by
obtain ⟨w, w_count, w_dense, _, w_top⟩ :
    ∃ w : Set ℝ≥0∞, w.Countable ∧ Dense w ∧ 0 ∉ w ∧ ∞ ∉ w :=
    ENNReal.exists_countable_dense_no_zero_top
  have I : ∀ x ∈ w, x ≠ ∞ := fun x xs hx => w_top (hx ▸ xs)
  have A : ∀ c ∈ w, ∀ d ∈ w, c < d → ∀ᵐ x ∂μ,
      ¬((∃ᶠ a in v.filterAt x, ρ a / μ a < c) ∧ ∃ᶠ a in v.filterAt x, d < ρ a / μ a) := by
    intro c hc d hd hcd
    lift c to ℝ≥0 using I c hc
    lift d to ℝ≥0 using I d hd
    apply v.null_of_frequently_le_of_frequently_ge hρ (ENNReal.coe_lt_coe.1 hcd)
    · simp only [and_imp, exists_prop, not_frequently, not_and, not_lt, not_le, not_eventually,
        mem_setOf_eq, mem_compl_iff, not_forall]
      intro x h1x _
      apply h1x.mono fun a ha => ?_
      refine (ENNReal.div_le_iff_le_mul ?_ (Or.inr (bot_le.trans_lt ha).ne')).1 ha.le
      simp only [ENNReal.coe_ne_top, Ne, or_true, not_false_iff]
    · simp only [and_imp, exists_prop, not_frequently, not_and, not_lt, not_le, not_eventually,
        mem_setOf_eq, mem_compl_iff, not_forall]
      intro x _ h2x
      apply h2x.mono fun a ha => ?_
      exact ENNReal.mul_le_of_le_div ha.le
  have B : ∀ᵐ x ∂μ, ∀ c ∈ w, ∀ d ∈ w, c < d →
      ¬((∃ᶠ a in v.filterAt x, ρ a / μ a < c) ∧ ∃ᶠ a in v.filterAt x, d < ρ a / μ a) := by
    simpa only [ae_ball_iff w_count, ae_all_iff]
  filter_upwards [B]
  intro x hx
  exact tendsto_of_no_upcrossings w_dense hx
```

## Edit instruction
Edit `ae_tendsto_div` so it still compiles and the proof is simplified where possible. Return the full updated `ae_tendsto_div` block.

You are Leanstral, a Lean 4 proof assistant. Complete the task below using the provided Lean source context. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.MeasureTheory.Covering.Differentiation).

You are editing a file in `Mathlib/MeasureTheory/Covering/Differentiation.lean` (mathlib commit 5e932f97dd25535344f80f9dd8da3aab83df0fe6).

## Current excerpt (around `Mathlib.MeasureTheory.Covering.Differentiation.ae_tendsto_div`, L233-L261)
Open namespaces: MeasureTheory, Metric, Set, Filter, TopologicalSpace, MeasureTheory.Measure, scoped, ENNReal

## Surrounding context in Mathlib/MeasureTheory/Covering/Differentiation.lean
```lean
-- Mathlib.MeasureTheory.Covering.Differentiation.ae_eventually_measure_pos (L98-L117)
theorem ae_eventually_measure_pos [SecondCountableTopology α] :
    ∀ᵐ x ∂μ, ∀ᶠ a in v.filterAt x, 0 < μ a

-- Mathlib.MeasureTheory.Covering.Differentiation.eventually_measure_lt_top (L118-L123)
theorem eventually_measure_lt_top [IsLocallyFiniteMeasure μ] (x : α) :
    ∀ᶠ a in v.filterAt x, μ a < ∞

-- Mathlib.MeasureTheory.Covering.Differentiation.measure_le_of_frequently_le (L124-L149)
theorem measure_le_of_frequently_le [SecondCountableTopology α] [BorelSpace α] {ρ : Measure α}
    (ν : Measure α) [IsLocallyFiniteMeasure ν] (hρ : ρ ≪ μ) (s : Set α)
    (hs : ∀ x ∈ s, ∃ᶠ a in v.filterAt x, ρ a ≤ ν a) : ρ s ≤ ν s
```

Relevant lemmas available in scope: `I`, `A`, `c`, `v.null_of_frequently_le_of_frequently_ge`, `x`, `h1x.mono`, `h2x.mono`, `ENNReal.mul_le_of_le_div`

```lean
theorem ae_tendsto_div : ∀ᵐ x ∂μ, ∃ c, Tendsto (fun a => ρ a / μ a) (v.filterAt x) (𝓝 c) := by
obtain ⟨w, w_count, w_dense, _, w_top⟩ :
    ∃ w : Set ℝ≥0∞, w.Countable ∧ Dense w ∧ 0 ∉ w ∧ ∞ ∉ w :=
    ENNReal.exists_countable_dense_no_zero_top
  have I : ∀ x ∈ w, x ≠ ∞ := fun x xs hx => w_top (hx ▸ xs)
  have A : ∀ c ∈ w, ∀ d ∈ w, c < d → ∀ᵐ x ∂μ,
      ¬((∃ᶠ a in v.filterAt x, ρ a / μ a < c) ∧ ∃ᶠ a in v.filterAt x, d < ρ a / μ a) := by
    intro c hc d hd hcd
    lift c to ℝ≥0 using I c hc
    lift d to ℝ≥0 using I d hd
    apply v.null_of_frequently_le_of_frequently_ge hρ (ENNReal.coe_lt_coe.1 hcd)
    · simp only [and_imp, exists_prop, not_frequently, not_and, not_lt, not_le, not_eventually,
        mem_setOf_eq, mem_compl_iff, not_forall]
      intro x h1x _
      apply h1x.mono fun a ha => ?_
      refine (ENNReal.div_le_iff_le_mul ?_ (Or.inr (bot_le.trans_lt ha).ne')).1 ha.le
      simp only [ENNReal.coe_ne_top, Ne, or_true, not_false_iff]
    · simp only [and_imp, exists_prop, not_frequently, not_and, not_lt, not_le, not_eventually,
        mem_setOf_eq, mem_compl_iff, not_forall]
      intro x _ h2x
      apply h2x.mono fun a ha => ?_
      exact ENNReal.mul_le_of_le_div ha.le
  have B : ∀ᵐ x ∂μ, ∀ c ∈ w, ∀ d ∈ w, c < d →
      ¬((∃ᶠ a in v.filterAt x, ρ a / μ a < c) ∧ ∃ᶠ a in v.filterAt x, d < ρ a / μ a) := by
    simpa only [ae_ball_iff w_count, ae_all_iff]
  filter_upwards [B]
  intro x hx
  exact tendsto_of_no_upcrossings w_dense hx
```

## Edit instruction
Edit `ae_tendsto_div` so it still compiles and the proof is simplified where possible. Return the full updated `ae_tendsto_div` block.


[System] You are Leanstral, a Lean 4 proof assistant. Complete the task below using the provided Lean source context. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.AlgebraicGeometry.Stalk).

[User]
The following Lean code fails to compile. Fix it.

```lean
lemma Spec_stalkClosedPointIso :
    Spec.map (stalkClosedPointIso R).inv = (Spec R).fromSpecStalk (closedPoint R)
:= by thisIsWrongLemmaNameXYZ
rw [stalkClosedPointIso_inv, Spec.fromSpecStalk_eq']

end stalkClosedPointIso

section stalkClosedPointTo

variable {R} (f : Spec R ⟶ X)

namespace Scheme

/--
Given a local ring `(R, 𝔪)` and a morphism `f : Spec R ⟶ X`,
they induce a (local) ring homomorphism `φ : 𝒪_{X, f 𝔪} ⟶ R`.

This is inverse to `φ ↦ Spec.map φ ≫ X.fromSpecStalk (f 𝔪)`. See `SpecToEquivOfLocalRing`.
-/
noncomputable
```

## Compiler diagnostic
```
[CompilationUnit(i_begin=0, i_end=122, messages=[Message(data='unknown tactic', pos=Position(line=3, column=7), pos_end=None, severity=<Severity.ERROR: 3>, kind=None), Message(data="Invalid field notation: Type of\n  Spec\nis not known; cannot resolve field `map`\n\nHint: Consider replacing the field projection with a call to one of the following:\n  • `Abelianization.map`\n  • `AbstractCompletion.map`\n  • `AccPt.map`\n  • `AddCommute.map`\n  • `AddCon.map`\n  • `AddConjClasses.map`\n  • `AddIrreducible.map`\n  • `AddMonoidAlgebra.map`\n  • `AddSemiconjBy.map`\n  • `AddSubgroup.map`\n  • `AddSubmonoid.map`\n  • `AddSubsemigroup.map`\n  • `AddUnits.map`\n  • `AddValuation.map`\n  • `AdicCompletion.map`\n  • `AdjoinRoot.map`\n  • `AffineSubspace.map`\n  • `AlgebraicIndependent.map`\n  • `Array.map`\n  • `Associated.map`\n  • `BaseIO.map`\n  • `Behrend.map`\n  • `BooleanSubalgebra.map`\n  • `ByteArray.map`\n  • `CStarMatrix.map`\n  • `Cardinal.map`\n  • `Cauchy.map`\n  • `CliffordAlgebra.map`\n  • `ClosedSubmodule.map`\n  • `ClusterPt.map`\n  • `Codisjoint.map`\n  • `Commute.map`\n  • `CompleteOrthogonalIdempotents.map`\n  • `CompleteSublattice.map`\n  • `Computation.map`\n  • `Con.map`\n  • `ConjClasses.map`\n  • `ContT.map`\n  • `ConvexCone.map`\n  • `CoxeterSystem.map`\n  • `Cubic.map`\n  • `Cycle.map`\n  • `DMatrix.map`\n  • `DirectLimit.map`\n  • `DirectSum.map`\n  • `DiscreteQuotient.map`\n  • `Disjoint.map`\n  • `EIO.map`\n  • `ENat.map`\n  • `EStateM.map`\n  • `Equiv.map`\n  • `EquivFunctor.map`\n  • `Erased.map`\n  • `Even.map`\n  • `Except.map`\n  • `ExceptT.map`\n  • `ExteriorAlgebra.map`\n  • `Filter.map`\n  • `FinVec.map`\n  • `Finpartition.map`\n  • `Finset.map`\n  • `Flag.map`\n  • `FloatArray.map`\n  • `FractionalIdeal.map`\n  • `FreeAbelianGroup.map`\n  • `FreeAddGroup.map`\n  • `FreeAddMagma.map`\n  • `FreeAddMonoid.map`\n  • `FreeAddSemigroup.map`\n  • `FreeCommRing.map`\n  • `FreeGroup.map`\n  • `FreeGroupBasis.map`\n  • `FreeMagma.map`\n  • `FreeMonoid.map`\n  • `FreeRing.map`\n  • `FreeSemigroup.map`\n  • `FunOnFinite.map`\n  • `Functor.map`\n  • `FundamentalGroup.map`\n  • `FundamentalGroupoid.map`\n  • `HahnSeries.map`\n  • `HasProd.map`\n  • `HasSum.map`\n  • `HomogeneousIdeal.map`\n  • `HomogeneousLocalization.map`\n  • `Ideal.map`\n  • `Inseparable.map`\n  • `IntermediateField.map`\n  • `Interval.map`\n  • `Invertible.map`\n  • `Irreducible.map`\n  • `IsAddUnit.map`\n  • `IsAdjoinRoot.map`\n  • `IsCompl.map`\n  • `IsCoprime.map`\n  • `IsFractionRing.map`\n  • `IsFractional.map`\n  • `IsGroupLikeElem.map`\n  • `IsIdempotentElem.map`\n  • `IsIntegral.map`\n  • `IsLocalization.map`\n  • `IsLocalizedModule.map`\n  • `IsNilpotent.map`\n  • `IsPGroup.map`\n  • `IsQuasiregular.map`\n  • `IsSMulRegular.map`\n  • `IsSelfAdjoint.map`\n  • `IsSeparable.map`\n  • `IsSquare.map`\n  • `IsStarNormal.map`\n  • `IsStarProjection.map`\n  • `IsTensorProduct.map`\n  • `IsTopologicallyNilpotent.map`\n  • `IsUnit.map`\n  • `JoinedIn.map`\n  • `KaehlerDifferential.map`\n  • `LTSeries.map`\n  • `Language.map`\n  • `LieIdeal.map`\n  • `LieSubalgebra.map`\n  • `LieSubmodule.map`\n  • `LinearIndependent.map`\n  • `List.map`\n  • `LocalSubring.map`\n  • `LocalizedModule.map`\n  • `LocallyConstant.map`\n  • `LowerSet.map`\n  • `MLList.map`\n  • `Matrix.map`\n  • `Matroid.map`\n  • `MeasurableSpace.map`\n  • `MonoidAlgebra.map`\n  • `MultilinearMap.map`\n  • `Multipliable.map`\n  • `Multiset.map`\n  • `MvFunctor.map`\n  • `MvPFunctor.map`\n  • `MvPolynomial.map`\n  • `MvPowerSeries.map`\n  • `NonUnitalStarSubalgebra.map`\n  • `NonUnitalSubalgebra.map`\n  • `NonUnitalSubring.map`\n  • `NonUnitalSubsemiring.map`\n  • `Nondet.map`\n  • `Nonempty.map`\n  • `NonemptyInterval.map`\n  • `Odd.map`\n  • `OnePoint.map`\n  • `Option.map`\n  • `Ordnode.map`\n  • `Ordset.map`\n  • `Orientation.map`\n  • `OrthogonalIdempotents.map`\n  • `OrthonormalBasis.map`\n  • `PFun.map`\n  • `PFunctor.map`\n  • `PLift.map`\n  • `PMF.map`\n  • `PSigma.map`\n  • `Part.map`\n  • `Partrec.map`\n  • `Path.map`\n  • `Perfection.map`\n  • `PerfectionMap.map`\n  • `Pi.map`\n  • `PiTensorProduct.map`\n  • `PointedCone.map`\n  • `Poly.map`\n  • `Polynomial.map`\n  • `PolynomialModule.map`\n  • `PontryaginDual.map`\n  • `PowerBasis.map`\n  • `PowerSeries.map`\n  • `PreAbstractSimplicialComplex.map`\n  • `Prefunctor.map`\n  • `PresheafOfModules.map`\n  • `Prod.map`\n  • `Projectivization.map`\n  • `ProperCone.map`\n  • `Quot.map`\n  • `QuotSMulTop.map`\n  • `Quotient.map`\n  • `QuotientAddGroup.map`\n  • `QuotientGroup.map`\n  • `RCLike.map`\n  • `RatFunc.map`\n  • `RegularExpression.map`\n  • `RelSeries.map`\n  • `RestrictedProduct.map`\n  • `RingCon.map`\n  • `RootPairing.map`\n  • `SModEq.map`\n  • `SameRay.map`\n  • `SatisfiesM.map`\n  • `SemiconjBy.map`\n  • `SemidirectProduct.map`\n  • `Semiquot.map`\n  • `SeparationQuotient.map`\n  • `Setoid.map`\n  • `Sigma.map`\n  • `SimpleGraph.map`\n  • `SingularManifold.map`\n  • `SlashAction.map`\n  • `Specialization.map`\n  • `Specializes.map`\n  • `StandardEtalePair.map`\n  • `StarSubalgebra.map`\n  • `StateT.map`\n  • `StdSimplex.map`\n  • `Stream'.map`\n  • `String.map`\n  • `Subalgebra.map`\n  • `Subfield.map`\n  • `Subgroup.map`\n  • `Sublattice.map`\n  • `Submodule.map`\n  • `Submonoid.map`\n  • `Subring.map`\n  • `Subsemigroup.map`\n  • `Subsemiring.map`\n  • `Subtype.map`\n  • `Sum.map`\n  • `Summable.map`\n  • `SummationFilter.map`\n  • `Sym.map`\n  • `Sym2.map`\n  • `Task.map`\n  • `TensorProduct.map`\n  • `Thunk.map`\n  • `Tree.map`\n  • `TrivSqZeroExt.map`\n  • `Trunc.map`\n  • `TwoSidedIdeal.map`\n  • `ULift.map`\n  • `Ultrafilter.map`\n  • `Unitary.map`\n  • `Units.map`\n  • `UpperSet.map`\n  • `Valuation.map`\n  • `Vector.map`\n  • `Wbtw.map`\n  • `WeakSpace.map`\n  • `WeierstrassCurve.map`\n  • `WithAbs.map`\n  • `WithBot.map`\n  • `WithLp.map`\n  • `WithOne.map`\n  • `WithTop.map`\n  • `WithVal.map`\n  • `WithZero.map`\n  • `WittVector.map`\n  • `ZFSet.map`\n  • `ZSpan.map`\n  • `bernsteinPolynomial.map`\n  • `exteriorPower.map`\n  • `groupCohomology.map`\n  • `groupHomology.map`\n  • `lowerCentralSeries.map`\n  • `stdSimplex.map`\n  • `unitary.map`\n  • `upperCentralSeries.map`\n  • `AddCommGroup.DirectLimit.map`\n  • `AddCommGroup.ModEq.map`\n  • `AddMagma.FreeAddSemigroup.map`\n  • `AddMonoid.Coprod.map`\n  • `AddSubgroup.IsSubnormal.map`\n  • `AddSubgroup.Normal.map`\n  • `AddSubmonoid.FG.map`\n  • `AddSubmonoid.LocalizationMap.map`\n  • `AddValuation.IsEquiv.map`\n  • `AdicCompletion.AdicCauchySequence.map`\n  • `Aesop.EMap.map`\n  • `Aesop.FVarIdSubst.map`\n  • `Aesop.InstMap.map`\n  • `Aesop.Rule.map`\n  • `Aesop.RulePatternCache.map`\n  • `Aesop.VariableMap.map`\n  • `Affine.Simplex.map`\n  • `AffineSubspace.WOppSide.map`\n  • `AffineSubspace.WSameSide.map`\n  • `Algebra.H1Cotangent.map`\n  • `Algebra.PreSubmersivePresentation.map`\n  • `Algebra.TensorProduct.map`\n  • `AlgebraicGeometry.AffineSpace.map`\n  • `AlgebraicGeometry.Proj.map`\n  • `AlgebraicGeometry.Spec.map`\n  • `AlgebraicGeometry.tilde.map`\n  • `AlgebraicTopology.AlternatingCofaceMapComplex.map`\n  • `AlgebraicTopology.AlternatingFaceMapComplex.map`\n  • `AlgebraicTopology.NormalizedMooreComplex.map`\n  • `Array.mapFinIdxM.map`\n  • `Batteries.RBNode.map`\n  • `Batteries.RBSet.map`\n  • `Bialgebra.TensorProduct.map`\n  • `BoxIntegral.BoxAdditiveMap.map`\n  • `CategoryTheory.Bundled.map`\n  • `CategoryTheory.CategoryOfElements.map`\n  • `CategoryTheory.CommSq.map`\n  • `CategoryTheory.Comma.map`\n  • `CategoryTheory.CostructuredArrow.map`\n  • `CategoryTheory.EnrichedFunctor.map`\n  • `CategoryTheory.FreeGroupoid.map`\n  • `CategoryTheory.Functor.map`\n  • `CategoryTheory.map`\n  • `CategoryTheory.GradedObject.map`\n  • `CategoryTheory.Grothendieck.map`\n  • `CategoryTheory.IsHomLift.map`\n  • `CategoryTheory.IsPullback.map`\n  • `CategoryTheory.IsPushout.map`\n  • `CategoryTheory.IsSplitCoequalizer.map`\n  • `CategoryTheory.IsSplitEqualizer.map`\n  • `CategoryTheory.LocalizerMorphism.map`\n  • `CategoryTheory.MonoOver.map`\n  • `CategoryTheory.MorphismProperty.map`\n  • `CategoryTheory.ObjectProperty.map`\n  • `CategoryTheory.Over.map`\n  • `CategoryTheory.PreOneHypercover.map`\n  • `CategoryTheory.PreZeroHypercover.map`\n  • `CategoryTheory.Presieve.map`\n  • `CategoryTheory.Retract.map`\n  • `CategoryTheory.RetractArrow.map`\n  • `CategoryTheory.ShiftedHom.map`\n  • `CategoryTheory.ShortComplex.map`\n  • `CategoryTheory.Sigma.map`\n  • `CategoryTheory.SplitEpi.map`\n  • `CategoryTheory.SplitMono.map`\n  • `CategoryTheory.Square.map`\n  • `CategoryTheory.StrictlyUnitaryLaxFunctorCore.map`\n  • `CategoryTheory.StrictlyUnitaryPseudofunctorCore.map`\n  • `CategoryTheory.StructuredArrow.map`\n  • `CategoryTheory.Subfunctor.map`\n  • `CategoryTheory.Subgroupoid.map`\n  • `CategoryTheory.Subobject.map`\n  • `CategoryTheory.ThinSkeleton.map`\n  • `CategoryTheory.TransfiniteCompositionOfShape.map`\n  • `CategoryTheory.Under.map`\n  • `CategoryTheory.WithInitial.map`\n  • `CategoryTheory.WithTerminal.map`\n  • `CategoryTheory.wideSubcategoryInclusion.map`\n  • `Coalgebra.TensorProduct.map`\n  • `CochainComplex.ConnectData.map`\n  • `CochainComplex.mappingCone.map`\n  • `Combinatorics.Line.map`\n  • `CommRingCat.KaehlerDifferential.map`\n  • `DerivedCategory.triangleOfSES.map`\n  • `EStateM.Result.map`\n  • `Filter.Germ.map`\n  • `Filter.HasAntitoneBasis.map`\n  • `Filter.HasBasis.map`\n  • `Filter.NeBot.map`\n  • `Filter.Realizer.map`\n  • `Filter.Subsingleton.map`\n  • `Filter.TotallyBounded.map`\n  • `Finset.Nonempty.map`\n  • `Function.IsFixedPt.map`\n  • `Function.IsPeriodicPt.map`\n  • `Functor.Comp.map`\n  • `Functor.Const.map`\n  • `GenContFract.Pair.map`\n  • `Group.IsPerfect.map`\n  • `HomogeneousLocalization.Away.map`\n  • `HomogeneousLocalization.NumDenSameDeg.map`\n  • `HomologicalComplex₂.total.map`\n  • `Hyperreal.IsSt.map`\n  • `Ideal.FG.map`\n  • `Ideal.ResidueField.map`\n  • `Ideal.primaryComponent.map`\n  • `IntermediateField.LinearDisjoint.map`\n  • `IsLocalRing.ResidueField.map`\n  • `IsLocalization.Away.map`\n  • `Lean.AttributeExtensionState.map`\n  • `Lean.ClosedTermCache.map`\n  • `Lean.PersistentArray.map`\n  • `Lean.PersistentHashMap.map`\n  • `Lean.RBNode.map`\n  • `LieAlgebra.ExtendScalars.map`\n  • `List.Disjoint.map`\n  • `List.IsInfix.map`\n  • `List.IsPrefix.map`\n  • `List.IsRotated.map`\n  • `List.IsSuffix.map`\n  • `List.Nodup.map`\n  • `List.Pairwise.map`\n  • `List.Palindrome.map`\n  • `List.Perm.map`\n  • `List.Sublist.map`\n  • `List.Subperm.map`\n  • `List.Triplewise.map`\n  • `List.Vector.map`\n  • `List.Wbtw.map`\n  • `Magma.AssocQuotient.map`\n  • `Matrix.BlockTriangular.map`\n  • `Matrix.GeneralLinearGroup.map`\n  • `Matrix.IsDiag.map`\n  • `Matrix.IsHermitian.map`\n  • `Matrix.IsSymm.map`\n  • `Matrix.SpecialLinearGroup.map`\n  • `Matroid.Indep.map`\n  • `Matroid.IsBase.map`\n  • `Matroid.IsBasis.map`\n  • `MeasureTheory.FiniteMeasure.map`\n  • `MeasureTheory.IsTightMeasureSet.map`\n  • `MeasureTheory.Measure.map`\n  • `MeasureTheory.OuterMeasure.map`\n  • `MeasureTheory.ProbabilityMeasure.map`\n  • `MeasureTheory.SimpleFunc.map`\n  • `MeasureTheory.VectorMeasure.map`\n  • `Module.Basis.map`\n  • `Module.DirectLimit.map`\n  • `Module.Finite.map`\n  • `Module.Ray.map`\n  • `Module.Relations.map`\n  • `ModuleCat.exteriorPower.map`\n  • `Monoid.Coprod.map`\n  • `Multiset.Nodup.map`\n  • `MvPolynomial.IsHomogeneous.map`\n  • `MvPolynomial.IsSymmetric.map`\n  • `MvPowerSeries.HasEval.map`\n  • `MvPowerSeries.HasSubst.map`\n  • `MvQPF.Cofix.map`\n  • `MvQPF.Comp.map`\n  • `MvQPF.Const.map`\n  • `MvQPF.Fix.map`\n  • `MvQPF.Prj.map`\n  • `MvQPF.Quot1.map`\n  • `Nat.Partrec'.map`\n  • `NormedAddGroupHom.Equalizer.map`\n  • `OmegaCompletePartialOrder.Chain.map`\n  • `OmegaCompletePartialOrder.ContinuousHom.map`\n  • `Path.Homotopic.map`\n  • `Path.Homotopy.map`\n  • `Polynomial.IsRoot.map`\n  • `Polynomial.IsSplittingField.map`\n  • `Polynomial.IsWeaklyEisensteinAt.map`\n  • `Polynomial.Monic.map`\n  • `Polynomial.MonicDegreeEq.map`\n  • `Polynomial.Separable.map`\n  • `Polynomial.Splits.map`\n  • `PowerSeries.HasEval.map`\n  • `PrimeSpectrum.BasicConstructibleSetData.map`\n  • `PrimeSpectrum.ConstructibleSetData.map`\n  • `ProbabilityTheory.HasGaussianLaw.map`\n  • `ProbabilityTheory.HasIndepIncrements.map`\n  • `ProbabilityTheory.Kernel.map`\n  • `Profinite.IndexFunctor.map`\n  • `Quandle.Conj.map`\n  • `Rack.toEnvelGroup.map`\n  • `Representation.Coinvariants.map`\n  • `Ring.DirectLimit.map`\n  • `RingHom.IsIntegralElem.map`\n  • `SSet.Edge.map`\n  • `SSet.OneTruncation₂.map`\n  • `SSet.Path.map`\n  • `SSet.RelativeMorphism.map`\n  • `SSet.S.map`\n  • `SemiNormedGrp.explicitCokernel.map`\n  • `Set.Finite.map`\n  • `Set.powersetCard.map`\n  • `SheafOfModules.Presentation.map`\n  • `SimpleGraph.Colorable.map`\n  • `SimpleGraph.Connected.map`\n  • `SimpleGraph.ConnectedComponent.map`\n  • `SimpleGraph.EdgeDisjointTriangles.map`\n  • `SimpleGraph.Embedding.map`\n  • `SimpleGraph.IsClique.map`\n  • `SimpleGraph.IsNClique.map`\n  • `SimpleGraph.Iso.map`\n  • `SimpleGraph.LocallyLinear.map`\n  • `SimpleGraph.Path.map`\n  • `SimpleGraph.Preconnected.map`\n  • `SimpleGraph.Reachable.map`\n  • `SimpleGraph.Subgraph.map`\n  • `SimpleGraph.Walk.map`\n  • `StandardEtalePair.HasMap.map`\n  • `Std.DHashMap.map`\n  • `Std.DTreeMap.map`\n  • `Std.ExtDHashMap.map`\n  • `Std.ExtDTreeMap.map`\n  • `Std.ExtHashMap.map`\n  • `Std.ExtTreeMap.map`\n  • `Std.HashMap.map`\n  • `Std.Iter.map`\n  • `Std.IterM.map`\n  • `Std.TreeMap.map`\n  • `Stream'.Seq.map`\n  • `Stream'.Seq1.map`\n  • `Stream'.WSeq.map`\n  • `String.Legacy.map`\n  • `Subalgebra.FG.map`\n  • `Subalgebra.LinearDisjoint.map`\n  • `Subgroup.IsNormalClosureFG.map`\n  • `Subgroup.IsSubnormal.map`\n  • `Subgroup.Normal.map`\n  • `Submodule.FG.map`\n  • `Submodule.IsOrtho.map`\n  • `Submodule.IsPrincipal.map`\n  • `Submodule.LinearDisjoint.map`\n  • `Submonoid.FG.map`\n  • `Submonoid.LocalizationMap.map`\n  • `Sym2.IsDiag.map`\n  • `TensorProduct.AlgebraTensorModule.map`\n  • `TensorProduct.LieModule.map`\n  • `TopCat.continuousFunctions.map`\n  • `TopologicalSpace.CompactOpens.map`\n  • `TopologicalSpace.Compacts.map`\n  • `TopologicalSpace.IrreducibleCloseds.map`\n  • `TopologicalSpace.NonemptyCompacts.map`\n  • `TopologicalSpace.OpenNhds.map`\n  • `TopologicalSpace.Opens.map`\n  • `TopologicalSpace.PositiveCompacts.map`\n  • `Topology.CWComplex.map`\n  • `Topology.RelCWComplex.map`\n  • `Topology.WithLowerSet.map`\n  • `Topology.WithUpperSet.map`\n  • `Turing.ListBlank.map`\n  • `Turing.Tape.map`\n  • `TypeVec.prod.map`\n  • `UniformSpace.Completion.map`\n  • `Valuation.IsEquiv.map`\n  • `Vector.mapFinIdxM.map`\n  • `WeierstrassCurve.VariableChange.map`\n  • `WittVector.IsPoly.map`\n  • `WittVector.IsPoly₂.map`\n  • `Algebra.Extension.Cotangent.map`\n  • `Algebra.Extension.CotangentSpace.map`\n  • `Algebra.Extension.H1Cotangent.map`\n  • `AlgebraicGeometry.Scheme.IdealSheafData.map`\n  • `AlgebraicTopology.DoldKan.Γ₀.map`\n  • `Batteries.RBNode.All.map`\n  • `Batteries.RBNode.Balanced.map`\n  • `Batteries.RBNode.Ordered.map`\n  • `CategoryTheory.Abelian.SpectralObject.map`\n  • `CategoryTheory.ComposableArrows.Mk₁.map`\n  • `CategoryTheory.ComposableArrows.Precomp.map`\n  • `CategoryTheory.Functor.HomObj.map`\n  • `CategoryTheory.Functor.IsCartesian.map`\n  • `CategoryTheory.Functor.IsCocartesian.map`\n  • `CategoryTheory.Functor.IsHomLift.map`\n  • `CategoryTheory.Functor.IsStronglyCartesian.map`\n  • `CategoryTheory.Functor.IsStronglyCocartesian.map`\n  • `CategoryTheory.Functor.OfSequence.map`\n  • `CategoryTheory.Functor.relativelyRepresentable.map`\n  • `CategoryTheory.GrothendieckTopology.OneHypercover.map`\n  • `CategoryTheory.GrothendieckTopology.Point.map`\n  • `CategoryTheory.Idempotents.FunctorExtension₁.map`\n  • `CategoryTheory.Idempotents.KaroubiFunctorCategoryEmbedding.map`\n  • `CategoryTheory.Limits.CokernelCofork.map`\n  • `CategoryTheory.Limits.ColimitPresentation.map`\n  • `CategoryTheory.Limits.DiagramOfCocones.map`\n  • `CategoryTheory.Limits.DiagramOfCones.map`\n  • `CategoryTheory.Limits.ImageMap.map`\n  • `CategoryTheory.Limits.IsColimit.map`\n  • `CategoryTheory.Limits.IsIndObject.map`\n  • `CategoryTheory.Limits.IsLimit.map`\n  • `CategoryTheory.Limits.IsZero.map`\n  • `CategoryTheory.Limits.KernelFork.map`\n  • `CategoryTheory.Limits.LimitPresentation.map`\n  • `CategoryTheory.Limits.Multicofork.map`\n  • `CategoryTheory.Limits.MultispanIndex.map`\n  • `CategoryTheory.Limits.Pi.map`\n  • `CategoryTheory.Limits.PullbackCone.map`\n  • `CategoryTheory.Limits.PushoutCocone.map`\n  • `CategoryTheory.Limits.Sigma.map`\n  • `CategoryTheory.Limits.biprod.map`\n  • `CategoryTheory.Limits.biproduct.map`\n  • `CategoryTheory.Limits.coend.map`\n  • `CategoryTheory.Limits.cokernel.map`\n  • `CategoryTheory.Limits.coprod.map`\n  • `CategoryTheory.Limits.end_.map`\n  • `CategoryTheory.Limits.image.map`\n  • `CategoryTheory.Limits.kernel.map`\n  • `CategoryTheory.Limits.prod.map`\n  • `CategoryTheory.Limits.pullback.map`\n  • `CategoryTheory.Limits.pushout.map`\n  • `CategoryTheory.MonoidalCategory.DayConvolution.map`\n  • `CategoryTheory.MonoidalCategory.DayConvolutionInternalHom.map`\n  • `CategoryTheory.MorphismProperty.LeftFraction.map`\n  • `CategoryTheory.MorphismProperty.Over.map`\n  • `CategoryTheory.MorphismProperty.RightFraction.map`\n  • `CategoryTheory.MorphismProperty.TransfiniteCompositionOfShape.map`\n  • `CategoryTheory.MorphismProperty.strictMap.map`\n  • `CategoryTheory.Precoverage.ZeroHypercover.map`\n  • `CategoryTheory.Presieve.CoverByImageStructure.map`\n  • `CategoryTheory.Presieve.FamilyOfElements.map`\n  • `CategoryTheory.Pseudofunctor.CoGrothendieck.map`\n  • `CategoryTheory.Pseudofunctor.Grothendieck.map`\n  • `CategoryTheory.Pseudofunctor.ObjectProperty.map`\n  • `CategoryTheory.ShortComplex.Exact.map`\n  • `CategoryTheory.ShortComplex.HomologyData.map`\n  • `CategoryTheory.ShortComplex.HomologyMapData.map`\n  • `CategoryTheory.ShortComplex.LeftHomologyData.map`\n  • `CategoryTheory.ShortComplex.LeftHomologyMapData.map`\n  • `CategoryTheory.ShortComplex.RightHomologyData.map`\n  • `CategoryTheory.ShortComplex.RightHomologyMapData.map`\n  • `CategoryTheory.ShortComplex.ShortExact.map`\n  • `CategoryTheory.ShortComplex.Splitting.map`\n  • `CategoryTheory.Square.IsPullback.map`\n  • `CategoryTheory.Square.IsPushout.map`\n  • `CategoryTheory.Triangulated.Octahedron.map`\n  • `CochainComplex.HomComplex.Cochain.map`\n  • `CommRingCat.Colimits.Relation.map`\n  • `ComputeAsymptotics.MultiseriesExpansion.Multiseries.map`\n  • `FirstOrder.Language.Substructure.map`\n  • `Lean.Export.Alloc.map`\n  • `Lean.Language.SnapshotTask.map`\n  • `Lean.Meta.CustomEliminators.map`\n  • `Lean.Meta.FVarSubst.map`\n  • `Lean.Meta.KExprMap.map`\n  • `Lean.Meta.MVarRenaming.map`\n  • `Lean.Omega.Coeffs.map`\n  • `Lean.Omega.Constraint.map`\n  • `Lean.ScopedEnvExtension.ScopedEntries.map`\n  • `Lean.Widget.TaggedText.map`\n  • `MeasureTheory.Measure.AbsolutelyContinuous.map`\n  • `MeasureTheory.Measure.InnerRegular.map`\n  • `MeasureTheory.Measure.InnerRegularWRT.map`\n  • `MeasureTheory.Measure.IsFiniteMeasureOnCompacts.map`\n  • `MeasureTheory.Measure.OuterRegular.map`\n  • `MeasureTheory.Measure.Regular.map`\n  • `MeasureTheory.SimpleFunc.FinMeasSupp.map`\n  • `MeasureTheory.VectorMeasure.AbsolutelyContinuous.map`\n  • `ModuleCat.ExtendRestrictScalarsAdj.Counit.map`\n  • `ModuleCat.ExtendRestrictScalarsAdj.Unit.map`\n  • `MonCat.Colimits.Relation.map`\n  • `OmegaCompletePartialOrder.ContinuousHom.ωScottContinuous.map`\n  • `Path.Homotopic.Quotient.map`\n  • `ProbabilityTheory.Kernel.IsFiniteKernel.map`\n  • `ProbabilityTheory.Kernel.IsMarkovKernel.map`\n  • `ProbabilityTheory.Kernel.IsSFiniteKernel.map`\n  • `ProbabilityTheory.Kernel.IsZeroOrMarkovKernel.map`\n  • `RingCat.Colimits.Relation.map`\n  • `SSet.Edge.CompStruct.map`\n  • `SSet.PtSimplex.MulStruct.map`\n  • `SSet.PtSimplex.RelStruct.map`\n  • `SSet.Truncated.Edge.map`\n  • `SSet.Truncated.Path.map`\n  • `SimpleGraph.Subgraph.Connected.map`\n  • `SimpleGraph.Subgraph.IsMatching.map`\n  • `SimpleGraph.Subgraph.Preconnected.map`\n  • `SimpleGraph.Walk.IsCycle.map`\n  • `SimpleGraph.Walk.IsHamiltonian.map`\n  • `SimpleGraph.Walk.IsHamiltonianCycle.map`\n  • `SimpleGraph.Walk.IsSubwalk.map`\n  • `Std.DHashMap.Equiv.map`\n  • `Std.DHashMap.Raw.map`\n  • `Std.DTreeMap.Equiv.map`\n  • `Std.DTreeMap.Raw.map`\n  • `Std.Do.Spec.map`\n  • `Std.Do.WP.map`\n  • `Std.HashMap.Equiv.map`\n  • `Std.HashMap.Raw.map`\n  • `Std.Internal.Small.map`\n  • `Std.IterM.Equiv.map`\n  • `Std.IterM.InternalCombinators.map`\n  • `Std.Iterators.HetT.map`\n  • `Std.Iterators.PostconditionT.map`\n  • `Std.TreeMap.Equiv.map`\n  • `Std.TreeMap.Raw.map`\n  • `TopCat.Presheaf.SubmonoidPresheaf.map`\n  • `Turing.TM0.Cfg.map`\n  • `Turing.TM0.Machine.map`\n  • `Turing.TM0.Stmt.map`\n  • `WeierstrassCurve.Affine.CoordinateRing.map`\n  • `WeierstrassCurve.Affine.Equation.map`\n  • `WeierstrassCurve.Affine.Point.map`\n  • `WeierstrassCurve.Jacobian.Equation.map`\n  • `WeierstrassCurve.Projective.Equation.map`\n  • `AlgebraicTopology.DoldKan.Γ₀.Obj.map`\n  • `CategoryTheory.GrothendieckTopology.Cover.Arrow.map`\n  • `CategoryTheory.HasLiftingProperty.transfiniteComposition.SqStruct.map`\n  • `CategoryTheory.Idempotents.KaroubiHomologicalComplexEquivalence.Functor.map`\n  • `CategoryTheory.Idempotents.KaroubiHomologicalComplexEquivalence.Inverse.map`\n  • `CategoryTheory.Presieve.FamilyOfElements.Compatible.map`\n  • `CategoryTheory.Presieve.FamilyOfElements.IsAmalgamation.map`\n  • `CategoryTheory.ShortComplex.ShortExact.singleTriangle.map`\n  • `CategoryTheory.SimplicialObject.Augmented.ExtraDegeneracy.map`\n  • `CategoryTheory.SmallObject.SuccStruct.extendToSucc.map`\n  • `CategoryTheory.SmallObject.SuccStruct.ofCocone.map`\n  • `CommRingCat.Colimits.Relation.below.map`\n  • `FirstOrder.Language.Substructure.CG.map`\n  • `FirstOrder.Language.Substructure.FG.map`\n  • `Lean.Compiler.CSimp.State.map`\n  • `Lean.Compiler.LCNF.Probe.map`\n  • `Lean.Meta.Grind.SymbolPriorities.map`\n  • `Lean.Meta.Grind.VarRename.map`\n  • `Lean.Meta.Match.MatchEqnsExtState.map`\n  • `Lean.Meta.Match.Overlaps.map`\n  • `Lean.Meta.Simp.UsedSimps.map`\n  • `MonCat.Colimits.Relation.below.map`\n  • `RingCat.Colimits.Relation.below.map`\n  • `SSet.Truncated.Edge.CompStruct.map`\n  • `Std.DHashMap.Internal.AssocList.map`\n  • `Std.DHashMap.Internal.Raw₀.map`\n  • `Std.DHashMap.Raw.Equiv.map`\n  • `Std.DHashMap.Raw.WF.map`\n  • `Std.DTreeMap.Internal.Impl.map`\n  • `Std.DTreeMap.Raw.Equiv.map`\n  • `Std.HashMap.Raw.Equiv.map`\n  • `Std.HashMap.Raw.WF.map`\n  • `Std.Internal.List.DistinctKeys.map`\n  • `Std.Sat.AIG.RefVec.map`\n  • `Std.TreeMap.Raw.Equiv.map`\n  • `CategoryTheory.GrothendieckTopology.Cover.Arrow.Relation.map`\n  • `CategoryTheory.MorphismProperty.LeftFraction.Localization.Hom.map`\n  • `Lean.Compiler.LCNF.CSE.State.map`\n  • `Lean.Compiler.LCNF.NormLevelParam.State.map`\n  • `Lean.Compiler.LCNF.Simp.FunDeclInfoMap.map`\n  • `Lean.Meta.Grind.UnitLike.State.map`\n  • `Lean.Meta.Match.Extension.State.map`\n  • `Std.DTreeMap.Internal.Impl.Balanced.map`\n  • `Std.DTreeMap.Internal.Impl.Equiv.map`\n  • `Std.DTreeMap.Internal.Impl.WF.map`\n  • `Std.Internal.IO.Async.AsyncTask.map`\n  • `Std.Internal.IO.Async.BaseAsync.map`\n  • `Std.Internal.IO.Async.EAsync.map`\n  • `Std.Internal.IO.Async.ETask.map`\n  • `Std.Internal.IO.Async.MaybeTask.map`\n  • `Std.Sat.AIG.RelabelNat.State.map`\n  • `Std.Tactic.BVDecide.BVExpr.Cache.map`", pos=Position(line=2, column=4), pos_end=Position(line=2, column=40), severity=<Severity.ERROR: 3>, kind='lean.invalidField._namedError'), Message(data="Function expected at\n  Spec\nbut this term has type\n  ?m.1\n\nNote: Expected a function because this term is being applied to the argument\n  R\n\nHint: The identifier `Spec` is unknown, and Lean's `autoImplicit` option causes an unknown identifier to be treated as an implicitly bound variable with an unknown type. However, the unknown type cannot be a function, and a function is what Lean expects here. This is often the result of a typo or a missing `import` or `open` statement.", pos=Position(line=2, column=44), pos_end=Position(line=2, column=50), severity=<Severity.ERROR: 3>, kind=None), Message(data='unsolved goals\nx✝ : Sort u_1\nSpec : x✝\n⊢ sorry = sorry', pos=Position(line=3, column=3), pos_end=Position(line=3, column=29), severity=<Severity.ERROR: 3>, kind='Tactic.unsolvedGoals')], invocations=None, goal_state=None, goal_src_boundaries=None, new_constants=None), CompilationUnit(i_begin=122, i_end=224, messages=[Message(data='Invalid `end`: There is no current scope to end\n\nNote: Scopes are introduced using `namespace` and `section`', pos=Position(line=6, column=0), pos_end=Position(line=6, column=23), severity=<Severity.ERROR: 3>, kind=None)], invocations=None, goal_state=None, goal_src_boundaries=None, new_constants=None), CompilationUnit(i_begin=224, i_end=252, messages=[], invocations=None, goal_state=None, goal_src_boundaries=None, new_constants=None), CompilationUnit(i_begin=252, i_end=285, messages=[Message(data='Function expected at\n  Spec\nbut this term has type\n  ?m.1\n\nNote: Expected a function because this term is being applied to the argument\n  R', pos=Position(line=10, column=18), pos_end=Position(line=10, column=24), severity=<Severity.ERROR: 3>, kind=None)], invocations=None, goal_state=None, goal_src_boundaries=None, new_constants=None), CompilationUnit(i_begin=285, i_end=303, messages=[], invocations=None, goal_state=None, goal_src_boundaries=None, new_constants=None), CompilationUnit(i_begin=303, i_end=561, messages=[Message(data="unexpected end of input; expected 'lemma'", pos=Position(line=20, column=13), pos_end=None, severity=<Severity.ERROR: 3>, kind=None)], invocations=None, goal_state=None, goal_src_boundaries=None, new_constants=None)]
```

Return a corrected, compiling version of the code.

<s>[SYSTEM_PROMPT]You are Leanstral, a Lean 4 proof assistant. Complete the task below using the provided Lean source context. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.AlgebraicGeometry.Stalk).[/SYSTEM_PROMPT][MODEL_SETTINGS]{"reasoning_effort": "none"}[/MODEL_SETTINGS][INST]The following Lean code fails to compile. Fix it.

```lean
lemma Spec_stalkClosedPointIso :
    Spec.map (stalkClosedPointIso R).inv = (Spec R).fromSpecStalk (closedPoint R)
:= by thisIsWrongLemmaNameXYZ
rw [stalkClosedPointIso_inv, Spec.fromSpecStalk_eq']

end stalkClosedPointIso

section stalkClosedPointTo

variable {R} (f : Spec R ⟶ X)

namespace Scheme

/--
Given a local ring `(R, 𝔪)` and a morphism `f : Spec R ⟶ X`,
they induce a (local) ring homomorphism `φ : 𝒪_{X, f 𝔪} ⟶ R`.

This is inverse to `φ ↦ Spec.map φ ≫ X.fromSpecStalk (f 𝔪)`. See `SpecToEquivOfLocalRing`.
-/
noncomputable
```

## Compiler diagnostic
```
[CompilationUnit(i_begin=0, i_end=122, messages=[Message(data='unknown tactic', pos=Position(line=3, column=7), pos_end=None, severity=<Severity.ERROR: 3>, kind=None), Message(data="Invalid field notation: Type of\n  Spec\nis not known; cannot resolve field `map`\n\nHint: Consider replacing the field projection with a call to one of the following:\n  • `Abelianization.map`\n  • `AbstractCompletion.map`\n  • `AccPt.map`\n  • `AddCommute.map`\n  • `AddCon.map`\n  • `AddConjClasses.map`\n  • `AddIrreducible.map`\n  • `AddMonoidAlgebra.map`\n  • `AddSemiconjBy.map`\n  • `AddSubgroup.map`\n  • `AddSubmonoid.map`\n  • `AddSubsemigroup.map`\n  • `AddUnits.map`\n  • `AddValuation.map`\n  • `AdicCompletion.map`\n  • `AdjoinRoot.map`\n  • `AffineSubspace.map`\n  • `AlgebraicIndependent.map`\n  • `Array.map`\n  • `Associated.map`\n  • `BaseIO.map`\n  • `Behrend.map`\n  • `BooleanSubalgebra.map`\n  • `ByteArray.map`\n  • `CStarMatrix.map`\n  • `Cardinal.map`\n  • `Cauchy.map`\n  • `CliffordAlgebra.map`\n  • `ClosedSubmodule.map`\n  • `ClusterPt.map`\n  • `Codisjoint.map`\n  • `Commute.map`\n  • `CompleteOrthogonalIdempotents.map`\n  • `CompleteSublattice.map`\n  • `Computation.map`\n  • `Con.map`\n  • `ConjClasses.map`\n  • `ContT.map`\n  • `ConvexCone.map`\n  • `CoxeterSystem.map`\n  • `Cubic.map`\n  • `Cycle.map`\n  • `DMatrix.map`\n  • `DirectLimit.map`\n  • `DirectSum.map`\n  • `DiscreteQuotient.map`\n  • `Disjoint.map`\n  • `EIO.map`\n  • `ENat.map`\n  • `EStateM.map`\n  • `Equiv.map`\n  • `EquivFunctor.map`\n  • `Erased.map`\n  • `Even.map`\n  • `Except.map`\n  • `ExceptT.map`\n  • `ExteriorAlgebra.map`\n  • `Filter.map`\n  • `FinVec.map`\n  • `Finpartition.map`\n  • `Finset.map`\n  • `Flag.map`\n  • `FloatArray.map`\n  • `FractionalIdeal.map`\n  • `FreeAbelianGroup.map`\n  • `FreeAddGroup.map`\n  • `FreeAddMagma.map`\n  • `FreeAddMonoid.map`\n  • `FreeAddSemigroup.map`\n  • `FreeCommRing.map`\n  • `FreeGroup.map`\n  • `FreeGroupBasis.map`\n  • `FreeMagma.map`\n  • `FreeMonoid.map`\n  • `FreeRing.map`\n  • `FreeSemigroup.map`\n  • `FunOnFinite.map`\n  • `Functor.map`\n  • `FundamentalGroup.map`\n  • `FundamentalGroupoid.map`\n  • `HahnSeries.map`\n  • `HasProd.map`\n  • `HasSum.map`\n  • `HomogeneousIdeal.map`\n  • `HomogeneousLocalization.map`\n  • `Ideal.map`\n  • `Inseparable.map`\n  • `IntermediateField.map`\n  • `Interval.map`\n  • `Invertible.map`\n  • `Irreducible.map`\n  • `IsAddUnit.map`\n  • `IsAdjoinRoot.map`\n  • `IsCompl.map`\n  • `IsCoprime.map`\n  • `IsFractionRing.map`\n  • `IsFractional.map`\n  • `IsGroupLikeElem.map`\n  • `IsIdempotentElem.map`\n  • `IsIntegral.map`\n  • `IsLocalization.map`\n  • `IsLocalizedModule.map`\n  • `IsNilpotent.map`\n  • `IsPGroup.map`\n  • `IsQuasiregular.map`\n  • `IsSMulRegular.map`\n  • `IsSelfAdjoint.map`\n  • `IsSeparable.map`\n  • `IsSquare.map`\n  • `IsStarNormal.map`\n  • `IsStarProjection.map`\n  • `IsTensorProduct.map`\n  • `IsTopologicallyNilpotent.map`\n  • `IsUnit.map`\n  • `JoinedIn.map`\n  • `KaehlerDifferential.map`\n  • `LTSeries.map`\n  • `Language.map`\n  • `LieIdeal.map`\n  • `LieSubalgebra.map`\n  • `LieSubmodule.map`\n  • `LinearIndependent.map`\n  • `List.map`\n  • `LocalSubring.map`\n  • `LocalizedModule.map`\n  • `LocallyConstant.map`\n  • `LowerSet.map`\n  • `MLList.map`\n  • `Matrix.map`\n  • `Matroid.map`\n  • `MeasurableSpace.map`\n  • `MonoidAlgebra.map`\n  • `MultilinearMap.map`\n  • `Multipliable.map`\n  • `Multiset.map`\n  • `MvFunctor.map`\n  • `MvPFunctor.map`\n  • `MvPolynomial.map`\n  • `MvPowerSeries.map`\n  • `NonUnitalStarSubalgebra.map`\n  • `NonUnitalSubalgebra.map`\n  • `NonUnitalSubring.map`\n  • `NonUnitalSubsemiring.map`\n  • `Nondet.map`\n  • `Nonempty.map`\n  • `NonemptyInterval.map`\n  • `Odd.map`\n  • `OnePoint.map`\n  • `Option.map`\n  • `Ordnode.map`\n  • `Ordset.map`\n  • `Orientation.map`\n  • `OrthogonalIdempotents.map`\n  • `OrthonormalBasis.map`\n  • `PFun.map`\n  • `PFunctor.map`\n  • `PLift.map`\n  • `PMF.map`\n  • `PSigma.map`\n  • `Part.map`\n  • `Partrec.map`\n  • `Path.map`\n  • `Perfection.map`\n  • `PerfectionMap.map`\n  • `Pi.map`\n  • `PiTensorProduct.map`\n  • `PointedCone.map`\n  • `Poly.map`\n  • `Polynomial.map`\n  • `PolynomialModule.map`\n  • `PontryaginDual.map`\n  • `PowerBasis.map`\n  • `PowerSeries.map`\n  • `PreAbstractSimplicialComplex.map`\n  • `Prefunctor.map`\n  • `PresheafOfModules.map`\n  • `Prod.map`\n  • `Projectivization.map`\n  • `ProperCone.map`\n  • `Quot.map`\n  • `QuotSMulTop.map`\n  • `Quotient.map`\n  • `QuotientAddGroup.map`\n  • `QuotientGroup.map`\n  • `RCLike.map`\n  • `RatFunc.map`\n  • `RegularExpression.map`\n  • `RelSeries.map`\n  • `RestrictedProduct.map`\n  • `RingCon.map`\n  • `RootPairing.map`\n  • `SModEq.map`\n  • `SameRay.map`\n  • `SatisfiesM.map`\n  • `SemiconjBy.map`\n  • `SemidirectProduct.map`\n  • `Semiquot.map`\n  • `SeparationQuotient.map`\n  • `Setoid.map`\n  • `Sigma.map`\n  • `SimpleGraph.map`\n  • `SingularManifold.map`\n  • `SlashAction.map`\n  • `Specialization.map`\n  • `Specializes.map`\n  • `StandardEtalePair.map`\n  • `StarSubalgebra.map`\n  • `StateT.map`\n  • `StdSimplex.map`\n  • `Stream'.map`\n  • `String.map`\n  • `Subalgebra.map`\n  • `Subfield.map`\n  • `Subgroup.map`\n  • `Sublattice.map`\n  • `Submodule.map`\n  • `Submonoid.map`\n  • `Subring.map`\n  • `Subsemigroup.map`\n  • `Subsemiring.map`\n  • `Subtype.map`\n  • `Sum.map`\n  • `Summable.map`\n  • `SummationFilter.map`\n  • `Sym.map`\n  • `Sym2.map`\n  • `Task.map`\n  • `TensorProduct.map`\n  • `Thunk.map`\n  • `Tree.map`\n  • `TrivSqZeroExt.map`\n  • `Trunc.map`\n  • `TwoSidedIdeal.map`\n  • `ULift.map`\n  • `Ultrafilter.map`\n  • `Unitary.map`\n  • `Units.map`\n  • `UpperSet.map`\n  • `Valuation.map`\n  • `Vector.map`\n  • `Wbtw.map`\n  • `WeakSpace.map`\n  • `WeierstrassCurve.map`\n  • `WithAbs.map`\n  • `WithBot.map`\n  • `WithLp.map`\n  • `WithOne.map`\n  • `WithTop.map`\n  • `WithVal.map`\n  • `WithZero.map`\n  • `WittVector.map`\n  • `ZFSet.map`\n  • `ZSpan.map`\n  • `bernsteinPolynomial.map`\n  • `exteriorPower.map`\n  • `groupCohomology.map`\n  • `groupHomology.map`\n  • `lowerCentralSeries.map`\n  • `stdSimplex.map`\n  • `unitary.map`\n  • `upperCentralSeries.map`\n  • `AddCommGroup.DirectLimit.map`\n  • `AddCommGroup.ModEq.map`\n  • `AddMagma.FreeAddSemigroup.map`\n  • `AddMonoid.Coprod.map`\n  • `AddSubgroup.IsSubnormal.map`\n  • `AddSubgroup.Normal.map`\n  • `AddSubmonoid.FG.map`\n  • `AddSubmonoid.LocalizationMap.map`\n  • `AddValuation.IsEquiv.map`\n  • `AdicCompletion.AdicCauchySequence.map`\n  • `Aesop.EMap.map`\n  • `Aesop.FVarIdSubst.map`\n  • `Aesop.InstMap.map`\n  • `Aesop.Rule.map`\n  • `Aesop.RulePatternCache.map`\n  • `Aesop.VariableMap.map`\n  • `Affine.Simplex.map`\n  • `AffineSubspace.WOppSide.map`\n  • `AffineSubspace.WSameSide.map`\n  • `Algebra.H1Cotangent.map`\n  • `Algebra.PreSubmersivePresentation.map`\n  • `Algebra.TensorProduct.map`\n  • `AlgebraicGeometry.AffineSpace.map`\n  • `AlgebraicGeometry.Proj.map`\n  • `AlgebraicGeometry.Spec.map`\n  • `AlgebraicGeometry.tilde.map`\n  • `AlgebraicTopology.AlternatingCofaceMapComplex.map`\n  • `AlgebraicTopology.AlternatingFaceMapComplex.map`\n  • `AlgebraicTopology.NormalizedMooreComplex.map`\n  • `Array.mapFinIdxM.map`\n  • `Batteries.RBNode.map`\n  • `Batteries.RBSet.map`\n  • `Bialgebra.TensorProduct.map`\n  • `BoxIntegral.BoxAdditiveMap.map`\n  • `CategoryTheory.Bundled.map`\n  • `CategoryTheory.CategoryOfElements.map`\n  • `CategoryTheory.CommSq.map`\n  • `CategoryTheory.Comma.map`\n  • `CategoryTheory.CostructuredArrow.map`\n  • `CategoryTheory.EnrichedFunctor.map`\n  • `CategoryTheory.FreeGroupoid.map`\n  • `CategoryTheory.Functor.map`\n  • `CategoryTheory.map`\n  • `CategoryTheory.GradedObject.map`\n  • `CategoryTheory.Grothendieck.map`\n  • `CategoryTheory.IsHomLift.map`\n  • `CategoryTheory.IsPullback.map`\n  • `CategoryTheory.IsPushout.map`\n  • `CategoryTheory.IsSplitCoequalizer.map`\n  • `CategoryTheory.IsSplitEqualizer.map`\n  • `CategoryTheory.LocalizerMorphism.map`\n  • `CategoryTheory.MonoOver.map`\n  • `CategoryTheory.MorphismProperty.map`\n  • `CategoryTheory.ObjectProperty.map`\n  • `CategoryTheory.Over.map`\n  • `CategoryTheory.PreOneHypercover.map`\n  • `CategoryTheory.PreZeroHypercover.map`\n  • `CategoryTheory.Presieve.map`\n  • `CategoryTheory.Retract.map`\n  • `CategoryTheory.RetractArrow.map`\n  • `CategoryTheory.ShiftedHom.map`\n  • `CategoryTheory.ShortComplex.map`\n  • `CategoryTheory.Sigma.map`\n  • `CategoryTheory.SplitEpi.map`\n  • `CategoryTheory.SplitMono.map`\n  • `CategoryTheory.Square.map`\n  • `CategoryTheory.StrictlyUnitaryLaxFunctorCore.map`\n  • `CategoryTheory.StrictlyUnitaryPseudofunctorCore.map`\n  • `CategoryTheory.StructuredArrow.map`\n  • `CategoryTheory.Subfunctor.map`\n  • `CategoryTheory.Subgroupoid.map`\n  • `CategoryTheory.Subobject.map`\n  • `CategoryTheory.ThinSkeleton.map`\n  • `CategoryTheory.TransfiniteCompositionOfShape.map`\n  • `CategoryTheory.Under.map`\n  • `CategoryTheory.WithInitial.map`\n  • `CategoryTheory.WithTerminal.map`\n  • `CategoryTheory.wideSubcategoryInclusion.map`\n  • `Coalgebra.TensorProduct.map`\n  • `CochainComplex.ConnectData.map`\n  • `CochainComplex.mappingCone.map`\n  • `Combinatorics.Line.map`\n  • `CommRingCat.KaehlerDifferential.map`\n  • `DerivedCategory.triangleOfSES.map`\n  • `EStateM.Result.map`\n  • `Filter.Germ.map`\n  • `Filter.HasAntitoneBasis.map`\n  • `Filter.HasBasis.map`\n  • `Filter.NeBot.map`\n  • `Filter.Realizer.map`\n  • `Filter.Subsingleton.map`\n  • `Filter.TotallyBounded.map`\n  • `Finset.Nonempty.map`\n  • `Function.IsFixedPt.map`\n  • `Function.IsPeriodicPt.map`\n  • `Functor.Comp.map`\n  • `Functor.Const.map`\n  • `GenContFract.Pair.map`\n  • `Group.IsPerfect.map`\n  • `HomogeneousLocalization.Away.map`\n  • `HomogeneousLocalization.NumDenSameDeg.map`\n  • `HomologicalComplex₂.total.map`\n  • `Hyperreal.IsSt.map`\n  • `Ideal.FG.map`\n  • `Ideal.ResidueField.map`\n  • `Ideal.primaryComponent.map`\n  • `IntermediateField.LinearDisjoint.map`\n  • `IsLocalRing.ResidueField.map`\n  • `IsLocalization.Away.map`\n  • `Lean.AttributeExtensionState.map`\n  • `Lean.ClosedTermCache.map`\n  • `Lean.PersistentArray.map`\n  • `Lean.PersistentHashMap.map`\n  • `Lean.RBNode.map`\n  • `LieAlgebra.ExtendScalars.map`\n  • `List.Disjoint.map`\n  • `List.IsInfix.map`\n  • `List.IsPrefix.map`\n  • `List.IsRotated.map`\n  • `List.IsSuffix.map`\n  • `List.Nodup.map`\n  • `List.Pairwise.map`\n  • `List.Palindrome.map`\n  • `List.Perm.map`\n  • `List.Sublist.map`\n  • `List.Subperm.map`\n  • `List.Triplewise.map`\n  • `List.Vector.map`\n  • `List.Wbtw.map`\n  • `Magma.AssocQuotient.map`\n  • `Matrix.BlockTriangular.map`\n  • `Matrix.GeneralLinearGroup.map`\n  • `Matrix.IsDiag.map`\n  • `Matrix.IsHermitian.map`\n  • `Matrix.IsSymm.map`\n  • `Matrix.SpecialLinearGroup.map`\n  • `Matroid.Indep.map`\n  • `Matroid.IsBase.map`\n  • `Matroid.IsBasis.map`\n  • `MeasureTheory.FiniteMeasure.map`\n  • `MeasureTheory.IsTightMeasureSet.map`\n  • `MeasureTheory.Measure.map`\n  • `MeasureTheory.OuterMeasure.map`\n  • `MeasureTheory.ProbabilityMeasure.map`\n  • `MeasureTheory.SimpleFunc.map`\n  • `MeasureTheory.VectorMeasure.map`\n  • `Module.Basis.map`\n  • `Module.DirectLimit.map`\n  • `Module.Finite.map`\n  • `Module.Ray.map`\n  • `Module.Relations.map`\n  • `ModuleCat.exteriorPower.map`\n  • `Monoid.Coprod.map`\n  • `Multiset.Nodup.map`\n  • `MvPolynomial.IsHomogeneous.map`\n  • `MvPolynomial.IsSymmetric.map`\n  • `MvPowerSeries.HasEval.map`\n  • `MvPowerSeries.HasSubst.map`\n  • `MvQPF.Cofix.map`\n  • `MvQPF.Comp.map`\n  • `MvQPF.Const.map`\n  • `MvQPF.Fix.map`\n  • `MvQPF.Prj.map`\n  • `MvQPF.Quot1.map`\n  • `Nat.Partrec'.map`\n  • `NormedAddGroupHom.Equalizer.map`\n  • `OmegaCompletePartialOrder.Chain.map`\n  • `OmegaCompletePartialOrder.ContinuousHom.map`\n  • `Path.Homotopic.map`\n  • `Path.Homotopy.map`\n  • `Polynomial.IsRoot.map`\n  • `Polynomial.IsSplittingField.map`\n  • `Polynomial.IsWeaklyEisensteinAt.map`\n  • `Polynomial.Monic.map`\n  • `Polynomial.MonicDegreeEq.map`\n  • `Polynomial.Separable.map`\n  • `Polynomial.Splits.map`\n  • `PowerSeries.HasEval.map`\n  • `PrimeSpectrum.BasicConstructibleSetData.map`\n  • `PrimeSpectrum.ConstructibleSetData.map`\n  • `ProbabilityTheory.HasGaussianLaw.map`\n  • `ProbabilityTheory.HasIndepIncrements.map`\n  • `ProbabilityTheory.Kernel.map`\n  • `Profinite.IndexFunctor.map`\n  • `Quandle.Conj.map`\n  • `Rack.toEnvelGroup.map`\n  • `Representation.Coinvariants.map`\n  • `Ring.DirectLimit.map`\n  • `RingHom.IsIntegralElem.map`\n  • `SSet.Edge.map`\n  • `SSet.OneTruncation₂.map`\n  • `SSet.Path.map`\n  • `SSet.RelativeMorphism.map`\n  • `SSet.S.map`\n  • `SemiNormedGrp.explicitCokernel.map`\n  • `Set.Finite.map`\n  • `Set.powersetCard.map`\n  • `SheafOfModules.Presentation.map`\n  • `SimpleGraph.Colorable.map`\n  • `SimpleGraph.Connected.map`\n  • `SimpleGraph.ConnectedComponent.map`\n  • `SimpleGraph.EdgeDisjointTriangles.map`\n  • `SimpleGraph.Embedding.map`\n  • `SimpleGraph.IsClique.map`\n  • `SimpleGraph.IsNClique.map`\n  • `SimpleGraph.Iso.map`\n  • `SimpleGraph.LocallyLinear.map`\n  • `SimpleGraph.Path.map`\n  • `SimpleGraph.Preconnected.map`\n  • `SimpleGraph.Reachable.map`\n  • `SimpleGraph.Subgraph.map`\n  • `SimpleGraph.Walk.map`\n  • `StandardEtalePair.HasMap.map`\n  • `Std.DHashMap.map`\n  • `Std.DTreeMap.map`\n  • `Std.ExtDHashMap.map`\n  • `Std.ExtDTreeMap.map`\n  • `Std.ExtHashMap.map`\n  • `Std.ExtTreeMap.map`\n  • `Std.HashMap.map`\n  • `Std.Iter.map`\n  • `Std.IterM.map`\n  • `Std.TreeMap.map`\n  • `Stream'.Seq.map`\n  • `Stream'.Seq1.map`\n  • `Stream'.WSeq.map`\n  • `String.Legacy.map`\n  • `Subalgebra.FG.map`\n  • `Subalgebra.LinearDisjoint.map`\n  • `Subgroup.IsNormalClosureFG.map`\n  • `Subgroup.IsSubnormal.map`\n  • `Subgroup.Normal.map`\n  • `Submodule.FG.map`\n  • `Submodule.IsOrtho.map`\n  • `Submodule.IsPrincipal.map`\n  • `Submodule.LinearDisjoint.map`\n  • `Submonoid.FG.map`\n  • `Submonoid.LocalizationMap.map`\n  • `Sym2.IsDiag.map`\n  • `TensorProduct.AlgebraTensorModule.map`\n  • `TensorProduct.LieModule.map`\n  • `TopCat.continuousFunctions.map`\n  • `TopologicalSpace.CompactOpens.map`\n  • `TopologicalSpace.Compacts.map`\n  • `TopologicalSpace.IrreducibleCloseds.map`\n  • `TopologicalSpace.NonemptyCompacts.map`\n  • `TopologicalSpace.OpenNhds.map`\n  • `TopologicalSpace.Opens.map`\n  • `TopologicalSpace.PositiveCompacts.map`\n  • `Topology.CWComplex.map`\n  • `Topology.RelCWComplex.map`\n  • `Topology.WithLowerSet.map`\n  • `Topology.WithUpperSet.map`\n  • `Turing.ListBlank.map`\n  • `Turing.Tape.map`\n  • `TypeVec.prod.map`\n  • `UniformSpace.Completion.map`\n  • `Valuation.IsEquiv.map`\n  • `Vector.mapFinIdxM.map`\n  • `WeierstrassCurve.VariableChange.map`\n  • `WittVector.IsPoly.map`\n  • `WittVector.IsPoly₂.map`\n  • `Algebra.Extension.Cotangent.map`\n  • `Algebra.Extension.CotangentSpace.map`\n  • `Algebra.Extension.H1Cotangent.map`\n  • `AlgebraicGeometry.Scheme.IdealSheafData.map`\n  • `AlgebraicTopology.DoldKan.Γ₀.map`\n  • `Batteries.RBNode.All.map`\n  • `Batteries.RBNode.Balanced.map`\n  • `Batteries.RBNode.Ordered.map`\n  • `CategoryTheory.Abelian.SpectralObject.map`\n  • `CategoryTheory.ComposableArrows.Mk₁.map`\n  • `CategoryTheory.ComposableArrows.Precomp.map`\n  • `CategoryTheory.Functor.HomObj.map`\n  • `CategoryTheory.Functor.IsCartesian.map`\n  • `CategoryTheory.Functor.IsCocartesian.map`\n  • `CategoryTheory.Functor.IsHomLift.map`\n  • `CategoryTheory.Functor.IsStronglyCartesian.map`\n  • `CategoryTheory.Functor.IsStronglyCocartesian.map`\n  • `CategoryTheory.Functor.OfSequence.map`\n  • `CategoryTheory.Functor.relativelyRepresentable.map`\n  • `CategoryTheory.GrothendieckTopology.OneHypercover.map`\n  • `CategoryTheory.GrothendieckTopology.Point.map`\n  • `CategoryTheory.Idempotents.FunctorExtension₁.map`\n  • `CategoryTheory.Idempotents.KaroubiFunctorCategoryEmbedding.map`\n  • `CategoryTheory.Limits.CokernelCofork.map`\n  • `CategoryTheory.Limits.ColimitPresentation.map`\n  • `CategoryTheory.Limits.DiagramOfCocones.map`\n  • `CategoryTheory.Limits.DiagramOfCones.map`\n  • `CategoryTheory.Limits.ImageMap.map`\n  • `CategoryTheory.Limits.IsColimit.map`\n  • `CategoryTheory.Limits.IsIndObject.map`\n  • `CategoryTheory.Limits.IsLimit.map`\n  • `CategoryTheory.Limits.IsZero.map`\n  • `CategoryTheory.Limits.KernelFork.map`\n  • `CategoryTheory.Limits.LimitPresentation.map`\n  • `CategoryTheory.Limits.Multicofork.map`\n  • `CategoryTheory.Limits.MultispanIndex.map`\n  • `CategoryTheory.Limits.Pi.map`\n  • `CategoryTheory.Limits.PullbackCone.map`\n  • `CategoryTheory.Limits.PushoutCocone.map`\n  • `CategoryTheory.Limits.Sigma.map`\n  • `CategoryTheory.Limits.biprod.map`\n  • `CategoryTheory.Limits.biproduct.map`\n  • `CategoryTheory.Limits.coend.map`\n  • `CategoryTheory.Limits.cokernel.map`\n  • `CategoryTheory.Limits.coprod.map`\n  • `CategoryTheory.Limits.end_.map`\n  • `CategoryTheory.Limits.image.map`\n  • `CategoryTheory.Limits.kernel.map`\n  • `CategoryTheory.Limits.prod.map`\n  • `CategoryTheory.Limits.pullback.map`\n  • `CategoryTheory.Limits.pushout.map`\n  • `CategoryTheory.MonoidalCategory.DayConvolution.map`\n  • `CategoryTheory.MonoidalCategory.DayConvolutionInternalHom.map`\n  • `CategoryTheory.MorphismProperty.LeftFraction.map`\n  • `CategoryTheory.MorphismProperty.Over.map`\n  • `CategoryTheory.MorphismProperty.RightFraction.map`\n  • `CategoryTheory.MorphismProperty.TransfiniteCompositionOfShape.map`\n  • `CategoryTheory.MorphismProperty.strictMap.map`\n  • `CategoryTheory.Precoverage.ZeroHypercover.map`\n  • `CategoryTheory.Presieve.CoverByImageStructure.map`\n  • `CategoryTheory.Presieve.FamilyOfElements.map`\n  • `CategoryTheory.Pseudofunctor.CoGrothendieck.map`\n  • `CategoryTheory.Pseudofunctor.Grothendieck.map`\n  • `CategoryTheory.Pseudofunctor.ObjectProperty.map`\n  • `CategoryTheory.ShortComplex.Exact.map`\n  • `CategoryTheory.ShortComplex.HomologyData.map`\n  • `CategoryTheory.ShortComplex.HomologyMapData.map`\n  • `CategoryTheory.ShortComplex.LeftHomologyData.map`\n  • `CategoryTheory.ShortComplex.LeftHomologyMapData.map`\n  • `CategoryTheory.ShortComplex.RightHomologyData.map`\n  • `CategoryTheory.ShortComplex.RightHomologyMapData.map`\n  • `CategoryTheory.ShortComplex.ShortExact.map`\n  • `CategoryTheory.ShortComplex.Splitting.map`\n  • `CategoryTheory.Square.IsPullback.map`\n  • `CategoryTheory.Square.IsPushout.map`\n  • `CategoryTheory.Triangulated.Octahedron.map`\n  • `CochainComplex.HomComplex.Cochain.map`\n  • `CommRingCat.Colimits.Relation.map`\n  • `ComputeAsymptotics.MultiseriesExpansion.Multiseries.map`\n  • `FirstOrder.Language.Substructure.map`\n  • `Lean.Export.Alloc.map`\n  • `Lean.Language.SnapshotTask.map`\n  • `Lean.Meta.CustomEliminators.map`\n  • `Lean.Meta.FVarSubst.map`\n  • `Lean.Meta.KExprMap.map`\n  • `Lean.Meta.MVarRenaming.map`\n  • `Lean.Omega.Coeffs.map`\n  • `Lean.Omega.Constraint.map`\n  • `Lean.ScopedEnvExtension.ScopedEntries.map`\n  • `Lean.Widget.TaggedText.map`\n  • `MeasureTheory.Measure.AbsolutelyContinuous.map`\n  • `MeasureTheory.Measure.InnerRegular.map`\n  • `MeasureTheory.Measure.InnerRegularWRT.map`\n  • `MeasureTheory.Measure.IsFiniteMeasureOnCompacts.map`\n  • `MeasureTheory.Measure.OuterRegular.map`\n  • `MeasureTheory.Measure.Regular.map`\n  • `MeasureTheory.SimpleFunc.FinMeasSupp.map`\n  • `MeasureTheory.VectorMeasure.AbsolutelyContinuous.map`\n  • `ModuleCat.ExtendRestrictScalarsAdj.Counit.map`\n  • `ModuleCat.ExtendRestrictScalarsAdj.Unit.map`\n  • `MonCat.Colimits.Relation.map`\n  • `OmegaCompletePartialOrder.ContinuousHom.ωScottContinuous.map`\n  • `Path.Homotopic.Quotient.map`\n  • `ProbabilityTheory.Kernel.IsFiniteKernel.map`\n  • `ProbabilityTheory.Kernel.IsMarkovKernel.map`\n  • `ProbabilityTheory.Kernel.IsSFiniteKernel.map`\n  • `ProbabilityTheory.Kernel.IsZeroOrMarkovKernel.map`\n  • `RingCat.Colimits.Relation.map`\n  • `SSet.Edge.CompStruct.map`\n  • `SSet.PtSimplex.MulStruct.map`\n  • `SSet.PtSimplex.RelStruct.map`\n  • `SSet.Truncated.Edge.map`\n  • `SSet.Truncated.Path.map`\n  • `SimpleGraph.Subgraph.Connected.map`\n  • `SimpleGraph.Subgraph.IsMatching.map`\n  • `SimpleGraph.Subgraph.Preconnected.map`\n  • `SimpleGraph.Walk.IsCycle.map`\n  • `SimpleGraph.Walk.IsHamiltonian.map`\n  • `SimpleGraph.Walk.IsHamiltonianCycle.map`\n  • `SimpleGraph.Walk.IsSubwalk.map`\n  • `Std.DHashMap.Equiv.map`\n  • `Std.DHashMap.Raw.map`\n  • `Std.DTreeMap.Equiv.map`\n  • `Std.DTreeMap.Raw.map`\n  • `Std.Do.Spec.map`\n  • `Std.Do.WP.map`\n  • `Std.HashMap.Equiv.map`\n  • `Std.HashMap.Raw.map`\n  • `Std.Internal.Small.map`\n  • `Std.IterM.Equiv.map`\n  • `Std.IterM.InternalCombinators.map`\n  • `Std.Iterators.HetT.map`\n  • `Std.Iterators.PostconditionT.map`\n  • `Std.TreeMap.Equiv.map`\n  • `Std.TreeMap.Raw.map`\n  • `TopCat.Presheaf.SubmonoidPresheaf.map`\n  • `Turing.TM0.Cfg.map`\n  • `Turing.TM0.Machine.map`\n  • `Turing.TM0.Stmt.map`\n  • `WeierstrassCurve.Affine.CoordinateRing.map`\n  • `WeierstrassCurve.Affine.Equation.map`\n  • `WeierstrassCurve.Affine.Point.map`\n  • `WeierstrassCurve.Jacobian.Equation.map`\n  • `WeierstrassCurve.Projective.Equation.map`\n  • `AlgebraicTopology.DoldKan.Γ₀.Obj.map`\n  • `CategoryTheory.GrothendieckTopology.Cover.Arrow.map`\n  • `CategoryTheory.HasLiftingProperty.transfiniteComposition.SqStruct.map`\n  • `CategoryTheory.Idempotents.KaroubiHomologicalComplexEquivalence.Functor.map`\n  • `CategoryTheory.Idempotents.KaroubiHomologicalComplexEquivalence.Inverse.map`\n  • `CategoryTheory.Presieve.FamilyOfElements.Compatible.map`\n  • `CategoryTheory.Presieve.FamilyOfElements.IsAmalgamation.map`\n  • `CategoryTheory.ShortComplex.ShortExact.singleTriangle.map`\n  • `CategoryTheory.SimplicialObject.Augmented.ExtraDegeneracy.map`\n  • `CategoryTheory.SmallObject.SuccStruct.extendToSucc.map`\n  • `CategoryTheory.SmallObject.SuccStruct.ofCocone.map`\n  • `CommRingCat.Colimits.Relation.below.map`\n  • `FirstOrder.Language.Substructure.CG.map`\n  • `FirstOrder.Language.Substructure.FG.map`\n  • `Lean.Compiler.CSimp.State.map`\n  • `Lean.Compiler.LCNF.Probe.map`\n  • `Lean.Meta.Grind.SymbolPriorities.map`\n  • `Lean.Meta.Grind.VarRename.map`\n  • `Lean.Meta.Match.MatchEqnsExtState.map`\n  • `Lean.Meta.Match.Overlaps.map`\n  • `Lean.Meta.Simp.UsedSimps.map`\n  • `MonCat.Colimits.Relation.below.map`\n  • `RingCat.Colimits.Relation.below.map`\n  • `SSet.Truncated.Edge.CompStruct.map`\n  • `Std.DHashMap.Internal.AssocList.map`\n  • `Std.DHashMap.Internal.Raw₀.map`\n  • `Std.DHashMap.Raw.Equiv.map`\n  • `Std.DHashMap.Raw.WF.map`\n  • `Std.DTreeMap.Internal.Impl.map`\n  • `Std.DTreeMap.Raw.Equiv.map`\n  • `Std.HashMap.Raw.Equiv.map`\n  • `Std.HashMap.Raw.WF.map`\n  • `Std.Internal.List.DistinctKeys.map`\n  • `Std.Sat.AIG.RefVec.map`\n  • `Std.TreeMap.Raw.Equiv.map`\n  • `CategoryTheory.GrothendieckTopology.Cover.Arrow.Relation.map`\n  • `CategoryTheory.MorphismProperty.LeftFraction.Localization.Hom.map`\n  • `Lean.Compiler.LCNF.CSE.State.map`\n  • `Lean.Compiler.LCNF.NormLevelParam.State.map`\n  • `Lean.Compiler.LCNF.Simp.FunDeclInfoMap.map`\n  • `Lean.Meta.Grind.UnitLike.State.map`\n  • `Lean.Meta.Match.Extension.State.map`\n  • `Std.DTreeMap.Internal.Impl.Balanced.map`\n  • `Std.DTreeMap.Internal.Impl.Equiv.map`\n  • `Std.DTreeMap.Internal.Impl.WF.map`\n  • `Std.Internal.IO.Async.AsyncTask.map`\n  • `Std.Internal.IO.Async.BaseAsync.map`\n  • `Std.Internal.IO.Async.EAsync.map`\n  • `Std.Internal.IO.Async.ETask.map`\n  • `Std.Internal.IO.Async.MaybeTask.map`\n  • `Std.Sat.AIG.RelabelNat.State.map`\n  • `Std.Tactic.BVDecide.BVExpr.Cache.map`", pos=Position(line=2, column=4), pos_end=Position(line=2, column=40), severity=<Severity.ERROR: 3>, kind='lean.invalidField._namedError'), Message(data="Function expected at\n  Spec\nbut this term has type\n  ?m.1\n\nNote: Expected a function because this term is being applied to the argument\n  R\n\nHint: The identifier `Spec` is unknown, and Lean's `autoImplicit` option causes an unknown identifier to be treated as an implicitly bound variable with an unknown type. However, the unknown type cannot be a function, and a function is what Lean expects here. This is often the result of a typo or a missing `import` or `open` statement.", pos=Position(line=2, column=44), pos_end=Position(line=2, column=50), severity=<Severity.ERROR: 3>, kind=None), Message(data='unsolved goals\nx✝ : Sort u_1\nSpec : x✝\n⊢ sorry = sorry', pos=Position(line=3, column=3), pos_end=Position(line=3, column=29), severity=<Severity.ERROR: 3>, kind='Tactic.unsolvedGoals')], invocations=None, goal_state=None, goal_src_boundaries=None, new_constants=None), CompilationUnit(i_begin=122, i_end=224, messages=[Message(data='Invalid `end`: There is no current scope to end\n\nNote: Scopes are introduced using `namespace` and `section`', pos=Position(line=6, column=0), pos_end=Position(line=6, column=23), severity=<Severity.ERROR: 3>, kind=None)], invocations=None, goal_state=None, goal_src_boundaries=None, new_constants=None), CompilationUnit(i_begin=224, i_end=252, messages=[], invocations=None, goal_state=None, goal_src_boundaries=None, new_constants=None), CompilationUnit(i_begin=252, i_end=285, messages=[Message(data='Function expected at\n  Spec\nbut this term has type\n  ?m.1\n\nNote: Expected a function because this term is being applied to the argument\n  R', pos=Position(line=10, column=18), pos_end=Position(line=10, column=24), severity=<Severity.ERROR: 3>, kind=None)], invocations=None, goal_state=None, goal_src_boundaries=None, new_constants=None), CompilationUnit(i_begin=285, i_end=303, messages=[], invocations=None, goal_state=None, goal_src_boundaries=None, new_constants=None), CompilationUnit(i_begin=303, i_end=561, messages=[Message(data="unexpected end of input; expected 'lemma'", pos=Position(line=20, column=13), pos_end=None, severity=<Severity.ERROR: 3>, kind=None)], invocations=None, goal_state=None, goal_src_boundaries=None, new_constants=None)]
```

Return a corrected, compiling version of the code.[/INST]


[System] You are Leanstral, a Lean 4 proof assistant. Complete the task below using the provided Lean source context. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.Probability.Independence.Process.Basic).

[User]
The following proof-state transcript was extracted from a real mathlib proof. Use it to answer the question below.

```text
Proof-state transcript for `Mathlib.Probability.Independence.Process.Basic.iIndepFun`:
State 0: ⊢ lemma iIndepFun.process_congr {T : S → Type*} {𝓧 : (i : S) → (j : T i) → Type*}
    [∀ i j, MeasurableSpace (𝓧 i j)] {X X' : (i : S) → (j : T i) → Ω → 𝓧 i j}
    (h1 : iIndepFun (fun i ω j ↦ X i j ω) κ P) (h2 : ∀ i j, ∀ᵐ a ∂P, X i j =ᵐ[κ a] X' i j) :
    iIndepFun (fun i ω j ↦ X' i j ω) κ P
Tactic: intro s f hf
State 1: ⊢ <goal after intro s f hf>
Tactic: choose! g mg hg using hf
State 2: ⊢ <goal after choose! g mg hg using hf>
Tactic: have h3 : ⋂ i ∈ s, f i = ⋂ i ∈ s, (fun i ω j ↦ X' i j ω) i ⁻¹' g i := (biInf_congr hg).symm
State 3: ⊢ <goal after have h3 : ⋂ i ∈ s, f i = ⋂ i ∈ s, (fun i ω j ↦ X' i j ω) i ⁻¹' g i := (biInf_congr hg).symm>
Tactic: have h3' a : ∏ i ∈ s, κ a (f i) = ∏ i ∈ s, κ a ((fun i ω j ↦ X' i j ω) i ⁻¹' g i) := by
State 4: ⊢ <goal after have h3' a : ∏ i ∈ s, κ a (f i) = ∏ i ∈ s, κ a ((fun i ω j ↦ X' i j ω) i ⁻¹' g i) := by>
Tactic: refine Finset.prod_congr rfl fun i hi ↦ ?_
State 5: ⊢ <goal after refine Finset.prod_congr rfl fun i hi ↦ ?_>
Tactic: rw [hg i hi]  simp_rw [h3, h3']
State 6: ⊢ <goal after rw [hg i hi]>
Tactic: choose! I u hI hu using fun i hi ↦ (mg i hi).eq_preimage_restrict_countable
State 7: ⊢ <goal after choose! I u hI hu using fun i hi ↦ (mg i hi).eq_preimage_restrict_countable>
Tactic: have h4 (f : (i : S) → (j : T i) → Ω → 𝓧 i j) : ⋂ i ∈ s, (fun i ω j ↦ f i j ω) i ⁻¹' g i =  ⋂ i ∈ s, (fun i ω j ↦ f i j ω) i ⁻¹' ((I i).restrict ⁻¹' u i) :=  (biInf_congr (fun i hi ↦ by rw [hu i hi])).symm
State 8: ⊢ <goal after have h4 (f : (i : S) → (j : T i) → Ω → 𝓧 i j) : ⋂ i ∈ s, (fun i ω j ↦ f i j ω) i ⁻¹' g i =>
Tactic: have h4' a (f : (i : S) → (j : T i) → Ω → 𝓧 i j) :  ∏ i ∈ s, κ a ((fun i ω j ↦ f i j ω) i ⁻¹' g i) =  ∏ i ∈ s, κ a ((fun i ω j ↦ f i j ω) i ⁻¹' ((I i).restrict ⁻¹' u i)) := by
State 9: ⊢ <goal after have h4' a (f : (i : S) → (j : T i) → Ω → 𝓧 i j) :>
Tactic: refine Finset.prod_congr rfl fun i hi ↦ ?_
State 10: ⊢ <goal after refine Finset.prod_congr rfl fun i hi ↦ ?_>
Tactic: rw [hu i hi]
State 11: ⊢ <goal after rw [hu i hi]>
Tactic: have h5 := h1 s (fun i hi ↦ ⟨g i, mg i hi, rfl⟩)  simp_rw [h4, h4'] at h5 ⊢
State 12: ⊢ <goal after have h5 := h1 s (fun i hi ↦ ⟨g i, mg i hi, rfl⟩)>
Tactic: have h6 i (f : (j : T i) → Ω → 𝓧 i j) : (fun ω j ↦ f j ω) ⁻¹' ((I i).restrict ⁻¹' (u i)) =  (fun ω (j : I i) ↦ f j ω) ⁻¹' (u i) := rfl  simp_rw [h6] at h5 ⊢
State 13: ⊢ <goal after have h6 i (f : (j : T i) → Ω → 𝓧 i j) : (fun ω j ↦ f j ω) ⁻¹' ((I i).restrict ⁻¹' (u i)) =>
Tactic: have h :  ∀ᵐ a ∂P, ∀ i ∈ s, (fun ω (j : I i) ↦ X i j ω) =ᵐ[κ a] (fun ω (j : I i) ↦ X' i j ω) := by
State 14: ⊢ <goal after have h :>
Tactic: refine (ae_ball_iff s.countable_toSet).2 fun i hi ↦ ?_
State 15: ⊢ <goal after refine (ae_ball_iff s.countable_toSet).2 fun i hi ↦ ?_>
Tactic: have := (hI i hi).to_subtype  filter_upwards [ae_all_iff.2 fun (j : I i) ↦ h2 i j] with  a (ha : ∀ (j : I i), ∀ᵐ ω ∂κ a, X i j ω = X' i j ω)  filter_upwards [ae_all_iff.2 ha] with ω hω using by simp [hω]  filter_upwards [h5, h] with a ha1 ha2
State 16: ⊢ <goal after have := (hI i hi).to_subtype>
Tactic: refine .trans (measure_congr (ae_eq_set_biInter s.countable_toSet  (fun i hi ↦ ((ha2 i hi).preimage _).symm))) (ha1.trans ?_)
State 17: ⊢ <goal after refine .trans (measure_congr (ae_eq_set_biInter s.countable_toSet>
Tactic: refine Finset.prod_congr rfl fun i hi ↦ ?_
State 18: ⊢ <goal after refine Finset.prod_congr rfl fun i hi ↦ ?_>
Tactic: rw [measure_congr ((ha2 i hi).preimage _)]  /-- Stochastic processes $((X^s_t)_{t \in T_s})_{s \in S}$ are mutually independent if  for all $s_1, ..., s_n$ and all $t^{s_i}_1, ..., t^{s_i}_{p_i}$ the families  $(X^{s_1}_{t^{s_1}_1}, ..., X^{s_1}_{t^{s_1}_{p_1}}), ...,  (X^{s_n}_{t^{s_n}_1}, ..., X^{s_n}_{t^{s_n}_{p_n}})$ are mutually independent. -/
```

Question: what is the next tactic after the last recorded state, and why?

<s>[SYSTEM_PROMPT]You are Leanstral, a Lean 4 proof assistant. Complete the task below using the provided Lean source context. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.Probability.Independence.Process.Basic).[/SYSTEM_PROMPT][MODEL_SETTINGS]{"reasoning_effort": "none"}[/MODEL_SETTINGS][INST]The following proof-state transcript was extracted from a real mathlib proof. Use it to answer the question below.

```text
Proof-state transcript for `Mathlib.Probability.Independence.Process.Basic.iIndepFun`:
State 0: ⊢ lemma iIndepFun.process_congr {T : S → Type*} {𝓧 : (i : S) → (j : T i) → Type*}
    [∀ i j, MeasurableSpace (𝓧 i j)] {X X' : (i : S) → (j : T i) → Ω → 𝓧 i j}
    (h1 : iIndepFun (fun i ω j ↦ X i j ω) κ P) (h2 : ∀ i j, ∀ᵐ a ∂P, X i j =ᵐ[κ a] X' i j) :
    iIndepFun (fun i ω j ↦ X' i j ω) κ P
Tactic: intro s f hf
State 1: ⊢ <goal after intro s f hf>
Tactic: choose! g mg hg using hf
State 2: ⊢ <goal after choose! g mg hg using hf>
Tactic: have h3 : ⋂ i ∈ s, f i = ⋂ i ∈ s, (fun i ω j ↦ X' i j ω) i ⁻¹' g i := (biInf_congr hg).symm
State 3: ⊢ <goal after have h3 : ⋂ i ∈ s, f i = ⋂ i ∈ s, (fun i ω j ↦ X' i j ω) i ⁻¹' g i := (biInf_congr hg).symm>
Tactic: have h3' a : ∏ i ∈ s, κ a (f i) = ∏ i ∈ s, κ a ((fun i ω j ↦ X' i j ω) i ⁻¹' g i) := by
State 4: ⊢ <goal after have h3' a : ∏ i ∈ s, κ a (f i) = ∏ i ∈ s, κ a ((fun i ω j ↦ X' i j ω) i ⁻¹' g i) := by>
Tactic: refine Finset.prod_congr rfl fun i hi ↦ ?_
State 5: ⊢ <goal after refine Finset.prod_congr rfl fun i hi ↦ ?_>
Tactic: rw [hg i hi]  simp_rw [h3, h3']
State 6: ⊢ <goal after rw [hg i hi]>
Tactic: choose! I u hI hu using fun i hi ↦ (mg i hi).eq_preimage_restrict_countable
State 7: ⊢ <goal after choose! I u hI hu using fun i hi ↦ (mg i hi).eq_preimage_restrict_countable>
Tactic: have h4 (f : (i : S) → (j : T i) → Ω → 𝓧 i j) : ⋂ i ∈ s, (fun i ω j ↦ f i j ω) i ⁻¹' g i =  ⋂ i ∈ s, (fun i ω j ↦ f i j ω) i ⁻¹' ((I i).restrict ⁻¹' u i) :=  (biInf_congr (fun i hi ↦ by rw [hu i hi])).symm
State 8: ⊢ <goal after have h4 (f : (i : S) → (j : T i) → Ω → 𝓧 i j) : ⋂ i ∈ s, (fun i ω j ↦ f i j ω) i ⁻¹' g i =>
Tactic: have h4' a (f : (i : S) → (j : T i) → Ω → 𝓧 i j) :  ∏ i ∈ s, κ a ((fun i ω j ↦ f i j ω) i ⁻¹' g i) =  ∏ i ∈ s, κ a ((fun i ω j ↦ f i j ω) i ⁻¹' ((I i).restrict ⁻¹' u i)) := by
State 9: ⊢ <goal after have h4' a (f : (i : S) → (j : T i) → Ω → 𝓧 i j) :>
Tactic: refine Finset.prod_congr rfl fun i hi ↦ ?_
State 10: ⊢ <goal after refine Finset.prod_congr rfl fun i hi ↦ ?_>
Tactic: rw [hu i hi]
State 11: ⊢ <goal after rw [hu i hi]>
Tactic: have h5 := h1 s (fun i hi ↦ ⟨g i, mg i hi, rfl⟩)  simp_rw [h4, h4'] at h5 ⊢
State 12: ⊢ <goal after have h5 := h1 s (fun i hi ↦ ⟨g i, mg i hi, rfl⟩)>
Tactic: have h6 i (f : (j : T i) → Ω → 𝓧 i j) : (fun ω j ↦ f j ω) ⁻¹' ((I i).restrict ⁻¹' (u i)) =  (fun ω (j : I i) ↦ f j ω) ⁻¹' (u i) := rfl  simp_rw [h6] at h5 ⊢
State 13: ⊢ <goal after have h6 i (f : (j : T i) → Ω → 𝓧 i j) : (fun ω j ↦ f j ω) ⁻¹' ((I i).restrict ⁻¹' (u i)) =>
Tactic: have h :  ∀ᵐ a ∂P, ∀ i ∈ s, (fun ω (j : I i) ↦ X i j ω) =ᵐ[κ a] (fun ω (j : I i) ↦ X' i j ω) := by
State 14: ⊢ <goal after have h :>
Tactic: refine (ae_ball_iff s.countable_toSet).2 fun i hi ↦ ?_
State 15: ⊢ <goal after refine (ae_ball_iff s.countable_toSet).2 fun i hi ↦ ?_>
Tactic: have := (hI i hi).to_subtype  filter_upwards [ae_all_iff.2 fun (j : I i) ↦ h2 i j] with  a (ha : ∀ (j : I i), ∀ᵐ ω ∂κ a, X i j ω = X' i j ω)  filter_upwards [ae_all_iff.2 ha] with ω hω using by simp [hω]  filter_upwards [h5, h] with a ha1 ha2
State 16: ⊢ <goal after have := (hI i hi).to_subtype>
Tactic: refine .trans (measure_congr (ae_eq_set_biInter s.countable_toSet  (fun i hi ↦ ((ha2 i hi).preimage _).symm))) (ha1.trans ?_)
State 17: ⊢ <goal after refine .trans (measure_congr (ae_eq_set_biInter s.countable_toSet>
Tactic: refine Finset.prod_congr rfl fun i hi ↦ ?_
State 18: ⊢ <goal after refine Finset.prod_congr rfl fun i hi ↦ ?_>
Tactic: rw [measure_congr ((ha2 i hi).preimage _)]  /-- Stochastic processes $((X^s_t)_{t \in T_s})_{s \in S}$ are mutually independent if  for all $s_1, ..., s_n$ and all $t^{s_i}_1, ..., t^{s_i}_{p_i}$ the families  $(X^{s_1}_{t^{s_1}_1}, ..., X^{s_1}_{t^{s_1}_{p_1}}), ...,  (X^{s_n}_{t^{s_n}_1}, ..., X^{s_n}_{t^{s_n}_{p_n}})$ are mutually independent. -/
```

Question: what is the next tactic after the last recorded state, and why?[/INST]