math / data /lean /OAI /Algebra /DepthFive /CharacteristicZeroTransfer.lean
introvoyz045's picture
Migrated from GitHub
4a56cd6 verified
Raw History Blame Contribute Delete
3.8 kB
import OAI.Algebra.DepthFive.ComplexEmbedding
import OAI.Algebra.DepthFive.CoefficientMap
import OAI.Algebra.DepthFive.ImmMap
import OAI.Algebra.DepthFive.CoefficientDescent
namespace OAI
noncomputable section
universe u
namespace Problem335
/-- A circuit over a countable characteristic-zero field can be realized over
`β„‚`, with exactly the same number of gates and the same IMM identity. -/
theorem exists_complex_circuit_of_countable {K : Type u} [Field K] [CharZero K]
[Countable K] {n : β„•} (c : Depth5Circuit K n)
(hc : circuitValue c = imm K n) :
βˆƒ d : Depth5Circuit β„‚ n, circuitValue d = imm β„‚ n ∧ circuitSize d = circuitSize c := by
obtain ⟨f⟩ := countable_field_embeds_complex K
refine ⟨c.mapCoefficients f, ?_, circuitSize_mapCoefficients f c⟩
rw [circuitValue_mapCoefficients, hc, map_imm]
/-- Any pointwise real gate-count lower bound over `β„‚` transfers to every
countable field of characteristic zero. -/
theorem countable_circuit_bound_of_complex {K : Type u} [Field K] [CharZero K]
[Countable K] {n : β„•} {b : ℝ}
(h : βˆ€ d : Depth5Circuit β„‚ n,
circuitValue d = imm β„‚ n β†’ b ≀ (circuitSize d : ℝ))
(c : Depth5Circuit K n) (hc : circuitValue c = imm K n) :
b ≀ (circuitSize c : ℝ) := by
obtain ⟨d, hd, hs⟩ := exists_complex_circuit_of_countable c hc
simpa only [hs] using h d hd
/-- Restriction to the coefficient subfield preserves and reflects the IMM identity. -/
theorem restrictCircuit_computes_imm {K : Type u} [Field K] {n : β„•}
(c : Depth5Circuit K n) :
circuitValue (restrictCircuit c) = imm (circuitCoefficientField c) n ↔
circuitValue c = imm K n := by
have hi := MvPolynomial.map_injective (Οƒ := Fin n Γ— Fin n Γ— Fin n)
(circuitCoefficientField c).subtype
(circuitCoefficientField c).subtype.injective
rw [← hi.eq_iff, map_circuitValue_restrictCircuit, map_imm]
/-- Every characteristic-zero IMM circuit has a same-size complex realization.
Only the finitely many occurring coefficients are embedded, not the entire field. -/
theorem exists_complex_circuit {K : Type u} [Field K] [CharZero K]
{n : β„•} (c : Depth5Circuit K n) (hc : circuitValue c = imm K n) :
βˆƒ d : Depth5Circuit β„‚ n, circuitValue d = imm β„‚ n ∧ circuitSize d = circuitSize c := by
obtain ⟨d, hd, hs⟩ := exists_complex_circuit_of_countable (restrictCircuit c)
((restrictCircuit_computes_imm c).mpr hc)
exact ⟨d, hd, hs.trans (circuitSize_restrictCircuit c)⟩
/-- Pointwise complex gate lower bounds hold over any characteristic-zero field. -/
theorem circuit_bound_of_complex {K : Type u} [Field K] [CharZero K]
{n : β„•} {b : ℝ}
(h : βˆ€ d : Depth5Circuit β„‚ n,
circuitValue d = imm β„‚ n β†’ b ≀ (circuitSize d : ℝ))
(c : Depth5Circuit K n) (hc : circuitValue c = imm K n) :
b ≀ (circuitSize c : ℝ) := by
obtain ⟨d, hd, hs⟩ := exists_complex_circuit c hc
simpa only [hs] using h d hd
/-- The extension to characteristic zero uses the same absolute threshold as
its complex counterpart. This implication has no lower-bound assumptions other
than the precise complex conclusion. -/
theorem characteristic_zero_depth_five_lower_bound_of_complex
(h : βˆƒ n0 : β„•, βˆ€ n : β„•, n0 ≀ n β†’ βˆ€ c : Depth5Circuit β„‚ n,
circuitValue c = imm β„‚ n β†’
(n : ℝ) ^ (Real.sqrt (n : ℝ) / 400) ≀ (circuitSize c : ℝ)) :
βˆƒ n0 : β„•, βˆ€ (K : Type u) [Field K] [CharZero K], βˆ€ n : β„•, n0 ≀ n β†’
βˆ€ c : Depth5Circuit K n, circuitValue c = imm K n β†’
(n : ℝ) ^ (Real.sqrt (n : ℝ) / 400) ≀ (circuitSize c : ℝ) := by
obtain ⟨n0, h0⟩ := h
refine ⟨n0, ?_⟩
intro K _ _ n hn c hc
exact circuit_bound_of_complex (h0 n hn) c hc
end Problem335
end
end OAI