l3lab/ntp-mathlib huggingface dataset:
theorem IsPrimitive.dvd_of_fraction_map_dvd_fraction_map {p q : R[X]} (hp : p.IsPrimitive)
    (hq : q.IsPrimitive) (h_dvd : p.map (algebraMap R K) ∣ q.map (algebraMap R K)) : p ∣ q := by
  rcases h_dvd with ⟨r, hr⟩
  obtain ⟨⟨s, s0⟩, hs⟩ := integerNormalization_map_to_map R⁰ r
  rw [Subtype.coe_mk, Algebra.smul_def, algebraMap_apply] at hs
  have h : p ∣ q * C s := by
    use integerNormalization R⁰ r
    apply map_injective (algebraMap R K) (IsFractionRing.injective _ _)
    rw [Polynomial.map_mul, Polynomial.map_mul, hs, hr, mul_assoc, mul_comm r]
    simp
  rw [← hp.dvd_primPart_iff_dvd, primPart_mul, hq.primPart_eq, Associated.dvd_iff_dvd_right] at h
  · exact h
  · symm
    rcases isUnit_primPart_C s with ⟨u, hu⟩
    use u
    rw [hu]
  iterate 2
    apply mul_ne_zero hq.ne_zero
    

Proof state:
case intro.intro.mk
R : Type u_1
inst✝⁵ : CommRing R
K : Type u_2
inst✝⁴ : Field K
inst✝³ : Algebra R K
inst✝² : IsFractionRing R K
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
p q : R[X]
hp : IsPrimitive p
hq : IsPrimitive q
r : K[X]
hr : map (algebraMap R K) q = map (algebraMap R K) p * r
s : R
s0 : s ∈ R⁰
hs : map (algebraMap R K) (integerNormalization R⁰ r) = C ((algebraMap R K) s) * r
h : p ∣ q * C s
⊢ C s ≠ 0

Next tactic:
rw [Ne.def, C_eq_zero]
theorem IsPrimitive.dvd_of_fraction_map_dvd_fraction_map {p q : R[X]} (hp : p.IsPrimitive)
    (hq : q.IsPrimitive) (h_dvd : p.map (algebraMap R K) ∣ q.map (algebraMap R K)) : p ∣ q := by
  rcases h_dvd with ⟨r, hr⟩
  obtain ⟨⟨s, s0⟩, hs⟩ := integerNormalization_map_to_map R⁰ r
  rw [Subtype.coe_mk, Algebra.smul_def, algebraMap_apply] at hs
  have h : p ∣ q * C s := by
    use integerNormalization R⁰ r
    apply map_injective (algebraMap R K) (IsFractionRing.injective _ _)
    rw [Polynomial.map_mul, Polynomial.map_mul, hs, hr, mul_assoc, mul_comm r]
    simp
  rw [← hp.dvd_primPart_iff_dvd, primPart_mul, hq.primPart_eq, Associated.dvd_iff_dvd_right] at h
  · exact h
  · symm
    rcases isUnit_primPart_C s with ⟨u, hu⟩
    use u
    rw [hu]
  iterate 2
    apply mul_ne_zero hq.ne_zero
    rw [Ne.def, C_eq_zero]
    

Proof state:
case intro.intro.mk
R : Type u_1
inst✝⁵ : CommRing R
K : Type u_2
inst✝⁴ : Field K
inst✝³ : Algebra R K
inst✝² : IsFractionRing R K
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
p q : R[X]
hp : IsPrimitive p
hq : IsPrimitive q
r : K[X]
hr : map (algebraMap R K) q = map (algebraMap R K) p * r
s : R
s0 : s ∈ R⁰
hs : map (algebraMap R K) (integerNormalization R⁰ r) = C ((algebraMap R K) s) * r
h : p ∣ q * C s
⊢ ¬s = 0

Next tactic:
contrapose! s0
theorem IsPrimitive.dvd_of_fraction_map_dvd_fraction_map {p q : R[X]} (hp : p.IsPrimitive)
    (hq : q.IsPrimitive) (h_dvd : p.map (algebraMap R K) ∣ q.map (algebraMap R K)) : p ∣ q := by
  rcases h_dvd with ⟨r, hr⟩
  obtain ⟨⟨s, s0⟩, hs⟩ := integerNormalization_map_to_map R⁰ r
  rw [Subtype.coe_mk, Algebra.smul_def, algebraMap_apply] at hs
  have h : p ∣ q * C s := by
    use integerNormalization R⁰ r
    apply map_injective (algebraMap R K) (IsFractionRing.injective _ _)
    rw [Polynomial.map_mul, Polynomial.map_mul, hs, hr, mul_assoc, mul_comm r]
    simp
  rw [← hp.dvd_primPart_iff_dvd, primPart_mul, hq.primPart_eq, Associated.dvd_iff_dvd_right] at h
  · exact h
  · symm
    rcases isUnit_primPart_C s with ⟨u, hu⟩
    use u
    rw [hu]
  iterate 2
    apply mul_ne_zero hq.ne_zero
    rw [Ne.def, C_eq_zero]
    contrapose! s0
    

Proof state:
case intro.intro.mk
R : Type u_1
inst✝⁵ : CommRing R
K : Type u_2
inst✝⁴ : Field K
inst✝³ : Algebra R K
inst✝² : IsFractionRing R K
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
p q : R[X]
hp : IsPrimitive p
hq : IsPrimitive q
r : K[X]
hr : map (algebraMap R K) q = map (algebraMap R K) p * r
s : R
hs : map (algebraMap R K) (integerNormalization R⁰ r) = C ((algebraMap R K) s) * r
h : p ∣ q * C s
s0 : s = 0
⊢ s ∉ R⁰

Next tactic:
simp [s0, mem_nonZeroDivisors_iff_ne_zero]
/-- If `G : D ⥤ C` is a right adjoint it satisfies the solution set condition.  -/
theorem solutionSetCondition_of_isRightAdjoint [IsRightAdjoint G] : SolutionSetCondition G := by
  

Proof state:
J : Type v
C : Type u
inst✝² : Category.{v, u} C
D : Type u
inst✝¹ : Category.{v, u} D
G : D ⥤ C
inst✝ : IsRightAdjoint G
⊢ SolutionSetCondition G

Next tactic:
intro A
/-- If `G : D ⥤ C` is a right adjoint it satisfies the solution set condition.  -/
theorem solutionSetCondition_of_isRightAdjoint [IsRightAdjoint G] : SolutionSetCondition G := by
  intro A
  

Proof state:
J : Type v
C : Type u
inst✝² : Category.{v, u} C
D : Type u
inst✝¹ : Category.{v, u} D
G : D ⥤ C
inst✝ : IsRightAdjoint G
A : C
⊢ ∃ ι B f, ∀ (X : D) (h : A ⟶ G.obj X), ∃ i g, f i ≫ G.map g = h

Next tactic:
refine'
    ⟨PUnit, fun _ => (leftAdjoint G).obj A, fun _ => (Adjunction.ofRightAdjoint G).unit.app A, _⟩
/-- If `G : D ⥤ C` is a right adjoint it satisfies the solution set condition.  -/
theorem solutionSetCondition_of_isRightAdjoint [IsRightAdjoint G] : SolutionSetCondition G := by
  intro A
  refine'
    ⟨PUnit, fun _ => (leftAdjoint G).obj A, fun _ => (Adjunction.ofRightAdjoint G).unit.app A, _⟩
  

Proof state:
J : Type v
C : Type u
inst✝² : Category.{v, u} C
D : Type u
inst✝¹ : Category.{v, u} D
G : D ⥤ C
inst✝ : IsRightAdjoint G
A : C
⊢ ∀ (X : D) (h : A ⟶ G.obj X), ∃ i g, (fun x => (Adjunction.ofRightAdjoint G).unit.app A) i ≫ G.map g = h

Next tactic:
intro B h
/-- If `G : D ⥤ C` is a right adjoint it satisfies the solution set condition.  -/
theorem solutionSetCondition_of_isRightAdjoint [IsRightAdjoint G] : SolutionSetCondition G := by
  intro A
  refine'
    ⟨PUnit, fun _ => (leftAdjoint G).obj A, fun _ => (Adjunction.ofRightAdjoint G).unit.app A, _⟩
  intro B h
  

Proof state:
J : Type v
C : Type u
inst✝² : Category.{v, u} C
D : Type u
inst✝¹ : Category.{v, u} D
G : D ⥤ C
inst✝ : IsRightAdjoint G
A : C
B : D
h : A ⟶ G.obj B
⊢ ∃ i g, (fun x => (Adjunction.ofRightAdjoint G).unit.app A) i ≫ G.map g = h

Next tactic:
refine' ⟨PUnit.unit, ((Adjunction.ofRightAdjoint G).homEquiv _ _).symm h, _⟩
/-- If `G : D ⥤ C` is a right adjoint it satisfies the solution set condition.  -/
theorem solutionSetCondition_of_isRightAdjoint [IsRightAdjoint G] : SolutionSetCondition G := by
  intro A
  refine'
    ⟨PUnit, fun _ => (leftAdjoint G).obj A, fun _ => (Adjunction.ofRightAdjoint G).unit.app A, _⟩
  intro B h
  refine' ⟨PUnit.unit, ((Adjunction.ofRightAdjoint G).homEquiv _ _).symm h, _⟩
  

Proof state:
J : Type v
C : Type u
inst✝² : Category.{v, u} C
D : Type u
inst✝¹ : Category.{v, u} D
G : D ⥤ C
inst✝ : IsRightAdjoint G
A : C
B : D
h : A ⟶ G.obj B
⊢ (fun x => (Adjunction.ofRightAdjoint G).unit.app A) PUnit.unit ≫
      G.map ((Adjunction.homEquiv (Adjunction.ofRightAdjoint G) A B).symm h) =
    h

Next tactic:
rw [← Adjunction.homEquiv_unit, Equiv.apply_symm_apply]
/-- The general adjoint functor theorem says that if `G : D ⥤ C` preserves limits and `D` has them,
if `G` satisfies the solution set condition then `G` is a right adjoint.
-/
noncomputable def isRightAdjointOfPreservesLimitsOfSolutionSetCondition [HasLimits D]
    [PreservesLimits G] (hG : SolutionSetCondition G) : IsRightAdjoint G := by
  

Proof state:
J : Type v
C : Type u
inst✝³ : Category.{v, u} C
D : Type u
inst✝² : Category.{v, u} D
G : D ⥤ C
inst✝¹ : HasLimits D
inst✝ : PreservesLimits G
hG : SolutionSetCondition G
⊢ IsRightAdjoint G

Next tactic:
refine' @isRightAdjointOfStructuredArrowInitials _ _ _ _ G ?_
/-- The general adjoint functor theorem says that if `G : D ⥤ C` preserves limits and `D` has them,
if `G` satisfies the solution set condition then `G` is a right adjoint.
-/
noncomputable def isRightAdjointOfPreservesLimitsOfSolutionSetCondition [HasLimits D]
    [PreservesLimits G] (hG : SolutionSetCondition G) : IsRightAdjoint G := by
  refine' @isRightAdjointOfStructuredArrowInitials _ _ _ _ G ?_
  

Proof state:
J : Type v
C : Type u
inst✝³ : Category.{v, u} C
D : Type u
inst✝² : Category.{v, u} D
G : D ⥤ C
inst✝¹ : HasLimits D
inst✝ : PreservesLimits G
hG : SolutionSetCondition G
⊢ ∀ (A : C), HasInitial (StructuredArrow A G)

Next tactic:
intro A
/-- The general adjoint functor theorem says that if `G : D ⥤ C` preserves limits and `D` has them,
if `G` satisfies the solution set condition then `G` is a right adjoint.
-/
noncomputable def isRightAdjointOfPreservesLimitsOfSolutionSetCondition [HasLimits D]
    [PreservesLimits G] (hG : SolutionSetCondition G) : IsRightAdjoint G := by
  refine' @isRightAdjointOfStructuredArrowInitials _ _ _ _ G ?_
  intro A
  

Proof state:
J : Type v
C : Type u
inst✝³ : Category.{v, u} C
D : Type u
inst✝² : Category.{v, u} D
G : D ⥤ C
inst✝¹ : HasLimits D
inst✝ : PreservesLimits G
hG : SolutionSetCondition G
A : C
⊢ HasInitial (StructuredArrow A G)

Next tactic:
specialize hG A
/-- The general adjoint functor theorem says that if `G : D ⥤ C` preserves limits and `D` has them,
if `G` satisfies the solution set condition then `G` is a right adjoint.
-/
noncomputable def isRightAdjointOfPreservesLimitsOfSolutionSetCondition [HasLimits D]
    [PreservesLimits G] (hG : SolutionSetCondition G) : IsRightAdjoint G := by
  refine' @isRightAdjointOfStructuredArrowInitials _ _ _ _ G ?_
  intro A
  specialize hG A
  

Proof state:
J : Type v
C : Type u
inst✝³ : Category.{v, u} C
D : Type u
inst✝² : Category.{v, u} D
G : D ⥤ C
inst✝¹ : HasLimits D
inst✝ : PreservesLimits G
A : C
hG : ∃ ι B f, ∀ (X : D) (h : A ⟶ G.obj X), ∃ i g, f i ≫ G.map g = h
⊢ HasInitial (StructuredArrow A G)

Next tactic:
choose ι B f g using hG
/-- The general adjoint functor theorem says that if `G : D ⥤ C` preserves limits and `D` has them,
if `G` satisfies the solution set condition then `G` is a right adjoint.
-/
noncomputable def isRightAdjointOfPreservesLimitsOfSolutionSetCondition [HasLimits D]
    [PreservesLimits G] (hG : SolutionSetCondition G) : IsRightAdjoint G := by
  refine' @isRightAdjointOfStructuredArrowInitials _ _ _ _ G ?_
  intro A
  specialize hG A
  choose ι B f g using hG
  

Proof state:
J : Type v
C : Type u
inst✝³ : Category.{v, u} C
D : Type u
inst✝² : Category.{v, u} D
G : D ⥤ C
inst✝¹ : HasLimits D
inst✝ : PreservesLimits G
A : C
ι : Type v
B : ι → D
f : (i : ι) → A ⟶ G.obj (B i)
g : ∀ (X : D) (h : A ⟶ G.obj X), ∃ i g, f i ≫ G.map g = h
⊢ HasInitial (StructuredArrow A G)

Next tactic:
let B' : ι → StructuredArrow A G := fun i => StructuredArrow.mk (f i)
/-- The general adjoint functor theorem says that if `G : D ⥤ C` preserves limits and `D` has them,
if `G` satisfies the solution set condition then `G` is a right adjoint.
-/
noncomputable def isRightAdjointOfPreservesLimitsOfSolutionSetCondition [HasLimits D]
    [PreservesLimits G] (hG : SolutionSetCondition G) : IsRightAdjoint G := by
  refine' @isRightAdjointOfStructuredArrowInitials _ _ _ _ G ?_
  intro A
  specialize hG A
  choose ι B f g using hG
  let B' : ι → StructuredArrow A G := fun i => StructuredArrow.mk (f i)
  

Proof state:
J : Type v
C : Type u
inst✝³ : Category.{v, u} C
D : Type u
inst✝² : Category.{v, u} D
G : D ⥤ C
inst✝¹ : HasLimits D
inst✝ : PreservesLimits G
A : C
ι : Type v
B : ι → D
f : (i : ι) → A ⟶ G.obj (B i)
g : ∀ (X : D) (h : A ⟶ G.obj X), ∃ i g, f i ≫ G.map g = h
B' : ι → StructuredArrow A G := fun i => StructuredArrow.mk (f i)
⊢ HasInitial (StructuredArrow A G)

Next tactic:
have hB' : ∀ A' : StructuredArrow A G, ∃ i, Nonempty (B' i ⟶ A') := by
    intro A'
    obtain ⟨i, _, t⟩ := g _ A'.hom
    exact ⟨i, ⟨StructuredArrow.homMk _ t⟩⟩
/-- The general adjoint functor theorem says that if `G : D ⥤ C` preserves limits and `D` has them,
if `G` satisfies the solution set condition then `G` is a right adjoint.
-/
noncomputable def isRightAdjointOfPreservesLimitsOfSolutionSetCondition [HasLimits D]
    [PreservesLimits G] (hG : SolutionSetCondition G) : IsRightAdjoint G := by
  refine' @isRightAdjointOfStructuredArrowInitials _ _ _ _ G ?_
  intro A
  specialize hG A
  choose ι B f g using hG
  let B' : ι → StructuredArrow A G := fun i => StructuredArrow.mk (f i)
  have hB' : ∀ A' : StructuredArrow A G, ∃ i, Nonempty (B' i ⟶ A') := by
    

Proof state:
J : Type v
C : Type u
inst✝³ : Category.{v, u} C
D : Type u
inst✝² : Category.{v, u} D
G : D ⥤ C
inst✝¹ : HasLimits D
inst✝ : PreservesLimits G
A : C
ι : Type v
B : ι → D
f : (i : ι) → A ⟶ G.obj (B i)
g : ∀ (X : D) (h : A ⟶ G.obj X), ∃ i g, f i ≫ G.map g = h
B' : ι → StructuredArrow A G := fun i => StructuredArrow.mk (f i)
⊢ ∀ (A' : StructuredArrow A G), ∃ i, Nonempty (B' i ⟶ A')

Next tactic:
intro A'
/-- The general adjoint functor theorem says that if `G : D ⥤ C` preserves limits and `D` has them,
if `G` satisfies the solution set condition then `G` is a right adjoint.
-/
noncomputable def isRightAdjointOfPreservesLimitsOfSolutionSetCondition [HasLimits D]
    [PreservesLimits G] (hG : SolutionSetCondition G) : IsRightAdjoint G := by
  refine' @isRightAdjointOfStructuredArrowInitials _ _ _ _ G ?_
  intro A
  specialize hG A
  choose ι B f g using hG
  let B' : ι → StructuredArrow A G := fun i => StructuredArrow.mk (f i)
  have hB' : ∀ A' : StructuredArrow A G, ∃ i, Nonempty (B' i ⟶ A') := by
    intro A'
    

Proof state:
J : Type v
C : Type u
inst✝³ : Category.{v, u} C
D : Type u
inst✝² : Category.{v, u} D
G : D ⥤ C
inst✝¹ : HasLimits D
inst✝ : PreservesLimits G
A : C
ι : Type v
B : ι → D
f : (i : ι) → A ⟶ G.obj (B i)
g : ∀ (X : D) (h : A ⟶ G.obj X), ∃ i g, f i ≫ G.map g = h
B' : ι → StructuredArrow A G := fun i => StructuredArrow.mk (f i)
A' : StructuredArrow A G
⊢ ∃ i, Nonempty (B' i ⟶ A')

Next tactic:
obtain ⟨i, _, t⟩ := g _ A'.hom
/-- The general adjoint functor theorem says that if `G : D ⥤ C` preserves limits and `D` has them,
if `G` satisfies the solution set condition then `G` is a right adjoint.
-/
noncomputable def isRightAdjointOfPreservesLimitsOfSolutionSetCondition [HasLimits D]
    [PreservesLimits G] (hG : SolutionSetCondition G) : IsRightAdjoint G := by
  refine' @isRightAdjointOfStructuredArrowInitials _ _ _ _ G ?_
  intro A
  specialize hG A
  choose ι B f g using hG
  let B' : ι → StructuredArrow A G := fun i => StructuredArrow.mk (f i)
  have hB' : ∀ A' : StructuredArrow A G, ∃ i, Nonempty (B' i ⟶ A') := by
    intro A'
    obtain ⟨i, _, t⟩ := g _ A'.hom
    

Proof state:
case intro.intro
J : Type v
C : Type u
inst✝³ : Category.{v, u} C
D : Type u
inst✝² : Category.{v, u} D
G : D ⥤ C
inst✝¹ : HasLimits D
inst✝ : PreservesLimits G
A : C
ι : Type v
B : ι → D
f : (i : ι) → A ⟶ G.obj (B i)
g : ∀ (X : D) (h : A ⟶ G.obj X), ∃ i g, f i ≫ G.map g = h
B' : ι → StructuredArrow A G := fun i => StructuredArrow.mk (f i)
A' : StructuredArrow A G
i : ι
w✝ : B i ⟶ A'.right
t : f i ≫ G.map w✝ = A'.hom
⊢ ∃ i, Nonempty (B' i ⟶ A')

Next tactic:
exact ⟨i, ⟨StructuredArrow.homMk _ t⟩⟩
/-- The general adjoint functor theorem says that if `G : D ⥤ C` preserves limits and `D` has them,
if `G` satisfies the solution set condition then `G` is a right adjoint.
-/
noncomputable def isRightAdjointOfPreservesLimitsOfSolutionSetCondition [HasLimits D]
    [PreservesLimits G] (hG : SolutionSetCondition G) : IsRightAdjoint G := by
  refine' @isRightAdjointOfStructuredArrowInitials _ _ _ _ G ?_
  intro A
  specialize hG A
  choose ι B f g using hG
  let B' : ι → StructuredArrow A G := fun i => StructuredArrow.mk (f i)
  have hB' : ∀ A' : StructuredArrow A G, ∃ i, Nonempty (B' i ⟶ A') := by
    intro A'
    obtain ⟨i, _, t⟩ := g _ A'.hom
    exact ⟨i, ⟨StructuredArrow.homMk _ t⟩⟩
  

Proof state:
J : Type v
C : Type u
inst✝³ : Category.{v, u} C
D : Type u
inst✝² : Category.{v, u} D
G : D ⥤ C
inst✝¹ : HasLimits D
inst✝ : PreservesLimits G
A : C
ι : Type v
B : ι → D
f : (i : ι) → A ⟶ G.obj (B i)
g : ∀ (X : D) (h : A ⟶ G.obj X), ∃ i g, f i ≫ G.map g = h
B' : ι → StructuredArrow A G := fun i => StructuredArrow.mk (f i)
hB' : ∀ (A' : StructuredArrow A G), ∃ i, Nonempty (B' i ⟶ A')
⊢ HasInitial (StructuredArrow A G)

Next tactic:
obtain ⟨T, hT⟩ := has_weakly_initial_of_weakly_initial_set_and_hasProducts hB'
/-- The general adjoint functor theorem says that if `G : D ⥤ C` preserves limits and `D` has them,
if `G` satisfies the solution set condition then `G` is a right adjoint.
-/
noncomputable def isRightAdjointOfPreservesLimitsOfSolutionSetCondition [HasLimits D]
    [PreservesLimits G] (hG : SolutionSetCondition G) : IsRightAdjoint G := by
  refine' @isRightAdjointOfStructuredArrowInitials _ _ _ _ G ?_
  intro A
  specialize hG A
  choose ι B f g using hG
  let B' : ι → StructuredArrow A G := fun i => StructuredArrow.mk (f i)
  have hB' : ∀ A' : StructuredArrow A G, ∃ i, Nonempty (B' i ⟶ A') := by
    intro A'
    obtain ⟨i, _, t⟩ := g _ A'.hom
    exact ⟨i, ⟨StructuredArrow.homMk _ t⟩⟩
  obtain ⟨T, hT⟩ := has_weakly_initial_of_weakly_initial_set_and_hasProducts hB'
  

Proof state:
case intro
J : Type v
C : Type u
inst✝³ : Category.{v, u} C
D : Type u
inst✝² : Category.{v, u} D
G : D ⥤ C
inst✝¹ : HasLimits D
inst✝ : PreservesLimits G
A : C
ι : Type v
B : ι → D
f : (i : ι) → A ⟶ G.obj (B i)
g : ∀ (X : D) (h : A ⟶ G.obj X), ∃ i g, f i ≫ G.map g = h
B' : ι → StructuredArrow A G := fun i => StructuredArrow.mk (f i)
hB' : ∀ (A' : StructuredArrow A G), ∃ i, Nonempty (B' i ⟶ A')
T : StructuredArrow A G
hT : ∀ (X : StructuredArrow A G), Nonempty (T ⟶ X)
⊢ HasInitial (StructuredArrow A G)

Next tactic:
apply hasInitial_of_weakly_initial_and_hasWideEqualizers hT
theorem applyComposition_ones (p : FormalMultilinearSeries 𝕜 E F) (n : ℕ) :
    p.applyComposition (Composition.ones n) = fun v i =>
      p 1 fun _ => v (Fin.castLE (Composition.length_le _) i) := by
  

Proof state:
𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
H : Type u_5
inst✝¹⁵ : CommRing 𝕜
inst✝¹⁴ : AddCommGroup E
inst✝¹³ : AddCommGroup F
inst✝¹² : AddCommGroup G
inst✝¹¹ : Module 𝕜 E
inst✝¹⁰ : Module 𝕜 F
inst✝⁹ : Module 𝕜 G
inst✝⁸ : TopologicalSpace E
inst✝⁷ : TopologicalSpace F
inst✝⁶ : TopologicalSpace G
inst✝⁵ : TopologicalAddGroup E
inst✝⁴ : ContinuousConstSMul 𝕜 E
inst✝³ : TopologicalAddGroup F
inst✝² : ContinuousConstSMul 𝕜 F
inst✝¹ : TopologicalAddGroup G
inst✝ : ContinuousConstSMul 𝕜 G
p : FormalMultilinearSeries 𝕜 E F
n : ℕ
⊢ applyComposition p (Composition.ones n) = fun v i =>
    (p 1) fun x => v (Fin.castLE (_ : Composition.length (Composition.ones n) ≤ n) i)

Next tactic:
funext v i
theorem applyComposition_ones (p : FormalMultilinearSeries 𝕜 E F) (n : ℕ) :
    p.applyComposition (Composition.ones n) = fun v i =>
      p 1 fun _ => v (Fin.castLE (Composition.length_le _) i) := by
  funext v i
  

Proof state:
case h.h
𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
H : Type u_5
inst✝¹⁵ : CommRing 𝕜
inst✝¹⁴ : AddCommGroup E
inst✝¹³ : AddCommGroup F
inst✝¹² : AddCommGroup G
inst✝¹¹ : Module 𝕜 E
inst✝¹⁰ : Module 𝕜 F
inst✝⁹ : Module 𝕜 G
inst✝⁸ : TopologicalSpace E
inst✝⁷ : TopologicalSpace F
inst✝⁶ : TopologicalSpace G
inst✝⁵ : TopologicalAddGroup E
inst✝⁴ : ContinuousConstSMul 𝕜 E
inst✝³ : TopologicalAddGroup F
inst✝² : ContinuousConstSMul 𝕜 F
inst✝¹ : TopologicalAddGroup G
inst✝ : ContinuousConstSMul 𝕜 G
p : FormalMultilinearSeries 𝕜 E F
n : ℕ
v : Fin n → E
i : Fin (Composition.length (Composition.ones n))
⊢ applyComposition p (Composition.ones n) v i =
    (p 1) fun x => v (Fin.castLE (_ : Composition.length (Composition.ones n) ≤ n) i)

Next tactic:
apply p.congr (Composition.ones_blocksFun _ _)
theorem applyComposition_ones (p : FormalMultilinearSeries 𝕜 E F) (n : ℕ) :
    p.applyComposition (Composition.ones n) = fun v i =>
      p 1 fun _ => v (Fin.castLE (Composition.length_le _) i) := by
  funext v i
  apply p.congr (Composition.ones_blocksFun _ _)
  

Proof state:
case h.h
𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
H : Type u_5
inst✝¹⁵ : CommRing 𝕜
inst✝¹⁴ : AddCommGroup E
inst✝¹³ : AddCommGroup F
inst✝¹² : AddCommGroup G
inst✝¹¹ : Module 𝕜 E
inst✝¹⁰ : Module 𝕜 F
inst✝⁹ : Module 𝕜 G
inst✝⁸ : TopologicalSpace E
inst✝⁷ : TopologicalSpace F
inst✝⁶ : TopologicalSpace G
inst✝⁵ : TopologicalAddGroup E
inst✝⁴ : ContinuousConstSMul 𝕜 E
inst✝³ : TopologicalAddGroup F
inst✝² : ContinuousConstSMul 𝕜 F
inst✝¹ : TopologicalAddGroup G
inst✝ : ContinuousConstSMul 𝕜 G
p : FormalMultilinearSeries 𝕜 E F
n : ℕ
v : Fin n → E
i : Fin (Composition.length (Composition.ones n))
⊢ ∀ (i_1 : ℕ) (him : i_1 < Composition.blocksFun (Composition.ones n) i),
    i_1 < 1 →
      (v ∘ ⇑(Composition.embedding (Composition.ones n) i)) { val := i_1, isLt := him } =
        v (Fin.castLE (_ : Composition.length (Composition.ones n) ≤ n) i)

Next tactic:
intro j hjn hj1
theorem applyComposition_ones (p : FormalMultilinearSeries 𝕜 E F) (n : ℕ) :
    p.applyComposition (Composition.ones n) = fun v i =>
      p 1 fun _ => v (Fin.castLE (Composition.length_le _) i) := by
  funext v i
  apply p.congr (Composition.ones_blocksFun _ _)
  intro j hjn hj1
  

Proof state:
case h.h
𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
H : Type u_5
inst✝¹⁵ : CommRing 𝕜
inst✝¹⁴ : AddCommGroup E
inst✝¹³ : AddCommGroup F
inst✝¹² : AddCommGroup G
inst✝¹¹ : Module 𝕜 E
inst✝¹⁰ : Module 𝕜 F
inst✝⁹ : Module 𝕜 G
inst✝⁸ : TopologicalSpace E
inst✝⁷ : TopologicalSpace F
inst✝⁶ : TopologicalSpace G
inst✝⁵ : TopologicalAddGroup E
inst✝⁴ : ContinuousConstSMul 𝕜 E
inst✝³ : TopologicalAddGroup F
inst✝² : ContinuousConstSMul 𝕜 F
inst✝¹ : TopologicalAddGroup G
inst✝ : ContinuousConstSMul 𝕜 G
p : FormalMultilinearSeries 𝕜 E F
n : ℕ
v : Fin n → E
i : Fin (Composition.length (Composition.ones n))
j : ℕ
hjn : j < Composition.blocksFun (Composition.ones n) i
hj1 : j < 1
⊢ (v ∘ ⇑(Composition.embedding (Composition.ones n) i)) { val := j, isLt := hjn } =
    v (Fin.castLE (_ : Composition.length (Composition.ones n) ≤ n) i)

Next tactic:
obtain rfl : j = 0 := by linarith
theorem applyComposition_ones (p : FormalMultilinearSeries 𝕜 E F) (n : ℕ) :
    p.applyComposition (Composition.ones n) = fun v i =>
      p 1 fun _ => v (Fin.castLE (Composition.length_le _) i) := by
  funext v i
  apply p.congr (Composition.ones_blocksFun _ _)
  intro j hjn hj1
  obtain rfl : j = 0 := by 

Proof state:
𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
H : Type u_5
inst✝¹⁵ : CommRing 𝕜
inst✝¹⁴ : AddCommGroup E
inst✝¹³ : AddCommGroup F
inst✝¹² : AddCommGroup G
inst✝¹¹ : Module 𝕜 E
inst✝¹⁰ : Module 𝕜 F
inst✝⁹ : Module 𝕜 G
inst✝⁸ : TopologicalSpace E
inst✝⁷ : TopologicalSpace F
inst✝⁶ : TopologicalSpace G
inst✝⁵ : TopologicalAddGroup E
inst✝⁴ : ContinuousConstSMul 𝕜 E
inst✝³ : TopologicalAddGroup F
inst✝² : ContinuousConstSMul 𝕜 F
inst✝¹ : TopologicalAddGroup G
inst✝ : ContinuousConstSMul 𝕜 G
p : FormalMultilinearSeries 𝕜 E F
n : ℕ
v : Fin n → E
i : Fin (Composition.length (Composition.ones n))
j : ℕ
hjn : j < Composition.blocksFun (Composition.ones n) i
hj1 : j < 1
⊢ j = 0

Next tactic:
linarith
theorem applyComposition_ones (p : FormalMultilinearSeries 𝕜 E F) (n : ℕ) :
    p.applyComposition (Composition.ones n) = fun v i =>
      p 1 fun _ => v (Fin.castLE (Composition.length_le _) i) := by
  funext v i
  apply p.congr (Composition.ones_blocksFun _ _)
  intro j hjn hj1
  obtain rfl : j = 0 := by linarith
  

Proof state:
case h.h
𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
H : Type u_5
inst✝¹⁵ : CommRing 𝕜
inst✝¹⁴ : AddCommGroup E
inst✝¹³ : AddCommGroup F
inst✝¹² : AddCommGroup G
inst✝¹¹ : Module 𝕜 E
inst✝¹⁰ : Module 𝕜 F
inst✝⁹ : Module 𝕜 G
inst✝⁸ : TopologicalSpace E
inst✝⁷ : TopologicalSpace F
inst✝⁶ : TopologicalSpace G
inst✝⁵ : TopologicalAddGroup E
inst✝⁴ : ContinuousConstSMul 𝕜 E
inst✝³ : TopologicalAddGroup F
inst✝² : ContinuousConstSMul 𝕜 F
inst✝¹ : TopologicalAddGroup G
inst✝ : ContinuousConstSMul 𝕜 G
p : FormalMultilinearSeries 𝕜 E F
n : ℕ
v : Fin n → E
i : Fin (Composition.length (Composition.ones n))
hjn : 0 < Composition.blocksFun (Composition.ones n) i
hj1 : 0 < 1
⊢ (v ∘ ⇑(Composition.embedding (Composition.ones n) i)) { val := 0, isLt := hjn } =
    v (Fin.castLE (_ : Composition.length (Composition.ones n) ≤ n) i)

Next tactic:
refine' congr_arg v _