Documentation

Init.Data.Int.Kernel

Kernel-reduction variants of Int arithmetic, written with Int.rec, Bool.rec, and Nat operations that the kernel evaluates on literals, together with proofs that they agree with the standard operations. They avoid match and explicit recursion, which the kernel unfolds slowly. Used in certificates that the kernel checks by evaluation, such as those of lia.

noncomputable def Int.subNatNat_k (m n : Nat) :

subNatNat for kernel reduction.

Equations
Instances For
    noncomputable def Int.negOfNat_k (k : Nat) :

    negOfNat for kernel reduction.

    Equations
    Instances For
      noncomputable def Int.neg_k (a : Int) :

      -a for kernel reduction.

      Equations
      Instances For
        noncomputable def Int.add_k (a b : Int) :

        a + b for kernel reduction.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For
          noncomputable def Int.mul_k (a b : Int) :

          a * b for kernel reduction.

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For
            noncomputable def Int.natAbs_k (a : Int) :

            a.natAbs for kernel reduction.

            Equations
            Instances For
              noncomputable def Int.beqZero_k (a : Int) :

              a == 0 for kernel reduction. Unlike Int.beq' a 0, it inspects a only once.

              Equations
              Instances For
                noncomputable def Int.sub_k (a b : Int) :

                a - b for kernel reduction.

                Equations
                Instances For
                  noncomputable def Int.bneZero_k (a : Int) :

                  a != 0 for kernel reduction.

                  Equations
                  Instances For
                    noncomputable def Int.emod_k (a b : Int) :

                    a % b for kernel reduction.

                    Equations
                    Instances For
                      noncomputable def Int.ediv_k (a b : Int) :

                      a / b for kernel reduction.

                      Equations
                      • One or more equations did not get rendered due to their size.
                      Instances For
                        noncomputable def Int.gcd_k (a b : Int) :

                        a.gcd b for kernel reduction.

                        Equations
                        Instances For
                          noncomputable def Int.lcm_k (a b : Int) :

                          a.lcm b for kernel reduction.

                          Equations
                          Instances For
                            noncomputable def Int.bmod_k (x : Int) (m : Nat) :

                            x.bmod m for kernel reduction.

                            Equations
                            Instances For
                              noncomputable def Int.toNat_k (a : Int) :

                              a.toNat for kernel reduction.

                              Equations
                              Instances For
                                noncomputable def Int.pow_k (a : Int) (n : Nat) :

                                a ^ n for kernel reduction.

                                Equations
                                Instances For
                                  @[simp]
                                  theorem Int.neg_k_eq (a : Int) :
                                  a.neg_k = a.neg
                                  @[simp]
                                  theorem Int.add_k_eq (a b : Int) :
                                  a.add_k b = a.add b
                                  @[simp]
                                  theorem Int.mul_k_eq (a b : Int) :
                                  a.mul_k b = a.mul b
                                  @[simp]
                                  theorem Int.natAbs_k_eq (a : Int) :
                                  @[simp]
                                  theorem Int.beqZero_k_eq (a : Int) :
                                  a.beqZero_k = (a == 0)
                                  @[simp]
                                  theorem Int.bneZero_k_eq (a : Int) :
                                  a.bneZero_k = (a != 0)
                                  @[simp]
                                  theorem Int.emod_k_eq (a b : Int) :
                                  a.emod_k b = a % b
                                  @[simp]
                                  theorem Int.ediv_k_eq (a b : Int) :
                                  a.ediv_k b = a / b
                                  @[simp]
                                  theorem Int.sub_k_eq (a b : Int) :
                                  a.sub_k b = a - b
                                  @[simp]
                                  theorem Int.gcd_k_eq (a b : Int) :
                                  a.gcd_k b = a.gcd b
                                  @[simp]
                                  theorem Int.lcm_k_eq (a b : Int) :
                                  a.lcm_k b = a.lcm b
                                  @[simp]
                                  theorem Int.bmod_k_eq (x : Int) (m : Nat) :
                                  x.bmod_k m = x.bmod m
                                  @[simp]
                                  theorem Int.toNat_k_eq (a : Int) :
                                  @[simp]
                                  theorem Int.pow_k_eq (a : Int) (n : Nat) :
                                  a.pow_k n = a ^ n