Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Aether Catalog definitions — EML_AbstractAlgebra_DifferentialClosure

Definition
EML_AbstractAlgebra_DifferentialClosure

by raver1975 · Sep 13, 2026 · Mathlib c5ea003 (Lean v4.30.0)

aether-catalogeml

Definition bundle for the Aether Catalog module EML.AbstractAlgebra.DifferentialClosure, transplanted by skeleton subtraction; supplies the types and constants the catalog's theorems import.

Definition code
-- Def bundle generated from EML/AbstractAlgebra/DifferentialClosure.lean by skeleton subtraction
import Mathlib

/-!
# Differential closure of rational exponential--logarithmic expressions

We use a precise expression language with real constants, the identity, field operations,
`exp`, and `log`.  Its symbolic derivative is again an expression.  This gives a rigorous
closure theorem for the regular (everywhere differentiable) members of the represented
function class.  Composition is implemented by syntactic substitution.
-/

namespace EMLDifferentialClosure

/-- Rational exponential--logarithmic expressions in one real variable. -/
inductive Expr where
  | const : ℝ → Expr
  | var : Expr
  | add : Expr → Expr → Expr
  | mul : Expr → Expr → Expr
  | inv : Expr → Expr
  | exp : Expr → Expr
  | log : Expr → Expr

namespace Expr

/-- Real evaluation, using Lean's totalized inverse and logarithm. -/
noncomputable def eval : Expr → ℝ → ℝ
  | const c, _ => c
  | var, x => x
  | add p q, x => eval p x + eval q x
  | mul p q, x => eval p x * eval q x
  | inv p, x => (eval p x)⁻¹
  | exp p, x => Real.exp (eval p x)
  | log p, x => Real.log (eval p x)

/-- Substitute `q` for the variable in `p`. -/
def subst : Expr → Expr → Expr
  | const c, _ => const c
  | var, q => q
  | add p r, q => add (subst p q) (subst r q)
  | mul p r, q => mul (subst p q) (subst r q)
  | inv p, q => inv (subst p q)
  | exp p, q => exp (subst p q)
  | log p, q => log (subst p q)

/-- Formal derivative. -/
def diff : Expr → Expr
  | const _ => const 0
  | var => const 1
  | add p q => add (diff p) (diff q)
  | mul p q => add (mul (diff p) q) (mul p (diff q))
  | inv p => mul (const (-1)) (mul (diff p) (inv (mul p p)))
  | exp p => mul (diff p) (exp p)
  | log p => mul (diff p) (inv p)

/-- Domain condition under which all ordinary chain-rule steps in an expression are valid. -/
def RegularAt : Expr → ℝ → Prop
  | const _, _ => True
  | var, _ => True
  | add p q, x => RegularAt p x ∧ RegularAt q x
  | mul p q, x => RegularAt p x ∧ RegularAt q x
  | inv p, x => RegularAt p x ∧ eval p x ≠ 0
  | exp p, x => RegularAt p x
  | log p, x => RegularAt p x ∧ eval p x ≠ 0




end Expr

/-- A real function is EML when represented by a rational exponential--logarithmic expression. -/
def IsEML (f : ℝ → ℝ) : Prop := ∃ p : Expr, Expr.eval p = f















/-! ## Local inverses and integration -/


/- The original declaration used `Function.LeftInverse g f`, which only says
`g (f x) = x`; the derivative formula at `x` requires `f (g x) = x` instead.
For example, totalized `Real.log` is a left inverse of `Real.exp`, but at negative
arguments its derivative does not satisfy the claimed formula. -/




end EMLDifferentialClosure

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me