Documentation

LeanPool.PointwiseComposition.Foundation.Vorspiel.Arithmetic

Supporting results for pointwise provable equality.

The is Eq Nat construction in Nat.

Equations
Instances For

    The is Lt Nat construction in Nat.

    Equations
    Instances For

      The is Le Nat construction in Nat.

      Equations
      Instances For

        The is Dvd Nat construction in Nat.

        Equations
        Instances For
          @[simp]
          theorem PointwiseComposition.Nat.inv_ne_zero {n : ℕ} (h : n ≠ 0) :
          inv n = 0
          @[simp]
          theorem PointwiseComposition.Nat.pos_ne_zero {n : ℕ} (h : n ≠ 0) :
          pos n = 1

          The and construction in Nat.

          Equations
          Instances For

            The or construction in Nat.

            Equations
            Instances For
              theorem PointwiseComposition.Nat.and_eq (n m : ℕ) :
              and n m = if 0 < n ∧ 0 < m then 1 else 0
              theorem PointwiseComposition.Nat.and_eq_one (n m : ℕ) :
              and n m = 1 ↔ 0 < n ∧ 0 < m
              theorem PointwiseComposition.Nat.or_eq (n m : ℕ) :
              or n m = if 0 < n ∨ 0 < m then 1 else 0
              @[simp]
              theorem PointwiseComposition.Nat.and_pos_iff (n m : ℕ) :
              0 < and n m ↔ 0 < n ∧ 0 < m
              @[simp]
              theorem PointwiseComposition.Nat.orNat_pos_iff (n m : ℕ) :
              0 < or n m ↔ 0 < n ∨ 0 < m
              @[simp]

              The ball construction in Nat.

              Equations
              Instances For
                @[simp]
                theorem PointwiseComposition.Nat.ball_pos_iff {φ : ℕ → ℕ} {n : ℕ} :
                0 < ball n φ ↔ ∀ m < n, 0 < φ m
                @[simp]
                theorem PointwiseComposition.Nat.ball_eq_zero_iff {φ : ℕ → ℕ} {n : ℕ} :
                ball n φ = 0 ↔ ∃ m < n, φ m = 0
                theorem PointwiseComposition.Nat.ball_pos_iff_eq_one {φ : ℕ → ℕ} {n : ℕ} :
                ball n φ = 1 ↔ 0 < ball n φ

                Data and laws for Arith Part₁ in Nat.

                Instances For
                  theorem PointwiseComposition.Nat.ArithPart₁.bind {n : ℕ} (f : List.Vector ℕ n → ℕ →. ℕ) (hf : ArithPart₁ fun (v : List.Vector ℕ (n + 1)) => f v.tail v.head) {g : List.Vector ℕ n →. ℕ} (hg : ArithPart₁ g) :
                  ArithPart₁ fun (v : List.Vector ℕ n) => (g v).bind (f v)
                  theorem PointwiseComposition.Nat.ArithPart₁.map {n : ℕ} (f : List.Vector ℕ n → ℕ → ℕ) (hf : Arithmetic₁ fun (v : List.Vector ℕ (n + 1)) => f v.tail v.head) {g : List.Vector ℕ n →. ℕ} (hg : ArithPart₁ g) :
                  ArithPart₁ fun (v : List.Vector ℕ n) => Part.map (f v) (g v)
                  theorem PointwiseComposition.Nat.ArithPart₁.comp₁ (f : ℕ →. ℕ) (hf : ArithPart₁ fun (v : List.Vector ℕ 1) => f (v.get 0)) {n : ℕ} {g : List.Vector ℕ n → ℕ} (hg : Arithmetic₁ g) :
                  ArithPart₁ fun (v : List.Vector ℕ n) => f (g v)
                  theorem PointwiseComposition.Nat.ArithPart₁.comp₂ (f : ℕ → ℕ →. ℕ) (hf : ArithPart₁ fun (v : List.Vector ℕ 2) => f (v.get 0) (v.get 1)) {n : ℕ} {g h : List.Vector ℕ n → ℕ} (hg : Arithmetic₁ g) (hh : Arithmetic₁ h) :
                  ArithPart₁ fun (v : List.Vector ℕ n) => f (g v) (h v)
                  theorem PointwiseComposition.Nat.ArithPart₁.rfind' {n : ℕ} {f : ℕ → List.Vector ℕ n → ℕ} (h : Arithmetic₁ fun (v : List.Vector ℕ (n + 1)) => f v.head v.tail) :
                  ArithPart₁ fun (v : List.Vector ℕ n) => Nat.rfind fun (n : ℕ) => Part.some (decide (f n v = 0))
                  theorem PointwiseComposition.Nat.ArithPart₁.rfind'₁ {n : ℕ} (i : Fin n) {f : ℕ → ℕ → ℕ} (h : Arithmetic₁ fun (v : List.Vector ℕ 2) => f (v.get 0) (v.get 1)) :
                  ArithPart₁ fun (v : List.Vector ℕ n) => Nat.rfind fun (n_1 : ℕ) => Part.some (decide (f n_1 (v.get i) = 0))
                  theorem PointwiseComposition.Nat.Arithmetic₁.of_eq {n : ℕ} {f g : List.Vector ℕ n → ℕ} (hf : Arithmetic₁ f) (H : ∀ (i : List.Vector ℕ n), f i = g i) :
                  theorem PointwiseComposition.Nat.Arithmetic₁.comp {m n : ℕ} {f : List.Vector ℕ n → ℕ} (g : Fin n → List.Vector ℕ m → ℕ) (hf : Arithmetic₁ f) (hg : ∀ (i : Fin n), Arithmetic₁ (g i)) :
                  Arithmetic₁ fun (v : List.Vector ℕ m) => f (List.Vector.ofFn fun (i : Fin n) => g i v)
                  theorem PointwiseComposition.Nat.Arithmetic₁.cons {n m : ℕ} {f : List.Vector ℕ n → ℕ} {g : List.Vector ℕ n → List.Vector ℕ m} (hf : Arithmetic₁ f) (hg : Vec g) :
                  Vec fun (v : List.Vector ℕ n) => f v ::ᵥ g v
                  theorem PointwiseComposition.Nat.Arithmetic₁.comp' {n m : ℕ} {f : List.Vector ℕ m → ℕ} {g : List.Vector ℕ n → List.Vector ℕ m} (hf : Arithmetic₁ f) (hg : Vec g) :
                  Arithmetic₁ fun (v : List.Vector ℕ n) => f (g v)
                  theorem PointwiseComposition.Nat.Arithmetic₁.comp₁ (f : ℕ → ℕ) (hf : Arithmetic₁ fun (v : List.Vector ℕ 1) => f (v.get 0)) {n : ℕ} {g : List.Vector ℕ n → ℕ} (hg : Arithmetic₁ g) :
                  Arithmetic₁ fun (v : List.Vector ℕ n) => f (g v)
                  theorem PointwiseComposition.Nat.Arithmetic₁.comp₂ (f : ℕ → ℕ → ℕ) (hf : Arithmetic₁ fun (v : List.Vector ℕ 2) => f (v.get 0) (v.get 1)) {n : ℕ} {g h : List.Vector ℕ n → ℕ} (hg : Arithmetic₁ g) (hh : Arithmetic₁ h) :
                  Arithmetic₁ fun (v : List.Vector ℕ n) => f (g v) (h v)
                  theorem PointwiseComposition.Nat.Arithmetic₁.if_pos {n : ℕ} {f g h : List.Vector ℕ n → ℕ} (hf : Arithmetic₁ f) (hg : Arithmetic₁ g) (hh : Arithmetic₁ h) :
                  Arithmetic₁ fun (v : List.Vector ℕ n) => if 0 < f v then g v else h v
                  theorem PointwiseComposition.Nat.ArithPart₁.rfindPos {n : ℕ} {f : List.Vector ℕ (n + 1) → ℕ} (h : Arithmetic₁ f) :
                  ArithPart₁ fun (v : List.Vector ℕ n) => Nat.rfind fun (n_1 : ℕ) => Part.some (decide (0 < f (n_1 ::ᵥ v)))
                  theorem PointwiseComposition.Nat.ArithPart₁.rfindPos₁ {n : ℕ} (i : Fin n) {f : ℕ → ℕ → ℕ} (h : Arithmetic₁ fun (v : List.Vector ℕ 2) => f (v.get 0) (v.get 1)) :
                  ArithPart₁ fun (v : List.Vector ℕ n) => Nat.rfind fun (n_1 : ℕ) => Part.some (decide (0 < f n_1 (v.get i)))
                  theorem PointwiseComposition.Nat.ArithPart₁.inv_fun {n : ℕ} (i : Fin n) (f : ℕ → ℕ) (hf : Arithmetic₁ fun (v : List.Vector ℕ 1) => f (v.get 0)) :
                  ArithPart₁ fun (v : List.Vector ℕ n) => Nat.rfind fun (x : ℕ) => Part.some (decide (f x ≤ v.get i ∧ v.get i < f (x + 1)))
                  theorem PointwiseComposition.Nat.ArithPart₁.implicit_fun {n : ℕ} (i : Fin n) (f : List.Vector ℕ n → ℕ → ℕ) (hf : Arithmetic₁ fun (v : List.Vector ℕ (n + 1)) => f v.tail v.head) :
                  ArithPart₁ fun (v : List.Vector ℕ n) => Nat.rfind fun (x : ℕ) => Part.some (decide (f v x ≤ v.get i ∧ v.get i < f v (x + 1)))
                  theorem PointwiseComposition.Nat.Arithmetic₁.ball {n : ℕ} {φ : List.Vector ℕ n → ℕ → ℕ} (hp : Arithmetic₁ fun (v : List.Vector ℕ (n + 1)) => φ v.tail v.head) (i : Fin n) :
                  Arithmetic₁ fun (v : List.Vector ℕ n) => Nat.ball (v.get i) (φ v)

                  The rec Sequence construction in Nat.Arithmetic₁.

                  Equations
                  Instances For
                    theorem PointwiseComposition.Nat.Arithmetic₁.beta_unbeta_recSequence_eq {n : ℕ} (f : List.Vector ℕ n → ℕ) (g : List.Vector ℕ (n + 2) → ℕ) (z : ℕ) (v : List.Vector ℕ n) (m : ℕ) (hm : m < z + 1) :
                    (Nat.unbeta (recSequence f g z v)).beta m = Nat.rec (f v) (fun (y IH : ℕ) => g (y ::ᵥ IH ::ᵥ v)) m
                    theorem PointwiseComposition.Nat.Arithmetic₁.beta_unbeta_recSequence_succ {n : ℕ} (f : List.Vector ℕ n → ℕ) (g : List.Vector ℕ (n + 2) → ℕ) (z : ℕ) (v : List.Vector ℕ n) {m : ℕ} (hm : m < z) :
                    (Nat.unbeta (recSequence f g z v)).beta (m + 1) = g (m ::ᵥ (Nat.unbeta (recSequence f g z v)).beta m ::ᵥ v)
                    theorem PointwiseComposition.Nat.Arithmetic₁.beta_eq_rec {n m : ℕ} (f : List.Vector ℕ n → ℕ) (g : List.Vector ℕ (n + 2) → ℕ) {z : ℕ} {v : List.Vector ℕ n} (h0 : z.beta 0 = f v) (hs : ∀ i < m, z.beta (i + 1) = g (i ::ᵥ z.beta i ::ᵥ v)) :
                    z.beta m = Nat.rec (f v) (fun (y IH : ℕ) => g (y ::ᵥ IH ::ᵥ v)) m
                    theorem PointwiseComposition.Nat.Arithmetic₁.prec {n : ℕ} {f : List.Vector ℕ n → ℕ} {g : List.Vector ℕ (n + 2) → ℕ} (hf : Arithmetic₁ f) (hg : Arithmetic₁ g) :
                    Arithmetic₁ fun (v : List.Vector ℕ (n + 1)) => Nat.rec (f v.tail) (fun (y IH : ℕ) => g (y ::ᵥ IH ::ᵥ v.tail)) v.head

                    Data and laws for Code in Nat.ArithPart₁.

                    Instances For

                      Data and laws for eval in Nat.ArithPart₁.Code.

                      Instances For