l3lab/ntp-mathlib huggingface dataset:
/-- Construct the finest (largest) Grothendieck topology for which the given presheaf is a sheaf.

This is a special case of https://stacks.math.columbia.edu/tag/00Z9, but following a different
proof (see the comments there).
-/
def finestTopologySingle (P : Cᵒᵖ ⥤ Type v) : GrothendieckTopology C where
  sieves X S := ∀ (Y) (f : Y ⟶ X), Presieve.IsSheafFor P (S.pullback f : Presieve Y)
  top_mem' X Y f := by
    rw [Sieve.pullback_top]
    exact Presieve.isSheafFor_top_sieve P
  pullback_stable' X Y S f hS Z g := by
    rw [← pullback_comp]
    apply hS
  transitive' X S hS R hR Z g := by
    -- This is the hard part of the construction, showing that the given set of sieves satisfies
    -- the transitivity axiom.
    refine' isSheafFor_trans P (pullback g S) _ (hS Z g) _ _
    · intro Y f _
      rw [← pullback_comp]
      apply (hS _ _).isSeparatedFor
    · intro Y f hf
      have := hR hf _ (𝟙 _)
      

Proof state:
case refine'_2
C : Type u
inst✝ : Category.{v, u} C
P✝ : Cᵒᵖ ⥤ Type v
X✝ Y✝ : C
S✝ : Sieve X✝
R✝ : Presieve X✝
J J₂ : GrothendieckTopology C
P : Cᵒᵖ ⥤ Type v
X : C
S : Sieve X
hS : S ∈ (fun X S => ∀ (Y : C) (f : Y ⟶ X), Presieve.IsSheafFor P (Sieve.pullback f S).arrows) X
R : Sieve X
hR :
  ∀ ⦃Y : C⦄ ⦃f : Y ⟶ X⦄,
    S.arrows f →
      Sieve.pullback f R ∈ (fun X S => ∀ (Y : C) (f : Y ⟶ X), Presieve.IsSheafFor P (Sieve.pullback f S).arrows) Y
Z : C
g : Z ⟶ X
Y : C
f : Y ⟶ Z
hf : (Sieve.pullback g S).arrows f
this : Presieve.IsSheafFor P (Sieve.pullback (𝟙 Y) (Sieve.pullback (f ≫ g) R)).arrows
⊢ Presieve.IsSheafFor P (Sieve.pullback f (Sieve.pullback g R)).arrows

Next tactic:
rw [pullback_id, pullback_comp] at this
/-- Construct the finest (largest) Grothendieck topology for which the given presheaf is a sheaf.

This is a special case of https://stacks.math.columbia.edu/tag/00Z9, but following a different
proof (see the comments there).
-/
def finestTopologySingle (P : Cᵒᵖ ⥤ Type v) : GrothendieckTopology C where
  sieves X S := ∀ (Y) (f : Y ⟶ X), Presieve.IsSheafFor P (S.pullback f : Presieve Y)
  top_mem' X Y f := by
    rw [Sieve.pullback_top]
    exact Presieve.isSheafFor_top_sieve P
  pullback_stable' X Y S f hS Z g := by
    rw [← pullback_comp]
    apply hS
  transitive' X S hS R hR Z g := by
    -- This is the hard part of the construction, showing that the given set of sieves satisfies
    -- the transitivity axiom.
    refine' isSheafFor_trans P (pullback g S) _ (hS Z g) _ _
    · intro Y f _
      rw [← pullback_comp]
      apply (hS _ _).isSeparatedFor
    · intro Y f hf
      have := hR hf _ (𝟙 _)
      rw [pullback_id, pullback_comp] at this
      

Proof state:
case refine'_2
C : Type u
inst✝ : Category.{v, u} C
P✝ : Cᵒᵖ ⥤ Type v
X✝ Y✝ : C
S✝ : Sieve X✝
R✝ : Presieve X✝
J J₂ : GrothendieckTopology C
P : Cᵒᵖ ⥤ Type v
X : C
S : Sieve X
hS : S ∈ (fun X S => ∀ (Y : C) (f : Y ⟶ X), Presieve.IsSheafFor P (Sieve.pullback f S).arrows) X
R : Sieve X
hR :
  ∀ ⦃Y : C⦄ ⦃f : Y ⟶ X⦄,
    S.arrows f →
      Sieve.pullback f R ∈ (fun X S => ∀ (Y : C) (f : Y ⟶ X), Presieve.IsSheafFor P (Sieve.pullback f S).arrows) Y
Z : C
g : Z ⟶ X
Y : C
f : Y ⟶ Z
hf : (Sieve.pullback g S).arrows f
this : Presieve.IsSheafFor P (Sieve.pullback f (Sieve.pullback g R)).arrows
⊢ Presieve.IsSheafFor P (Sieve.pullback f (Sieve.pullback g R)).arrows

Next tactic:
apply this
/-- Check that if `P ∈ Ps`, then `P` is indeed a sheaf for the finest topology on `Ps`. -/
theorem sheaf_for_finestTopology (Ps : Set (Cᵒᵖ ⥤ Type v)) (h : P ∈ Ps) :
    Presieve.IsSheaf (finestTopology Ps) P := fun X S hS => by
  

Proof state:
C : Type u
inst✝ : Category.{v, u} C
P : Cᵒᵖ ⥤ Type v
X✝ Y : C
S✝ : Sieve X✝
R : Presieve X✝
J J₂ : GrothendieckTopology C
Ps : Set (Cᵒᵖ ⥤ Type v)
h : P ∈ Ps
X : C
S : Sieve X
hS : S ∈ GrothendieckTopology.sieves (finestTopology Ps) X
⊢ Presieve.IsSheafFor P S.arrows

Next tactic:
simpa using hS _ ⟨⟨_, _, ⟨_, h, rfl⟩, rfl⟩, rfl⟩ _ (𝟙 _)
/--
Check that if each `P ∈ Ps` is a sheaf for `J`, then `J` is a subtopology of `finestTopology Ps`.
-/
theorem le_finestTopology (Ps : Set (Cᵒᵖ ⥤ Type v)) (J : GrothendieckTopology C)
    (hJ : ∀ P ∈ Ps, Presieve.IsSheaf J P) : J ≤ finestTopology Ps := by
  

Proof state:
C : Type u
inst✝ : Category.{v, u} C
P : Cᵒᵖ ⥤ Type v
X Y : C
S : Sieve X
R : Presieve X
J✝ J₂ : GrothendieckTopology C
Ps : Set (Cᵒᵖ ⥤ Type v)
J : GrothendieckTopology C
hJ : ∀ P ∈ Ps, Presieve.IsSheaf J P
⊢ J ≤ finestTopology Ps

Next tactic:
rintro X S hS _ ⟨⟨_, _, ⟨P, hP, rfl⟩, rfl⟩, rfl⟩
/--
Check that if each `P ∈ Ps` is a sheaf for `J`, then `J` is a subtopology of `finestTopology Ps`.
-/
theorem le_finestTopology (Ps : Set (Cᵒᵖ ⥤ Type v)) (J : GrothendieckTopology C)
    (hJ : ∀ P ∈ Ps, Presieve.IsSheaf J P) : J ≤ finestTopology Ps := by
  rintro X S hS _ ⟨⟨_, _, ⟨P, hP, rfl⟩, rfl⟩, rfl⟩
  

Proof state:
case intro.mk.intro.intro.intro.intro
C : Type u
inst✝ : Category.{v, u} C
P✝ : Cᵒᵖ ⥤ Type v
X✝ Y : C
S✝ : Sieve X✝
R : Presieve X✝
J✝ J₂ : GrothendieckTopology C
Ps : Set (Cᵒᵖ ⥤ Type v)
J : GrothendieckTopology C
hJ : ∀ P ∈ Ps, Presieve.IsSheaf J P
X : C
S : Sieve X
hS : S ∈ GrothendieckTopology.sieves J X
P : Cᵒᵖ ⥤ Type v
hP : P ∈ Ps
⊢ S ∈
    (fun f => ↑f X)
      { val := (finestTopologySingle P).sieves,
        property := (_ : ∃ a ∈ finestTopologySingle '' Ps, a.sieves = (finestTopologySingle P).sieves) }

Next tactic:
intro Y f
/--
Check that if each `P ∈ Ps` is a sheaf for `J`, then `J` is a subtopology of `finestTopology Ps`.
-/
theorem le_finestTopology (Ps : Set (Cᵒᵖ ⥤ Type v)) (J : GrothendieckTopology C)
    (hJ : ∀ P ∈ Ps, Presieve.IsSheaf J P) : J ≤ finestTopology Ps := by
  rintro X S hS _ ⟨⟨_, _, ⟨P, hP, rfl⟩, rfl⟩, rfl⟩
  intro Y f
  -- this can't be combined with the previous because the `subst` is applied at the end
  

Proof state:
case intro.mk.intro.intro.intro.intro
C : Type u
inst✝ : Category.{v, u} C
P✝ : Cᵒᵖ ⥤ Type v
X✝ Y✝ : C
S✝ : Sieve X✝
R : Presieve X✝
J✝ J₂ : GrothendieckTopology C
Ps : Set (Cᵒᵖ ⥤ Type v)
J : GrothendieckTopology C
hJ : ∀ P ∈ Ps, Presieve.IsSheaf J P
X : C
S : Sieve X
hS : S ∈ GrothendieckTopology.sieves J X
P : Cᵒᵖ ⥤ Type v
hP : P ∈ Ps
Y : C
f : Y ⟶ X
⊢ Presieve.IsSheafFor P (Sieve.pullback f S).arrows

Next tactic:
exact hJ P hP (S.pullback f) (J.pullback_stable f hS)
/-- If every functor `yoneda.obj X` is a `J`-sheaf, then `J` is subcanonical. -/
theorem of_yoneda_isSheaf (J : GrothendieckTopology C)
    (h : ∀ X, Presieve.IsSheaf J (yoneda.obj X)) : Subcanonical J :=
  le_finestTopology _ _
    (by
      

Proof state:
C : Type u
inst✝ : Category.{v, u} C
P : Cᵒᵖ ⥤ Type v
X Y : C
S : Sieve X
R : Presieve X
J✝ J₂ J : GrothendieckTopology C
h : ∀ (X : C), Presieve.IsSheaf J (yoneda.obj X)
⊢ ∀ P ∈ Set.range yoneda.toPrefunctor.obj, Presieve.IsSheaf J P

Next tactic:
rintro P ⟨X, rfl⟩
/-- If every functor `yoneda.obj X` is a `J`-sheaf, then `J` is subcanonical. -/
theorem of_yoneda_isSheaf (J : GrothendieckTopology C)
    (h : ∀ X, Presieve.IsSheaf J (yoneda.obj X)) : Subcanonical J :=
  le_finestTopology _ _
    (by
      rintro P ⟨X, rfl⟩
      

Proof state:
case intro
C : Type u
inst✝ : Category.{v, u} C
P : Cᵒᵖ ⥤ Type v
X✝ Y : C
S : Sieve X✝
R : Presieve X✝
J✝ J₂ J : GrothendieckTopology C
h : ∀ (X : C), Presieve.IsSheaf J (yoneda.obj X)
X : C
⊢ Presieve.IsSheaf J (yoneda.obj X)

Next tactic:
apply h
protected theorem id : LeftOrdContinuous (id : α → α) := fun s x h => by
  

Proof state:
α : Type u
β : Type v
γ : Type w
ι : Sort x
inst✝² : Preorder α
inst✝¹ : Preorder β
inst✝ : Preorder γ
g : β → γ
f : α → β
s : Set α
x : α
h : IsLUB s x
⊢ IsLUB (id '' s) (id x)

Next tactic:
simpa only [image_id] using h
theorem mono (hf : LeftOrdContinuous f) : Monotone f := fun a₁ a₂ h =>
  have : IsGreatest {a₁, a₂} a₂ := ⟨Or.inr rfl, by 

Proof state:
α : Type u
β : Type v
γ : Type w
ι : Sort x
inst✝² : Preorder α
inst✝¹ : Preorder β
inst✝ : Preorder γ
g : β → γ
f : α → β
hf : LeftOrdContinuous f
a₁ a₂ : α
h : a₁ ≤ a₂
⊢ a₂ ∈ upperBounds {a₁, a₂}

Next tactic:
simp [*]
theorem comp (hg : LeftOrdContinuous g) (hf : LeftOrdContinuous f) : LeftOrdContinuous (g ∘ f) :=
  fun s x h => by 

Proof state:
α : Type u
β : Type v
γ : Type w
ι : Sort x
inst✝² : Preorder α
inst✝¹ : Preorder β
inst✝ : Preorder γ
g : β → γ
f : α → β
hg : LeftOrdContinuous g
hf : LeftOrdContinuous f
s : Set α
x : α
h : IsLUB s x
⊢ IsLUB (g ∘ f '' s) ((g ∘ f) x)

Next tactic:
simpa only [image_image] using hg (hf h)
protected theorem iterate {f : α → α} (hf : LeftOrdContinuous f) (n : ℕ) :
    LeftOrdContinuous f^[n] := by
  

Proof state:
α : Type u
β : Type v
γ : Type w
ι : Sort x
inst✝² : Preorder α
inst✝¹ : Preorder β
inst✝ : Preorder γ
g : β → γ
f✝ : α → β
f : α → α
hf : LeftOrdContinuous f
n : ℕ
⊢ LeftOrdContinuous f^[n]

Next tactic:
induction n with
  | zero => exact LeftOrdContinuous.id α
  | succ n ihn => exact ihn.comp hf
protected theorem iterate {f : α → α} (hf : LeftOrdContinuous f) (n : ℕ) :
    LeftOrdContinuous f^[n] := by
  induction n with
  

Proof state:
case zero
α : Type u
β : Type v
γ : Type w
ι : Sort x
inst✝² : Preorder α
inst✝¹ : Preorder β
inst✝ : Preorder γ
g : β → γ
f✝ : α → β
f : α → α
hf : LeftOrdContinuous f
⊢ LeftOrdContinuous f^[Nat.zero]

Next tactic:
| zero => exact LeftOrdContinuous.id α
protected theorem iterate {f : α → α} (hf : LeftOrdContinuous f) (n : ℕ) :
    LeftOrdContinuous f^[n] := by
  induction n with
  | zero => 

Proof state:
case zero
α : Type u
β : Type v
γ : Type w
ι : Sort x
inst✝² : Preorder α
inst✝¹ : Preorder β
inst✝ : Preorder γ
g : β → γ
f✝ : α → β
f : α → α
hf : LeftOrdContinuous f
⊢ LeftOrdContinuous f^[Nat.zero]

Next tactic:
exact LeftOrdContinuous.id α
protected theorem iterate {f : α → α} (hf : LeftOrdContinuous f) (n : ℕ) :
    LeftOrdContinuous f^[n] := by
  induction n with
  | zero => exact LeftOrdContinuous.id α
  

Proof state:
case succ
α : Type u
β : Type v
γ : Type w
ι : Sort x
inst✝² : Preorder α
inst✝¹ : Preorder β
inst✝ : Preorder γ
g : β → γ
f✝ : α → β
f : α → α
hf : LeftOrdContinuous f
n : ℕ
ihn : LeftOrdContinuous f^[n]
⊢ LeftOrdContinuous f^[Nat.succ n]

Next tactic:
| succ n ihn => exact ihn.comp hf
protected theorem iterate {f : α → α} (hf : LeftOrdContinuous f) (n : ℕ) :
    LeftOrdContinuous f^[n] := by
  induction n with
  | zero => exact LeftOrdContinuous.id α
  | succ n ihn => 

Proof state:
case succ
α : Type u
β : Type v
γ : Type w
ι : Sort x
inst✝² : Preorder α
inst✝¹ : Preorder β
inst✝ : Preorder γ
g : β → γ
f✝ : α → β
f : α → α
hf : LeftOrdContinuous f
n : ℕ
ihn : LeftOrdContinuous f^[n]
⊢ LeftOrdContinuous f^[Nat.succ n]

Next tactic:
exact ihn.comp hf
theorem map_sup (hf : LeftOrdContinuous f) (x y : α) : f (x ⊔ y) = f x ⊔ f y :=
  (hf isLUB_pair).unique <| by 

Proof state:
α : Type u
β : Type v
γ : Type w
ι : Sort x
inst✝¹ : SemilatticeSup α
inst✝ : SemilatticeSup β
f : α → β
hf : LeftOrdContinuous f
x y : α
⊢ IsLUB (f '' {x, y}) (f x ⊔ f y)

Next tactic:
simp only [image_pair, isLUB_pair]
theorem le_iff (hf : LeftOrdContinuous f) (h : Injective f) {x y} : f x ≤ f y ↔ x ≤ y := by
  

Proof state:
α : Type u
β : Type v
γ : Type w
ι : Sort x
inst✝¹ : SemilatticeSup α
inst✝ : SemilatticeSup β
f : α → β
hf : LeftOrdContinuous f
h : Injective f
x y : α
⊢ f x ≤ f y ↔ x ≤ y

Next tactic:
simp only [← sup_eq_right, ← hf.map_sup, h.eq_iff]
theorem lt_iff (hf : LeftOrdContinuous f) (h : Injective f) {x y} : f x < f y ↔ x < y := by
  

Proof state:
α : Type u
β : Type v
γ : Type w
ι : Sort x
inst✝¹ : SemilatticeSup α
inst✝ : SemilatticeSup β
f : α → β
hf : LeftOrdContinuous f
h : Injective f
x y : α
⊢ f x < f y ↔ x < y

Next tactic:
simp only [lt_iff_le_not_le, hf.le_iff h]
theorem map_sSup (hf : LeftOrdContinuous f) (s : Set α) : f (sSup s) = ⨆ x ∈ s, f x := by
  

Proof state:
α : Type u
β : Type v
γ : Type w
ι : Sort x
inst✝¹ : CompleteLattice α
inst✝ : CompleteLattice β
f : α → β
hf : LeftOrdContinuous f
s : Set α
⊢ f (sSup s) = ⨆ x ∈ s, f x

Next tactic:
rw [hf.map_sSup', sSup_image]
theorem map_iSup (hf : LeftOrdContinuous f) (g : ι → α) : f (⨆ i, g i) = ⨆ i, f (g i) := by
  

Proof state:
α : Type u
β : Type v
γ : Type w
ι : Sort x
inst✝¹ : CompleteLattice α
inst✝ : CompleteLattice β
f : α → β
hf : LeftOrdContinuous f
g : ι → α
⊢ f (⨆ i, g i) = ⨆ i, f (g i)

Next tactic:
simp only [iSup, hf.map_sSup', ← range_comp]
theorem map_iSup (hf : LeftOrdContinuous f) (g : ι → α) : f (⨆ i, g i) = ⨆ i, f (g i) := by
  simp only [iSup, hf.map_sSup', ← range_comp]
  

Proof state:
α : Type u
β : Type v
γ : Type w
ι : Sort x
inst✝¹ : CompleteLattice α
inst✝ : CompleteLattice β
f : α → β
hf : LeftOrdContinuous f
g : ι → α
⊢ sSup (range (f ∘ fun i => g i)) = sSup (range fun i => f (g i))

Next tactic:
rfl
theorem map_ciSup (hf : LeftOrdContinuous f) {g : ι → α} (hg : BddAbove (range g)) :
    f (⨆ i, g i) = ⨆ i, f (g i) := by
  

Proof state:
α : Type u
β : Type v
γ : Type w
ι : Sort x
inst✝² : ConditionallyCompleteLattice α
inst✝¹ : ConditionallyCompleteLattice β
inst✝ : Nonempty ι
f : α → β
hf : LeftOrdContinuous f
g : ι → α
hg : BddAbove (range g)
⊢ f (⨆ i, g i) = ⨆ i, f (g i)

Next tactic:
simp only [iSup, hf.map_csSup (range_nonempty _) hg, ← range_comp]
theorem map_ciSup (hf : LeftOrdContinuous f) {g : ι → α} (hg : BddAbove (range g)) :
    f (⨆ i, g i) = ⨆ i, f (g i) := by
  simp only [iSup, hf.map_csSup (range_nonempty _) hg, ← range_comp]
  

Proof state:
α : Type u
β : Type v
γ : Type w
ι : Sort x
inst✝² : ConditionallyCompleteLattice α
inst✝¹ : ConditionallyCompleteLattice β
inst✝ : Nonempty ι
f : α → β
hf : LeftOrdContinuous f
g : ι → α
hg : BddAbove (range g)
⊢ sSup (range (f ∘ g)) = sSup (range fun i => f (g i))

Next tactic:
rfl
protected theorem id : RightOrdContinuous (id : α → α) := fun s x h => by
  

Proof state:
α : Type u
β : Type v
γ : Type w
ι : Sort x
inst✝² : Preorder α
inst✝¹ : Preorder β
inst✝ : Preorder γ
g : β → γ
f : α → β
s : Set α
x : α
h : IsGLB s x
⊢ IsGLB (id '' s) (id x)

Next tactic:
simpa only [image_id] using h
theorem toMultilinearMap_injective :
    Function.Injective
      (ContinuousMultilinearMap.toMultilinearMap :
        ContinuousMultilinearMap R M₁ M₂ → MultilinearMap R M₁ M₂)
  | ⟨f, hf⟩, ⟨g, hg⟩, h => by 

Proof state:
R : Type u
ι : Type v
n : ℕ
M : Fin (Nat.succ n) → Type w
M₁ : ι → Type w₁
M₁' : ι → Type w₁'
M₂ : Type w₂
M₃ : Type w₃
M₄ : Type w₄
inst✝¹⁸ : Semiring R
inst✝¹⁷ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)
inst✝¹⁶ : (i : ι) → AddCommMonoid (M₁ i)
inst✝¹⁵ : (i : ι) → AddCommMonoid (M₁' i)
inst✝¹⁴ : AddCommMonoid M₂
inst✝¹³ : AddCommMonoid M₃
inst✝¹² : AddCommMonoid M₄
inst✝¹¹ : (i : Fin (Nat.succ n)) → Module R (M i)
inst✝¹⁰ : (i : ι) → Module R (M₁ i)
inst✝⁹ : (i : ι) → Module R (M₁' i)
inst✝⁸ : Module R M₂
inst✝⁷ : Module R M₃
inst✝⁶ : Module R M₄
inst✝⁵ : (i : Fin (Nat.succ n)) → TopologicalSpace (M i)
inst✝⁴ : (i : ι) → TopologicalSpace (M₁ i)
inst✝³ : (i : ι) → TopologicalSpace (M₁' i)
inst✝² : TopologicalSpace M₂
inst✝¹ : TopologicalSpace M₃
inst✝ : TopologicalSpace M₄
f✝ f' : ContinuousMultilinearMap R M₁ M₂
f : MultilinearMap R M₁ M₂
hf : Continuous f.toFun
g : MultilinearMap R M₁ M₂
hg : Continuous g.toFun
h : { toMultilinearMap := f, cont := hf }.toMultilinearMap = { toMultilinearMap := g, cont := hg }.toMultilinearMap
⊢ { toMultilinearMap := f, cont := hf } = { toMultilinearMap := g, cont := hg }

Next tactic:
subst h
theorem toMultilinearMap_injective :
    Function.Injective
      (ContinuousMultilinearMap.toMultilinearMap :
        ContinuousMultilinearMap R M₁ M₂ → MultilinearMap R M₁ M₂)
  | ⟨f, hf⟩, ⟨g, hg⟩, h => by subst h; 

Proof state:
R : Type u
ι : Type v
n : ℕ
M : Fin (Nat.succ n) → Type w
M₁ : ι → Type w₁
M₁' : ι → Type w₁'
M₂ : Type w₂
M₃ : Type w₃
M₄ : Type w₄
inst✝¹⁸ : Semiring R
inst✝¹⁷ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)
inst✝¹⁶ : (i : ι) → AddCommMonoid (M₁ i)
inst✝¹⁵ : (i : ι) → AddCommMonoid (M₁' i)
inst✝¹⁴ : AddCommMonoid M₂
inst✝¹³ : AddCommMonoid M₃
inst✝¹² : AddCommMonoid M₄
inst✝¹¹ : (i : Fin (Nat.succ n)) → Module R (M i)
inst✝¹⁰ : (i : ι) → Module R (M₁ i)
inst✝⁹ : (i : ι) → Module R (M₁' i)
inst✝⁸ : Module R M₂
inst✝⁷ : Module R M₃
inst✝⁶ : Module R M₄
inst✝⁵ : (i : Fin (Nat.succ n)) → TopologicalSpace (M i)
inst✝⁴ : (i : ι) → TopologicalSpace (M₁ i)
inst✝³ : (i : ι) → TopologicalSpace (M₁' i)
inst✝² : TopologicalSpace M₂
inst✝¹ : TopologicalSpace M₃
inst✝ : TopologicalSpace M₄
f✝ f' : ContinuousMultilinearMap R M₁ M₂
f : MultilinearMap R M₁ M₂
hf : Continuous f.toFun
hg : Continuous { toMultilinearMap := f, cont := hf }.toMultilinearMap.toFun
⊢ { toMultilinearMap := f, cont := hf } =
    { toMultilinearMap := { toMultilinearMap := f, cont := hf }.toMultilinearMap, cont := hg }

Next tactic:
rfl
theorem ext_iff {f f' : ContinuousMultilinearMap R M₁ M₂} : f = f' ↔ ∀ x, f x = f' x := by
  

Proof state:
R : Type u
ι : Type v
n : ℕ
M : Fin (Nat.succ n) → Type w
M₁ : ι → Type w₁
M₁' : ι → Type w₁'
M₂ : Type w₂
M₃ : Type w₃
M₄ : Type w₄
inst✝¹⁸ : Semiring R
inst✝¹⁷ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)
inst✝¹⁶ : (i : ι) → AddCommMonoid (M₁ i)
inst✝¹⁵ : (i : ι) → AddCommMonoid (M₁' i)
inst✝¹⁴ : AddCommMonoid M₂
inst✝¹³ : AddCommMonoid M₃
inst✝¹² : AddCommMonoid M₄
inst✝¹¹ : (i : Fin (Nat.succ n)) → Module R (M i)
inst✝¹⁰ : (i : ι) → Module R (M₁ i)
inst✝⁹ : (i : ι) → Module R (M₁' i)
inst✝⁸ : Module R M₂
inst✝⁷ : Module R M₃
inst✝⁶ : Module R M₄
inst✝⁵ : (i : Fin (Nat.succ n)) → TopologicalSpace (M i)
inst✝⁴ : (i : ι) → TopologicalSpace (M₁ i)
inst✝³ : (i : ι) → TopologicalSpace (M₁' i)
inst✝² : TopologicalSpace M₂
inst✝¹ : TopologicalSpace M₃
inst✝ : TopologicalSpace M₄
f✝ f'✝ f f' : ContinuousMultilinearMap R M₁ M₂
⊢ f = f' ↔ ∀ (x : (i : ι) → M₁ i), f x = f' x

Next tactic:
rw [← toMultilinearMap_injective.eq_iff, MultilinearMap.ext_iff]
theorem ext_iff {f f' : ContinuousMultilinearMap R M₁ M₂} : f = f' ↔ ∀ x, f x = f' x := by
  rw [← toMultilinearMap_injective.eq_iff, MultilinearMap.ext_iff]; 

Proof state:
R : Type u
ι : Type v
n : ℕ
M : Fin (Nat.succ n) → Type w
M₁ : ι → Type w₁
M₁' : ι → Type w₁'
M₂ : Type w₂
M₃ : Type w₃
M₄ : Type w₄
inst✝¹⁸ : Semiring R
inst✝¹⁷ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)
inst✝¹⁶ : (i : ι) → AddCommMonoid (M₁ i)
inst✝¹⁵ : (i : ι) → AddCommMonoid (M₁' i)
inst✝¹⁴ : AddCommMonoid M₂
inst✝¹³ : AddCommMonoid M₃
inst✝¹² : AddCommMonoid M₄
inst✝¹¹ : (i : Fin (Nat.succ n)) → Module R (M i)
inst✝¹⁰ : (i : ι) → Module R (M₁ i)
inst✝⁹ : (i : ι) → Module R (M₁' i)
inst✝⁸ : Module R M₂
inst✝⁷ : Module R M₃
inst✝⁶ : Module R M₄
inst✝⁵ : (i : Fin (Nat.succ n)) → TopologicalSpace (M i)
inst✝⁴ : (i : ι) → TopologicalSpace (M₁ i)
inst✝³ : (i : ι) → TopologicalSpace (M₁' i)
inst✝² : TopologicalSpace M₂
inst✝¹ : TopologicalSpace M₃
inst✝ : TopologicalSpace M₄
f✝ f'✝ f f' : ContinuousMultilinearMap R M₁ M₂
⊢ (∀ (x : (i : ι) → M₁ i), f.toMultilinearMap x = f'.toMultilinearMap x) ↔ ∀ (x : (i : ι) → M₁ i), f x = f' x

Next tactic:
rfl
@[simp]
theorem _root_.ContinuousLinearMap.compContinuousMultilinearMap_coe (g : M₂ →L[R] M₃)
    (f : ContinuousMultilinearMap R M₁ M₂) :
    (g.compContinuousMultilinearMap f : (∀ i, M₁ i) → M₃) =
      (g : M₂ → M₃) ∘ (f : (∀ i, M₁ i) → M₂) := by
  

Proof state:
R : Type u
ι : Type v
n : ℕ
M : Fin (Nat.succ n) → Type w
M₁ : ι → Type w₁
M₁' : ι → Type w₁'
M₂ : Type w₂
M₃ : Type w₃
M₄ : Type w₄
inst✝¹⁸ : Semiring R
inst✝¹⁷ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)
inst✝¹⁶ : (i : ι) → AddCommMonoid (M₁ i)
inst✝¹⁵ : (i : ι) → AddCommMonoid (M₁' i)
inst✝¹⁴ : AddCommMonoid M₂
inst✝¹³ : AddCommMonoid M₃
inst✝¹² : AddCommMonoid M₄
inst✝¹¹ : (i : Fin (Nat.succ n)) → Module R (M i)
inst✝¹⁰ : (i : ι) → Module R (M₁ i)
inst✝⁹ : (i : ι) → Module R (M₁' i)
inst✝⁸ : Module R M₂
inst✝⁷ : Module R M₃
inst✝⁶ : Module R M₄
inst✝⁵ : (i : Fin (Nat.succ n)) → TopologicalSpace (M i)
inst✝⁴ : (i : ι) → TopologicalSpace (M₁ i)
inst✝³ : (i : ι) → TopologicalSpace (M₁' i)
inst✝² : TopologicalSpace M₂
inst✝¹ : TopologicalSpace M₃
inst✝ : TopologicalSpace M₄
f✝ f' : ContinuousMultilinearMap R M₁ M₂
g : M₂ →L[R] M₃
f : ContinuousMultilinearMap R M₁ M₂
⊢ ⇑(ContinuousLinearMap.compContinuousMultilinearMap g f) = ⇑g ∘ ⇑f

Next tactic:
ext m
@[simp]
theorem _root_.ContinuousLinearMap.compContinuousMultilinearMap_coe (g : M₂ →L[R] M₃)
    (f : ContinuousMultilinearMap R M₁ M₂) :
    (g.compContinuousMultilinearMap f : (∀ i, M₁ i) → M₃) =
      (g : M₂ → M₃) ∘ (f : (∀ i, M₁ i) → M₂) := by
  ext m
  

Proof state:
case h
R : Type u
ι : Type v
n : ℕ
M : Fin (Nat.succ n) → Type w
M₁ : ι → Type w₁
M₁' : ι → Type w₁'
M₂ : Type w₂
M₃ : Type w₃
M₄ : Type w₄
inst✝¹⁸ : Semiring R
inst✝¹⁷ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)
inst✝¹⁶ : (i : ι) → AddCommMonoid (M₁ i)
inst✝¹⁵ : (i : ι) → AddCommMonoid (M₁' i)
inst✝¹⁴ : AddCommMonoid M₂
inst✝¹³ : AddCommMonoid M₃
inst✝¹² : AddCommMonoid M₄
inst✝¹¹ : (i : Fin (Nat.succ n)) → Module R (M i)
inst✝¹⁰ : (i : ι) → Module R (M₁ i)
inst✝⁹ : (i : ι) → Module R (M₁' i)
inst✝⁸ : Module R M₂
inst✝⁷ : Module R M₃
inst✝⁶ : Module R M₄
inst✝⁵ : (i : Fin (Nat.succ n)) → TopologicalSpace (M i)
inst✝⁴ : (i : ι) → TopologicalSpace (M₁ i)
inst✝³ : (i : ι) → TopologicalSpace (M₁' i)
inst✝² : TopologicalSpace M₂
inst✝¹ : TopologicalSpace M₃
inst✝ : TopologicalSpace M₄
f✝ f' : ContinuousMultilinearMap R M₁ M₂
g : M₂ →L[R] M₃
f : ContinuousMultilinearMap R M₁ M₂
m : (i : ι) → M₁ i
⊢ (ContinuousLinearMap.compContinuousMultilinearMap g f) m = (⇑g ∘ ⇑f) m

Next tactic:
rfl
/-- `ContinuousMultilinearMap.pi` as an `Equiv`. -/
@[simps]
def piEquiv {ι' : Type*} {M' : ι' → Type*} [∀ i, AddCommMonoid (M' i)]
    [∀ i, TopologicalSpace (M' i)] [∀ i, Module R (M' i)] :
    (∀ i, ContinuousMultilinearMap R M₁ (M' i)) ≃ ContinuousMultilinearMap R M₁ (∀ i, M' i) where
  toFun := ContinuousMultilinearMap.pi
  invFun f i := (ContinuousLinearMap.proj i : _ →L[R] M' i).compContinuousMultilinearMap f
  left_inv f := by
    

Proof state:
R : Type u
ι : Type v
n : ℕ
M : Fin (Nat.succ n) → Type w
M₁ : ι → Type w₁
M₁' : ι → Type w₁'
M₂ : Type w₂
M₃ : Type w₃
M₄ : Type w₄
inst✝²¹ : Semiring R
inst✝²⁰ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)
inst✝¹⁹ : (i : ι) → AddCommMonoid (M₁ i)
inst✝¹⁸ : (i : ι) → AddCommMonoid (M₁' i)
inst✝¹⁷ : AddCommMonoid M₂
inst✝¹⁶ : AddCommMonoid M₃
inst✝¹⁵ : AddCommMonoid M₄
inst✝¹⁴ : (i : Fin (Nat.succ n)) → Module R (M i)
inst✝¹³ : (i : ι) → Module R (M₁ i)
inst✝¹² : (i : ι) → Module R (M₁' i)
inst✝¹¹ : Module R M₂
inst✝¹⁰ : Module R M₃
inst✝⁹ : Module R M₄
inst✝⁸ : (i : Fin (Nat.succ n)) → TopologicalSpace (M i)
inst✝⁷ : (i : ι) → TopologicalSpace (M₁ i)
inst✝⁶ : (i : ι) → TopologicalSpace (M₁' i)
inst✝⁵ : TopologicalSpace M₂
inst✝⁴ : TopologicalSpace M₃
inst✝³ : TopologicalSpace M₄
f✝ f' : ContinuousMultilinearMap R M₁ M₂
ι' : Type u_1
M' : ι' → Type u_2
inst✝² : (i : ι') → AddCommMonoid (M' i)
inst✝¹ : (i : ι') → TopologicalSpace (M' i)
inst✝ : (i : ι') → Module R (M' i)
f : (i : ι') → ContinuousMultilinearMap R M₁ (M' i)
⊢ (fun f i => ContinuousLinearMap.compContinuousMultilinearMap (ContinuousLinearMap.proj i) f) (pi f) = f

Next tactic:
ext