Derivation of Fick's second law from Fick's first law and mass conservation
ProvedFickDiffusion.fick_second_law_of_first_law_and_conservationLet be a constant diffusion coefficient, let be a concentration and a flux, both real functions of position and time . Suppose
- (Fick's first law) for all ;
- (mass conservation) for all .
Then for all ,
This is the textbook derivation of Fick's second law from the first law and the continuity equation.
Formalization Note Partial derivatives are written with Mathlib's deriv, which returns at points of non-differentiability. Because pulling a constant out of deriv holds unconditionally over , no differentiability hypothesis is needed for this formal statement.
import Mathlib import Definitions.Def_FickDiffusion_defs open Real Filter Topology MeasureTheory
namespace FickDiffusion
theorem fick_second_law_of_first_law_and_conservation (D : ℝ) (φ J : ℝ → ℝ → ℝ)
(hfirst : ∀ x t, J x t = -D * deriv (fun y => φ y t) x)
(hcons : ∀ x t, deriv (fun s => φ x s) t + deriv (fun y => J y t) x = 0) :
∀ x t, deriv (fun s => φ x s) t = D * deriv (fun y => deriv (fun z => φ z t) y) x := 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 every real number and all functions (arguments written ), assume:
- for all : , where denotes the derivative at of ;
- for all : , where is the derivative at of and the derivative at of .
Here every "derivative" is the one-variable derivative with the convention that it equals wherever the function is not differentiable. Conclusion: for all real ,
i.e. times the derivative at of the function . No differentiability, sign or nonvanishing assumption is made on , or ; the case is included.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.