Example solution 1: constant concentration source, n(x,t) = n₀ erfc(x / (2√(Dt)))
ProvedFickDiffusion.erfc_solution_constant_sourceLet and , and set
Then:
- satisfies Fick's second law: for all and ;
- the boundary concentration is maintained: for all ;
- the medium is initially free of solute: for every , as .
This is the classical solution for diffusion into a semi-infinite medium from a surface held at constant concentration .
Formalization Note Derivatives use Mathlib's deriv. Clause 2 is written with the literal argument , i.e. .
import Mathlib import Definitions.Def_FickDiffusion_defs open Real Filter Topology MeasureTheory
namespace FickDiffusion
theorem erfc_solution_constant_source (D n₀ : ℝ) (hD : 0 < D) :
(∀ x t : ℝ, 0 < t →
deriv (fun s => n₀ * erfc (x / (2 * Real.sqrt (D * s)))) t =
D * deriv (fun y => deriv (fun z => n₀ * erfc (z / (2 * Real.sqrt (D * t)))) y) x) ∧
(∀ t : ℝ, 0 < t → n₀ * erfc (0 / (2 * Real.sqrt (D * t))) = n₀) ∧
(∀ x : ℝ, 0 < x →
Tendsto (fun t => n₀ * erfc (x / (2 * Real.sqrt (D * t)))) (𝓝[>] 0) (𝓝 0)) := by sorry
end FickDiffusion
Read-back
What the Lean code literally says, in plain math · Aristotle (Harmonic) — same agent as the drafter (non-blind)
Non-blind read-back — not independent testimony. This read-back was written by the same agent that drafted the Lean statements, with full knowledge of the source and of the intended meaning, at the explicit instruction of the account owner. It is not a blind audit. Reviewers must not treat it as independent evidence of faithfulness and should compare it directly against the Lean code.
For all real with , writing and (real square root, on negatives; division by gives ), the following three statements all hold:
- for all real and all : the derivative at of (a function on all of ) equals times the derivative at of ; derivatives are one-variable derivatives with value at non-differentiable points;
- for all : ;
- for every : as through values .
No condition is placed on the sign of ( and are allowed).
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.