FormalConjecturesForMathlib/Data/Nat/PerfectPower.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

8 declarations, 0 contain sorry, 0 declared as axioms

Imports (4)
Imported by 1 file
  1. def Nat.IsPerfectPower Documented declaration: IsPerfectPower line 36 source

    Source documentation

    A perfect power is a natural number that is a product of equal natural factors, or, in other words, an integer that can be expressed as a square or a higher integer power of another integer greater than one. More formally, $n$ is a perfect power if there exist natural numbers $m > 1$, and $k > 1$ such that $m ^ k = n$. In this case, $n$ may be called a perfect $k$th power. If $k = 2$ or $k = 3$, then $n$ is called a perfect square or perfect cube, respectively.

    L4DEL explanation

    A perfect power is a natural number that is a product of equal natural factors, or, in other words, an integer that can be expressed as a square or a higher integer power of another integer greater than one. More formally, $n$ is a perfect power if there exist natural numbers $m > 1$, and $k > 1$ such that $m ^ k = n$. In this case, $n$ may be called a perfect $k$th power. If $k = 2$ or $k = 3$, then $n$ is called a perfect square or perfect cube, respectively.

    Sources and attribution: Pinned Lean source (1646ca16afd6)

    standard axioms: propext what this means

    Statement uses: Nat

    Proof uses: Exists, And, LT.lt, OfNat.ofNat, Eq, HPow.hPow

    6 instances, coercions and auxiliary constants left out.

    def IsPerfectPower (n : ℕ) : Prop :=
    …
  2. theorem Nat.isPerfectPower_iff_factorization_gcd line 39 source

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

    Statement uses: Nat, Iff, Nat.IsPerfectPower, And, GT.gt, OfNat.ofNat, Finset.gcd, Nat.primeFactors, Finsupp, Nat.factorization

    Proof uses: Iff.intro, LT.lt, Eq, HPow.hPow, And.intro, GE.ge, Trans.trans, Eq.symm, Nat.pow_le_pow_left, Nat.succ, Nat.pow_le_pow_right, Mathlib.Meta.NormNum.isNat_le_true, Mathlib.Meta.NormNum.isNat_ofNat, Eq.refl, Bool, Bool.true, Decidable.byContradiction, Not, Ne, Iff.mp and 63 more

    71 instances, coercions and auxiliary constants left out.

    Tactic trace: 81 steps

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

  3. instance Nat.IsPerfectPower.decide line 129 source

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

    Statement uses: Nat, Decidable, Nat.IsPerfectPower

    Proof uses: decidable_of_iff, And, GT.gt, OfNat.ofNat, Finset.gcd, Nat.primeFactors, Finsupp, Nat.factorization

    12 instances, coercions and auxiliary constants left out.

    Tactic trace: 5 steps

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

  4. example Nat.(example at line 133) line 133 source
  5. example Nat.(example at line 134) line 134 source
  6. example Nat.(example at line 135) line 135 source
  7. example Nat.(example at line 136) line 136 source
  8. example Nat.(example at line 137) line 137 source