Documentation

mynat

inductive MyNat :
Instances For
    Equations
    Instances For
      instance MyNat.instOfNat {n : } :
      Equations
      Equations
      def MyNat.repeatn (f : MyNatMyNat) (n i : MyNat) :
      Equations
      Instances For
        def MyNat.addn (n : MyNat) :
        Equations
        Instances For
          def MyNat.add (n m : MyNat) :
          Equations
          Instances For
            def MyNat.mul (n m : MyNat) :
            Equations
            Instances For
              @[simp]
              theorem MyNat.add_zero (n : MyNat) :
              zero + n = n
              @[simp]
              theorem MyNat.zero_add (n : MyNat) :
              n + zero = n
              @[simp]
              theorem MyNat.add_succ (n m : MyNat) :
              n.succ + m = (n + m).succ
              @[simp]
              theorem MyNat.succ_add (n m : MyNat) :
              n + m.succ = (n + m).succ
              @[simp]
              theorem MyNat.add_comm (m n : MyNat) :
              m + n = n + m
              @[simp]
              theorem MyNat.add_assoc (l m n : MyNat) :
              l + m + n = l + (m + n)
              theorem MyNat.add_elim {n m : MyNat} :
              n + m = nm = zero
              theorem MyNat.add_eq_zero (n m : MyNat) :
              n + m = zerom = zero
              theorem MyNat.add_abac {a b c : MyNat} :
              a + b = a + c b = c
              @[simp]
              theorem MyNat.mul_zero (n : MyNat) :
              @[simp]
              theorem MyNat.zero_mul (n : MyNat) :
              theorem MyNat.mul_one (m : MyNat) :
              m * zero.succ = m
              @[simp]
              theorem MyNat.one_mul (m : MyNat) :
              zero.succ * m = m
              @[simp]
              theorem MyNat.mul_succ (m n : MyNat) :
              m * n.succ = m + m * n
              @[simp]
              theorem MyNat.succ_mul (m n : MyNat) :
              m.succ * n = n + m * n
              theorem MyNat.mul_comm (n m : MyNat) :
              n * m = m * n
              @[simp]
              theorem MyNat.mul_dist (l m n : MyNat) :
              l * (m + n) = l * m + l * n
              theorem MyNat.mul_assoc (l m n : MyNat) :
              l * m * n = l * (m * n)
              def MyNat.nsmul :
              MyNatMyNat
              Equations
              Instances For
                Equations
                Equations
                • One or more equations did not get rendered due to their size.
                Equations
                • One or more equations did not get rendered due to their size.
                def MyNat.le (n m : MyNat) :
                Equations
                Instances For
                  theorem MyNat.le_refl (n : MyNat) :
                  n <= n
                  theorem MyNat.le_step (n m : MyNat) :
                  n <= mn <= m.succ
                  theorem MyNat.le_trans (l m n : MyNat) :
                  l <= mm <= nl <= n
                  theorem MyNat.le_asym (n m : MyNat) :
                  n <= mm <= nn = m
                  theorem MyNat.le_total (n m : MyNat) :
                  n <= m m <= n
                  def MyNat.lt (n m : MyNat) :
                  Equations
                  Instances For
                    theorem MyNat.not_eq_succ (m n : MyNat) :
                    ¬m + n.succ = m
                    theorem MyNat.lt_le_succ (n m : MyNat) :
                    n < m n.succ <= m
                    theorem MyNat.lt_trans (l m n : MyNat) :
                    l < mm < nl < n
                    theorem MyNat.mul_elim (n m : MyNat) :
                    zero < nn * m = nm = 1
                    theorem MyNat.mul_eq_one (n m : MyNat) :
                    n * m = 1n = 1
                    def MyNat.divides (d n : MyNat) :
                    Equations
                    Instances For
                      theorem MyNat.divides_trans (d n m : MyNat) :
                      d nn md m
                      theorem MyNat.divides_assym (n m : MyNat) :
                      n mm nn = m
                      theorem MyNat.le1 {a b : MyNat} :
                      a + b <= ab = 0
                      theorem MyNat.mul_le {a b c : MyNat} :
                      a.succ * b <= a.succ * cb <= c
                      theorem MyNat.divides_elim {a b c d : MyNat} :
                      a + b = cd ad cd b
                      @[simp]
                      theorem MyNat.eq_dec1 (n m : MyNat) :
                      n.eq_dec m = true n = m
                      instance MyNat.eq_dec2 (n m : MyNat) :
                      Decidable (n = m)
                      Equations
                      • One or more equations did not get rendered due to their size.
                      def MyNat.mod (n m : MyNat) :
                      Equations
                      Instances For
                        theorem MyNat.mod_eq (n m : MyNat) :
                        ∃ (c : MyNat), c * m + n % m = n
                        theorem MyNat.mod_lt (n m : MyNat) :
                        0 < mn % m < m
                        @[simp]
                        @[simp]
                        theorem MyNat.add_mynat_nat (n m : ) :
                        @[simp]
                        theorem MyNat.add_nat_mynat (n m : MyNat) :
                        (n + m).toNat = n.toNat + m.toNat
                        theorem MyNat.add_tonat {n m : MyNat} :
                        (n + m).toNat = n.toNat + m.toNat
                        theorem MyNat.lt_tonat {n m : MyNat} :
                        n < mn.toNat.lt m.toNat
                        @[irreducible]
                        def MyNat.gcd (n m : MyNat) :
                        Equations
                        Instances For
                          theorem MyNat.ind_mynat1 (P : MyNatProp) :
                          (∀ (n : MyNat), (∀ (k : MyNat), k < nP k)P n)∀ (n k : MyNat), k <= nP k
                          theorem MyNat.zero_le (k : MyNat) :
                          theorem MyNat.ind_mynat (P : MyNatProp) :
                          (∀ (n : MyNat), (∀ (k : MyNat), k < nP k)P n)∀ (n : MyNat), P n
                          theorem MyNat.succ_le (a : MyNat) :
                          a < a.succ
                          theorem MyNat.gcd_linear (b a : MyNat) :
                          ∃ (p : MyNat) (q : MyNat) (r : MyNat) (s : MyNat), p * a + q * b = r * a + s * b + a.gcd b
                          theorem MyNat.gcd_greatest (b a d : MyNat) :
                          d ad bd a.gcd b
                          theorem MyNat.mod_le {a b : MyNat} :
                          a < ba % b = a
                          theorem MyNat.mod_aa {a : MyNat} :
                          a % a = zero
                          theorem MyNat.gcd_aa (a : MyNat) :
                          a.gcd a = a
                          theorem MyNat.gcd_divides_a_and_b {a b : MyNat} :
                          a.gcd b a a.gcd b b
                          theorem MyNat.gcd_unique {a b : MyNat} (g1 g2 : MyNat) :
                          g1 a g2 a g1 b g2 b(∀ (d : MyNat), d a d bd g1)(∀ (d : MyNat), d a d bd g2)g1 = g2
                          theorem MyNat.gcd_comm (a b : MyNat) :
                          a.gcd b = b.gcd a
                          theorem MyNat.gcd_assoc (a b c : MyNat) :
                          a.gcd (b.gcd c) = (a.gcd b).gcd c
                          Equations
                          Instances For
                            theorem MyNat.pabpapb (p a b : MyNat) :
                            p.is_primep a * bp a p b