openAI-math-dataset / lean /OAI /Algebra /Determinantal /AmbientOperators.lean
roseking's picture
Add lean source and binary files (part 7)
216fb31 verified
Raw History Blame Contribute Delete
2.55 kB
10
noncomputable def substitution (b : σ → ℂ)
    (L : (Option κ → ℂ) →L[ℂ] (σ → ℂ)) : Poly σ →ₐ[ℂ] Poly (Option κ) :=
body · 1 line
  affineSubstitution b (fun j i => L (Pi.single i 1) j)
15
lemma eval_substitution (b : σ → ℂ)
    (L : (Option κ → ℂ) →L[ℂ] (σ → ℂ)) (P : Poly σ) (z : Option κ → ℂ) :
    eval z (substitution b L P) = eval (b + L z) P := by
proof · 13 lines
  classical
  change (aeval z : Poly (Option κ) →ₐ[ℂ] ℂ) (aeval _ P) = _
  rw [comp_aeval_apply]
  apply congrArg (fun g : σ → ℂ => aeval g P)
  funext j
  simp only [map_add, map_sum, map_mul, aeval_C, aeval_X, Algebra.algebraMap_self_apply]
  have hz : z = ∑ i, z i • Pi.single i 1 := by
    ext i
    simp [Pi.single_apply]
  have hL : L z j = ∑ i, L (Pi.single i 1) j * z i := by
    conv_lhs => rw [hz, map_sum]
    simp [mul_comm]
  simpa only [Pi.add_apply] using congrArg (fun v : ℂ => b j + v) hL.symm
32
noncomputable def directional (h : κ → σ → ℂ) (i : κ) : Poly σ →ₗ[ℂ] Poly σ :=
body · 1 line
  ∑ j, h i j • (pderiv j).toLinearMap
35
noncomputable def operators (b : σ → ℂ)
    (L : (Option κ → ℂ) →L[ℂ] (σ → ℂ)) (h : κ → σ → ℂ) :
    Option κ → Poly σ →ₗ[ℂ] Poly (Option κ) :=
body · 2 lines
  Option.elim' (substitution b L).toLinearMap
    (fun i => (substitution b L).toLinearMap.comp (directional h i))
42
lemma derivative_directional (h : κ → σ → ℂ) (P : Poly σ) (y : σ → ℂ) (i : κ) :
    fderiv ℂ (fun y => eval y P) y (h i) = eval y (directional h i P) := by
proof · 2 lines
  rw [(CI.hasFDerivAt_eval P y).fderiv, CI.polynomialDerivative_apply]
  simp [directional, mul_comm]
47
lemma polarPair_operators (b : σ → ℂ)
    (L : (Option κ → ℂ) →L[ℂ] (σ → ℂ)) (h : κ → σ → ℂ) (P : Poly σ) :
    polarPair (fun y => eval y P) (fun z => b + L (optionProduct.symm z)) h =
      fun z => optionProduct (polynomialSystem (operators b L h) P (optionProduct.symm z)) := by
proof · 7 lines
  funext z
  apply Prod.ext
  · exact (eval_substitution b L P _).symm
  · funext i
    change fderiv ℂ (fun y => eval y P) (b + L (optionProduct.symm z)) (h i) =
      eval (optionProduct.symm z) (substitution b L (directional h i P))
    rw [eval_substitution, derivative_directional]