FormalConjecturesForMathlib/ModelTheory/Real.lean

GitHub source file

Explanation legend Lean4 Domain Explanation Language (L4DEL)

L4DEL explanations are a separate layer. They do not change the Lean source. Intuition is explanatory prose; numbered items are a reading path; sources link the wording back to evidence.

L4DEL
Lean4 Domain Explanation Language

Credit: The upstream authors and contributors retain credit for the project and mathematics. lean4-explainer only renders their pinned source and adds the separately disclosed explanation layer.

Project sources: Pinned project documentation, Formal Conjectures paper, arXiv v1

15 declarations, 0 contain sorry, 0 declared as axioms

Expansions of the real field

This file makes ℝ a structure for the language of rings and for the language of orders. It defines the language Language.exp with a single unary function symbol exp, the language Language.orderedExpField of ordered exponential fields, and the real exponential field (ℝ, +, *, -, 0, 1, ≤, exp) as a structure for that language.

Main declarations

Implementation notes

Mathlib deliberately does not make Ring.compatibleRingOfRing or orderStructure instances, because for a general type R the round trip Ring R → Language.ring.Structure R → Ring R need not commute definitionally. Here they are declared as instances for the single type ℝ. Mathlib has no instance producing a Ring or LE structure from a first-order structure on a concrete type, so no such round trip arises.

Imports (2)
Imported by 1 file
  1. inductive FirstOrder.expFunc The type of function symbols of Language.exp: a single unary symbol exp line 48 source

    Source documentation

    The type of function symbols of Language.exp: a single unary symbol exp.

    no axioms what this means

    Statement uses: Nat

    inductive expFunc : ℕ → Type
      | exp : expFunc 1
      deriving DecidableEq
    
    namespace Language
    
    /-- The language with a single unary function symbol `exp` and no relation symbols. -/
  2. def FirstOrder.Language.exp The language with a single unary function symbol exp and no relation symbols line 55 source

    Source documentation

    The language with a single unary function symbol exp and no relation symbols.

    no axioms what this means

    Statement uses: FirstOrder.Language

    Proof uses: FirstOrder.Language.mk, FirstOrder.expFunc, Nat, Empty

    protected def exp : Language := ⟨expFunc, fun _ => Empty⟩
    …

    Mentions: FirstOrder.expFunc

  3. abbrev FirstOrder.Language.orderedExpField The language of ordered exponential fields: the language of rings, together with a unary function symbol exp and the order relation ≤ line 60 source

    Source documentation

    The language of ordered exponential fields: the language of rings, together with a unary function symbol exp and the order relation ≤.

    no axioms what this means

    Statement uses: FirstOrder.Language

    Proof uses: FirstOrder.Language.sum, FirstOrder.Language.ring, FirstOrder.Language.exp, FirstOrder.Language.order

    protected abbrev orderedExpField : Language :=
    …
  4. instance FirstOrder.Language.orderedExpField.instIsOrdered The language of ordered exponential fields contains the order symbol ≤ line 64 source

    Source documentation

    The language of ordered exponential fields contains the order symbol ≤.

    no axioms what this means

    Statement uses: FirstOrder.Language.IsOrdered, FirstOrder.Language.orderedExpField

    Proof uses: FirstOrder.Language.IsOrdered.mk, Sum.inr, FirstOrder.Language.Relations, FirstOrder.Language.ring, OfNat.ofNat, Nat, FirstOrder.Language.sum, FirstOrder.Language.exp, FirstOrder.Language.order, FirstOrder.Language.IsOrdered.leSymb

    2 instances, coercions and auxiliary constants left out.

    instance orderedExpField.instIsOrdered : Language.orderedExpField.IsOrdered :=
    …
  5. instance FirstOrder.Language.exp.encodableFunctions The function symbol exp is encoded as 0 line 68 source

    Source documentation

    The function symbol exp is encoded as 0.

    standard axioms: Quot.sound, propext what this means

    Statement uses: Encodable, Sigma, Nat, FirstOrder.Language.Functions, FirstOrder.Language.exp

    Proof uses: Encodable.ofLeftInjection, OfNat.ofNat, Option.some, Sigma.mk, FirstOrder.expFunc.exp

    3 instances, coercions and auxiliary constants left out.

    Tactic trace: 3 steps

    Open to load the checked before-and-after goal states.

    instance exp.encodableFunctions : Encodable (Σ n, Language.exp.Functions n) :=
    …
  6. instance FirstOrder.Language.compatibleRingReal ℝ as a structure for the language of rings, with the usual ring operations line 77 source

    Source documentation

    ℝ as a structure for the language of rings, with the usual ring operations.

    standard axioms: Classical.choice, Quot.sound, propext what this means

    Statement uses: FirstOrder.Ring.CompatibleRing, Real

    Proof uses: FirstOrder.Ring.compatibleRingOfRing

    10 instances, coercions and auxiliary constants left out.

    instance compatibleRingReal : Ring.CompatibleRing ℝ := Ring.compatibleRingOfRing ℝ
  7. instance FirstOrder.Language.orderStructureReal ℝ as a structure for the language of orders, with ≤ interpreted as ≤ line 80 source

    Source documentation

    ℝ as a structure for the language of orders, with ≤ interpreted as ≤.

    standard axioms: Classical.choice, Quot.sound, propext what this means

    Statement uses: FirstOrder.Language.Structure, FirstOrder.Language.order, Real

    Proof uses: FirstOrder.Language.orderStructure

    1 instances, coercions and auxiliary constants left out.

    instance orderStructureReal : Language.order.Structure ℝ := orderStructure ℝ
  8. instance FirstOrder.Language.orderOrderedStructureReal line 82 source

    standard axioms: Classical.choice, Quot.sound, propext what this means

    Statement uses: FirstOrder.Language.OrderedStructure, FirstOrder.Language.order, Real

    Proof uses: FirstOrder.Language.OrderedStructure.mk, Fin, OfNat.ofNat, Nat, Iff.rfl, FirstOrder.Language.Structure.RelMap, FirstOrder.Language.IsOrdered.leSymb

    7 instances, coercions and auxiliary constants left out.

  9. instance FirstOrder.Language.expStructureReal ℝ as a structure for Language.exp, with exp interpreted as the exponential function line 85 source

    Source documentation

    ℝ as a structure for Language.exp, with exp interpreted as the exponential function.

    standard axioms: Classical.choice, Quot.sound, propext what this means

    Statement uses: FirstOrder.Language.Structure, FirstOrder.Language.exp, Real

    Proof uses: FirstOrder.Language.Structure.mk, Nat, FirstOrder.Language.Functions, FirstOrder.Language.expStructureReal.match_1, Fin, Unit, OfNat.ofNat, Real.exp, FirstOrder.Language.Relations, isEmptyElim

    4 instances, coercions and auxiliary constants left out.

    instance expStructureReal : Language.exp.Structure ℝ where
    …
  10. theorem FirstOrder.Language.funMap_exp line 90 source

    standard axioms: Classical.choice, Quot.sound, propext what this means

    Statement uses: Fin, OfNat.ofNat, Nat, Real, Eq, FirstOrder.Language.Structure.funMap, FirstOrder.Language.exp, FirstOrder.expFunc.exp, Real.exp

    Proof uses: rfl

    6 instances, coercions and auxiliary constants left out.

  11. instance FirstOrder.Language.orderedExpFieldOrderedStructureReal In the real exponential field, ≤ is interpreted as ≤ line 95 source

    Source documentation

    In the real exponential field, ≤ is interpreted as ≤.

    standard axioms: Classical.choice, Quot.sound, propext what this means

    Statement uses: FirstOrder.Language.OrderedStructure, FirstOrder.Language.orderedExpField, Real, FirstOrder.Language.ring, FirstOrder.Language.sum, FirstOrder.Language.exp, FirstOrder.Language.order

    Proof uses: FirstOrder.Language.OrderedStructure.mk, Fin, OfNat.ofNat, Nat, Iff.rfl, FirstOrder.Language.Structure.RelMap, FirstOrder.Language.IsOrdered.leSymb

    25 instances, coercions and auxiliary constants left out.

    instance orderedExpFieldOrderedStructureReal : Language.orderedExpField.OrderedStructure ℝ :=
    …
  12. example FirstOrder.Language.(example at line 99) line 99 source

    Source comment

    In the real exponential field, the symbol `exp` is interpreted as the exponential function.
    example (x : ℝ) :
        Structure.funMap (L := Language.orderedExpField) (Sum.inr (Sum.inl expFunc.exp)) ![x] =
    …

    Mentions: FirstOrder.Language.orderedExpField

  13. example FirstOrder.Language.(example at line 105) line 105 source

    Source comment

    In the real exponential field, the symbol `+` is interpreted as addition.
    example (x y : ℝ) :
        Structure.funMap (L := Language.orderedExpField) (Sum.inl Ring.addFunc) ![x, y] = x + y :=
    …

    Mentions: FirstOrder.Language.orderedExpField

  14. example FirstOrder.Language.(example at line 110) line 110 source

    Source comment

    In the real exponential field, the symbol `≤` is interpreted as the order of `ℝ`.
    example (x y : ℝ) :
        Structure.RelMap (L := Language.orderedExpField) leSymb ![x, y] ↔ x ≤ y :=
    …

    Mentions: FirstOrder.Language.orderedExpField

  15. example FirstOrder.Language.(example at line 115) line 115 source

    Source comment

    The Gödel numbering of sentences of `Language.orderedExpField` is found by instance resolution.
    example : Encodable Language.orderedExpField.Sentence := inferInstance
    …