Example solution 1 (infinite medium): n(x,t) = (n₀/2) erfc(x / (2√(Dt)))
ProvedFickDiffusion.erfc_solution_infinite_mediumLet and , and set
Then:
- for all and ;
- for every , as ;
- for every , as .
So solves Fick's second law on the whole line with initial profile on and on : a solution of concentration brought into contact with pure solvent.
Formalization Note The initial condition is expressed as pointwise limits as away from the interface (at the value is for all , consistent with any choice of ).
import Mathlib import Definitions.Def_FickDiffusion_defs open Real Filter Topology MeasureTheory
namespace FickDiffusion
theorem erfc_solution_infinite_medium (D n₀ : ℝ) (hD : 0 < D) :
(∀ x t : ℝ, 0 < t →
deriv (fun s => n₀ / 2 * erfc (x / (2 * Real.sqrt (D * s)))) t =
D * deriv (fun y => deriv (fun z => n₀ / 2 * erfc (z / (2 * Real.sqrt (D * t)))) y) x) ∧
(∀ x : ℝ, 0 < x →
Tendsto (fun t => n₀ / 2 * erfc (x / (2 * Real.sqrt (D * t)))) (𝓝[>] 0) (𝓝 0)) ∧
(∀ x : ℝ, x < 0 →
Tendsto (fun t => n₀ / 2 * erfc (x / (2 * Real.sqrt (D * t)))) (𝓝[>] 0) (𝓝 n₀)) := 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 , with and real square root ( on negatives), the following three statements all hold:
- for all real and : the derivative at of equals times the derivative at of the derivative function of (one-variable derivatives, where not differentiable);
- for every : as with ;
- for every : as with .
Nothing is asserted at in clauses 2–3; has no sign condition.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.