Documentation

Mathlib.NumberTheory.ArithmeticFunction.Carmichael

The Carmichael function #

Main definitions #

Main results #

Notation #

We use the standard notation λ to represent the Carmichael function, which is accessible in the scope ArithmeticFunction.Carmichael. Since the notation conflicts with the anonymous function notation, it is impossible to use this notation in statements, but the pretty-printer will use it when showing the goal state.

Tags #

arithmetic functions, totient

λ is the Carmichael function, also known as the reduced totient function, defined as the exponent of the unit group of ZMod n.

Equations
    Instances For

      λ is the Carmichael function, also known as the reduced totient function, defined as the exponent of the unit group of ZMod n.

      Equations
        Instances For

          This takes in an NeZero n instance instead of an n ≠ 0 hypothesis.

          theorem ArithmeticFunction.carmichael_finset_lcm {α : Type u_2} (s : Finset α) (f : α) :
          Carmichael (s.lcm f) = s.lcm (Carmichael f)
          @[simp]
          theorem ArithmeticFunction.carmichael_two_pow_of_le_two {n : } (hn : n 2) :
          Carmichael (2 ^ n) = 2 ^ (n - 1)

          Note that 2 ^ (n - 1) = 1 when n = 0.

          @[simp]
          theorem ArithmeticFunction.carmichael_two_pow_of_ne_two {n : } (hn : n 2) :
          Carmichael (2 ^ n) = 2 ^ (n - 2)

          Note that 2 ^ (n - 2) = 1 when n ≤ 1.

          @[simp]
          theorem ArithmeticFunction.carmichael_pow_of_prime_ne_two {p : } (n : ) (hp : Nat.Prime p) (hp₂ : p 2) :
          Carmichael (p ^ n) = (p ^ n).totient