File: .lake/packages/batteries/Batteries/Data/Nat/Lemmas.lean

full_name: Nat.recAux_zero
code: @[simp] theorem recAux_zero {motive : Nat → Sort _} (zero : motive 0)
    (succ : ∀ n, motive n → motive (n+1)) :
    Nat.recAux zero succ 0 = zero 
goal: Nat.recAux zero succ 0 = zero

full_name: Nat.recAux_succ
code: theorem recAux_succ {motive : Nat → Sort _} (zero : motive 0)
    (succ : ∀ n, motive n → motive (n+1)) (n) :
    Nat.recAux zero succ (n+1) = succ n (Nat.recAux zero succ n) 
goal: Nat.recAux zero succ (n + 1) = succ n (Nat.recAux zero succ n)

full_name: Nat.recAuxOn_zero
code: @[simp] theorem recAuxOn_zero {motive : Nat → Sort _} (zero : motive 0)
    (succ : ∀ n, motive n → motive (n+1)) :
    Nat.recAuxOn 0 zero succ = zero 
goal: Nat.recAuxOn 0 zero succ = zero

full_name: Nat.recAuxOn_succ
code: theorem recAuxOn_succ {motive : Nat → Sort _} (zero : motive 0)
    (succ : ∀ n, motive n → motive (n+1)) (n) :
    Nat.recAuxOn (n+1) zero succ = succ n (Nat.recAuxOn n zero succ) 
goal: Nat.recAuxOn (n + 1) zero succ = succ n (Nat.recAuxOn n zero succ)

full_name: Nat.casesAuxOn_zero
code: @[simp] theorem casesAuxOn_zero {motive : Nat → Sort _} (zero : motive 0)
    (succ : ∀ n, motive (n+1)) :
    Nat.casesAuxOn 0 zero succ = zero 
goal: Nat.casesAuxOn 0 zero succ = zero

full_name: Nat.casesAuxOn_succ
code: theorem casesAuxOn_succ {motive : Nat → Sort _} (zero : motive 0)
    (succ : ∀ n, motive (n+1)) (n) :
    Nat.casesAuxOn (n+1) zero succ = succ n 
goal: Nat.casesAuxOn (n + 1) zero succ = succ n

full_name: Nat.strongRec_eq
code: theorem strongRec_eq {motive : Nat → Sort _} (ind : ∀ n, (∀ m, m < n → motive m) → motive n)
    (t : Nat) : Nat.strongRec ind t = ind t fun m _ => Nat.strongRec ind m 
goal: Nat.strongRec ind t = ind t fun m x => Nat.strongRec ind m

full_name: Nat.strongRecOn_eq
code: theorem strongRecOn_eq {motive : Nat → Sort _} (ind : ∀ n, (∀ m, m < n → motive m) → motive n)
    (t : Nat) : Nat.strongRecOn t ind = ind t fun m _ => Nat.strongRecOn m ind 
goal: t.strongRecOn ind = ind t fun m x => m.strongRecOn ind

full_name: Nat.recDiagAux_zero_left
code: @[simp] theorem recDiagAux_zero_left {motive : Nat → Nat → Sort _}
    (zero_left : ∀ n, motive 0 n) (zero_right : ∀ m, motive m 0)
    (succ_succ : ∀ m n, motive m n → motive (m+1) (n+1)) (n) :
    Nat.recDiagAux zero_left zero_right succ_succ 0 n = zero_left n 
goal: Nat.recDiagAux zero_left zero_right succ_succ 0 n = zero_left n

full_name: Nat.recDiagAux_zero_right
code: @[simp] theorem recDiagAux_zero_right {motive : Nat → Nat → Sort _}
    (zero_left : ∀ n, motive 0 n) (zero_right : ∀ m, motive m 0)
    (succ_succ : ∀ m n, motive m n → motive (m+1) (n+1)) (m)
    (h : zero_left 0 = zero_right 0 := by first | assumption | trivial) :
    Nat.recDiagAux zero_left zero_right succ_succ m 0 = zero_right m 
goal: Nat.recDiagAux zero_left zero_right succ_succ m 0 = zero_right m

full_name: Nat.recDiagAux_succ_succ
code: theorem recDiagAux_succ_succ {motive : Nat → Nat → Sort _}
    (zero_left : ∀ n, motive 0 n) (zero_right : ∀ m, motive m 0)
    (succ_succ : ∀ m n, motive m n → motive (m+1) (n+1)) (m n) :
    Nat.recDiagAux zero_left zero_right succ_succ (m+1) (n+1)
      = succ_succ m n (Nat.recDiagAux zero_left zero_right succ_succ m n) 
goal: Nat.recDiagAux zero_left zero_right succ_succ (m + 1) (n + 1) =
  succ_succ m n (Nat.recDiagAux zero_left zero_right succ_succ m n)

full_name: Nat.recDiag_zero_zero
code: @[simp] theorem recDiag_zero_zero {motive : Nat → Nat → Sort _} (zero_zero : motive 0 0)
    (zero_succ : ∀ n, motive 0 n → motive 0 (n+1)) (succ_zero : ∀ m, motive m 0 → motive (m+1) 0)
    (succ_succ : ∀ m n, motive m n → motive (m+1) (n+1)) :
    Nat.recDiag (motive:=motive) zero_zero zero_succ succ_zero succ_succ 0 0 = zero_zero 
goal: Nat.recDiag zero_zero zero_succ succ_zero succ_succ 0 0 = zero_zero

full_name: Nat.recDiag_zero_succ
code: theorem recDiag_zero_succ {motive : Nat → Nat → Sort _} (zero_zero : motive 0 0)
    (zero_succ : ∀ n, motive 0 n → motive 0 (n+1)) (succ_zero : ∀ m, motive m 0 → motive (m+1) 0)
    (succ_succ : ∀ m n, motive m n → motive (m+1) (n+1)) (n) :
    Nat.recDiag zero_zero zero_succ succ_zero succ_succ 0 (n+1)
      = zero_succ n (Nat.recDiag zero_zero zero_succ succ_zero succ_succ 0 n) 
goal: Nat.recDiag zero_zero zero_succ succ_zero succ_succ 0 (n + 1) =
  zero_succ n (Nat.recDiag zero_zero zero_succ succ_zero succ_succ 0 n)

full_name: Nat.recDiag_succ_zero
code: theorem recDiag_succ_zero {motive : Nat → Nat → Sort _} (zero_zero : motive 0 0)
    (zero_succ : ∀ n, motive 0 n → motive 0 (n+1)) (succ_zero : ∀ m, motive m 0 → motive (m+1) 0)
    (succ_succ : ∀ m n, motive m n → motive (m+1) (n+1)) (m) :
    Nat.recDiag zero_zero zero_succ succ_zero succ_succ (m+1) 0
      = succ_zero m (Nat.recDiag zero_zero zero_succ succ_zero succ_succ m 0) 
goal: Nat.recDiag zero_zero zero_succ succ_zero succ_succ (m + 1) 0 =
  succ_zero m (Nat.recDiag zero_zero zero_succ succ_zero succ_succ m 0)

full_name: Nat.recDiag_succ_succ
code: theorem recDiag_succ_succ {motive : Nat → Nat → Sort _} (zero_zero : motive 0 0)
    (zero_succ : ∀ n, motive 0 n → motive 0 (n+1)) (succ_zero : ∀ m, motive m 0 → motive (m+1) 0)
    (succ_succ : ∀ m n, motive m n → motive (m+1) (n+1)) (m n) :
    Nat.recDiag zero_zero zero_succ succ_zero succ_succ (m+1) (n+1)
      = succ_succ m n (Nat.recDiag zero_zero zero_succ succ_zero succ_succ m n) 
goal: Nat.recDiag zero_zero zero_succ succ_zero succ_succ (m + 1) (n + 1) =
  succ_succ m n (Nat.recDiag zero_zero zero_succ succ_zero succ_succ m n)

full_name: Nat.recDiagOn_zero_zero
code: @[simp] theorem recDiagOn_zero_zero {motive : Nat → Nat → Sort _} (zero_zero : motive 0 0)
    (zero_succ : ∀ n, motive 0 n → motive 0 (n+1)) (succ_zero : ∀ m, motive m 0 → motive (m+1) 0)
    (succ_succ : ∀ m n, motive m n → motive (m+1) (n+1)) :
    Nat.recDiagOn (motive:=motive) 0 0 zero_zero zero_succ succ_zero succ_succ = zero_zero 
goal: Nat.recDiagOn 0 0 zero_zero zero_succ succ_zero succ_succ = zero_zero

full_name: Nat.recDiagOn_zero_succ
code: theorem recDiagOn_zero_succ {motive : Nat → Nat → Sort _} (zero_zero : motive 0 0)
    (zero_succ : ∀ n, motive 0 n → motive 0 (n+1)) (succ_zero : ∀ m, motive m 0 → motive (m+1) 0)
    (succ_succ : ∀ m n, motive m n → motive (m+1) (n+1)) (n) :
    Nat.recDiagOn 0 (n+1) zero_zero zero_succ succ_zero succ_succ
      = zero_succ n (Nat.recDiagOn 0 n zero_zero zero_succ succ_zero succ_succ) 
goal: Nat.recDiagOn 0 (n + 1) zero_zero zero_succ succ_zero succ_succ =
  zero_succ n (Nat.recDiagOn 0 n zero_zero zero_succ succ_zero succ_succ)

full_name: Nat.recDiagOn_succ_zero
code: theorem recDiagOn_succ_zero {motive : Nat → Nat → Sort _} (zero_zero : motive 0 0)
    (zero_succ : ∀ n, motive 0 n → motive 0 (n+1)) (succ_zero : ∀ m, motive m 0 → motive (m+1) 0)
    (succ_succ : ∀ m n, motive m n → motive (m+1) (n+1)) (m) :
    Nat.recDiagOn (m+1) 0 zero_zero zero_succ succ_zero succ_succ
      = succ_zero m (Nat.recDiagOn m 0 zero_zero zero_succ succ_zero succ_succ) 
goal: Nat.recDiagOn (m + 1) 0 zero_zero zero_succ succ_zero succ_succ =
  succ_zero m (Nat.recDiagOn m 0 zero_zero zero_succ succ_zero succ_succ)

full_name: Nat.recDiagOn_succ_succ
code: theorem recDiagOn_succ_succ {motive : Nat → Nat → Sort _} (zero_zero : motive 0 0)
    (zero_succ : ∀ n, motive 0 n → motive 0 (n+1)) (succ_zero : ∀ m, motive m 0 → motive (m+1) 0)
    (succ_succ : ∀ m n, motive m n → motive (m+1) (n+1)) (m n) :
    Nat.recDiagOn (m+1) (n+1) zero_zero zero_succ succ_zero succ_succ
      = succ_succ m n (Nat.recDiagOn m n zero_zero zero_succ succ_zero succ_succ) 
goal: Nat.recDiagOn (m + 1) (n + 1) zero_zero zero_succ succ_zero succ_succ =
  succ_succ m n (Nat.recDiagOn m n zero_zero zero_succ succ_zero succ_succ)

full_name: Nat.casesDiagOn_zero_zero
code: @[simp] theorem casesDiagOn_zero_zero {motive : Nat → Nat → Sort _} (zero_zero : motive 0 0)
    (zero_succ : ∀ n, motive 0 (n+1)) (succ_zero : ∀ m, motive (m+1) 0)
    (succ_succ : ∀ m n, motive (m+1) (n+1)) :
    Nat.casesDiagOn 0 0 (motive:=motive) zero_zero zero_succ succ_zero succ_succ = zero_zero 
goal: Nat.casesDiagOn 0 0 zero_zero zero_succ succ_zero succ_succ = zero_zero

full_name: Nat.casesDiagOn_zero_succ
code: @[simp] theorem casesDiagOn_zero_succ {motive : Nat → Nat → Sort _} (zero_zero : motive 0 0)
    (zero_succ : ∀ n, motive 0 (n+1)) (succ_zero : ∀ m, motive (m+1) 0)
    (succ_succ : ∀ m n, motive (m+1) (n+1)) (n) :
    Nat.casesDiagOn 0 (n+1) zero_zero zero_succ succ_zero succ_succ = zero_succ n 
goal: Nat.casesDiagOn 0 (n + 1) zero_zero zero_succ succ_zero succ_succ = zero_succ n

full_name: Nat.casesDiagOn_succ_zero
code: @[simp] theorem casesDiagOn_succ_zero {motive : Nat → Nat → Sort _} (zero_zero : motive 0 0)
    (zero_succ : ∀ n, motive 0 (n+1)) (succ_zero : ∀ m, motive (m+1) 0)
    (succ_succ : ∀ m n, motive (m+1) (n+1)) (m) :
    Nat.casesDiagOn (m+1) 0 zero_zero zero_succ succ_zero succ_succ = succ_zero m 
goal: Nat.casesDiagOn (m + 1) 0 zero_zero zero_succ succ_zero succ_succ = succ_zero m

full_name: Nat.casesDiagOn_succ_succ
code: @[simp] theorem casesDiagOn_succ_succ {motive : Nat → Nat → Sort _} (zero_zero : motive 0 0)
    (zero_succ : ∀ n, motive 0 (n+1)) (succ_zero : ∀ m, motive (m+1) 0)
    (succ_succ : ∀ m n, motive (m+1) (n+1)) (m n) :
    Nat.casesDiagOn (m+1) (n+1) zero_zero zero_succ succ_zero succ_succ = succ_succ m n 
goal: Nat.casesDiagOn (m + 1) (n + 1) zero_zero zero_succ succ_zero succ_succ = succ_succ m n

full_name: Nat.lt_sum_ge
code: /-- Strong case analysis on `a < b ∨ b ≤ a` -/
protected def lt_sum_ge (a b : Nat) : a < b ⊕' b ≤ a 
goal: a < b ⊕' b ≤ a

full_name: Nat.sum_trichotomy
code: /-- Strong case analysis on `a < b ∨ a = b ∨ b < a` -/
protected def sum_trichotomy (a b : Nat) : a < b ⊕' a = b ⊕' b < a 
goal: a < b ⊕' a = b ⊕' b < a

full_name: Nat.sum_nil
code: @[simp] theorem sum_nil : Nat.sum [] = 0 
goal: Nat.sum [] = 0

full_name: Nat.sum_cons
code: @[simp] theorem sum_cons : Nat.sum (a :: l) = a + Nat.sum l 
goal: Nat.sum (a :: l) = a + Nat.sum l

full_name: Nat.sum_append
code: @[simp] theorem sum_append : Nat.sum (l₁ ++ l₂) = Nat.sum l₁ + Nat.sum l₂ 
goal: Nat.sum (l₁ ++ l₂) = Nat.sum l₁ + Nat.sum l₂